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

Unified Diff: Source/bindings/core/v8/custom/V8InjectedScriptManager.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/custom/V8InjectedScriptManager.cpp
diff --git a/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp b/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp
index 630d853b31b3ea3e55e2c5a70ca1f9e0a705ad4f..28d98cdcc4fc253eeced61ef40b5bd5c029ce7d6 100644
--- a/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp
+++ b/Source/bindings/core/v8/custom/V8InjectedScriptManager.cpp
@@ -102,8 +102,9 @@ ScriptValue InjectedScriptManager::createInjectedScript(const String& scriptSour
// inspector's stuff) the function is called a few lines below with InjectedScriptHost wrapper,
// injected script id and explicit reference to the inspected global object. The function is expected
// to create and configure InjectedScript instance that is going to be used by the inspector.
- v8::Local<v8::Value> value = V8ScriptRunner::compileAndRunInternalScript(v8String(isolate, scriptSource), isolate);
- ASSERT(!value.IsEmpty());
+ v8::Local<v8::Value> value;
+ if (!V8ScriptRunner::compileAndRunInternalScript(v8String(isolate, scriptSource), isolate).ToLocal(&value))
+ return ScriptValue();
ASSERT(value->IsFunction());
v8::Local<v8::Object> windowGlobal = inspectedScriptState->context()->Global();

Powered by Google App Engine
This is Rietveld 408576698