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

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

Issue 1067763002: bindings: Use Maybe version of Get in bindings/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 8 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
« no previous file with comments | « Source/bindings/core/v8/ScriptFunctionCall.cpp ('k') | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/ScriptState.cpp
diff --git a/Source/bindings/core/v8/ScriptState.cpp b/Source/bindings/core/v8/ScriptState.cpp
index 3de3de91fab7a2c8e7ef9fec6e6060c9cfb634aa..0ab6195b7681f5498fd539f657d11112dfad3a89 100644
--- a/Source/bindings/core/v8/ScriptState.cpp
+++ b/Source/bindings/core/v8/ScriptState.cpp
@@ -88,7 +88,9 @@ void ScriptState::setEvalEnabled(bool enabled)
ScriptValue ScriptState::getFromGlobalObject(const char* name)
{
v8::HandleScope handleScope(m_isolate);
- v8::Local<v8::Value> v8Value = context()->Global()->Get(v8AtomicString(isolate(), name));
+ v8::Local<v8::Value> v8Value;
+ if (!context()->Global()->Get(context(), v8AtomicString(isolate(), name)).ToLocal(&v8Value))
+ return ScriptValue();
return ScriptValue(this, v8Value);
}
« no previous file with comments | « Source/bindings/core/v8/ScriptFunctionCall.cpp ('k') | Source/bindings/core/v8/ScriptValueSerializer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698