diff options
Diffstat (limited to 'WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp')
-rw-r--r-- | WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp index f733ede..2545f24 100644 --- a/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp +++ b/WebCore/bindings/v8/custom/V8CustomSQLStatementErrorCallback.cpp @@ -35,6 +35,7 @@ #include "V8CustomSQLStatementErrorCallback.h" #include "Frame.h" +#include "ScriptExecutionContext.h" #include "V8CustomVoidCallback.h" #include "V8SQLError.h" #include "V8SQLTransaction.h" @@ -44,6 +45,7 @@ namespace WebCore { V8CustomSQLStatementErrorCallback::V8CustomSQLStatementErrorCallback(v8::Local<v8::Object> callback, Frame* frame) : m_callback(v8::Persistent<v8::Object>::New(callback)) , m_frame(frame) + , m_worldContext(UseCurrentWorld) { } @@ -52,15 +54,15 @@ V8CustomSQLStatementErrorCallback::~V8CustomSQLStatementErrorCallback() m_callback.Dispose(); } -bool V8CustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, SQLError* error) +bool V8CustomSQLStatementErrorCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, SQLError* error) { v8::HandleScope handleScope; - v8::Handle<v8::Context> context = V8Proxy::context(m_frame.get()); - if (context.IsEmpty()) + v8::Handle<v8::Context> v8Context = toV8Context(context, m_worldContext); + if (v8Context.IsEmpty()) return true; - v8::Context::Scope scope(context); + v8::Context::Scope scope(v8Context); v8::Handle<v8::Value> argv[] = { toV8(transaction), @@ -75,7 +77,7 @@ bool V8CustomSQLStatementErrorCallback::handleEvent(SQLTransaction* transaction, // 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 invokeCallbackTreatOnlyExplicitFalseAsFalse(m_callback, 2, argv, callbackReturnValue) || callbackReturnValue; + return invokeCallback(m_callback, 2, argv, callbackReturnValue) || callbackReturnValue; } } // namespace WebCore |