summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp')
-rw-r--r--WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp22
1 files changed, 13 insertions, 9 deletions
diff --git a/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp b/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp
index 456022f..d5e9754 100644
--- a/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp
+++ b/WebCore/bindings/js/JSCustomSQLTransactionCallback.cpp
@@ -33,24 +33,23 @@
#include "Frame.h"
#include "JSCallbackData.h"
-#include "JSDOMGlobalObject.h"
#include "JSSQLTransaction.h"
-#include "Page.h"
-#include "ScriptController.h"
+#include "ScriptExecutionContext.h"
#include <runtime/JSLock.h>
#include <wtf/MainThread.h>
#include <wtf/RefCountedLeakCounter.h>
namespace WebCore {
-
+
using namespace JSC;
-
+
#ifndef NDEBUG
static WTF::RefCountedLeakCounter counter("JSCustomSQLTransactionCallback");
#endif
JSCustomSQLTransactionCallback::JSCustomSQLTransactionCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
: m_data(new JSCallbackData(callback, globalObject))
+ , m_isolatedWorld(globalObject->world())
{
#ifndef NDEBUG
counter.increment();
@@ -66,19 +65,24 @@ JSCustomSQLTransactionCallback::~JSCustomSQLTransactionCallback()
#endif
}
-void JSCustomSQLTransactionCallback::handleEvent(SQLTransaction* transaction, bool& raisedException)
+void JSCustomSQLTransactionCallback::handleEvent(ScriptExecutionContext* context, SQLTransaction* transaction, bool& raisedException)
{
ASSERT(m_data);
+ ASSERT(context);
RefPtr<JSCustomSQLTransactionCallback> 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), transaction));
m_data->invokeCallback(args, &raisedException);
}
-
+
}
#endif // ENABLE(DATABASE)