summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp')
-rw-r--r--WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp b/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp
index 331e014..09ff340 100644
--- a/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp
+++ b/WebCore/bindings/js/JSCustomSQLTransactionErrorCallback.cpp
@@ -34,16 +34,17 @@
#include "Frame.h"
#include "JSCallbackData.h"
#include "JSSQLError.h"
-#include "ScriptController.h"
+#include "ScriptExecutionContext.h"
#include <runtime/JSLock.h>
#include <wtf/MainThread.h>
namespace WebCore {
-
+
using namespace JSC;
-
+
JSCustomSQLTransactionErrorCallback::JSCustomSQLTransactionErrorCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
: m_data(new JSCallbackData(callback, globalObject))
+ , m_isolatedWorld(globalObject->world())
{
}
@@ -55,14 +56,19 @@ JSCustomSQLTransactionErrorCallback::~JSCustomSQLTransactionErrorCallback()
#endif
}
-void JSCustomSQLTransactionErrorCallback::handleEvent(SQLError* error)
+void JSCustomSQLTransactionErrorCallback::handleEvent(ScriptExecutionContext* context, SQLError* error)
{
ASSERT(m_data);
+ ASSERT(context);
RefPtr<JSCustomSQLTransactionErrorCallback> protect(this);
JSC::JSLock lock(SilenceAssertionsOnly);
- ExecState* exec = m_data->globalObject()->globalExec();
+ JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(context, m_isolatedWorld.get());
+ if (!globalObject)
+ return;
+
+ ExecState* exec = globalObject->globalExec();
MarkedArgumentBuffer args;
args.append(toJS(exec, deprecatedGlobalObjectForPrototype(exec), error));
m_data->invokeCallback(args);