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/tests/results/V8TestInterfaceEventConstructor.cpp

Issue 351403003: IDL: Merge duplicating local variable assignment in attribute_getter (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Further v8Value -> cppValue renaming Created 6 years, 6 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/V8TestInterfaceEventConstructor.cpp
diff --git a/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp b/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
index d3600c35c260d3bf8ea0c2c49afa06e69d226f49..8fcd01266b440865c8bfd8b34e5163d648300f9c 100644
--- a/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
+++ b/Source/bindings/tests/results/V8TestInterfaceEventConstructor.cpp
@@ -123,10 +123,10 @@ static void initializedByEventConstructorReadonlyUint8ArrayAttributeAttributeGet
{
v8::Handle<v8::Object> holder = info.Holder();
TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toNative(holder);
- RefPtr<Uint8Array> result(impl->initializedByEventConstructorReadonlyUint8ArrayAttribute());
- if (result && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.GetReturnValue(), result.get()))
+ RefPtr<Uint8Array> cppValue(impl->initializedByEventConstructorReadonlyUint8ArrayAttribute());
+ if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.GetReturnValue(), cppValue.get()))
return;
- v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
+ v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate());
if (!wrapper.IsEmpty()) {
V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "initializedByEventConstructorReadonlyUint8ArrayAttribute"), wrapper);
v8SetReturnValue(info, wrapper);
@@ -144,10 +144,10 @@ static void initializedByEventConstructorReadonlyTestInterfaceEmptyAttributeAttr
{
v8::Handle<v8::Object> holder = info.Holder();
TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toNative(holder);
- RefPtr<TestInterfaceEmpty> result(impl->initializedByEventConstructorReadonlyTestInterfaceEmptyAttribute());
- if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
+ RefPtr<TestInterfaceEmpty> cppValue(impl->initializedByEventConstructorReadonlyTestInterfaceEmptyAttribute());
+ if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), cppValue.get()))
return;
- v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
+ v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate());
if (!wrapper.IsEmpty()) {
V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "initializedByEventConstructorReadonlyTestInterfaceEmptyAttribute"), wrapper);
v8SetReturnValue(info, wrapper);
@@ -180,15 +180,14 @@ static void initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttri
v8::Handle<v8::Object> holder = info.Holder();
TestInterfaceEventConstructor* impl = V8TestInterfaceEventConstructor::toNative(holder);
bool isNull = false;
- RefPtr<TestInterfaceEmpty> v8Value = impl->initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute(isNull);
+ RefPtr<TestInterfaceEmpty> cppValue(impl->initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute(isNull));
if (isNull) {
v8SetReturnValueNull(info);
return;
}
- RefPtr<TestInterfaceEmpty> result(v8Value);
- if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
+ if (cppValue && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), cppValue.get()))
return;
- v8::Handle<v8::Value> wrapper = toV8(result.get(), holder, info.GetIsolate());
+ v8::Handle<v8::Value> wrapper = toV8(cppValue.get(), holder, info.GetIsolate());
if (!wrapper.IsEmpty()) {
V8HiddenValue::setHiddenValue(info.GetIsolate(), holder, v8AtomicString(info.GetIsolate(), "initializedByEventConstructorReadonlyNullableTestInterfaceEmptyAttribute"), wrapper);
v8SetReturnValue(info, wrapper);
« no previous file with comments | « Source/bindings/tests/results/V8TestInterface.cpp ('k') | Source/bindings/tests/results/V8TestInterfaceNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698