Title: [186592] trunk/Source/WebCore
Revision
186592
Author
da...@apple.com
Date
2015-07-09 08:27:43 -0700 (Thu, 09 Jul 2015)

Log Message

REGRESSION (r182866): repeated prompts for password on internal Apple website using workers
https://bugs.webkit.org/show_bug.cgi?id=146769

Reviewed by Sam Weinig.

Not sure how to make a regression test for this. Sure would be nice to have one though.

* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Added. Calls through to the
base class copy constructor to copy data members of the base class (the lack of this was
the bug). Also initializes all the data members of this class.
(WebCore::ThreadableLoaderOptions::isolatedCopy): Changed to call the constructor above.

* loader/ThreadableLoader.h: Added new constructor.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (186591 => 186592)


--- trunk/Source/WebCore/ChangeLog	2015-07-09 14:41:30 UTC (rev 186591)
+++ trunk/Source/WebCore/ChangeLog	2015-07-09 15:27:43 UTC (rev 186592)
@@ -1,3 +1,20 @@
+2015-07-09  Darin Adler  <da...@apple.com>
+
+        REGRESSION (r182866): repeated prompts for password on internal Apple website using workers
+        https://bugs.webkit.org/show_bug.cgi?id=146769
+
+        Reviewed by Sam Weinig.
+
+        Not sure how to make a regression test for this. Sure would be nice to have one though.
+
+        * loader/ThreadableLoader.cpp:
+        (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Added. Calls through to the
+        base class copy constructor to copy data members of the base class (the lack of this was
+        the bug). Also initializes all the data members of this class.
+        (WebCore::ThreadableLoaderOptions::isolatedCopy): Changed to call the constructor above.
+
+        * loader/ThreadableLoader.h: Added new constructor.
+
 2015-07-09  Chris Fleizach  <cfleiz...@apple.com>
 
         AX: VoiceOver cannot get to any content in Yahoo Mail messages table

Modified: trunk/Source/WebCore/loader/ThreadableLoader.cpp (186591 => 186592)


--- trunk/Source/WebCore/loader/ThreadableLoader.cpp	2015-07-09 14:41:30 UTC (rev 186591)
+++ trunk/Source/WebCore/loader/ThreadableLoader.cpp	2015-07-09 15:27:43 UTC (rev 186592)
@@ -51,15 +51,22 @@
 {
 }
 
+ThreadableLoaderOptions::ThreadableLoaderOptions(const ResourceLoaderOptions& baseOptions, PreflightPolicy preflightPolicy, CrossOriginRequestPolicy crossOriginRequestPolicy, RefPtr<SecurityOrigin>&& securityOrigin, String&& initiator)
+    : ResourceLoaderOptions(baseOptions)
+    , preflightPolicy(preflightPolicy)
+    , crossOriginRequestPolicy(crossOriginRequestPolicy)
+    , securityOrigin(WTF::move(securityOrigin))
+    , initiator(WTF::move(initiator))
+{
+}
+
 std::unique_ptr<ThreadableLoaderOptions> ThreadableLoaderOptions::isolatedCopy() const
 {
-    std::unique_ptr<ThreadableLoaderOptions> copy = std::make_unique<ThreadableLoaderOptions>();
-    copy->preflightPolicy = preflightPolicy;
-    copy->crossOriginRequestPolicy = crossOriginRequestPolicy;
+    RefPtr<SecurityOrigin> securityOriginCopy;
     if (securityOrigin)
-        copy->securityOrigin = securityOrigin->isolatedCopy();
-    copy->initiator = initiator.isolatedCopy();
-    return copy;
+        securityOriginCopy = securityOrigin->isolatedCopy();
+    return std::make_unique<ThreadableLoaderOptions>(*this, preflightPolicy, crossOriginRequestPolicy,
+        WTF::move(securityOriginCopy), initiator.isolatedCopy());
 }
 
 PassRefPtr<ThreadableLoader> ThreadableLoader::create(ScriptExecutionContext* context, ThreadableLoaderClient* client, const ResourceRequest& request, const ThreadableLoaderOptions& options)

Modified: trunk/Source/WebCore/loader/ThreadableLoader.h (186591 => 186592)


--- trunk/Source/WebCore/loader/ThreadableLoader.h	2015-07-09 14:41:30 UTC (rev 186591)
+++ trunk/Source/WebCore/loader/ThreadableLoader.h	2015-07-09 15:27:43 UTC (rev 186592)
@@ -59,8 +59,9 @@
         PreventPreflight
     };
 
-    struct ThreadableLoaderOptions : public ResourceLoaderOptions {
+    struct ThreadableLoaderOptions : ResourceLoaderOptions {
         ThreadableLoaderOptions();
+        ThreadableLoaderOptions(const ResourceLoaderOptions&, PreflightPolicy, CrossOriginRequestPolicy, RefPtr<SecurityOrigin>&&, String&& initiator);
         ~ThreadableLoaderOptions();
 
         std::unique_ptr<ThreadableLoaderOptions> isolatedCopy() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to