diff --git a/native_mate/constructor.h b/native_mate/constructor.h index 7cad253e0ea6..c6deead3ece8 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(isolate); + v8::TryCatch try_catch; 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 533576f98630..de953d381c2f 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::Local templ = v8::ObjectTemplate::New()); ~ObjectTemplateBuilder(); // It's against Google C++ style to return a non-const ref, but we take some