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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.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/modules/v8/V8BindingForModules.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
index 344368f6507f5916270d42649b769ea2c52a458a..0afed46c4391a0b7a632816cd9254f91f256d325 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
@@ -113,8 +113,6 @@ v8::Local<v8::Value> toV8(const IDBKey* key, v8::Local<v8::Object> creationConte
v8::Local<v8::Array> array = v8::Array::New(isolate, key->array().size());
for (size_t i = 0; i < key->array().size(); ++i) {
v8::Local<v8::Value> value = toV8(key->array()[i].get(), creationContext, isolate);
- if (value.IsEmpty())
- value = v8::Undefined(isolate);
if (!v8CallBoolean(array->CreateDataProperty(context, i, value)))
return v8Undefined();
}
@@ -379,8 +377,6 @@ static v8::Local<v8::Value> deserializeIDBValue(v8::Isolate* isolate, v8::Local<
v8::Local<v8::Value> v8Value = deserializeIDBValueData(isolate, value);
if (value->primaryKey()) {
v8::Local<v8::Value> key = toV8(value->primaryKey(), creationContext, isolate);
- if (key.IsEmpty())
- return v8::Local<v8::Value>();
bool injected = injectV8KeyIntoV8Value(isolate, key, v8Value, value->keyPath());
ASSERT_UNUSED(injected, injected);
}

Powered by Google App Engine
This is Rietveld 408576698