Index: Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp |
diff --git a/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp b/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp |
index 3d7b0bcbe4ac6f5dd788d34adbe3bbefbc1d7f65..8ed7c26e1efb66365f4164a239fa910e7546f68c 100644 |
--- a/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp |
+++ b/Source/bindings/modules/v8/custom/V8SQLTransactionCustom.cpp |
@@ -91,17 +91,19 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8: |
} |
SQLTransaction* transaction = V8SQLTransaction::toImpl(info.Holder()); |
- OwnPtrWillBeRawPtr<SQLStatementCallback> callback = nullptr; |
- if (info.Length() > 2 && !isUndefinedOrNull(info[2])) { |
+ SQLStatementCallback* callback; |
+ if (!isUndefinedOrNull(info[2])) { |
if (!info[2]->IsFunction()) { |
exceptionState.throwDOMException(TypeMismatchError, "The 'callback' (2nd) argument provided is not a function."); |
exceptionState.throwIfNeeded(); |
return; |
} |
callback = V8SQLStatementCallback::create(v8::Handle<v8::Function>::Cast(info[2]), ScriptState::current(info.GetIsolate())); |
+ } else { |
+ callback = nullptr; |
} |
- OwnPtrWillBeRawPtr<SQLStatementErrorCallback> errorCallback = nullptr; |
+ SQLStatementErrorCallback* errorCallback = nullptr; |
Jens Widell
2014/09/19 10:34:06
Follow-up nit: Align this block too?
keishi
2014/09/22 05:44:01
Done.
|
if (info.Length() > 3 && !isUndefinedOrNull(info[3])) { |
if (!info[3]->IsFunction()) { |
exceptionState.throwDOMException(TypeMismatchError, "The 'errorCallback' (3rd) argument provided is not a function."); |
@@ -111,7 +113,7 @@ void V8SQLTransaction::executeSqlMethodCustom(const v8::FunctionCallbackInfo<v8: |
errorCallback = V8SQLStatementErrorCallback::create(v8::Handle<v8::Function>::Cast(info[3]), ScriptState::current(info.GetIsolate())); |
} |
- transaction->executeSQL(statement, sqlValues, callback.release(), errorCallback.release(), exceptionState); |
+ transaction->executeSQL(statement, sqlValues, callback, errorCallback, exceptionState); |
exceptionState.throwIfNeeded(); |
} |