summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/js/JSCustomPositionCallback.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/js/JSCustomPositionCallback.cpp')
-rw-r--r--WebCore/bindings/js/JSCustomPositionCallback.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/WebCore/bindings/js/JSCustomPositionCallback.cpp b/WebCore/bindings/js/JSCustomPositionCallback.cpp
index cc6d45c..8990520 100644
--- a/WebCore/bindings/js/JSCustomPositionCallback.cpp
+++ b/WebCore/bindings/js/JSCustomPositionCallback.cpp
@@ -38,12 +38,17 @@ namespace WebCore {
using namespace JSC;
JSCustomPositionCallback::JSCustomPositionCallback(JSObject* callback, JSDOMGlobalObject* globalObject)
- : m_data(callback, globalObject)
+ : PositionCallback(globalObject->scriptExecutionContext())
+ , m_data(callback, globalObject)
{
}
void JSCustomPositionCallback::handleEvent(Geoposition* geoposition)
{
+ // ActiveDOMObject will null our pointer to the ScriptExecutionContext when it goes away.
+ if (!scriptExecutionContext())
+ return;
+
RefPtr<JSCustomPositionCallback> protect(this);
JSC::JSLock lock(SilenceAssertionsOnly);