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

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

Issue 23600034: Use TRYCATCH_FOR_V8STRINGRESOURCE in AbstractEventListener::invokeEventHandler() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use a frame in the test Created 7 years, 3 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
Index: Source/bindings/v8/V8AbstractEventListener.cpp
diff --git a/Source/bindings/v8/V8AbstractEventListener.cpp b/Source/bindings/v8/V8AbstractEventListener.cpp
index e6937c99d53f9f2caf60cd433dde6f810d0f6471..e6b3de91b411885d3368a198eb5479c802da8b5e 100644
--- a/Source/bindings/v8/V8AbstractEventListener.cpp
+++ b/Source/bindings/v8/V8AbstractEventListener.cpp
@@ -156,8 +156,10 @@ void V8AbstractEventListener::invokeEventHandler(ScriptExecutionContext* context
if (returnValue.IsEmpty())
return;
- if (!returnValue->IsNull() && !returnValue->IsUndefined() && event->isBeforeUnloadEvent())
- toBeforeUnloadEvent(event)->setReturnValue(toWebCoreString(returnValue));
+ if (!returnValue->IsNull() && !returnValue->IsUndefined() && event->isBeforeUnloadEvent()) {
+ V8TRYCATCH_FOR_V8STRINGRESOURCE_VOID(V8StringResource<>, stringReturnValue, returnValue);
+ toBeforeUnloadEvent(event)->setReturnValue(stringReturnValue);
+ }
if (m_isAttribute && shouldPreventDefault(returnValue))
event->preventDefault();

Powered by Google App Engine
This is Rietveld 408576698