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

Unified Diff: Source/bindings/tests/results/V8TestObject.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/scripts/deprecated_code_generator_v8.pm ('k') | Source/bindings/v8/V8EventListener.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/tests/results/V8TestObject.cpp
diff --git a/Source/bindings/tests/results/V8TestObject.cpp b/Source/bindings/tests/results/V8TestObject.cpp
index aeae38b97cbde62a2443a92312594f66e5d821df..1e77380aae8527d72788e40be29cc0328b29ac4b 100644
--- a/Source/bindings/tests/results/V8TestObject.cpp
+++ b/Source/bindings/tests/results/V8TestObject.cpp
@@ -479,6 +479,8 @@ static void eventHandlerAttrAttrGetterCallback(v8::Local<v8::String> name, const
static void eventHandlerAttrAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::PropertyCallbackInfo<void>& info)
{
TestObj* imp = V8TestObject::toNative(info.Holder());
+ if (!value->IsNull() && !value->IsFunction())
+ value = v8::Null(info.GetIsolate());
transferHiddenDependency(info.Holder(), imp->eventHandlerAttr(isolatedWorldForIsolate(info.GetIsolate())), value, V8TestObject::eventListenerCacheIndex, info.GetIsolate());
imp->setEventHandlerAttr(V8EventListenerList::getEventListener(value, true, ListenerFindOrCreate), isolatedWorldForIsolate(info.GetIsolate()));
return;
« no previous file with comments | « Source/bindings/scripts/deprecated_code_generator_v8.pm ('k') | Source/bindings/v8/V8EventListener.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698