| Index: src/JsValue.cpp |
| =================================================================== |
| --- a/src/JsValue.cpp |
| +++ b/src/JsValue.cpp |
| @@ -19,6 +19,7 @@ |
| #include <AdblockPlus.h> |
| #include "JsContext.h" |
| +#include "JsEngineTransition.h" |
| #include "JsError.h" |
| #include "Utils.h" |
| @@ -213,9 +214,7 @@ |
| const JsContext context(jsEngine); |
| if (!thisPtr) |
| { |
| - v8::Local<v8::Context> localContext = v8::Local<v8::Context>::New( |
| - jsEngine->GetIsolate(), *jsEngine->context); |
| - thisPtr = JsValuePtr(new JsValue(jsEngine, localContext->Global())); |
| + thisPtr = JsValuePtr(new JsValue(jsEngine, ToInternal(jsEngine)->GetGlobalObject())); |
| } |
| if (!thisPtr->IsObject()) |
| throw new std::runtime_error("`this` pointer has to be an object"); |