| Index: Source/core/fileapi/File.cpp
|
| diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp
|
| index cb0466492b56ffcb9a478ac4352edc6dd8dc56d9..ce62104ff226533db4ab6f08e41ff51440ac6871 100644
|
| --- a/Source/core/fileapi/File.cpp
|
| +++ b/Source/core/fileapi/File.cpp
|
| @@ -82,7 +82,7 @@ static PassOwnPtr<BlobData> createBlobDataForFileSystemURL(const KURL& fileSyste
|
| {
|
| OwnPtr<BlobData> blobData = BlobData::create();
|
| blobData->setContentType(getContentTypeFromFileName(fileSystemURL.path(), File::WellKnownContentTypes));
|
| - blobData->appendURL(fileSystemURL, 0, metadata.length, metadata.modificationTime);
|
| + blobData->appendFileSystemURL(fileSystemURL, 0, metadata.length, metadata.modificationTime);
|
| return blobData.release();
|
| }
|
|
|
| @@ -94,7 +94,7 @@ PassRefPtr<File> File::createWithRelativePath(const String& path, const String&
|
| }
|
|
|
| File::File(const String& path, ContentTypeLookupPolicy policy)
|
| - : Blob(createBlobDataForFile(path, policy), -1)
|
| + : Blob(BlobDataHandle::create(createBlobDataForFile(path, policy), -1))
|
| , m_path(path)
|
| , m_name(WebKit::Platform::current()->fileUtilities()->baseName(path))
|
| , m_snapshotSize(-1)
|
| @@ -103,31 +103,32 @@ File::File(const String& path, ContentTypeLookupPolicy policy)
|
| ScriptWrappable::init(this);
|
| }
|
|
|
| -File::File(const String& path, const KURL& url, const String& type)
|
| - : Blob(url, type, -1)
|
| +File::File(const String& path, const String& name, ContentTypeLookupPolicy policy)
|
| + : Blob(BlobDataHandle::create(createBlobDataForFileWithName(path, name, policy), -1))
|
| , m_path(path)
|
| + , m_name(name)
|
| , m_snapshotSize(-1)
|
| , m_snapshotModificationTime(invalidFileTime())
|
| {
|
| ScriptWrappable::init(this);
|
| - m_name = WebKit::Platform::current()->fileUtilities()->baseName(path);
|
| - // FIXME: File object serialization/deserialization does not include
|
| - // newer file object data members: m_name and m_relativePath.
|
| - // See SerializedScriptValue.cpp for js and v8.
|
| }
|
|
|
| -File::File(const String& path, const String& name, ContentTypeLookupPolicy policy)
|
| - : Blob(createBlobDataForFileWithName(path, name, policy), -1)
|
| +File::File(const String& path, PassRefPtr<BlobDataHandle> blobDataHandle)
|
| + : Blob(blobDataHandle)
|
| , m_path(path)
|
| - , m_name(name)
|
| + , m_name(WebKit::Platform::current()->fileUtilities()->baseName(path))
|
| , m_snapshotSize(-1)
|
| , m_snapshotModificationTime(invalidFileTime())
|
| {
|
| ScriptWrappable::init(this);
|
| + // FIXME: File object serialization/deserialization does not include
|
| + // newer file object data members: m_name and m_relativePath.
|
| + // See SerializedScriptValue.cpp.
|
| }
|
|
|
| +
|
| File::File(const String& name, const FileMetadata& metadata)
|
| - : Blob(createBlobDataForFileWithMetadata(name, metadata), metadata.length)
|
| + : Blob(BlobDataHandle::create(createBlobDataForFileWithMetadata(name, metadata), metadata.length))
|
| , m_path(metadata.platformPath)
|
| , m_name(name)
|
| , m_snapshotSize(metadata.length)
|
| @@ -137,7 +138,7 @@ File::File(const String& name, const FileMetadata& metadata)
|
| }
|
|
|
| File::File(const KURL& fileSystemURL, const FileMetadata& metadata)
|
| - : Blob(createBlobDataForFileSystemURL(fileSystemURL, metadata), metadata.length)
|
| + : Blob(BlobDataHandle::create(createBlobDataForFileSystemURL(fileSystemURL, metadata), metadata.length))
|
| , m_fileSystemURL(fileSystemURL)
|
| , m_snapshotSize(metadata.length)
|
| , m_snapshotModificationTime(metadata.modificationTime)
|
|
|