| Index: gin/wrappable.cc
|
| diff --git a/gin/wrappable.cc b/gin/wrappable.cc
|
| index 4137609cf917566534cdbe9164e8889b5f59bf55..185c6657f6e674d77cb16cc92efdf92b5b6ff8e7 100644
|
| --- a/gin/wrappable.cc
|
| +++ b/gin/wrappable.cc
|
| @@ -49,10 +49,10 @@ v8::Handle<v8::Object> WrappableBase::GetWrapperImpl(v8::Isolate* isolate,
|
| data->SetObjectTemplate(info, templ);
|
| }
|
| CHECK_EQ(kNumberOfInternalFields, templ->InternalFieldCount());
|
| - v8::Handle<v8::Object> wrapper = templ->NewInstance();
|
| + v8::Local<v8::Object> wrapper;
|
| // |wrapper| may be empty in some extreme cases, e.g., when
|
| // Object.prototype.constructor is overwritten.
|
| - if (wrapper.IsEmpty()) {
|
| + if (!templ->NewInstance(isolate->GetCurrentContext()).ToLocal(&wrapper)) {
|
| // The current wrappable object will be no longer managed by V8. Delete this
|
| // now.
|
| delete this;
|
|
|