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

Unified Diff: Source/bindings/v8/custom/V8SQLTransactionCustom.cpp

Issue 103473002: Manage WebSQL callbacks with OwnPtr instead of refcounting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years 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/v8/custom/V8SQLTransactionCustom.cpp
diff --git a/Source/bindings/v8/custom/V8SQLTransactionCustom.cpp b/Source/bindings/v8/custom/V8SQLTransactionCustom.cpp
index 12e7e4c51b49671c726dad6dc74d7ea40d901951..e2374c3d21d5c0954ad3c242759e0824ce870c4c 100644
--- a/Source/bindings/v8/custom/V8SQLTransactionCustom.cpp
+++ b/Source/bindings/v8/custom/V8SQLTransactionCustom.cpp
@@ -90,7 +90,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
ExecutionContext* executionContext = getExecutionContext();
- RefPtr<SQLStatementCallback> callback;
+ OwnPtr<SQLStatementCallback> callback;
if (info.Length() > 2 && !isUndefinedOrNull(info[2])) {
if (!info[2]->IsObject()) {
setDOMException(TypeMismatchError, info.GetIsolate());
@@ -99,7 +99,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
callback = V8SQLStatementCallback::create(info[2], executionContext);
}
- RefPtr<SQLStatementErrorCallback> errorCallback;
+ OwnPtr<SQLStatementErrorCallback> errorCallback;
if (info.Length() > 3 && !isUndefinedOrNull(info[3])) {
if (!info[3]->IsObject()) {
setDOMException(TypeMismatchError, info.GetIsolate());
@@ -109,7 +109,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8:
}
ExceptionState exceptionState(info.Holder(), info.GetIsolate());
- transaction->executeSQL(statement, sqlValues, callback, errorCallback, exceptionState);
+ transaction->executeSQL(statement, sqlValues, callback.release(), errorCallback.release(), exceptionState);
exceptionState.throwIfNeeded();
}

Powered by Google App Engine
This is Rietveld 408576698