Index: src/JsEngine.cpp |
diff --git a/src/JsEngine.cpp b/src/JsEngine.cpp |
index 232cb398541f5cde25eeebedb648bd1b69150f97..ce75e1b0f822be5187628d16e6fe1b067212753e 100644 |
--- a/src/JsEngine.cpp |
+++ b/src/JsEngine.cpp |
@@ -89,9 +89,10 @@ AdblockPlus::JsEnginePtr AdblockPlus::JsEngine::New(const AppInfo& appInfo) |
const v8::Isolate::Scope isolateScope(result->isolate); |
const v8::HandleScope handleScope(result->isolate); |
- result->context.reset(result->isolate, v8::Context::New(result->isolate)); |
+ result->context.reset(new v8::Persistent<v8::Context>(result->isolate, |
+ v8::Context::New(result->isolate))); |
v8::Local<v8::Object> globalContext = v8::Local<v8::Context>::New( |
- result->isolate, result->context)->Global(); |
+ result->isolate, *result->context)->Global(); |
AdblockPlus::GlobalJsObject::Setup(result, appInfo, |
JsValuePtr(new JsValue(result, globalContext))); |
return result; |