Title: [206074] trunk/Source/WebCore
Revision
206074
Author
ddkil...@apple.com
Date
2016-09-17 04:14:38 -0700 (Sat, 17 Sep 2016)

Log Message

MainThreadBridge needs an isolatedCopy() of SecurityOrigin
<https://webkit.org/b/162116>
<rdar://problem/27525870>

Reviewed by Carlos Garcia Campos.

Covered by existing tests.

* loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
Make an isolatedCopy() of SecurityOrigin here since that's the
correct idiom to use when the object is passed from a worker
thread back to the main thread.  Fix suggested by Daniel Bates.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (206073 => 206074)


--- trunk/Source/WebCore/ChangeLog	2016-09-17 10:53:08 UTC (rev 206073)
+++ trunk/Source/WebCore/ChangeLog	2016-09-17 11:14:38 UTC (rev 206074)
@@ -1,3 +1,19 @@
+2016-09-17  David Kilzer  <ddkil...@apple.com>
+
+        MainThreadBridge needs an isolatedCopy() of SecurityOrigin
+        <https://webkit.org/b/162116>
+        <rdar://problem/27525870>
+
+        Reviewed by Carlos Garcia Campos.
+
+        Covered by existing tests.
+
+        * loader/WorkerThreadableLoader.cpp:
+        (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
+        Make an isolatedCopy() of SecurityOrigin here since that's the
+        correct idiom to use when the object is passed from a worker
+        thread back to the main thread.  Fix suggested by Daniel Bates.
+
 2016-09-16  Yusuke Suzuki  <utatane....@gmail.com>
 
         [DFG] Introduce IsCellWithType node and unify IsJSArray, IsRegExpObject and newly added IsProxyObject

Modified: trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp (206073 => 206074)


--- trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp	2016-09-17 10:53:08 UTC (rev 206073)
+++ trunk/Source/WebCore/loader/WorkerThreadableLoader.cpp	2016-09-17 11:14:38 UTC (rev 206074)
@@ -108,7 +108,7 @@
     ASSERT(securityOrigin);
     ASSERT(contentSecurityPolicy);
 
-    auto contentSecurityPolicyCopy = std::make_unique<ContentSecurityPolicy>(*securityOrigin);
+    auto contentSecurityPolicyCopy = std::make_unique<ContentSecurityPolicy>(securityOrigin->isolatedCopy());
     contentSecurityPolicyCopy->copyStateFrom(contentSecurityPolicy);
 
     auto optionsCopy = std::make_unique<LoaderTaskOptions>(options, request.httpReferrer().isNull() ? outgoingReferrer : request.httpReferrer(), *securityOrigin);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to