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

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

Issue 26592006: Avoid useless call to RefPtr::get() in the generated bindings code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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/V8TestObjectPython.cpp
diff --git a/Source/bindings/tests/results/V8TestObjectPython.cpp b/Source/bindings/tests/results/V8TestObjectPython.cpp
index c2a4871f0502091f6a7dccf7bc47b41a7955edf2..5fe9c3cbab22cee083139a0ca455ca9d52f15562 100644
--- a/Source/bindings/tests/results/V8TestObjectPython.cpp
+++ b/Source/bindings/tests/results/V8TestObjectPython.cpp
@@ -400,7 +400,7 @@ static void readonlyArrayBufferAttributeAttributeGetter(v8::Local<v8::String> na
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
RefPtr<ArrayBuffer> result = imp->readonlyArrayBufferAttribute();
- if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8ArrayBuffer>(info.GetReturnValue(), result.get()))
+ if (result && DOMDataStore::setReturnValueFromWrapper<V8ArrayBuffer>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
@@ -420,7 +420,7 @@ static void readonlyFloat32ArrayAttributeAttributeGetter(v8::Local<v8::String> n
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
RefPtr<Float32Array> result = imp->readonlyFloat32ArrayAttribute();
- if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8Float32Array>(info.GetReturnValue(), result.get()))
+ if (result && DOMDataStore::setReturnValueFromWrapper<V8Float32Array>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
@@ -440,7 +440,7 @@ static void readonlyUint8ArrayAttributeAttributeGetter(v8::Local<v8::String> nam
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
RefPtr<Uint8Array> result = imp->readonlyUint8ArrayAttribute();
- if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.GetReturnValue(), result.get()))
+ if (result && DOMDataStore::setReturnValueFromWrapper<V8Uint8Array>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
@@ -460,7 +460,7 @@ static void readonlyTestInterfaceEmptyAttributeAttributeGetter(v8::Local<v8::Str
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
RefPtr<TestInterfaceEmpty> result = imp->readonlyTestInterfaceEmptyAttribute();
- if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
+ if (result && DOMDataStore::setReturnValueFromWrapper<V8TestInterfaceEmpty>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
@@ -857,7 +857,7 @@ static void readonlyDocumentFragmentAttributeAttributeGetter(v8::Local<v8::Strin
{
TestObjectPython* imp = V8TestObjectPython::toNative(info.Holder());
RefPtr<DocumentFragment> result = imp->readonlyDocumentFragmentAttribute();
- if (result.get() && DOMDataStore::setReturnValueFromWrapper<V8DocumentFragment>(info.GetReturnValue(), result.get()))
+ if (result && DOMDataStore::setReturnValueFromWrapper<V8DocumentFragment>(info.GetReturnValue(), result.get()))
return;
v8::Handle<v8::Value> wrapper = toV8(result.get(), info.Holder(), info.GetIsolate());
if (!wrapper.IsEmpty()) {
@@ -988,7 +988,7 @@ bool V8TestObjectPython::HasInstanceInAnyWorld(v8::Handle<v8::Value> value, v8::
v8::Handle<v8::Object> V8TestObjectPython::createWrapper(PassRefPtr<TestObjectPython> impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
{
- ASSERT(impl.get());
+ ASSERT(impl);
ASSERT(!DOMDataStore::containsWrapper<V8TestObjectPython>(impl.get(), isolate));
if (ScriptWrappable::wrapperCanBeStoredInObject(impl.get())) {
const WrapperTypeInfo* actualInfo = ScriptWrappable::getTypeInfoFromObject(impl.get());
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | Source/bindings/tests/results/V8TestOverloadedConstructors.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698