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

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp

Issue 2755383004: Encapsulate optional SerializedScriptValue serialize/deserialize parameters. (Closed)
Patch Set: fuzzer Created 3 years, 9 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 10d6059cadd19b56ead63c3b513900676ca9e6fb..f042536f137bbddbf15cc438d4bd04613997e68a 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/V8BindingForModules.cpp
@@ -387,7 +387,9 @@ static v8::Local<v8::Value> deserializeIDBValueData(v8::Isolate* isolate,
RefPtr<SerializedScriptValue> serializedValue =
value->createSerializedValue();
- return serializedValue->deserialize(isolate, nullptr, value->blobInfo());
+ SerializedScriptValue::DeserializeOptions options;
+ options.blobInfo = value->blobInfo();
+ return serializedValue->deserialize(isolate, options);
}
// Deserialize the entire IDBValue (injecting key & keypath if present).
@@ -541,10 +543,13 @@ ScriptValue deserializeScriptValue(ScriptState* scriptState,
const Vector<WebBlobInfo>* blobInfo) {
v8::Isolate* isolate = scriptState->isolate();
v8::HandleScope handleScope(isolate);
- if (serializedValue)
- return ScriptValue(
- scriptState, serializedValue->deserialize(isolate, nullptr, blobInfo));
- return ScriptValue(scriptState, v8::Null(isolate));
+ if (!serializedValue)
+ return ScriptValue::createNull(scriptState);
+
+ SerializedScriptValue::DeserializeOptions options;
+ options.blobInfo = blobInfo;
+ return ScriptValue(scriptState,
+ serializedValue->deserialize(isolate, options));
}
SQLValue NativeValueTraits<SQLValue>::nativeValue(

Powered by Google App Engine
This is Rietveld 408576698