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

Unified Diff: Source/bindings/tests/results/V8TestInterfaceCheckSecurity.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/V8TestInterfaceCheckSecurity.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp b/Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp
index e609da0b085ee0b066e27b01587de635d1d688fa..cea39e33e34067dadfdabda21917b05efe6d7092 100644
--- a/Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceCheckSecurity.cpp
@@ -45,7 +45,8 @@ template <typename T> void V8_USE(T) { }
static void longAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
v8SetReturnValueInt(info, impl->longAttribute());
}
@@ -58,7 +59,8 @@ static void longAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8
static void doNotCheckSecurityLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
v8SetReturnValueInt(info, impl->doNotCheckSecurityLongAttribute());
}
@@ -71,8 +73,9 @@ static void doNotCheckSecurityLongAttributeAttributeGetterCallback(v8::Local<v8:
static void doNotCheckSecurityLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecurityLongAttribute", "TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate());
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecurityLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate());
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
impl->setDoNotCheckSecurityLongAttribute(cppValue);
}
@@ -86,7 +89,8 @@ static void doNotCheckSecurityLongAttributeAttributeSetterCallback(v8::Local<v8:
static void doNotCheckSecurityReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
v8SetReturnValueInt(info, impl->doNotCheckSecurityReadonlyLongAttribute());
}
@@ -99,7 +103,8 @@ static void doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback(v8::L
static void doNotCheckSecurityOnSetterLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
v8SetReturnValueInt(info, impl->doNotCheckSecurityOnSetterLongAttribute());
}
@@ -112,8 +117,9 @@ static void doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback(v8::L
static void doNotCheckSecurityOnSetterLongAttributeAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
- ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecurityOnSetterLongAttribute", "TestInterfaceCheckSecurity", info.Holder(), info.GetIsolate());
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ ExceptionState exceptionState(ExceptionState::SetterContext, "doNotCheckSecurityOnSetterLongAttribute", "TestInterfaceCheckSecurity", holder, info.GetIsolate());
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
V8TRYCATCH_EXCEPTION_VOID(int, cppValue, toInt32(jsValue, exceptionState), exceptionState);
impl->setDoNotCheckSecurityOnSetterLongAttribute(cppValue);
}
@@ -127,7 +133,8 @@ static void doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback(v8::L
static void doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
- TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(info.Holder());
+ v8::Handle<v8::Object> holder = info.Holder();
+ TestInterfaceCheckSecurity* impl = V8TestInterfaceCheckSecurity::toNative(holder);
v8SetReturnValueInt(info, impl->doNotCheckSecurityReplaceableReadonlyLongAttribute());
}
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698