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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp

Issue 214143003: Bindings: use |holder| local variable in attribute getters and setters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 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/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
index bd2a8458eec6f3f648103fd876119b3144ae121c..3fbecb732ce2a7882ed59f38fc4e39b26952b0ab 100644
--- a/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceWillBeGarbageCollected.cpp
@@ -45,7 +45,8 @@ template <typename T> void V8_USE(T) { }
static void attr1AttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toNative(holder);
v8SetReturnValueFast(info, WTF::getPtr(impl->attr1()), impl);
}
@@ -58,7 +59,8 @@ static void attr1AttributeGetterCallback(v8::Local<v8::String>, const v8::Proper
static void attr1AttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceWillBeGarbageCollected* impl = V8TestInterfaceWillBeGarbageCollected::toNative(holder);
V8TRYCATCH_VOID(TestInterfaceWillBeGarbageCollected*, cppValue, V8TestInterfaceWillBeGarbageCollected::toNativeWithTypeCheck(info.GetIsolate(), jsValue));
impl->setAttr1(WTF::getPtr(cppValue));
}
« no previous file with comments | « Source/bindings/tests/results/V8TestInterfacePython.cpp ('k') | Source/bindings/tests/results/V8TestNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698