Title: [205383] trunk
- Revision
- 205383
- Author
- [email protected]
- Date
- 2016-09-02 16:25:00 -0700 (Fri, 02 Sep 2016)
Log Message
Temporarily break customElements.whenDefined to remove flaky crashes
https://bugs.webkit.org/show_bug.cgi?id=161555
Reviewed by Chris Dumez.
Source/WebCore:
Remove HashMap of DeferredWrapper which causes a crash during destruction.
This breaks the semantics of "whenDefined" for now.
* bindings/js/JSCustomElementRegistryCustom.cpp:
(WebCore::whenDefinedPromise):
* dom/CustomElementRegistry.cpp:
(WebCore::CustomElementRegistry::addElementDefinition):
* dom/CustomElementRegistry.h:
(WebCore::CustomElementRegistry::promiseMap): Deleted.
LayoutTests:
Rebaseline the test now that some test cases are failing due to the partial rollout.
* fast/custom-elements/CustomElementRegistry-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (205382 => 205383)
--- trunk/LayoutTests/ChangeLog 2016-09-02 23:18:48 UTC (rev 205382)
+++ trunk/LayoutTests/ChangeLog 2016-09-02 23:25:00 UTC (rev 205383)
@@ -1,3 +1,14 @@
+2016-09-02 Ryosuke Niwa <[email protected]>
+
+ Temporarily break customElements.whenDefined to remove flaky crashes
+ https://bugs.webkit.org/show_bug.cgi?id=161555
+
+ Reviewed by Chris Dumez.
+
+ Rebaseline the test now that some test cases are failing due to the partial rollout.
+
+ * fast/custom-elements/CustomElementRegistry-expected.txt:
+
2016-09-02 Ryan Haddad <[email protected]>
Unreviewed, rolling out r205373.
Modified: trunk/LayoutTests/fast/custom-elements/CustomElementRegistry-expected.txt (205382 => 205383)
--- trunk/LayoutTests/fast/custom-elements/CustomElementRegistry-expected.txt 2016-09-02 23:18:48 UTC (rev 205382)
+++ trunk/LayoutTests/fast/custom-elements/CustomElementRegistry-expected.txt 2016-09-02 23:25:00 UTC (rev 205383)
@@ -29,11 +29,11 @@
PASS customElements.get must return undefined when the registry does not contain an entry with the given name
PASS customElements.get must return undefined when the registry does not contain an entry with the given name even if the name was not a valid custom element name
PASS customElements.get return the constructor of the entry with the given name when there is a matching entry.
-PASS customElements.whenDefined must return a promise for a valid custom element name
+FAIL customElements.whenDefined must return a promise for a valid custom element name assert_true: expected true got false
PASS customElements.whenDefined must return the same promise each time invoked for a valid custom element name which has not been defined
-PASS customElements.whenDefined must return an unresolved promise when the registry does not contain the entry with the given name
+FAIL customElements.whenDefined must return an unresolved promise when the registry does not contain the entry with the given name undefined is not an object (evaluating 'customElements.whenDefined('a-b').then')
PASS customElements.whenDefined must return a rejected promise when the given name is not a valid custom element name
PASS customElements.whenDefined must return a resolved promise when the registry contains the entry with the given name
PASS customElements.whenDefined must return a new resolved promise each time invoked when the registry contains the entry with the given name
-PASS A promise returned by customElements.whenDefined must be resolved by "define"
+FAIL A promise returned by customElements.whenDefined must be resolved by "define" undefined is not an object (evaluating 'promise.then')
Modified: trunk/Source/WebCore/ChangeLog (205382 => 205383)
--- trunk/Source/WebCore/ChangeLog 2016-09-02 23:18:48 UTC (rev 205382)
+++ trunk/Source/WebCore/ChangeLog 2016-09-02 23:25:00 UTC (rev 205383)
@@ -1,3 +1,20 @@
+2016-09-02 Ryosuke Niwa <[email protected]>
+
+ Temporarily break customElements.whenDefined to remove flaky crashes
+ https://bugs.webkit.org/show_bug.cgi?id=161555
+
+ Reviewed by Chris Dumez.
+
+ Remove HashMap of DeferredWrapper which causes a crash during destruction.
+ This breaks the semantics of "whenDefined" for now.
+
+ * bindings/js/JSCustomElementRegistryCustom.cpp:
+ (WebCore::whenDefinedPromise):
+ * dom/CustomElementRegistry.cpp:
+ (WebCore::CustomElementRegistry::addElementDefinition):
+ * dom/CustomElementRegistry.h:
+ (WebCore::CustomElementRegistry::promiseMap): Deleted.
+
2016-09-02 Ryan Haddad <[email protected]>
Unreviewed, rolling out r205373.
Modified: trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp (205382 => 205383)
--- trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp 2016-09-02 23:18:48 UTC (rev 205382)
+++ trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp 2016-09-02 23:25:00 UTC (rev 205383)
@@ -182,11 +182,7 @@
return jsPromise.promise();
}
- auto result = registry.promiseMap().ensure(localName, [&] {
- return DeferredWrapper::create(&state, &globalObject, JSPromiseDeferred::create(&state, &globalObject));
- });
-
- return result.iterator->value->promise();
+ return jsUndefined();
}
JSValue JSCustomElementRegistry::whenDefined(ExecState& state)
Modified: trunk/Source/WebCore/dom/CustomElementRegistry.cpp (205382 => 205383)
--- trunk/Source/WebCore/dom/CustomElementRegistry.cpp 2016-09-02 23:18:48 UTC (rev 205382)
+++ trunk/Source/WebCore/dom/CustomElementRegistry.cpp 2016-09-02 23:25:00 UTC (rev 205383)
@@ -78,9 +78,6 @@
if (auto* document = m_window.document())
enqueueUpgradeInShadowIncludingTreeOrder(*document, elementInterface.get());
-
- if (auto promise = m_promiseMap.take(localName))
- promise.value()->resolve(nullptr);
}
JSCustomElementInterface* CustomElementRegistry::findInterface(const Element& element) const
Modified: trunk/Source/WebCore/dom/CustomElementRegistry.h (205382 => 205383)
--- trunk/Source/WebCore/dom/CustomElementRegistry.h 2016-09-02 23:18:48 UTC (rev 205382)
+++ trunk/Source/WebCore/dom/CustomElementRegistry.h 2016-09-02 23:25:00 UTC (rev 205383)
@@ -66,8 +66,6 @@
JSC::JSValue get(const AtomicString&);
- HashMap<AtomicString, Ref<DeferredWrapper>>& promiseMap() { return m_promiseMap; }
-
private:
CustomElementRegistry(DOMWindow&);
@@ -74,7 +72,6 @@
DOMWindow& m_window;
HashMap<AtomicString, Ref<JSCustomElementInterface>> m_nameMap;
HashMap<const JSC::JSObject*, JSCustomElementInterface*> m_constructorMap;
- HashMap<AtomicString, Ref<DeferredWrapper>> m_promiseMap;
bool m_elementDefinitionIsRunning { false };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes