Chromium Code Reviews| Index: Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp |
| diff --git a/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp b/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp |
| index 5a5aaf1ddad065321aab8c864509d57d23775c5d..fc597c110345da297a77e706a57a2381e2f72629 100644 |
| --- a/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp |
| +++ b/Source/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp |
| @@ -33,7 +33,7 @@ |
| #include "V8SQLError.h" |
| #include "V8SQLTransaction.h" |
| -#include "bindings/v8/V8Callback.h" |
| +#include "bindings/v8/ScriptController.h" |
| #include "core/dom/ExecutionContext.h" |
| #include "wtf/Assertions.h" |
| @@ -66,12 +66,18 @@ bool V8SQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLEr |
| errorHandle |
| }; |
| - bool callbackReturnValue = false; |
| + v8::TryCatch exceptionCatcher; |
| + exceptionCatcher.SetVerbose(true); |
| + |
| + v8::Handle<v8::Value> result = ScriptController::callFunction(executionContext(), m_callback.newLocal(isolate), isolate->GetCurrentContext()->Global(), 2, argv, isolate); |
|
haraken
2013/12/11 00:54:30
I'm curious why you changed invokeCallback() to ca
adamk
2013/12/11 01:05:48
This allowed me to get rid of the callbackReturnVa
|
| + |
| + // FIXME: This comment doesn't make much sense given what the code is actually doing. |
|
haraken
2013/12/11 00:54:30
Yeah, probably we can remove the comment.
adamk
2013/12/11 01:05:48
I'm going to leave it for posterity, I think; ther
|
| + // |
| // Step 6: If the error callback returns false, then move on to the next |
| // statement, if any, or onto the next overall step otherwise. Otherwise, |
| // the error callback did not return false, or there was no error callback. |
| // Jump to the last step in the overall steps. |
| - return invokeCallback(m_callback.newLocal(isolate), 2, argv, callbackReturnValue, executionContext(), isolate) || callbackReturnValue; |
| + return exceptionCatcher.HasCaught() || (!result.IsEmpty() && result->BooleanValue()); |
| } |
| } // namespace WebCore |