v8::Handle<v8::String> v8_code(
v8::String::NewFromUtf8(isolate, code.c_str()));
- v8::TryCatch try_catch;
+ v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true);
v8::Handle<v8::Script> script(v8::Script::Compile(v8_code));
v8::Local<v8::Function>::New(isolate, create_function_);
v8::Handle<v8::Context> context = v8::Context::New(isolate);
- v8::TryCatch try_catch;
+ v8::TryCatch try_catch(isolate);
v8::Handle<v8::Value> ret = function->Call(context->Global(), 0, NULL);
if (try_catch.HasCaught()) {
LOGGER(ERROR) << "Exception when running create function: ";
newvalue
};
- v8::TryCatch try_catch;
+ v8::TryCatch try_catch(isolate);
v8::Handle<v8::Function>::Cast(function)->Call(
context->Global(), argc, argv);
if (try_catch.HasCaught())
void KeyFunction(const v8::FunctionCallbackInfo<v8::Value>& info) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
- int idx = info[0]->ToInt32()->Value();
+ int idx = info[0]->ToInt32(isolate)->Value();
auto widget = WidgetPreferenceDB::GetInstance();
std::string keyname;
if (widget->Key(idx, &keyname)) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
v8::Handle<v8::ObjectTemplate>
- preference_object_template = v8::ObjectTemplate::New();
+ preference_object_template = v8::ObjectTemplate::New(isolate);
auto getter = [](
v8::Local<v8::String> property,
v8::Handle<v8::String> v8_code(
v8::String::NewFromUtf8(isolate, code.c_str()));
- v8::TryCatch try_catch;
+ v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true);
v8::Handle<v8::Script> script(v8::Script::Compile(v8_code));
require_native
};
- v8::TryCatch try_catch;
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ v8::TryCatch try_catch(isolate);
try_catch.SetVerbose(true);
callable_api_code->Call(context->Global(), argc, argv);
if (try_catch.HasCaught()) {
v8::Handle<v8::Function> message_listener =
v8::Local<v8::Function>::New(isolate, message_listener_);
- v8::TryCatch try_catch;
+ v8::TryCatch try_catch(isolate);
message_listener->Call(context->Global(), 1, args);
if (try_catch.HasCaught())
LOGGER(ERROR) << "Exception when running message listener: "
XWalkV8ToolsModule::XWalkV8ToolsModule() {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handle_scope(isolate);
- v8::Handle<v8::ObjectTemplate> object_template = v8::ObjectTemplate::New();
+ v8::Handle<v8::ObjectTemplate> object_template = v8::ObjectTemplate::New(isolate);
// TODO(cmarcelo): Use Template::Set() function that takes isolate, once we
// update the Chromium (and V8) version.