| Index: Source/core/fileapi/File.cpp
|
| diff --git a/Source/core/fileapi/File.cpp b/Source/core/fileapi/File.cpp
|
| index 8e5e32f538badaa325a00c47ab1732b04727f0b2..c578ada5303bb5fabb39259a3c9b859bcfd64fa6 100644
|
| --- a/Source/core/fileapi/File.cpp
|
| +++ b/Source/core/fileapi/File.cpp
|
| @@ -81,7 +81,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();
|
| }
|
|
|
| @@ -93,7 +93,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)
|
| @@ -102,31 +102,31 @@ 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)
|
| @@ -136,7 +136,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)
|
|
|