mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-30 03:40:18 +02:00
Add check for failed V8 function creation in CefV8Value::CreateFunction().
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@387 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
3f2735909a
commit
48d5da7827
@ -633,6 +633,11 @@ CefRefPtr<CefV8Value> CefV8Value::CreateFunction(const CefString& name,
|
||||
|
||||
// Retrieve the function object and set the name.
|
||||
v8::Local<v8::Function> 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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user