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

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

Issue 2438653002: Support serializable DOMFileSystem on the V8-based structured clone path. (Closed)
Patch Set: Created 4 years, 2 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/serialization/V8ScriptValueDeserializerForModules.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueDeserializerForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueDeserializerForModules.cpp
index 9cfade22feb22667501103c9988a352a83c47808..9f59a136f55cf7929a1ecb8d83daadf7a1b6b42a 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueDeserializerForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/serialization/V8ScriptValueDeserializerForModules.cpp
@@ -6,7 +6,9 @@
#include "bindings/modules/v8/serialization/WebCryptoSubTags.h"
#include "modules/crypto/CryptoKey.h"
+#include "modules/filesystem/DOMFileSystem.h"
#include "modules/peerconnection/RTCCertificate.h"
+#include "platform/FileSystemType.h"
#include "public/platform/Platform.h"
#include "public/platform/WebCrypto.h"
#include "public/platform/WebCryptoKeyAlgorithm.h"
@@ -25,6 +27,17 @@ ScriptWrappable* V8ScriptValueDeserializerForModules::readDOMObject(
switch (tag) {
case CryptoKeyTag:
return readCryptoKey();
+ case DOMFileSystemTag: {
+ uint32_t rawType;
+ String name;
+ String rootURL;
+ if (!readUint32(&rawType) || rawType > FileSystemTypeLast ||
+ !readUTF8String(&name) || !readUTF8String(&rootURL))
+ return nullptr;
+ return DOMFileSystem::create(getScriptState()->getExecutionContext(),
+ name, static_cast<FileSystemType>(rawType),
+ KURL(ParsedURLString, rootURL));
+ }
case RTCCertificateTag: {
String pemPrivateKey;
String pemCertificate;

Powered by Google App Engine
This is Rietveld 408576698