ASSERTION FAILED: m_timeOrigin in Performance::Performance()
https://bugs.webkit.org/show_bug.cgi?id=182558
<rdar://problem/37297551>
Patch by Youenn Fablet <youenn@apple.com> on 2018-02-07
Reviewed by Chris Dumez.
Source/WebCore:
Test: http/wpt/fetch/cors-preflight-star.any.serviceworker.html
* loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::startPreflight):
LayoutTests:
Make use of WPT cors-preflight-star.any.js test in service worker.
This test should be removed once WPT will run any.js tests in service workers as well as workers and window.
* http/wpt/service-workers/cors-preflight-star.any.js: Added.
* http/wpt/service-workers/cors-preflight-star.any.serviceworker-expected.txt: Added.
* http/wpt/service-workers/cors-preflight-star.any.serviceworker.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@228241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog
index 8a7e96f..9c2b5a1 100644
--- a/Source/WebCore/ChangeLog
+++ b/Source/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2018-02-07 Youenn Fablet <youenn@apple.com>
+
+ ASSERTION FAILED: m_timeOrigin in Performance::Performance()
+ https://bugs.webkit.org/show_bug.cgi?id=182558
+ <rdar://problem/37297551>
+
+ Reviewed by Chris Dumez.
+
+ Test: http/wpt/fetch/cors-preflight-star.any.serviceworker.html
+
+ * loader/CrossOriginPreflightChecker.cpp:
+ (WebCore::CrossOriginPreflightChecker::startPreflight):
+
2018-02-07 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION(r226396): File paths are inserted when dropping image files
diff --git a/Source/WebCore/loader/CrossOriginPreflightChecker.cpp b/Source/WebCore/loader/CrossOriginPreflightChecker.cpp
index 9aa9b61..37ab471 100644
--- a/Source/WebCore/loader/CrossOriginPreflightChecker.cpp
+++ b/Source/WebCore/loader/CrossOriginPreflightChecker.cpp
@@ -108,6 +108,7 @@
options.referrerPolicy = m_loader.options().referrerPolicy;
options.contentSecurityPolicyImposition = ContentSecurityPolicyImposition::SkipPolicyCheck;
options.serviceWorkersMode = ServiceWorkersMode::None;
+ options.initiatorContext = m_loader.options().initiatorContext;
CachedResourceRequest preflightRequest(createAccessControlPreflightRequest(m_request, m_loader.securityOrigin(), m_loader.referrer()), options);
if (RuntimeEnabledFeatures::sharedFeatures().resourceTimingEnabled())