Changeset 205383 in webkit
- Timestamp:
- Sep 2, 2016, 4:25:00 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r205382 r205383 1 2016-09-02 Ryosuke Niwa <rniwa@webkit.org> 2 3 Temporarily break customElements.whenDefined to remove flaky crashes 4 https://bugs.webkit.org/show_bug.cgi?id=161555 5 6 Reviewed by Chris Dumez. 7 8 Rebaseline the test now that some test cases are failing due to the partial rollout. 9 10 * fast/custom-elements/CustomElementRegistry-expected.txt: 11 1 12 2016-09-02 Ryan Haddad <ryanhaddad@apple.com> 2 13 -
trunk/LayoutTests/fast/custom-elements/CustomElementRegistry-expected.txt
r205340 r205383 30 30 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 31 31 PASS customElements.get return the constructor of the entry with the given name when there is a matching entry. 32 PASS customElements.whenDefined must return a promise for a valid custom element name 32 FAIL customElements.whenDefined must return a promise for a valid custom element name assert_true: expected true got false 33 33 PASS customElements.whenDefined must return the same promise each time invoked for a valid custom element name which has not been defined 34 PASS customElements.whenDefined must return an unresolved promise when the registry does not contain the entry with the given name 34 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') 35 35 PASS customElements.whenDefined must return a rejected promise when the given name is not a valid custom element name 36 36 PASS customElements.whenDefined must return a resolved promise when the registry contains the entry with the given name 37 37 PASS customElements.whenDefined must return a new resolved promise each time invoked when the registry contains the entry with the given name 38 PASS A promise returned by customElements.whenDefined must be resolved by "define" 38 FAIL A promise returned by customElements.whenDefined must be resolved by "define" undefined is not an object (evaluating 'promise.then') 39 39 -
trunk/Source/WebCore/ChangeLog
r205382 r205383 1 2016-09-02 Ryosuke Niwa <rniwa@webkit.org> 2 3 Temporarily break customElements.whenDefined to remove flaky crashes 4 https://bugs.webkit.org/show_bug.cgi?id=161555 5 6 Reviewed by Chris Dumez. 7 8 Remove HashMap of DeferredWrapper which causes a crash during destruction. 9 This breaks the semantics of "whenDefined" for now. 10 11 * bindings/js/JSCustomElementRegistryCustom.cpp: 12 (WebCore::whenDefinedPromise): 13 * dom/CustomElementRegistry.cpp: 14 (WebCore::CustomElementRegistry::addElementDefinition): 15 * dom/CustomElementRegistry.h: 16 (WebCore::CustomElementRegistry::promiseMap): Deleted. 17 1 18 2016-09-02 Ryan Haddad <ryanhaddad@apple.com> 2 19 Unreviewed, rolling out r205373. -
trunk/Source/WebCore/bindings/js/JSCustomElementRegistryCustom.cpp
r205340 r205383 183 183 } 184 184 185 auto result = registry.promiseMap().ensure(localName, [&] { 186 return DeferredWrapper::create(&state, &globalObject, JSPromiseDeferred::create(&state, &globalObject)); 187 }); 188 189 return result.iterator->value->promise(); 185 return jsUndefined(); 190 186 } 191 187 -
trunk/Source/WebCore/dom/CustomElementRegistry.cpp
r205340 r205383 79 79 if (auto* document = m_window.document()) 80 80 enqueueUpgradeInShadowIncludingTreeOrder(*document, elementInterface.get()); 81 82 if (auto promise = m_promiseMap.take(localName))83 promise.value()->resolve(nullptr);84 81 } 85 82 -
trunk/Source/WebCore/dom/CustomElementRegistry.h
r205340 r205383 67 67 JSC::JSValue get(const AtomicString&); 68 68 69 HashMap<AtomicString, Ref<DeferredWrapper>>& promiseMap() { return m_promiseMap; }70 71 69 private: 72 70 CustomElementRegistry(DOMWindow&); … … 75 73 HashMap<AtomicString, Ref<JSCustomElementInterface>> m_nameMap; 76 74 HashMap<const JSC::JSObject*, JSCustomElementInterface*> m_constructorMap; 77 HashMap<AtomicString, Ref<DeferredWrapper>> m_promiseMap;78 75 79 76 bool m_elementDefinitionIsRunning { false };
Note:
See TracChangeset
for help on using the changeset viewer.