| 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 334f4a9434b239eb0344d009c664f2985c4a795c..76e8c2c545e0b2cb28dee294d2b22780be94051c 100644
|
| --- a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
|
| +++ b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
|
| @@ -7,10 +7,10 @@
|
| #include "bindings/core/v8/SerializationTag.h"
|
| #include "bindings/core/v8/V8Binding.h"
|
| #include "bindings/modules/v8/V8CryptoKey.h"
|
| -#include "bindings/modules/v8/V8DOMFileSystem.h"
|
| +#include "bindings/modules/v8/V8FileSystem.h"
|
| #include "bindings/modules/v8/V8RTCCertificate.h"
|
| #include "bindings/modules/v8/serialization/WebCryptoSubTags.h"
|
| -#include "modules/filesystem/DOMFileSystem.h"
|
| +#include "modules/filesystem/FileSystem.h"
|
| #include "modules/peerconnection/RTCCertificate.h"
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebRTCCertificate.h"
|
| @@ -27,16 +27,16 @@ ScriptValueSerializerForModules::ScriptValueSerializerForModules(
|
| : ScriptValueSerializer(writer, blobInfo, scriptState) {}
|
|
|
| ScriptValueSerializer::StateBase*
|
| -ScriptValueSerializerForModules::writeDOMFileSystem(v8::Local<v8::Value> value,
|
| - StateBase* next) {
|
| - DOMFileSystem* fs = V8DOMFileSystem::toImpl(value.As<v8::Object>());
|
| +ScriptValueSerializerForModules::writeFileSystem(v8::Local<v8::Value> value,
|
| + StateBase* next) {
|
| + FileSystem* fs = V8FileSystem::toImpl(value.As<v8::Object>());
|
| if (!fs)
|
| return 0;
|
| if (!fs->clonable())
|
| return handleError(Status::DataCloneError,
|
| "A FileSystem object could not be cloned.", next);
|
|
|
| - toSerializedScriptValueWriterForModules(writer()).writeDOMFileSystem(
|
| + toSerializedScriptValueWriterForModules(writer()).writeFileSystem(
|
| fs->type(), fs->name(), fs->rootURL().getString());
|
| return 0;
|
| }
|
| @@ -63,11 +63,10 @@ ScriptValueSerializerForModules::writeRTCCertificate(v8::Local<v8::Value> value,
|
| return nullptr;
|
| }
|
|
|
| -void SerializedScriptValueWriterForModules::writeDOMFileSystem(
|
| - int type,
|
| - const String& name,
|
| - const String& url) {
|
| - append(DOMFileSystemTag);
|
| +void SerializedScriptValueWriterForModules::writeFileSystem(int type,
|
| + const String& name,
|
| + const String& url) {
|
| + append(FileSystemTag);
|
| doWriteUint32(type);
|
| doWriteWebCoreString(name);
|
| doWriteWebCoreString(url);
|
| @@ -275,9 +274,9 @@ ScriptValueSerializerForModules::doSerializeObject(
|
| StateBase* next) {
|
| DCHECK(!jsObject.IsEmpty());
|
|
|
| - if (V8DOMFileSystem::hasInstance(jsObject, isolate())) {
|
| + if (V8FileSystem::hasInstance(jsObject, isolate())) {
|
| greyObject(jsObject);
|
| - return writeDOMFileSystem(jsObject, next);
|
| + return writeFileSystem(jsObject, next);
|
| }
|
| if (V8CryptoKey::hasInstance(jsObject, isolate())) {
|
| greyObject(jsObject);
|
| @@ -301,8 +300,8 @@ bool SerializedScriptValueReaderForModules::read(
|
| if (!readTag(&tag))
|
| return false;
|
| switch (tag) {
|
| - case DOMFileSystemTag:
|
| - if (!readDOMFileSystem(value))
|
| + case FileSystemTag:
|
| + if (!readFileSystem(value))
|
| return false;
|
| deserializer.pushObjectReference(*value);
|
| break;
|
| @@ -322,7 +321,7 @@ bool SerializedScriptValueReaderForModules::read(
|
| return !value->IsEmpty();
|
| }
|
|
|
| -bool SerializedScriptValueReaderForModules::readDOMFileSystem(
|
| +bool SerializedScriptValueReaderForModules::readFileSystem(
|
| v8::Local<v8::Value>* value) {
|
| uint32_t type;
|
| String name;
|
| @@ -333,9 +332,9 @@ bool SerializedScriptValueReaderForModules::readDOMFileSystem(
|
| return false;
|
| if (!readWebCoreString(&url))
|
| return false;
|
| - DOMFileSystem* fs = DOMFileSystem::create(
|
| - getScriptState()->getExecutionContext(), name,
|
| - static_cast<FileSystemType>(type), KURL(ParsedURLString, url));
|
| + FileSystem* fs = FileSystem::create(getScriptState()->getExecutionContext(),
|
| + name, static_cast<FileSystemType>(type),
|
| + KURL(ParsedURLString, url));
|
| *value = toV8(fs, getScriptState()->context()->Global(), isolate());
|
| return !value->IsEmpty();
|
| }
|
|
|