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

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: Take arv's feedback into consideration 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
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.

Powered by Google App Engine
This is Rietveld 408576698