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. task->Run(); streamer->streamingCompleteOnBackgroundThread(); MutexLocker locker(*s_mutex); ScriptStreamerThread* thread = shared(); if (thread) thread->taskDone(); // If thread is 0, we're shutting down. }
void ScriptStreamerThread::runScriptStreamingTask( std::unique_ptr<v8::ScriptCompiler::ScriptStreamingTask> task, ScriptStreamer* streamer) { TRACE_EVENT1( "v8,devtools.timeline", "v8.parseOnBackground", "data", InspectorParseScriptEvent::data(streamer->scriptResourceIdentifier(), streamer->scriptURLString())); // Running the task can and will block: SourceStream::GetSomeData will get // called and it will block and wait for data from the network. task->Run(); streamer->streamingCompleteOnBackgroundThread(); MutexLocker locker(*s_mutex); ScriptStreamerThread* thread = shared(); if (thread) thread->taskDone(); // If thread is 0, we're shutting down. }