Skip to content

Commit

Permalink
Merge r184657 - ThreadableLoaderOptions::isolatedCopy() doesn't produ…
Browse files Browse the repository at this point in the history
…ce a copy that is safe for sending to another thread

https://bugs.webkit.org/show_bug.cgi?id=145217

Reviewed by Anders Carlsson.

Caught by existing tests, rarely. I don't know how to catch such bugs more reliably.

* loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy):
* loader/ThreadableLoader.h:
  • Loading branch information
aproskuryakov authored and carlosgcampos committed Jul 6, 2015
1 parent 4a30d07 commit c81e6b0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,15 @@
2015-05-20 Alexey Proskuryakov <ap@apple.com>

ThreadableLoaderOptions::isolatedCopy() doesn't produce a copy that is safe for sending to another thread
https://bugs.webkit.org/show_bug.cgi?id=145217

Reviewed by Anders Carlsson.

Caught by existing tests, rarely. I don't know how to catch such bugs more reliably.

* loader/ThreadableLoader.cpp: (WebCore::ThreadableLoaderOptions::isolatedCopy):
* loader/ThreadableLoader.h:

2015-05-19 Antti Koivisto <antti@apple.com>

Crash under WebCore::invalidateStyleRecursively
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/loader/ThreadableLoader.cpp
Expand Up @@ -59,7 +59,7 @@ std::unique_ptr<ThreadableLoaderOptions> ThreadableLoaderOptions::isolatedCopy()
if (securityOrigin)
copy->securityOrigin = securityOrigin->isolatedCopy();
#if ENABLE(RESOURCE_TIMING)
copy->initiator = initiator.string().isolatedCopy();
copy->initiator = initiator.isolatedCopy();
#endif
return copy;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/loader/ThreadableLoader.h
Expand Up @@ -72,7 +72,7 @@ namespace WebCore {
CrossOriginRequestPolicy crossOriginRequestPolicy;
RefPtr<SecurityOrigin> securityOrigin;
#if ENABLE(RESOURCE_TIMING)
AtomicString initiator;
String initiator; // This cannot be an AtomicString, as isolatedCopy() wouldn't create an object that's safe for passing to another thread.
#endif
};

Expand Down

0 comments on commit c81e6b0

Please sign in to comment.