diff --git a/libcef/v8_impl.cc b/libcef/v8_impl.cc index 18e557cd3..72a1554c6 100644 --- a/libcef/v8_impl.cc +++ b/libcef/v8_impl.cc @@ -633,6 +633,11 @@ CefRefPtr CefV8Value::CreateFunction(const CefString& name, // Retrieve the function object and set the name. v8::Local func = tmpl->GetFunction(); + if (func.IsEmpty()) { + NOTREACHED() << "failed to create function"; + return NULL; + } + func->SetName(GetV8String(name)); // Attach the handler instance to the V8 object.