Index: src/JsEngine.cpp |
=================================================================== |
--- a/src/JsEngine.cpp |
+++ b/src/JsEngine.cpp |
@@ -55,9 +55,9 @@ |
const v8::Locker locker(result->isolate); |
const v8::HandleScope handleScope; |
- result->context.reset(result->isolate, v8::Context::New()); |
+ result->context.reset(result->isolate, v8::Context::New(result->isolate)); |
AdblockPlus::GlobalJsObject::Setup(result, appInfo, |
- JsValuePtr(new JsValue(result, result->context->Global()))); |
+ JsValuePtr(new JsValue(result, v8::Local<v8::Context>::New(result->isolate, result->context)->Global(), JsValue::Private::CtrArg()))); |
return result; |
} |
@@ -70,7 +70,7 @@ |
CheckTryCatch(tryCatch); |
v8::Local<v8::Value> result = script->Run(); |
CheckTryCatch(tryCatch); |
- return JsValuePtr(new JsValue(shared_from_this(), result)); |
+ return JsValuePtr(new JsValue(shared_from_this(), result, JsValue::Private::CtrArg())); |
} |
void AdblockPlus::JsEngine::SetEventCallback(const std::string& eventName, |
@@ -100,25 +100,25 @@ |
{ |
const JsContext context(shared_from_this()); |
return JsValuePtr(new JsValue(shared_from_this(), |
- v8::String::New(val.c_str(), val.length()))); |
+ v8::String::New(val.c_str(), val.length()), JsValue::Private::CtrArg())); |
} |
AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewValue(int64_t val) |
{ |
const JsContext context(shared_from_this()); |
- return JsValuePtr(new JsValue(shared_from_this(), v8::Number::New(val))); |
+ return JsValuePtr(new JsValue(shared_from_this(), v8::Number::New(val), JsValue::Private::CtrArg())); |
} |
AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewValue(bool val) |
{ |
const JsContext context(shared_from_this()); |
- return JsValuePtr(new JsValue(shared_from_this(), v8::Boolean::New(val))); |
+ return JsValuePtr(new JsValue(shared_from_this(), v8::Boolean::New(val), JsValue::Private::CtrArg())); |
} |
AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewObject() |
{ |
const JsContext context(shared_from_this()); |
- return JsValuePtr(new JsValue(shared_from_this(), v8::Object::New())); |
+ return JsValuePtr(new JsValue(shared_from_this(), v8::Object::New(), JsValue::Private::CtrArg())); |
} |
AdblockPlus::JsValuePtr AdblockPlus::JsEngine::NewCallback( |
@@ -132,7 +132,7 @@ |
new std::tr1::weak_ptr<JsEngine>(shared_from_this()); |
v8::Local<v8::FunctionTemplate> templ = v8::FunctionTemplate::New(callback, |
v8::External::New(data)); |
- return JsValuePtr(new JsValue(shared_from_this(), templ->GetFunction())); |
+ return JsValuePtr(new JsValue(shared_from_this(), templ->GetFunction(), JsValue::Private::CtrArg())); |
} |
AdblockPlus::JsEnginePtr AdblockPlus::JsEngine::FromArguments(const v8::Arguments& arguments) |
@@ -152,7 +152,7 @@ |
const JsContext context(shared_from_this()); |
JsValueList list; |
for (int i = 0; i < arguments.Length(); i++) |
- list.push_back(JsValuePtr(new JsValue(shared_from_this(), arguments[i]))); |
+ list.push_back(JsValuePtr(new JsValue(shared_from_this(), arguments[i], JsValue::Private::CtrArg()))); |
return list; |
} |