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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp

Issue 2267403006: Remove redundant IsEmpty checks after calling toV8() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: temp Created 4 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: third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
index 5da2531c04194e3130988a59123366b9d76b9e1f..61e07bbe4806a6cf040df58d655a9e23cabd589d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8AbstractEventListener.cpp
@@ -90,8 +90,6 @@ void V8AbstractEventListener::handleEvent(ScriptState* scriptState, Event* event
// Get the V8 wrapper for the event object.
v8::Local<v8::Value> jsEvent = toV8(event, scriptState->context()->Global(), isolate());
- if (jsEvent.IsEmpty())
- return;
invokeEventHandler(scriptState, event, v8::Local<v8::Value>::New(isolate(), jsEvent));
}
@@ -173,8 +171,6 @@ v8::Local<v8::Object> V8AbstractEventListener::getReceiverObject(ScriptState* sc
EventTarget* target = event->currentTarget();
v8::Local<v8::Value> value = toV8(target, scriptState->context()->Global(), isolate());
- if (value.IsEmpty())
- return v8::Local<v8::Object>();
return v8::Local<v8::Object>::New(isolate(), v8::Local<v8::Object>::Cast(value));
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ToV8Test.cpp ('k') | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698