Changeset 254408 in webkit
- Timestamp:
- Jan 11, 2020 5:25:25 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r254406 r254408 1 2020-01-10 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [WebCore] Fix crash in module loader due to change in fragment reservation 4 https://bugs.webkit.org/show_bug.cgi?id=206125 5 6 Reviewed by Dean Jackson. 7 8 * TestExpectations: 9 1 10 2020-01-11 Noam Rosenthal <noam@webkit.org> 2 11 -
trunk/LayoutTests/TestExpectations
r254373 r254408 339 339 imported/w3c/web-platform-tests/html/infrastructure/urls/resolving-urls/query-encoding/utf-8.html [ Skip ] 340 340 imported/w3c/web-platform-tests/html/browsers/browsing-the-web/history-traversal/browsing_context_name_cross_origin_2.html [ Skip ] 341 imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url.html [ Skip ]342 341 imported/w3c/web-platform-tests/html/browsers/offline/application-cache-api/api_update.https.html [ Skip ] 343 342 imported/w3c/web-platform-tests/cors/image-tainting-in-cross-origin-iframe.sub.html [ Skip ] -
trunk/LayoutTests/imported/w3c/ChangeLog
r254399 r254408 1 2020-01-10 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [WebCore] Fix crash in module loader due to change in fragment reservation 4 https://bugs.webkit.org/show_bug.cgi?id=206125 5 6 Reviewed by Dean Jackson. 7 8 * web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url-expected.txt: 9 1 10 2020-01-11 Cathie Chen <cathiechen@igalia.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/module/import-meta/import-meta-url-expected.txt
r249886 r254408 1 2 PASS import.meta.url in a root inline script 3 PASS import.meta.url in a root external script 4 PASS import.meta.url in a dependent external script 5 PASS import.meta is an object 6 PASS import.meta is extensible 7 PASS import.meta's properties are writable, configurable, and enumerable 8 PASS import.meta.url when importing the module with different fragments 9 -
trunk/Source/WebCore/ChangeLog
r254407 r254408 1 2020-01-10 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [WebCore] Fix crash in module loader due to change in fragment reservation 4 https://bugs.webkit.org/show_bug.cgi?id=206125 5 6 Reviewed by Dean Jackson. 7 8 At some point, CachedResource::url() starts returning URL without fragment. 9 However, this was invariant in ScriptModuleLoader, so one of WPT test is crashing. 10 11 We save source URL so that we preserve fragment information. 12 Still we need to have fragment information after the redirect to fix a bug filed in [1]. 13 14 [1]: https://bugs.webkit.org/show_bug.cgi?id=205294 15 16 * bindings/js/CachedModuleScriptLoader.cpp: 17 (WebCore::CachedModuleScriptLoader::load): 18 * bindings/js/CachedModuleScriptLoader.h: 19 * bindings/js/ScriptModuleLoader.cpp: 20 (WebCore::ScriptModuleLoader::notifyFinished): 21 1 22 2020-01-11 Zalan Bujtas <zalan@apple.com> 2 23 -
trunk/Source/WebCore/bindings/js/CachedModuleScriptLoader.cpp
r250735 r254408 69 69 if (!m_cachedScript) 70 70 return false; 71 m_sourceURL = sourceURL; 71 72 72 73 // If the content is already cached, this immediately calls notifyFinished. -
trunk/Source/WebCore/bindings/js/CachedModuleScriptLoader.h
r238771 r254408 31 31 #include <wtf/RefCounted.h> 32 32 #include <wtf/RefPtr.h> 33 #include <wtf/URL.h> 33 34 34 35 namespace WebCore { … … 53 54 CachedScript* cachedScript() { return m_cachedScript.get(); } 54 55 ModuleFetchParameters* parameters() { return m_parameters.get(); } 56 const URL& sourceURL() const { return m_sourceURL; } 55 57 56 58 void clearClient() … … 70 72 RefPtr<ModuleFetchParameters> m_parameters; 71 73 CachedResourceHandle<CachedScript> m_cachedScript; 74 URL m_sourceURL; 72 75 }; 73 76 -
trunk/Source/WebCore/bindings/js/ScriptModuleLoader.cpp
r251698 r254408 282 282 // https://html.spec.whatwg.org/multipage/webappapis.html#fetch-a-single-module-script 283 283 284 URL sourceURL = loader.sourceURL(); 284 285 if (!m_loaders.remove(&loader)) 285 286 return; … … 318 319 } 319 320 320 m_requestURLToResponseURLMap.add( cachedScript.url(), cachedScript.response().url());321 m_requestURLToResponseURLMap.add(WTFMove(sourceURL), cachedScript.response().url()); 321 322 promise->resolveWithCallback([&] (JSDOMGlobalObject& jsGlobalObject) { 322 323 return JSC::JSSourceCode::create(jsGlobalObject.vm(),
Note: See TracChangeset
for help on using the changeset viewer.