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

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

Issue 34393005: IDL compiler: merge and simplify EventHandler non-callable value check (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Formatting Created 7 years, 2 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/V8Utilities.cpp
diff --git a/Source/bindings/v8/V8Utilities.cpp b/Source/bindings/v8/V8Utilities.cpp
index 71d7493b164bbc2aeb7128e7b8b2535ecaa7da6e..f85217f28100e28b3793afef9f13a423ddc51dfb 100644
--- a/Source/bindings/v8/V8Utilities.cpp
+++ b/Source/bindings/v8/V8Utilities.cpp
@@ -149,10 +149,10 @@ void transferHiddenDependency(v8::Handle<v8::Object> object, EventListener* oldV
removeHiddenDependency(object, oldListenerObject, cacheIndex, isolate);
}
}
- // Non-callable input should be treated as null
- if (!newValue->IsNull() && !newValue->IsFunction())
- newValue = v8::Null(isolate);
- if (!newValue->IsNull() && !newValue->IsUndefined())
+ if (!newValue->IsNull()
+ // Non-callable input is treated as null and ignored
+ && newValue->IsFunction()
+ && !newValue->IsUndefined())
haraken 2013/10/22 12:05:30 If IsFunction() is true, both IsNull() and IsUndef
Nils Barth (inactive) 2013/10/22 12:16:51 Thanks, changed! (I wasn't sure about the relation
createHiddenDependency(object, newValue, cacheIndex, isolate);
}
« Source/bindings/v8/V8EventListenerList.h ('K') | « Source/bindings/v8/V8EventListenerList.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698