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

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

Issue 176763009: Have DOMWindow deal with references instead of pointers when possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 10 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/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 9987b0a2b293a0a137158c08044edfefab36c39a..e0344b64fb6c61556e0a03d64ae7aeb657be7eb8 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -125,7 +125,7 @@ static void readOnlyStringAttrAttributeGetterCallback(v8::Local<v8::String>, con
static void readOnlyTestObjectAttrAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
- RefPtr<TestObject> result = imp->readOnlyTestObjectAttr();
+ RefPtr<TestObject> result(imp->readOnlyTestObjectAttr());
if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
@@ -2444,7 +2444,7 @@ static void nullableLongSettableAttributeAttributeSetterCallback(v8::Local<v8::S
static void perWorldReadOnlyAttributeAttributeGetter(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
- RefPtr<TestObject> result = imp->perWorldReadOnlyAttribute();
+ RefPtr<TestObject> result(imp->perWorldReadOnlyAttribute());
if (result && DOMDataStore::setReturnValueFromWrapper<V8TestObject>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
@@ -2464,7 +2464,7 @@ static void perWorldReadOnlyAttributeAttributeGetterCallback(v8::Local<v8::Strin
static void perWorldReadOnlyAttributeAttributeGetterForMainWorld(const v8::PropertyCallbackInfo<v8::Value>& info)
{
TestObject* imp = V8TestObject::toNative(info.Holder());
- RefPtr<TestObject> result = imp->perWorldReadOnlyAttribute();
+ RefPtr<TestObject> result(imp->perWorldReadOnlyAttribute());
if (result && DOMDataStore::setReturnValueFromWrapperForMainWorld<V8TestObject>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
@@ -3120,7 +3120,7 @@ static void locationAttributeGetterCallback(v8::Local<v8::String>, const v8::Pro
static void locationAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObject* proxyImp = V8TestObject::toNative(info.Holder());
- TestNode* imp = proxyImp->location();
+ TestNode* imp = WTF::getPtr(proxyImp->location());
if (!imp)
return;
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);
@@ -3150,7 +3150,7 @@ static void locationWithExceptionAttributeGetterCallback(v8::Local<v8::String>,
static void locationWithExceptionAttributeSetter(v8::Local<v8::Value> jsValue, const v8::PropertyCallbackInfo<void>& info)
{
TestObject* proxyImp = V8TestObject::toNative(info.Holder());
- TestNode* imp = proxyImp->locationWithException();
+ TestNode* imp = WTF::getPtr(proxyImp->locationWithException());
if (!imp)
return;
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, cppValue, jsValue);

Powered by Google App Engine
This is Rietveld 408576698