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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.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/V8WorkerGlobalScopeEventListener.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp b/third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
index 3546a873a016c81e52d1b564463a533cebb3f3bc..1f0ebc682608d2c7cd57286d9c4ab3f8c3f0298d 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8WorkerGlobalScopeEventListener.cpp
@@ -58,9 +58,6 @@ void V8WorkerGlobalScopeEventListener::handleEvent(ScriptState* scriptState, Eve
// 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));
}
@@ -94,8 +91,6 @@ v8::Local<v8::Object> V8WorkerGlobalScopeEventListener::getReceiverObject(Script
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));
}

Powered by Google App Engine
This is Rietveld 408576698