| Index: Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| diff --git a/Source/bindings/core/v8/V8AbstractEventListener.cpp b/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| index 21be4e1c79935cc44ad2dfae3978b61b6b15a619..b4c9d2a3fedc98e12cec72b154e48641da930032 100644
|
| --- a/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| +++ b/Source/bindings/core/v8/V8AbstractEventListener.cpp
|
| @@ -124,8 +124,11 @@ void V8AbstractEventListener::invokeEventHandler(Event* event, v8::Local<v8::Val
|
| // Make the event available in the global object, so LocalDOMWindow can expose it.
|
| V8HiddenValue::setHiddenValue(isolate(), scriptState()->context()->Global(), V8HiddenValue::event(isolate()), jsEvent);
|
| tryCatch.Reset();
|
| -
|
| + if (event->isBeforeUnloadEvent())
|
| + scriptState()->executionContext()->setIsBeforeUnloadEvent(true);
|
| returnValue = callListenerFunction(jsEvent, event);
|
| + if (event->isBeforeUnloadEvent())
|
| + scriptState()->executionContext()->setIsBeforeUnloadEvent(false);
|
| if (tryCatch.HasCaught())
|
| event->target()->uncaughtExceptionInEventHandler();
|
|
|
|
|