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); |
} |