| Index: Source/bindings/core/v8/V8LazyEventListener.cpp
|
| diff --git a/Source/bindings/core/v8/V8LazyEventListener.cpp b/Source/bindings/core/v8/V8LazyEventListener.cpp
|
| index fd8ee45989db8cca124171dffbd93e03d318cb06..1e4b11d74e758b39f3e49717e16d484d0fbc16d6 100644
|
| --- a/Source/bindings/core/v8/V8LazyEventListener.cpp
|
| +++ b/Source/bindings/core/v8/V8LazyEventListener.cpp
|
| @@ -120,7 +120,10 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
|
| if (!scriptState->contextIsValid())
|
| return;
|
|
|
| - if (executionContext->isDocument() && !toDocument(executionContext)->allowInlineEventHandlers(m_node, this, m_sourceURL, m_position.m_line)) {
|
| + if (!executionContext->isDocument())
|
| + return;
|
| +
|
| + if (!toDocument(executionContext)->allowInlineEventHandlers(m_node, this, m_sourceURL, m_position.m_line)) {
|
| clearListenerObject();
|
| return;
|
| }
|
| @@ -128,8 +131,6 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
|
| if (hasExistingListenerObject())
|
| return;
|
|
|
| - ASSERT(executionContext->isDocument());
|
| -
|
| ScriptState::Scope scope(scriptState);
|
| String listenerSource = InspectorInstrumentation::preprocessEventListener(toDocument(executionContext)->frame(), m_code, m_sourceURL, m_functionName);
|
|
|
| @@ -166,7 +167,8 @@ void V8LazyEventListener::prepareListenerObject(ExecutionContext* executionConte
|
| return;
|
|
|
| // Call the outer function to get the inner function.
|
| - ASSERT(result->IsFunction());
|
| + if (!result->IsFunction())
|
| + return;
|
| v8::Local<v8::Function> intermediateFunction = result.As<v8::Function>();
|
|
|
| HTMLFormElement* formElement = 0;
|
|
|