diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp')
-rw-r--r-- | src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp index f7c74ae..8913243 100644 --- a/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp +++ b/src/3rdparty/webkit/WebCore/bindings/js/JSLazyEventListener.cpp @@ -77,7 +77,11 @@ void JSLazyEventListener::parseCode() const if (m_parsed) return; - if (m_globalObject->scriptExecutionContext()->isDocument()) { + ScriptExecutionContext* executionContext = m_globalObject->scriptExecutionContext(); + ASSERT(executionContext); + if (!executionContext) + return; + if (executionContext->isDocument()) { JSDOMWindow* window = static_cast<JSDOMWindow*>(m_globalObject); Frame* frame = window->impl()->frame(); if (!frame) @@ -93,7 +97,7 @@ void JSLazyEventListener::parseCode() const ExecState* exec = m_globalObject->globalExec(); MarkedArgumentBuffer args; - UString sourceURL(m_globalObject->scriptExecutionContext()->url().string()); + UString sourceURL(executionContext->url().string()); args.append(jsNontrivialString(exec, m_eventParameterName)); args.append(jsString(exec, m_code)); |