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

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

Issue 22687002: Treat non-callable input as null for EventHandler attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 4 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 | « Source/bindings/tests/results/V8TestObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/V8EventListener.cpp
diff --git a/Source/bindings/v8/V8EventListener.cpp b/Source/bindings/v8/V8EventListener.cpp
index 8ada755b27a3e233f0a5002bafcd30e3ec8f75f2..343654c98584d1d07599b829dabed6ab236f8972 100644
--- a/Source/bindings/v8/V8EventListener.cpp
+++ b/Source/bindings/v8/V8EventListener.cpp
@@ -55,6 +55,7 @@ v8::Local<v8::Function> V8EventListener::getListenerFunction(ScriptExecutionCont
return v8::Local<v8::Function>::Cast(listener);
if (listener->IsObject()) {
+ ASSERT_WITH_MESSAGE(!isAttribute(), "EventHandler attributes should only accept JS Functions as input.");
v8::Local<v8::Value> property = listener->Get(v8::String::NewSymbol("handleEvent"));
// Check that no exceptions were thrown when getting the
// handleEvent property and that the value is a function.
« no previous file with comments | « Source/bindings/tests/results/V8TestObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698