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

Unified Diff: Source/bindings/tests/results/V8TestNode.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/V8TestNode.cpp
diff --git a/Source/bindings/tests/results/V8TestNode.cpp b/Source/bindings/tests/results/V8TestNode.cpp
index 65d32f3125873d6e54eba2208d632d4e3264d574..b0b2f601514f12b3bd64067df0cbcfa39cba7c5c 100644
--- a/Source/bindings/tests/results/V8TestNode.cpp
+++ b/Source/bindings/tests/results/V8TestNode.cpp
@@ -45,7 +45,8 @@ template <typename T> void V8_USE(T) { }
static void hrefAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestNode* impl = V8TestNode::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestNode* impl = V8TestNode::toNative(holder);
v8SetReturnValueString(info, impl->href(), info.GetIsolate());
}
@@ -58,7 +59,8 @@ static void hrefAttributeGetterCallback(v8::Local<v8::String>, const v8::Propert
static void hrefAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- TestNode* impl = V8TestNode::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestNode* impl = V8TestNode::toNative(holder);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
impl->setHref(cppValue);
}
@@ -72,7 +74,8 @@ static void hrefAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v8::Val
static void hrefThrowsAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestNode* impl = V8TestNode::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestNode* impl = V8TestNode::toNative(holder);
v8SetReturnValueString(info, impl->hrefThrows(), info.GetIsolate());
}
@@ -85,8 +88,9 @@ static void hrefThrowsAttributeGetterCallback(v8::Local<v8::String>, const v8::P
static void hrefThrowsAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "TestNode", info.Holder(), info.GetIsolate());
- TestNode* impl = V8TestNode::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ ExceptionState exceptionState(ExceptionState::SetterContext, "hrefThrows", "TestNode", holder, info.GetIsolate());
+ TestNode* impl = V8TestNode::toNative(holder);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
impl->setHrefThrows(cppValue, exceptionState);
exceptionState.throwIfNeeded();
@@ -101,7 +105,8 @@ static void hrefThrowsAttributeSetterCallback(v8::Local<v8::String>, v8::Local<v
static void hrefCallWithAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestNode* impl = V8TestNode::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestNode* impl = V8TestNode::toNative(holder);
v8SetReturnValueString(info, impl->hrefCallWith(), info.GetIsolate());
}
@@ -114,7 +119,8 @@ static void hrefCallWithAttributeGetterCallback(v8::Local<v8::String>, const v8:
static void hrefCallWithAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- TestNode* impl = V8TestNode::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestNode* impl = V8TestNode::toNative(holder);
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
impl->setHrefCallWith(callingDOMWindow(info.GetIsolate()), enteredDOMWindow(info.GetIsolate()), cppValue);
}

Powered by Google App Engine
This is Rietveld 408576698