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:
Marshall Greenblatt 2011-11-18 17:43:12 +00:00
parent 3f2735909a
commit 48d5da7827
1 changed files with 5 additions and 0 deletions

View File

@ -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.