Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/GlobalJsObject.cpp

Issue 29367507: Issue #3595 - Add an actual scheduler; use joined threads for file system
Patch Set: Created Dec. 14, 2016, 5:38 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/GlobalJsObject.cpp
===================================================================
--- a/src/GlobalJsObject.cpp
+++ b/src/GlobalJsObject.cpp
@@ -66,11 +66,12 @@
v8::Handle<v8::Value> SetTimeoutCallback(const v8::Arguments& arguments)
{
std::shared_ptr<TimeoutTask> timeoutTask;
+ JsEnginePtr engine;
try
{
+ engine = AdblockPlus::JsEngine::FromArguments(arguments);
AdblockPlus::JsValueList converted =
- AdblockPlus::JsEngine::FromArguments(arguments)
- ->ConvertArguments(arguments);
+ engine->ConvertArguments(arguments);
timeoutTask = std::make_shared<TimeoutTask>(converted);
}
catch (const std::exception& e)
@@ -78,7 +79,7 @@
v8::Isolate* isolate = arguments.GetIsolate();
return v8::ThrowException(Utils::ToV8String(isolate, e.what()));
}
- Scheduler::StartImmediatelyInSingleUseThread(MakeHeapFunction(timeoutTask));
+ StartImmediatelyInSingleUseDetachedThread(MakeHeapFunction(timeoutTask));
// We should actually return the timer ID here, which could be
// used via clearTimeout(). But since we don't seem to need

Powered by Google App Engine
This is Rietveld