Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Unified Diff: Source/bindings/core/v8/ScriptStreamerThread.cpp

Issue 1143083005: Replace ScriptStreamerTask with blink::Task and threadSafeBind() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use threadSafeBind(). Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/core/v8/ScriptStreamerThread.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptStreamerThread.cpp
diff --git a/Source/bindings/core/v8/ScriptStreamerThread.cpp b/Source/bindings/core/v8/ScriptStreamerThread.cpp
index 130770af7ffd75b5faafe9d1d9d7122ef93bc675..05ec23fc384269ba949f03b5755eef0aa2621e3a 100644
--- a/Source/bindings/core/v8/ScriptStreamerThread.cpp
+++ b/Source/bindings/core/v8/ScriptStreamerThread.cpp
@@ -77,18 +77,15 @@ WebThread& ScriptStreamerThread::platformThread()
return *m_thread;
}
-ScriptStreamingTask::ScriptStreamingTask(WTF::PassOwnPtr<v8::ScriptCompiler::ScriptStreamingTask> task, ScriptStreamer* streamer)
- : m_v8Task(task), m_streamer(streamer) { }
-
-void ScriptStreamingTask::run()
+void ScriptStreamerThread::runScriptStreamingTask(WTF::PassOwnPtr<v8::ScriptCompiler::ScriptStreamingTask> task, ScriptStreamer* streamer)
{
TRACE_EVENT0("v8", "v8.parseOnBackground");
// Running the task can and will block: SourceStream::GetSomeData will get
// called and it will block and wait for data from the network.
- m_v8Task->Run();
- m_streamer->streamingCompleteOnBackgroundThread();
+ task->Run();
+ streamer->streamingCompleteOnBackgroundThread();
MutexLocker locker(*s_mutex);
- ScriptStreamerThread* thread = ScriptStreamerThread::shared();
+ ScriptStreamerThread* thread = shared();
if (thread)
thread->taskDone();
// If thread is 0, we're shutting down.
« no previous file with comments | « Source/bindings/core/v8/ScriptStreamerThread.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698