Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(314)

Unified Diff: Source/bindings/core/v8/NPV8Object.cpp

Issue 1003043002: bindings: Use Maybe APIs in V8ScriptRunner (part 1) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/bindings/core/v8/NPV8Object.cpp
diff --git a/Source/bindings/core/v8/NPV8Object.cpp b/Source/bindings/core/v8/NPV8Object.cpp
index dfef2fc9d7b3dd4cb63fe33c4fc4fb245c9f740b..e3bd7cf4259d1aa7c47cba76e68c905b2ff93e84 100644
--- a/Source/bindings/core/v8/NPV8Object.cpp
+++ b/Source/bindings/core/v8/NPV8Object.cpp
@@ -555,8 +555,9 @@ bool _NPN_Enumerate(NPP npp, NPObject* npObject, NPIdentifier** identifier, uint
" return props;"
"});";
v8::Handle<v8::String> source = v8AtomicString(isolate, enumeratorCode);
- v8::Handle<v8::Value> result = V8ScriptRunner::compileAndRunInternalScript(source, isolate);
- ASSERT(!result.IsEmpty());
+ v8::Local<v8::Value> result;
+ if (!V8ScriptRunner::compileAndRunInternalScript(source, isolate).ToLocal(&result))
+ return false;
ASSERT(result->IsFunction());
v8::Handle<v8::Function> enumerator = v8::Handle<v8::Function>::Cast(result);
v8::Handle<v8::Value> argv[] = { obj };
« no previous file with comments | « no previous file | Source/bindings/core/v8/PrivateScriptRunner.cpp » ('j') | Source/bindings/core/v8/V8ScriptRunner.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698