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

Unified Diff: Source/bindings/core/v8/WindowProxy.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
Index: Source/bindings/core/v8/WindowProxy.cpp
diff --git a/Source/bindings/core/v8/WindowProxy.cpp b/Source/bindings/core/v8/WindowProxy.cpp
index 51aeff63cf0728403532e18d27da188ed233c1ca..43761438c3d48a99fbe66256be57a264e3b16c11 100644
--- a/Source/bindings/core/v8/WindowProxy.cpp
+++ b/Source/bindings/core/v8/WindowProxy.cpp
@@ -455,15 +455,16 @@ static void getter(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<
AtomicString name = toCoreAtomicString(property.As<v8::String>());
HTMLDocument* htmlDocument = V8HTMLDocument::toImpl(info.Holder());
ASSERT(htmlDocument);
- v8::Handle<v8::Value> result = getNamedProperty(htmlDocument, name, info.Holder(), info.GetIsolate());
+ v8::Local<v8::Value> result = getNamedProperty(htmlDocument, name, info.Holder(), info.GetIsolate());
if (!result.IsEmpty()) {
v8SetReturnValue(info, result);
return;
}
- v8::Handle<v8::Value> prototype = info.Holder()->GetPrototype();
+ v8::Local<v8::Value> prototype = info.Holder()->GetPrototype();
if (prototype->IsObject()) {
- v8SetReturnValue(info, prototype.As<v8::Object>()->Get(property));
- return;
+ v8::Local<v8::Value> value;
+ if (prototype.As<v8::Object>()->Get(info.GetIsolate()->GetCurrentContext(), property).ToLocal(&value))
+ v8SetReturnValue(info, value);
}
}
« Source/bindings/core/v8/V8PerIsolateData.cpp ('K') | « Source/bindings/core/v8/V8ThrowException.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698