diff --git a/native_mate/constructor.h b/native_mate/constructor.h index c6deead3ece8..7cad253e0ea6 100644 --- a/native_mate/constructor.h +++ b/native_mate/constructor.h @@ -127,7 +127,7 @@ MATE_METHOD_RETURN_TYPE InvokeNew(const base::Callback& factory, WrappableBase* object; { // Don't continue if the constructor throws an exception. - v8::TryCatch try_catch; + v8::TryCatch try_catch(isolate); object = internal::InvokeFactory(args, factory); if (try_catch.HasCaught()) { try_catch.ReThrow(); diff --git a/native_mate/object_template_builder.h b/native_mate/object_template_builder.h index de953d381c2f..533576f98630 100644 --- a/native_mate/object_template_builder.h +++ b/native_mate/object_template_builder.h @@ -69,7 +69,7 @@ class ObjectTemplateBuilder { public: explicit ObjectTemplateBuilder( v8::Isolate* isolate, - v8::Local templ = v8::ObjectTemplate::New()); + v8::Local templ); ~ObjectTemplateBuilder(); // It's against Google C++ style to return a non-const ref, but we take some