Index: Source/bindings/core/v8/ScriptStreamer.cpp |
diff --git a/Source/bindings/core/v8/ScriptStreamer.cpp b/Source/bindings/core/v8/ScriptStreamer.cpp |
index 262bf813a20bda0f455ce0c3c2aa17587c943cda..ad5cfca5dc109e9b61c8c512d32ec55d024bc5f4 100644 |
--- a/Source/bindings/core/v8/ScriptStreamer.cpp |
+++ b/Source/bindings/core/v8/ScriptStreamer.cpp |
@@ -14,6 +14,7 @@ |
#include "core/frame/Settings.h" |
#include "core/html/parser/TextResourceDecoder.h" |
#include "platform/SharedBuffer.h" |
+#include "platform/ThreadSafeFunctional.h" |
#include "platform/TraceEvent.h" |
#include "public/platform/Platform.h" |
#include "wtf/MainThread.h" |
@@ -316,7 +317,7 @@ void ScriptStreamer::streamingCompleteOnBackgroundThread() |
// notifyFinished might already be called, or it might be called in the |
// future (if the parsing finishes earlier because of a parse error). |
- Platform::current()->mainThread()->postTask(FROM_HERE, bind(&ScriptStreamer::streamingComplete, this)); |
+ Platform::current()->mainThread()->postTask(FROM_HERE, threadSafeBind(&ScriptStreamer::streamingComplete, AllowCrossThreadAccess(this))); |
// The task might delete ScriptStreamer, so it's not safe to do anything |
// after posting it. Note that there's no way to guarantee that this |