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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years, 1 month 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
« no previous file with comments | « Source/bindings/tests/results/V8TestCallback.h ('k') | Source/bindings/tests/results/V8TestTypedefs.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index 4e706ac87ed25b0c6c8e0bacac1bfb69a8097853..405d09f3c7a753faa914ee3db342d112fd7237cc 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -3595,7 +3595,7 @@ static void methodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8::Value
throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- RefPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecutionContext());
+ OwnPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecutionContext());
imp->methodWithCallbackArg(callback.release());
}
@@ -3618,7 +3618,7 @@ static void methodWithNonCallbackArgAndCallbackArgMethod(const v8::FunctionCallb
throwTypeError(ExceptionMessages::failedToExecute("methodWithNonCallbackArgAndCallbackArg", "TestObject", "The callback provided as parameter 2 is not a function."), info.GetIsolate());
return;
}
- RefPtr<TestCallback> callback = V8TestCallback::create(info[1], getExecutionContext());
+ OwnPtr<TestCallback> callback = V8TestCallback::create(info[1], getExecutionContext());
imp->methodWithNonCallbackArgAndCallbackArg(nonCallback, callback.release());
}
@@ -3632,7 +3632,7 @@ static void methodWithNonCallbackArgAndCallbackArgMethodCallback(const v8::Funct
static void methodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
- RefPtr<TestCallback> callback;
+ OwnPtr<TestCallback> callback;
if (info.Length() > 0 && !info[0]->IsNull() && !info[0]->IsUndefined()) {
if (!info[0]->IsFunction()) {
throwTypeError(ExceptionMessages::failedToExecute("methodWithCallbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
@@ -3661,7 +3661,7 @@ static void methodWithNullableCallbackArgMethod(const v8::FunctionCallbackInfo<v
throwTypeError(ExceptionMessages::failedToExecute("methodWithNullableCallbackArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- RefPtr<TestCallback> callback = info[0]->IsNull() ? 0 : V8TestCallback::create(info[0], getExecutionContext());
+ OwnPtr<TestCallback> callback = info[0]->IsNull() ? nullptr : V8TestCallback::create(info[0], getExecutionContext());
imp->methodWithNullableCallbackArg(callback.release());
}
@@ -3674,7 +3674,7 @@ static void methodWithNullableCallbackArgMethodCallback(const v8::FunctionCallba
static void staticMethodWithCallbackAndOptionalArgMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
{
- RefPtr<TestCallback> callback;
+ OwnPtr<TestCallback> callback;
if (info.Length() > 0 && !info[0]->IsNull() && !info[0]->IsUndefined()) {
if (!info[0]->IsFunction()) {
throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallbackAndOptionalArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
@@ -3702,7 +3702,7 @@ static void staticMethodWithCallbackArgMethod(const v8::FunctionCallbackInfo<v8:
throwTypeError(ExceptionMessages::failedToExecute("staticMethodWithCallbackArg", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- RefPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecutionContext());
+ OwnPtr<TestCallback> callback = V8TestCallback::create(info[0], getExecutionContext());
TestObj::staticMethodWithCallbackArg(callback.release());
}
@@ -3961,7 +3961,7 @@ static void overloadedMethod2Method(const v8::FunctionCallbackInfo<v8::Value>& i
throwTypeError(ExceptionMessages::failedToExecute("overloadedMethod", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- RefPtr<TestCallback> callbackArg = V8TestCallback::create(info[0], getExecutionContext());
+ OwnPtr<TestCallback> callbackArg = V8TestCallback::create(info[0], getExecutionContext());
imp->overloadedMethod(callbackArg.release());
}
@@ -4930,7 +4930,7 @@ static void constructor(const v8::FunctionCallbackInfo<v8::Value>& info)
throwTypeError(ExceptionMessages::failedToExecute("Constructor", "TestObject", "The callback provided as parameter 1 is not a function."), info.GetIsolate());
return;
}
- RefPtr<TestCallback> testCallback = V8TestCallback::create(info[0], getExecutionContext());
+ OwnPtr<TestCallback> testCallback = V8TestCallback::create(info[0], getExecutionContext());
RefPtr<TestObj> impl = TestObj::create(testCallback);
v8::Handle<v8::Object> wrapper = info.Holder();
« no previous file with comments | « Source/bindings/tests/results/V8TestCallback.h ('k') | Source/bindings/tests/results/V8TestTypedefs.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698