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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.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/ScriptValueSerializerForModules.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
index 3784968d26cf74e993c6afc4b46118cacfe73634..c591120312056351e6a714cf055e238e6d7dd760 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
@@ -376,7 +376,7 @@ bool SerializedScriptValueReaderForModules::readDOMFileSystem(v8::Local<v8::Valu
return false;
DOMFileSystem* fs = DOMFileSystem::create(getScriptState()->getExecutionContext(), name, static_cast<FileSystemType>(type), KURL(ParsedURLString, url));
*value = toV8(fs, getScriptState()->context()->Global(), isolate());
- return !value->IsEmpty();
+ return true;
}
bool SerializedScriptValueReaderForModules::readCryptoKey(v8::Local<v8::Value>* value)
@@ -433,7 +433,7 @@ bool SerializedScriptValueReaderForModules::readCryptoKey(v8::Local<v8::Value>*
}
*value = toV8(CryptoKey::create(key), getScriptState()->context()->Global(), isolate());
- return !value->IsEmpty();
+ return true;
}
bool SerializedScriptValueReaderForModules::readRTCCertificate(v8::Local<v8::Value>* value)
@@ -455,7 +455,7 @@ bool SerializedScriptValueReaderForModules::readRTCCertificate(v8::Local<v8::Val
RTCCertificate* jsCertificate = new RTCCertificate(std::move(certificate));
*value = toV8(jsCertificate, getScriptState()->context()->Global(), isolate());
- return !value->IsEmpty();
+ return true;
}
bool SerializedScriptValueReaderForModules::doReadHmacKey(WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyType& type)

Powered by Google App Engine
This is Rietveld 408576698