Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: Source/bindings/v8/V8AbstractEventListener.cpp

Issue 158783002: Limit beforeunload returnValue propagation to event handlers. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Switch tests to use onbeforeunload event handlers instead. Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/inspector-protocol/page/javascriptDialogEvents.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8AbstractEventListener.cpp
diff --git a/Source/bindings/v8/V8AbstractEventListener.cpp b/Source/bindings/v8/V8AbstractEventListener.cpp
index 0f9c40504aa65393eeefe4cf286a05477e12d8e7..c1505fd7c52751082bd4008b96cb35a696e07b88 100644
--- a/Source/bindings/v8/V8AbstractEventListener.cpp
+++ b/Source/bindings/v8/V8AbstractEventListener.cpp
@@ -149,7 +149,7 @@ void V8AbstractEventListener::invokeEventHandler(ExecutionContext* context, Even
if (returnValue.IsEmpty())
return;
- if (!returnValue->IsNull() && !returnValue->IsUndefined() && event->isBeforeUnloadEvent()) {
+ if (m_isAttribute && !returnValue->IsNull() && !returnValue->IsUndefined() && event->isBeforeUnloadEvent()) {
V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringReturnValue, returnValue);
toBeforeUnloadEvent(event)->setReturnValue(stringReturnValue);
}
« no previous file with comments | « LayoutTests/inspector-protocol/page/javascriptDialogEvents.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698