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

Unified Diff: Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp

Issue 1100223003: bindings: Add empty checks for toV8() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 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: Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
diff --git a/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp b/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
index e6ac50e8fd146dd78d7a6de19c1b9ec902cb338e..483c0940ea96b93868781dd7ee16efa330f48c69 100644
--- a/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
+++ b/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
@@ -345,7 +345,7 @@ bool SerializedScriptValueReaderForModules::readDOMFileSystem(v8::Local<v8::Valu
return false;
DOMFileSystem* fs = DOMFileSystem::create(scriptState()->executionContext(), name, static_cast<FileSystemType>(type), KURL(ParsedURLString, url));
*value = toV8(fs, scriptState()->context()->Global(), isolate());
- return true;
+ return !value->IsEmpty();
}
bool SerializedScriptValueReaderForModules::readCryptoKey(v8::Local<v8::Value>* value)
@@ -402,7 +402,7 @@ bool SerializedScriptValueReaderForModules::readCryptoKey(v8::Local<v8::Value>*
}
*value = toV8(CryptoKey::create(key), scriptState()->context()->Global(), isolate());
- return true;
+ return !value->IsEmpty();
}
bool SerializedScriptValueReaderForModules::doReadHmacKey(WebCryptoKeyAlgorithm& algorithm, WebCryptoKeyType& type)

Powered by Google App Engine
This is Rietveld 408576698