[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

kinuko at chromium.org kinuko at chromium.org
Wed Dec 22 14:55:13 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 75d7c53ed189403251576de5987abbd72c77f00a
Author: kinuko at chromium.org <kinuko at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Oct 25 05:53:35 2010 +0000

    2010-10-20  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by Jian Li.
    
            Renumber FileError/FileException error codes per latest File API spec changes
            https://bugs.webkit.org/show_bug.cgi?id=47936
    
            * public/WebFileError.h:
            * src/AssertMatchingEnums.cpp:
            * src/AsyncFileWriterChromium.cpp:
            (WebCore::AsyncFileWriterChromium::didFail):
    2010-10-20  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by Jian Li.
    
            Renumber FileError/FileException error codes per latest File API spec changes
            https://bugs.webkit.org/show_bug.cgi?id=47936
    
            * bindings/js/JSDOMBinding.cpp:
            (WebCore::setDOMException): Added FileExceptionType case.
            * bindings/v8/V8Proxy.cpp:
            (WebCore::V8Proxy::setDOMException): Added FileExceptionType case.
            * dom/ExceptionCode.cpp:
            (WebCore::getExceptionCodeDescription): Added code for FileException.
            * dom/ExceptionCode.h:
            * fileapi/AsyncFileWriterClient.h:
            * fileapi/DirectoryEntry.cpp:
            (WebCore::DirectoryEntry::getFile):
            (WebCore::DirectoryEntry::getDirectory):
            (WebCore::DirectoryEntry::removeRecursively):
            * fileapi/DirectoryEntrySync.cpp:
            (WebCore::DirectoryEntrySync::getFile):
            (WebCore::DirectoryEntrySync::getDirectory):
            (WebCore::DirectoryEntrySync::removeRecursively):
            * fileapi/DirectoryReaderSync.cpp:
            (WebCore::DirectoryReaderSync::readEntries):
            * fileapi/Entry.cpp:
            (WebCore::Entry::getMetadata):
            (WebCore::Entry::moveTo):
            (WebCore::Entry::copyTo):
            (WebCore::Entry::remove):
            (WebCore::Entry::getParent):
            * fileapi/EntrySync.cpp:
            (WebCore::EntrySync::getMetadata):
            (WebCore::EntrySync::moveTo):
            (WebCore::EntrySync::copyTo):
            (WebCore::EntrySync::remove):
            * fileapi/FileError.h: Added error code enum.
            (WebCore::FileError::create):
            (WebCore::FileError::code):
            (WebCore::FileError::FileError):
            * fileapi/FileError.idl: Rebased error code numbers.
            * fileapi/FileException.h: Added exception code enum.
            (WebCore::FileException::ErrorCodeToExceptionCode): Added.
            * fileapi/FileException.idl: Rebased exception code numbers.
            * fileapi/FileReader.cpp:
            (WebCore::FileReader::abort):
            (WebCore::FileReader::failed):
            (WebCore::FileReader::httpStatusCodeToErrorCode): Changed from
            httpStatuCodeToExceptionCode.
            * fileapi/FileReader.h:
            * fileapi/FileReaderSync.cpp:
            (WebCore::FileReaderSyncLoader::start):
            * fileapi/FileSystemCallbacks.cpp:
            (WebCore::FileSystemCallbacksBase::didFail):
            * fileapi/FileWriter.cpp:
            (WebCore::FileWriter::write):
            (WebCore::FileWriter::seek):
            (WebCore::FileWriter::truncate):
            (WebCore::FileWriter::abort):
            (WebCore::FileWriter::didFail):
            (WebCore::FileWriter::setError):
            * fileapi/FileWriter.h:
            * fileapi/SyncCallbackHelper.h:
            (WebCore::SyncCallbackHelper::SyncCallbackHelper):
            (WebCore::SyncCallbackHelper::getResult):
            (WebCore::SyncCallbackHelper::setError):
            * page/DOMWindow.cpp:
            (WebCore::DOMWindow::requestFileSystem):
            * workers/WorkerContext.cpp:
            (WebCore::WorkerContext::requestFileSystem):
            (WebCore::WorkerContext::requestFileSystemSync):
    2010-10-20  Kinuko Yasuda  <kinuko at chromium.org>
    
            Reviewed by Jian Li.
    
            Renumber FileError/FileException error codes per latest File API spec changes
            https://bugs.webkit.org/show_bug.cgi?id=47936
    
            Updated test expectations to match with the new error code.
    
            * fast/files/read-blob-async-expected.txt:
            * fast/files/read-file-async-expected.txt:
            * fast/files/workers/worker-read-blob-async-expected.txt:
            * fast/files/workers/worker-read-blob-sync-expected.txt:
            * fast/files/workers/worker-read-file-async-expected.txt:
            * fast/files/workers/worker-read-file-sync-expected.txt:
            * fast/filesystem/op-copy-expected.txt:
            * fast/filesystem/op-get-entry-expected.txt:
            * fast/filesystem/op-move-expected.txt:
            * fast/filesystem/op-remove-expected.txt:
            * fast/filesystem/op-restricted-chars-expected.txt:
            * fast/filesystem/op-restricted-names-expected.txt:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70438 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index c7d2689..e46331c 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,25 @@
+2010-10-20  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by Jian Li.
+
+        Renumber FileError/FileException error codes per latest File API spec changes
+        https://bugs.webkit.org/show_bug.cgi?id=47936
+
+        Updated test expectations to match with the new error code.
+
+        * fast/files/read-blob-async-expected.txt:
+        * fast/files/read-file-async-expected.txt:
+        * fast/files/workers/worker-read-blob-async-expected.txt:
+        * fast/files/workers/worker-read-blob-sync-expected.txt:
+        * fast/files/workers/worker-read-file-async-expected.txt:
+        * fast/files/workers/worker-read-file-sync-expected.txt:
+        * fast/filesystem/op-copy-expected.txt:
+        * fast/filesystem/op-get-entry-expected.txt:
+        * fast/filesystem/op-move-expected.txt:
+        * fast/filesystem/op-remove-expected.txt:
+        * fast/filesystem/op-restricted-chars-expected.txt:
+        * fast/filesystem/op-restricted-names-expected.txt:
+
 2010-10-24  MORITA Hajime  <morrita at google.com>
 
         Unreviewed skip.
diff --git a/LayoutTests/fast/files/read-blob-async-expected.txt b/LayoutTests/fast/files/read-blob-async-expected.txt
index 27d8c0a..099b1be 100644
--- a/LayoutTests/fast/files/read-blob-async-expected.txt
+++ b/LayoutTests/fast/files/read-blob-async-expected.txt
@@ -3,13 +3,13 @@ Test reading a blob containing non-existent file
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a blob containing existent and non-existent file
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a blob containing empty file
 readyState: 0
diff --git a/LayoutTests/fast/files/read-file-async-expected.txt b/LayoutTests/fast/files/read-file-async-expected.txt
index 76fd55f..d94eabb 100644
--- a/LayoutTests/fast/files/read-file-async-expected.txt
+++ b/LayoutTests/fast/files/read-file-async-expected.txt
@@ -3,19 +3,19 @@ Test reading a non-existent file as binary string
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a non-existent file as text
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a non-existent file as data URL
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading an empty file as binary string
 readyState: 0
diff --git a/LayoutTests/fast/files/workers/worker-read-blob-async-expected.txt b/LayoutTests/fast/files/workers/worker-read-blob-async-expected.txt
index 89bbd88..689e7b2 100644
--- a/LayoutTests/fast/files/workers/worker-read-blob-async-expected.txt
+++ b/LayoutTests/fast/files/workers/worker-read-blob-async-expected.txt
@@ -4,13 +4,13 @@ Test reading a blob containing non-existent file
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a blob containing existent and non-existent file
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a blob containing empty file
 readyState: 0
diff --git a/LayoutTests/fast/files/workers/worker-read-blob-sync-expected.txt b/LayoutTests/fast/files/workers/worker-read-blob-sync-expected.txt
index 3d9058b..f0ec0f1 100644
--- a/LayoutTests/fast/files/workers/worker-read-blob-sync-expected.txt
+++ b/LayoutTests/fast/files/workers/worker-read-blob-sync-expected.txt
@@ -1,9 +1,9 @@
 
 Received files in worker
 Test reading a blob containing non-existent file
-Received exception 8: NOT_FOUND_ERR
+Received exception 1: NOT_FOUND_ERR
 Test reading a blob containing existent and non-existent file
-Received exception 8: NOT_FOUND_ERR
+Received exception 1: NOT_FOUND_ERR
 Test reading a blob containing empty file
 
 Test reading a blob containing empty text
@@ -17,7 +17,7 @@ First
 Test reading a blob containing single text as data URL
 data:base64,Rmlyc3Q=
 Test reading a blob containing single text as data URL (optional content type provided)
-result: data:type/foo;base64,Rmlyc3Q=
+data:type/foo;base64,Rmlyc3Q=
 Test reading a blob containing sliced file
 onder
 Test reading a blob containing sliced text
diff --git a/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt b/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt
index a497658..d0361b3 100644
--- a/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt
+++ b/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt
@@ -4,19 +4,19 @@ Test reading a non-existent file as binary string
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a non-existent file as text
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading a non-existent file as data URL
 readyState: 0
 Received error event
 readyState: 2
-error code: 8
+error code: 1
 Received loadend event
 Test reading an empty file as binary string
 readyState: 0
diff --git a/LayoutTests/fast/filesystem/op-copy-expected.txt b/LayoutTests/fast/filesystem/op-copy-expected.txt
index a76a921..6d18912 100644
--- a/LayoutTests/fast/filesystem/op-copy-expected.txt
+++ b/LayoutTests/fast/filesystem/op-copy-expected.txt
@@ -19,26 +19,26 @@ PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 PASS Verified entry: ENTRY {path:/c/b name:b type:FILE}
 * Running: CopyFileWithEmptyNameToSameDirectory
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 * Running: CopyFileWithSameName
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 * Running: CopyForNonExistentEntry
 PASS Succeeded: "/a/b".remove()
-PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "1"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/c name:c type:DIRECTORY}
 * Running: CopyEntryToNonExistentDirectory
 PASS Succeeded: "/c".remove()
-PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "1"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 * Running: CopyEntryToItsChild
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b/c name:c type:DIRECTORY}
diff --git a/LayoutTests/fast/filesystem/op-get-entry-expected.txt b/LayoutTests/fast/filesystem/op-get-entry-expected.txt
index 8779318..1f49bb6 100644
--- a/LayoutTests/fast/filesystem/op-get-entry-expected.txt
+++ b/LayoutTests/fast/filesystem/op-get-entry-expected.txt
@@ -24,15 +24,15 @@ PASS Succeeded: "/a".getDirectory("../b")
 PASS Succeeded: "/a".getDirectory("../../b/c")
 PASS Succeeded: "/a".getDirectory("/a/../../d")
 PASS Succeeded: "/a".getDirectory("/a/../../b/./c/../../../../../e")
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Succeeded: "/a".getFile("./b.txt")
 PASS Succeeded: "/a".getFile("../b.txt")
 PASS Succeeded: "/a".getFile("../../b/c.txt")
 PASS Succeeded: "/a".getFile("/a/../../d.txt")
 PASS Succeeded: "/a".getFile("/a/../../b/./c/../../../../../e.txt")
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/b name:b type:DIRECTORY}
@@ -66,21 +66,21 @@ PASS this.environment[this.entry.fullPath].isDirectory + "" is "false"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/b name:b type:FILE}
 * Running: GetNonExistent
-PASS this.expectedErrorCode + "" is "8"
-PASS this.expectedErrorCode + "" is "8"
-PASS this.expectedErrorCode + "" is "8"
-PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "1"
+PASS this.expectedErrorCode + "" is "1"
+PASS this.expectedErrorCode + "" is "1"
+PASS this.expectedErrorCode + "" is "1"
 * Running: GetFileForDirectory
-PASS this.expectedErrorCode + "" is "11"
-PASS this.expectedErrorCode + "" is "11"
+PASS this.expectedErrorCode + "" is "7"
+PASS this.expectedErrorCode + "" is "7"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 * Running: GetDirectoryForFile
-PASS this.expectedErrorCode + "" is "11"
-PASS this.expectedErrorCode + "" is "11"
+PASS this.expectedErrorCode + "" is "7"
+PASS this.expectedErrorCode + "" is "7"
 PASS Verified entry: ENTRY {path:/a name:a type:FILE}
 * Running: CreateWithExclusive
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/b name:b type:FILE}
 Finished running tests.
diff --git a/LayoutTests/fast/filesystem/op-move-expected.txt b/LayoutTests/fast/filesystem/op-move-expected.txt
index 4158672..3546396 100644
--- a/LayoutTests/fast/filesystem/op-move-expected.txt
+++ b/LayoutTests/fast/filesystem/op-move-expected.txt
@@ -19,26 +19,26 @@ PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry does NOT exist: /a/b
 PASS Verified entry: ENTRY {path:/c/b name:b type:FILE}
 * Running: MoveFileWithEmptyNameToSameDirectory
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 * Running: MoveFileWithSameName
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 * Running: MoveForNonExistentEntry
 PASS Succeeded: "/a/b".remove()
-PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "1"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/c name:c type:DIRECTORY}
 * Running: MoveEntryToNonExistentDirectory
 PASS Succeeded: "/c".remove()
-PASS this.expectedErrorCode + "" is "8"
+PASS this.expectedErrorCode + "" is "1"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:FILE}
 * Running: MoveEntryToItsChild
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b/c name:c type:DIRECTORY}
diff --git a/LayoutTests/fast/filesystem/op-remove-expected.txt b/LayoutTests/fast/filesystem/op-remove-expected.txt
index 9368933..82af44c 100644
--- a/LayoutTests/fast/filesystem/op-remove-expected.txt
+++ b/LayoutTests/fast/filesystem/op-remove-expected.txt
@@ -1,11 +1,11 @@
 * Running: RemoveSimple
 PASS Succeeded: "/a".remove()
 PASS Succeeded: "/b".remove()
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry does NOT exist: /a
 PASS Verified entry does NOT exist: /b
 * Running: RemoveNonRecursiveWithChildren
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/b name:b type:DIRECTORY}
 PASS Verified entry: ENTRY {path:/a/c name:c type:FILE}
@@ -14,7 +14,7 @@ PASS Succeeded: "/a".removeRecursively()
 PASS Verified entry does NOT exist: /a
 * Running: RemoveRecursiveWithChildren
 PASS Succeeded: "/a".removeRecursively()
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry does NOT exist: /a
 Finished running tests.
 PASS successfullyParsed is true
diff --git a/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt b/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt
index ade72df..32454a7 100644
--- a/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt
+++ b/LayoutTests/fast/filesystem/op-restricted-chars-expected.txt
@@ -1,35 +1,35 @@
 * Running: RestrictedChars
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Succeeded: "/".getFile("ab")
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/ab name:ab type:FILE}
 Finished running tests.
 PASS successfullyParsed is true
diff --git a/LayoutTests/fast/filesystem/op-restricted-names-expected.txt b/LayoutTests/fast/filesystem/op-restricted-names-expected.txt
index c390379..74a9018 100644
--- a/LayoutTests/fast/filesystem/op-restricted-names-expected.txt
+++ b/LayoutTests/fast/filesystem/op-restricted-names-expected.txt
@@ -1,43 +1,43 @@
 * Running: RestrictedChars
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
-PASS this.expectedErrorCode + "" is "13"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
+PASS this.expectedErrorCode + "" is "9"
 PASS Verified entry: ENTRY {path:/a name:a type:DIRECTORY}
 Finished running tests.
 PASS successfullyParsed is true
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 3df9c18..ec4750a 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,75 @@
+2010-10-20  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by Jian Li.
+
+        Renumber FileError/FileException error codes per latest File API spec changes
+        https://bugs.webkit.org/show_bug.cgi?id=47936
+
+        * bindings/js/JSDOMBinding.cpp:
+        (WebCore::setDOMException): Added FileExceptionType case.
+        * bindings/v8/V8Proxy.cpp:
+        (WebCore::V8Proxy::setDOMException): Added FileExceptionType case.
+        * dom/ExceptionCode.cpp:
+        (WebCore::getExceptionCodeDescription): Added code for FileException.
+        * dom/ExceptionCode.h:
+        * fileapi/AsyncFileWriterClient.h:
+        * fileapi/DirectoryEntry.cpp:
+        (WebCore::DirectoryEntry::getFile):
+        (WebCore::DirectoryEntry::getDirectory):
+        (WebCore::DirectoryEntry::removeRecursively):
+        * fileapi/DirectoryEntrySync.cpp:
+        (WebCore::DirectoryEntrySync::getFile):
+        (WebCore::DirectoryEntrySync::getDirectory):
+        (WebCore::DirectoryEntrySync::removeRecursively):
+        * fileapi/DirectoryReaderSync.cpp:
+        (WebCore::DirectoryReaderSync::readEntries):
+        * fileapi/Entry.cpp:
+        (WebCore::Entry::getMetadata):
+        (WebCore::Entry::moveTo):
+        (WebCore::Entry::copyTo):
+        (WebCore::Entry::remove):
+        (WebCore::Entry::getParent):
+        * fileapi/EntrySync.cpp:
+        (WebCore::EntrySync::getMetadata):
+        (WebCore::EntrySync::moveTo):
+        (WebCore::EntrySync::copyTo):
+        (WebCore::EntrySync::remove):
+        * fileapi/FileError.h: Added error code enum.
+        (WebCore::FileError::create):
+        (WebCore::FileError::code):
+        (WebCore::FileError::FileError):
+        * fileapi/FileError.idl: Rebased error code numbers.
+        * fileapi/FileException.h: Added exception code enum.
+        (WebCore::FileException::ErrorCodeToExceptionCode): Added.
+        * fileapi/FileException.idl: Rebased exception code numbers.
+        * fileapi/FileReader.cpp:
+        (WebCore::FileReader::abort):
+        (WebCore::FileReader::failed):
+        (WebCore::FileReader::httpStatusCodeToErrorCode): Changed from
+        httpStatuCodeToExceptionCode.
+        * fileapi/FileReader.h:
+        * fileapi/FileReaderSync.cpp:
+        (WebCore::FileReaderSyncLoader::start):
+        * fileapi/FileSystemCallbacks.cpp:
+        (WebCore::FileSystemCallbacksBase::didFail):
+        * fileapi/FileWriter.cpp:
+        (WebCore::FileWriter::write):
+        (WebCore::FileWriter::seek):
+        (WebCore::FileWriter::truncate):
+        (WebCore::FileWriter::abort):
+        (WebCore::FileWriter::didFail):
+        (WebCore::FileWriter::setError):
+        * fileapi/FileWriter.h:
+        * fileapi/SyncCallbackHelper.h:
+        (WebCore::SyncCallbackHelper::SyncCallbackHelper):
+        (WebCore::SyncCallbackHelper::getResult):
+        (WebCore::SyncCallbackHelper::setError):
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::requestFileSystem):
+        * workers/WorkerContext.cpp:
+        (WebCore::WorkerContext::requestFileSystem):
+        (WebCore::WorkerContext::requestFileSystemSync):
+
 2010-10-24  Dan Bernstein  <mitz at apple.com>
 
         Reviewed by Anders Carlsson.
diff --git a/WebCore/bindings/js/JSDOMBinding.cpp b/WebCore/bindings/js/JSDOMBinding.cpp
index 72e6d03..e4cff4a 100644
--- a/WebCore/bindings/js/JSDOMBinding.cpp
+++ b/WebCore/bindings/js/JSDOMBinding.cpp
@@ -78,6 +78,11 @@
 #include "SQLException.h"
 #endif
 
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+#include "FileException.h"
+#include "JSFileException.h"
+#endif
+
 using namespace JSC;
 
 namespace WebCore {
@@ -619,6 +624,11 @@ void setDOMException(ExecState* exec, ExceptionCode ec)
             errorObject = toJS(exec, globalObject, SQLException::create(description));
             break;
 #endif
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+        case FileExceptionType:
+            errorObject = toJS(exec, globalObject, FileException::create(description));
+            break;
+#endif
     }
 
     ASSERT(errorObject);
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index 90c2ed8..e7d6bf6 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -55,6 +55,7 @@
 #include "V8DOMMap.h"
 #include "V8DOMWindow.h"
 #include "V8EventException.h"
+#include "V8FileException.h"
 #include "V8HiddenPropertyName.h"
 #include "V8IsolatedContext.h"
 #include "V8RangeException.h"
@@ -703,6 +704,11 @@ void V8Proxy::setDOMException(int exceptionCode)
         exception = toV8(SQLException::create(description));
         break;
 #endif
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+    case FileExceptionType:
+        exception = toV8(FileException::create(description));
+        break;
+#endif
     default:
         ASSERT_NOT_REACHED();
     }
diff --git a/WebCore/dom/ExceptionCode.cpp b/WebCore/dom/ExceptionCode.cpp
index 9303f9e..f048fe5 100644
--- a/WebCore/dom/ExceptionCode.cpp
+++ b/WebCore/dom/ExceptionCode.cpp
@@ -42,6 +42,10 @@
 #include "SQLException.h"
 #endif
 
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+#include "FileException.h"
+#endif
+
 namespace WebCore {
 
 static const char* const exceptionNames[] = {
@@ -173,6 +177,38 @@ static const char* const sqlExceptionDescriptions[] = {
 };
 #endif
 
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+static const char* const fileExceptionNames[] = {
+    "NOT_FOUND_ERR",
+    "SECURITY_ERR",
+    "ABORT_ERR",
+    "NOT_READABLE_ERR",
+    "ENCODING_ERR",
+    "NO_MODIFICATION_ALLOWED_ERR",
+    "INVALID_STATE_ERR",
+    "SYNTAX_ERR",
+    "INVALID_MODIFICATION_ERR",
+    "QUOTA_EXCEEDED_ERR",
+    "TYPE_MISMATCH_ERR",
+    "PATH_EXISTS_ERR"
+};
+
+static const char* const fileExceptionDescriptions[] = {
+    "A requested file or directory could not be found at the time an operation was processed.",
+    "It was determined that certain files are unsafe for access within a Web application, or that too many calls are being made on file resources.",
+    "An ongoing operation was aborted, typically with a call to abort().",
+    "The requested file could not be read, typically due to permission problems that have occured after a reference to a file was acquired.",
+    "A URI supplied to the API was malformed, or the resulting Data URL has exceeded the URL length limitations for Data URLs.",
+    "An attempt was made to write to a file or directory which could not be modified due to the state of the underlying filesystem.",
+    "An operation that depends on state cached in an interface object was made but the state had changed since it was read from disk.",
+    "An invalid or unsupported argument was given, like an invalid line ending specifier.",
+    "The modification request was illegal.",
+    "The operation failed because it would cause the application to exceed its storage quota.",
+    "The path supplied exists, but was not an entry of requested type.",
+    "An attempt was made to create a file or directory where an element already exists."
+};
+#endif
+
 void getExceptionCodeDescription(ExceptionCode ec, ExceptionCodeDescription& description)
 {
     ASSERT(ec);
@@ -241,6 +277,16 @@ void getExceptionCodeDescription(ExceptionCode ec, ExceptionCodeDescription& des
         nameTableSize = sizeof(sqlExceptionNames) / sizeof(sqlExceptionNames[0]);
         nameTableOffset = SQLException::UNKNOWN_ERR;
 #endif
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+    } else if (code >= FileException::FileExceptionOffset && code <= FileException::FileExceptionMax) {
+        type = FileExceptionType;
+        typeName = "DOM File";
+        code -= FileException::FileExceptionOffset;
+        nameTable = fileExceptionNames;
+        descriptionTable = fileExceptionDescriptions;
+        nameTableSize = sizeof(fileExceptionNames) / sizeof(fileExceptionNames[0]);
+        nameTableOffset = FileException::NOT_FOUND_ERR;
+#endif
     } else {
         type = DOMExceptionType;
         typeName = "DOM";
diff --git a/WebCore/dom/ExceptionCode.h b/WebCore/dom/ExceptionCode.h
index cbbf650..6ea9f7d 100644
--- a/WebCore/dom/ExceptionCode.h
+++ b/WebCore/dom/ExceptionCode.h
@@ -81,6 +81,9 @@ namespace WebCore {
 #if ENABLE(DATABASE)
         , SQLExceptionType
 #endif
+#if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
+        , FileExceptionType
+#endif
     };
 
 
diff --git a/WebCore/fileapi/AsyncFileWriterClient.h b/WebCore/fileapi/AsyncFileWriterClient.h
index 327b19c..929f523 100644
--- a/WebCore/fileapi/AsyncFileWriterClient.h
+++ b/WebCore/fileapi/AsyncFileWriterClient.h
@@ -33,7 +33,7 @@
 
 #if ENABLE(FILE_SYSTEM)
 
-#include "ExceptionCode.h"
+#include "FileError.h"
 
 namespace WebCore {
 
@@ -43,7 +43,7 @@ public:
 
     virtual void didWrite(long long bytes, bool complete) = 0;
     virtual void didTruncate() = 0;
-    virtual void didFail(ExceptionCode) = 0;
+    virtual void didFail(FileError::ErrorCode) = 0;
 };
 
 } // namespace
diff --git a/WebCore/fileapi/DirectoryEntry.cpp b/WebCore/fileapi/DirectoryEntry.cpp
index 765fcd5..7915117 100644
--- a/WebCore/fileapi/DirectoryEntry.cpp
+++ b/WebCore/fileapi/DirectoryEntry.cpp
@@ -55,21 +55,21 @@ void DirectoryEntry::getFile(const String& path, PassRefPtr<Flags> flags, PassRe
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->getFile(this, path, flags, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 void DirectoryEntry::getDirectory(const String& path, PassRefPtr<Flags> flags, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef)
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->getDirectory(this, path, flags, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 void DirectoryEntry::removeRecursively(PassRefPtr<VoidCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef) const
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->removeRecursively(this, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 }
diff --git a/WebCore/fileapi/DirectoryEntrySync.cpp b/WebCore/fileapi/DirectoryEntrySync.cpp
index d8d22c2..021d973 100644
--- a/WebCore/fileapi/DirectoryEntrySync.cpp
+++ b/WebCore/fileapi/DirectoryEntrySync.cpp
@@ -36,6 +36,7 @@
 #include "DirectoryReaderSync.h"
 #include "EntrySync.h"
 #include "FileEntrySync.h"
+#include "FileException.h"
 #include "SyncCallbackHelper.h"
 
 namespace WebCore {
@@ -55,7 +56,7 @@ PassRefPtr<FileEntrySync> DirectoryEntrySync::getFile(const String& path, PassRe
     ec = 0;
     EntrySyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->getFile(this, path, flags, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return 0;
     }
     return static_pointer_cast<FileEntrySync>(helper.getResult(ec));
@@ -66,7 +67,7 @@ PassRefPtr<DirectoryEntrySync> DirectoryEntrySync::getDirectory(const String& pa
     ec = 0;
     EntrySyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->getDirectory(this, path, flags, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return 0;
     }
     return static_pointer_cast<DirectoryEntrySync>(helper.getResult(ec));
@@ -77,7 +78,7 @@ void DirectoryEntrySync::removeRecursively(ExceptionCode& ec)
     ec = 0;
     VoidSyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->removeRecursively(this, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return;
     }
     helper.getResult(ec);
diff --git a/WebCore/fileapi/DirectoryReaderSync.cpp b/WebCore/fileapi/DirectoryReaderSync.cpp
index 6c66a15..9e5e684 100644
--- a/WebCore/fileapi/DirectoryReaderSync.cpp
+++ b/WebCore/fileapi/DirectoryReaderSync.cpp
@@ -39,7 +39,7 @@
 #include "EntrySync.h"
 #include "ExceptionCode.h"
 #include "FileEntrySync.h"
-#include "FileError.h"
+#include "FileException.h"
 #include "SyncCallbackHelper.h"
 
 namespace WebCore {
@@ -57,7 +57,7 @@ PassRefPtr<EntryArraySync> DirectoryReaderSync::readEntries(ExceptionCode& ec)
 
     EntriesSyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->readDirectory(this, m_fullPath, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         setHasMoreEntries(false);
         return 0;
     }
diff --git a/WebCore/fileapi/Entry.cpp b/WebCore/fileapi/Entry.cpp
index 2183b33..83e1a1d 100644
--- a/WebCore/fileapi/Entry.cpp
+++ b/WebCore/fileapi/Entry.cpp
@@ -51,35 +51,35 @@ void Entry::getMetadata(PassRefPtr<MetadataCallback> successCallback, PassRefPtr
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->getMetadata(this, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 void Entry::moveTo(PassRefPtr<DirectoryEntry> parent, const String& name, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef) const
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->move(this, parent.get(), name, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 void Entry::copyTo(PassRefPtr<DirectoryEntry> parent, const String& name, PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef) const
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->copy(this, parent.get(), name, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 void Entry::remove(PassRefPtr<VoidCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef) const
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->remove(this, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 void Entry::getParent(PassRefPtr<EntryCallback> successCallback, PassRefPtr<ErrorCallback> errorCallbackRef) const
 {
     RefPtr<ErrorCallback> errorCallback(errorCallbackRef);
     if (!m_fileSystem->getParent(this, successCallback, errorCallback))
-        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(INVALID_MODIFICATION_ERR));
+        filesystem()->scheduleCallback(errorCallback.release(), FileError::create(FileError::INVALID_MODIFICATION_ERR));
 }
 
 String Entry::toURI(const String&)
diff --git a/WebCore/fileapi/EntrySync.cpp b/WebCore/fileapi/EntrySync.cpp
index ad007db..a06bd22 100644
--- a/WebCore/fileapi/EntrySync.cpp
+++ b/WebCore/fileapi/EntrySync.cpp
@@ -38,6 +38,7 @@
 #include "DirectoryEntry.h"
 #include "DirectoryEntrySync.h"
 #include "FileEntrySync.h"
+#include "FileException.h"
 #include "Metadata.h"
 #include "SyncCallbackHelper.h"
 
@@ -55,7 +56,7 @@ PassRefPtr<Metadata> EntrySync::getMetadata(ExceptionCode& ec)
     ec = 0;
     MetadataSyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->getMetadata(this, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return 0;
     }
     return helper.getResult(ec);
@@ -66,7 +67,7 @@ PassRefPtr<EntrySync> EntrySync::moveTo(PassRefPtr<DirectoryEntrySync> parent, c
     ec = 0;
     EntrySyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->move(this, parent.get(), name, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return 0;
     }
     return helper.getResult(ec);
@@ -77,7 +78,7 @@ PassRefPtr<EntrySync> EntrySync::copyTo(PassRefPtr<DirectoryEntrySync> parent, c
     ec = 0;
     EntrySyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->copy(this, parent.get(), name, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return 0;
     }
     return helper.getResult(ec);
@@ -88,7 +89,7 @@ void EntrySync::remove(ExceptionCode& ec) const
     ec = 0;
     VoidSyncCallbackHelper helper(m_fileSystem->asyncFileSystem());
     if (!m_fileSystem->remove(this, helper.successCallback(), helper.errorCallback())) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return;
     }
     helper.getResult(ec);
diff --git a/WebCore/fileapi/FileError.h b/WebCore/fileapi/FileError.h
index 3528109..27ad397 100644
--- a/WebCore/fileapi/FileError.h
+++ b/WebCore/fileapi/FileError.h
@@ -33,7 +33,6 @@
 
 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
 
-#include "ExceptionCode.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -41,16 +40,31 @@ namespace WebCore {
 
 class FileError : public RefCounted<FileError> {
 public:
-    static PassRefPtr<FileError> create(ExceptionCode code) { return adoptRef(new FileError(code)); }
+    enum ErrorCode {
+        NOT_FOUND_ERR = 1,
+        SECURITY_ERR = 2,
+        ABORT_ERR = 3,
+        NOT_READABLE_ERR = 4,
+        ENCODING_ERR = 5,
+        NO_MODIFICATION_ALLOWED_ERR = 6,
+        INVALID_STATE_ERR = 7,
+        SYNTAX_ERR = 8,
+        INVALID_MODIFICATION_ERR = 9,
+        QUOTA_EXCEEDED_ERR = 10,
+        TYPE_MISMATCH_ERR = 11,
+        PATH_EXISTS_ERR = 12,
+    };
 
-    ExceptionCode code() const { return m_code; }
+    static PassRefPtr<FileError> create(ErrorCode code) { return adoptRef(new FileError(code)); }
+
+    ErrorCode code() const { return m_code; }
 
 private:
-    FileError(ExceptionCode code)
+    FileError(ErrorCode code)
         : m_code(code)
     { }
 
-    ExceptionCode m_code;
+    ErrorCode m_code;
 };
 
 } // namespace WebCore
diff --git a/WebCore/fileapi/FileError.idl b/WebCore/fileapi/FileError.idl
index c5dedbe..bab815a 100644
--- a/WebCore/fileapi/FileError.idl
+++ b/WebCore/fileapi/FileError.idl
@@ -31,21 +31,23 @@
 module html {
     interface [
         Conditional=BLOB|FILE_SYSTEM,
-        DontCheckEnums,
         NoStaticTables
     ] FileError {
 #if !defined(LANGUAGE_OBJECTIVE_C)
-        const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
-        const unsigned short NOT_FOUND_ERR = 8;
-        const unsigned short INVALID_STATE_ERR = 11;
-        const unsigned short SYNTAX_ERR = 12;
-        const unsigned short INVALID_MODIFICATION_ERR = 13;
+        // FIXME: Some of constant names are already defined in DOMException.h for Objective-C binding and we cannot have the same names here (they are translated into a enum in the same namespace).
+        const unsigned short NOT_FOUND_ERR = 1;
+        const unsigned short SECURITY_ERR = 2;
+        const unsigned short ABORT_ERR = 3;
+        const unsigned short NOT_READABLE_ERR = 4;
+        const unsigned short ENCODING_ERR = 5;
+        const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6;
+        const unsigned short INVALID_STATE_ERR = 7;
+        const unsigned short SYNTAX_ERR = 8;
+        const unsigned short INVALID_MODIFICATION_ERR = 9;
+        const unsigned short QUOTA_EXCEEDED_ERR = 10;
+        const unsigned short TYPE_MISMATCH_ERR = 11;
+        const unsigned short PATH_EXISTS_ERR = 12;
 #endif
-        const unsigned short SECURITY_ERR = 18;
-        const unsigned short ABORT_ERR = 20;
-        const unsigned short QUOTA_EXCEEDED_ERR = 22;
-        const unsigned short NOT_READABLE_ERR = 24;
-        const unsigned short ENCODING_ERR = 26;
         readonly attribute unsigned short code;
     };
 }
diff --git a/WebCore/fileapi/FileException.h b/WebCore/fileapi/FileException.h
index e90ab90..c3cc638 100644
--- a/WebCore/fileapi/FileException.h
+++ b/WebCore/fileapi/FileException.h
@@ -44,13 +44,31 @@ public:
         return adoptRef(new FileException(description));
     }
 
-    static const int FileExceptionOffset = 100;
-    static const int FileExceptionMax = 199;
+    static const int FileExceptionOffset = 1100;
+    static const int FileExceptionMax = 1199;
 
-    enum EventExceptionCode {
-        UNSPECIFIED_EVENT_TYPE_ERR = FileExceptionOffset
+    enum FileExceptionCode {
+        NOT_FOUND_ERR = FileExceptionOffset + 1,
+        SECURITY_ERR = FileExceptionOffset + 2,
+        ABORT_ERR = FileExceptionOffset + 3,
+        NOT_READABLE_ERR = FileExceptionOffset + 4,
+        ENCODING_ERR = FileExceptionOffset + 5,
+        NO_MODIFICATION_ALLOWED_ERR = FileExceptionOffset + 6,
+        INVALID_STATE_ERR = FileExceptionOffset + 7,
+        SYNTAX_ERR = FileExceptionOffset + 8,
+        INVALID_MODIFICATION_ERR = FileExceptionOffset + 9,
+        QUOTA_EXCEEDED_ERR = FileExceptionOffset + 10,
+        TYPE_MISMATCH_ERR = FileExceptionOffset + 11,
+        PATH_EXISTS_ERR = FileExceptionOffset + 12,
     };
 
+    static int ErrorCodeToExceptionCode(int errorCode)
+    {
+        if (!errorCode)
+            return 0;
+        return errorCode + FileExceptionOffset;
+    }
+
 private:
     FileException(const ExceptionCodeDescription& description)
         : ExceptionBase(description)
@@ -63,4 +81,3 @@ private:
 #endif // ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
 
 #endif // FileException_h
-
diff --git a/WebCore/fileapi/FileException.idl b/WebCore/fileapi/FileException.idl
index 0b2ab9c..10bd151 100644
--- a/WebCore/fileapi/FileException.idl
+++ b/WebCore/fileapi/FileException.idl
@@ -45,15 +45,17 @@ module html {
 #endif
 
         // FileExceptionCode
-        const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
-        const unsigned short NOT_FOUND_ERR = 8;
-        const unsigned short INVALID_STATE_ERR = 11;
-        const unsigned short SYNTAX_ERR = 12;
-        const unsigned short INVALID_MODIFICATION_ERR = 13;
-        const unsigned short SECURITY_ERR = 18;
-        const unsigned short ABORT_ERR = 20;
-        const unsigned short QUOTA_EXCEEDED_ERR = 22;
-        const unsigned short NOT_READABLE_ERR = 24;
-        const unsigned short ENCODING_ERR = 26;
+        const unsigned short NOT_FOUND_ERR = 1;
+        const unsigned short SECURITY_ERR = 2;
+        const unsigned short ABORT_ERR = 3;
+        const unsigned short NOT_READABLE_ERR = 4;
+        const unsigned short ENCODING_ERR = 5;
+        const unsigned short NO_MODIFICATION_ALLOWED_ERR = 6;
+        const unsigned short INVALID_STATE_ERR = 7;
+        const unsigned short SYNTAX_ERR = 8;
+        const unsigned short INVALID_MODIFICATION_ERR = 9;
+        const unsigned short QUOTA_EXCEEDED_ERR = 10;
+        const unsigned short TYPE_MISMATCH_ERR = 11;
+        const unsigned short PATH_EXISTS_ERR = 12;
     };
 }
diff --git a/WebCore/fileapi/FileReader.cpp b/WebCore/fileapi/FileReader.cpp
index 0b7b46d..666259a 100644
--- a/WebCore/fileapi/FileReader.cpp
+++ b/WebCore/fileapi/FileReader.cpp
@@ -145,7 +145,7 @@ void FileReader::abort()
     terminate();
 
     m_builder.clear();
-    m_error = FileError::create(ABORT_ERR);
+    m_error = FileError::create(FileError::ABORT_ERR);
 
     fireEvent(eventNames().errorEvent);
     fireEvent(eventNames().abortEvent);
@@ -255,22 +255,22 @@ void FileReader::failed(int httpStatusCode)
 {
     m_state = Completed;
 
-     m_error = FileError::create(httpStatusCodeToExceptionCode(httpStatusCode));
+     m_error = FileError::create(httpStatusCodeToErrorCode(httpStatusCode));
     fireEvent(eventNames().errorEvent);
     fireEvent(eventNames().loadendEvent);
 
     cleanup();
 }
 
-ExceptionCode FileReader::httpStatusCodeToExceptionCode(int httpStatusCode)
+FileError::ErrorCode FileReader::httpStatusCodeToErrorCode(int httpStatusCode)
 {
     switch (httpStatusCode) {
         case 403:
-            return SECURITY_ERR;
+            return FileError::SECURITY_ERR;
         case 404:
-            return NOT_FOUND_ERR;
+            return FileError::NOT_FOUND_ERR;
         default:
-            return NOT_READABLE_ERR;
+            return FileError::NOT_READABLE_ERR;
     }
 }
 
diff --git a/WebCore/fileapi/FileReader.h b/WebCore/fileapi/FileReader.h
index f914dad..5a135a2 100644
--- a/WebCore/fileapi/FileReader.h
+++ b/WebCore/fileapi/FileReader.h
@@ -80,7 +80,7 @@ public:
     String result();
 
     // Helper methods, also used by FileReaderSync.
-    static ExceptionCode httpStatusCodeToExceptionCode(int httpStatusCode);
+    static FileError::ErrorCode httpStatusCodeToErrorCode(int httpStatusCode);
     static void convertToDataURL(const Vector<char>& rawData, const String& fileType, StringBuilder&);
 
     // ActiveDOMObject
diff --git a/WebCore/fileapi/FileReaderSync.cpp b/WebCore/fileapi/FileReaderSync.cpp
index 6425bcf..99f5a89 100644
--- a/WebCore/fileapi/FileReaderSync.cpp
+++ b/WebCore/fileapi/FileReaderSync.cpp
@@ -37,6 +37,7 @@
 #include "Base64.h"
 #include "Blob.h"
 #include "BlobURL.h"
+#include "FileException.h"
 #include "FileReader.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
@@ -91,7 +92,7 @@ void FileReaderSyncLoader::start(ScriptExecutionContext* scriptExecutionContext,
 
     ThreadableLoader::loadResourceSynchronously(scriptExecutionContext, request, *this, options);
 
-    ec = (m_httpStatusCode == 200) ? 0 : FileReader::httpStatusCodeToExceptionCode(m_httpStatusCode);
+    ec = (m_httpStatusCode == 200) ? 0 : FileException::ErrorCodeToExceptionCode(FileReader::httpStatusCodeToErrorCode(m_httpStatusCode));
 }
 
 void FileReaderSyncLoader::didReceiveResponse(const ResourceResponse& response)
diff --git a/WebCore/fileapi/FileSystemCallbacks.cpp b/WebCore/fileapi/FileSystemCallbacks.cpp
index e5f404e..453fcf1 100644
--- a/WebCore/fileapi/FileSystemCallbacks.cpp
+++ b/WebCore/fileapi/FileSystemCallbacks.cpp
@@ -43,7 +43,6 @@
 #include "EntryArray.h"
 #include "EntryCallback.h"
 #include "ErrorCallback.h"
-#include "ExceptionCode.h"
 #include "FileEntry.h"
 #include "FileError.h"
 #include "FileSystemCallback.h"
@@ -104,7 +103,7 @@ void FileSystemCallbacksBase::didCreateFileWriter(PassOwnPtr<AsyncFileWriter>, l
 void FileSystemCallbacksBase::didFail(int code)
 {
     if (m_errorCallback) {
-        m_errorCallback->handleEvent(FileError::create(code).get());
+        m_errorCallback->handleEvent(FileError::create(static_cast<FileError::ErrorCode>(code)).get());
         m_errorCallback.clear();
     }
 }
diff --git a/WebCore/fileapi/FileWriter.cpp b/WebCore/fileapi/FileWriter.cpp
index bc76984..7775709 100644
--- a/WebCore/fileapi/FileWriter.cpp
+++ b/WebCore/fileapi/FileWriter.cpp
@@ -38,6 +38,7 @@
 #include "Blob.h"
 #include "ExceptionCode.h"
 #include "FileError.h"
+#include "FileException.h"
 #include "ProgressEvent.h"
 
 namespace WebCore {
@@ -90,13 +91,11 @@ void FileWriter::write(Blob* data, ExceptionCode& ec)
 {
     ASSERT(m_writer);
     if (m_readyState == WRITING) {
-        ec = INVALID_STATE_ERR;
-        m_error = FileError::create(ec);
+        setError(FileError::INVALID_STATE_ERR, ec);
         return;
     }
     if (!data) {
-        ec = TYPE_MISMATCH_ERR;
-        m_error = FileError::create(ec);
+        setError(FileError::TYPE_MISMATCH_ERR, ec);
         return;
     }
 
@@ -112,8 +111,7 @@ void FileWriter::seek(long long position, ExceptionCode& ec)
 {
     ASSERT(m_writer);
     if (m_readyState == WRITING) {
-        ec = INVALID_STATE_ERR;
-        m_error = FileError::create(ec);
+        setError(FileError::INVALID_STATE_ERR, ec);
         return;
     }
 
@@ -132,8 +130,7 @@ void FileWriter::truncate(long long position, ExceptionCode& ec)
 {
     ASSERT(m_writer);
     if (m_readyState == WRITING || position < 0) {
-        ec = INVALID_STATE_ERR;
-        m_error = FileError::create(ec);
+        setError(FileError::INVALID_STATE_ERR, ec);
         return;
     }
     m_readyState = WRITING;
@@ -147,12 +144,11 @@ void FileWriter::abort(ExceptionCode& ec)
 {
     ASSERT(m_writer);
     if (m_readyState != WRITING) {
-        ec = INVALID_STATE_ERR;
-        m_error = FileError::create(ec);
+        setError(FileError::INVALID_STATE_ERR, ec);
         return;
     }
-    
-    m_error = FileError::create(ABORT_ERR);
+
+    m_error = FileError::create(FileError::ABORT_ERR);
     m_writer->abort();
 }
 
@@ -191,11 +187,11 @@ void FileWriter::didTruncate()
     fireEvent(eventNames().writeendEvent);
 }
 
-void FileWriter::didFail(ExceptionCode ec)
+void FileWriter::didFail(FileError::ErrorCode code)
 {
-    m_error = FileError::create(ec);
+    m_error = FileError::create(code);
     fireEvent(eventNames().errorEvent);
-    if (ABORT_ERR == ec)
+    if (FileError::ABORT_ERR == code)
         fireEvent(eventNames().abortEvent);
     fireEvent(eventNames().errorEvent);
     m_blobBeingWritten.clear();
@@ -209,6 +205,12 @@ void FileWriter::fireEvent(const AtomicString& type)
     dispatchEvent(ProgressEvent::create(type, true, static_cast<unsigned>(m_bytesWritten), static_cast<unsigned>(m_bytesToWrite)));
 }
 
+void FileWriter::setError(FileError::ErrorCode errorCode, ExceptionCode& ec)
+{
+    ec = FileException::ErrorCodeToExceptionCode(errorCode);
+    m_error = FileError::create(errorCode);
+}
+
 } // namespace WebCore
- 
+
 #endif // ENABLE(FILE_SYSTEM)
diff --git a/WebCore/fileapi/FileWriter.h b/WebCore/fileapi/FileWriter.h
index 454081c..0e884ea 100644
--- a/WebCore/fileapi/FileWriter.h
+++ b/WebCore/fileapi/FileWriter.h
@@ -77,7 +77,7 @@ public:
     // AsyncFileWriterClient
     void didWrite(long long bytes, bool complete);
     void didTruncate();
-    void didFail(ExceptionCode ec);
+    void didFail(FileError::ErrorCode);
 
     // ActiveDOMObject
     virtual bool canSuspend() const;
@@ -97,7 +97,7 @@ public:
     DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(error);
     DEFINE_ATTRIBUTE_EVENT_LISTENER(writeend);
-    
+
 private:
     FileWriter(ScriptExecutionContext*);
 
@@ -113,6 +113,8 @@ private:
 
     void fireEvent(const AtomicString& type);
 
+    void setError(FileError::ErrorCode, ExceptionCode&);
+
     RefPtr<FileError> m_error;
     EventTargetData m_eventTargetData;
     OwnPtr<AsyncFileWriter> m_writer;
diff --git a/WebCore/fileapi/SyncCallbackHelper.h b/WebCore/fileapi/SyncCallbackHelper.h
index 1612e93..25e6739 100644
--- a/WebCore/fileapi/SyncCallbackHelper.h
+++ b/WebCore/fileapi/SyncCallbackHelper.h
@@ -41,6 +41,7 @@
 #include "ExceptionCode.h"
 #include "FileEntry.h"
 #include "FileError.h"
+#include "FileException.h"
 #include "FileSystemCallback.h"
 #include "MetadataCallback.h"
 #include "VoidCallback.h"
@@ -64,7 +65,7 @@ public:
         : m_observer(observer)
         , m_successCallback(SuccessCallbackImpl::create(this))
         , m_errorCallback(ErrorCallbackImpl::create(this))
-        , m_error(0)
+        , m_exceptionCode(0)
         , m_completed(false)
     {
     }
@@ -74,12 +75,12 @@ public:
         if (m_observer) {
             while (!m_completed) {
                 if (!m_observer->waitForOperationToComplete()) {
-                    m_error = ABORT_ERR;
+                    m_exceptionCode = FileException::ABORT_ERR;
                     break;
                 }
             }
         }
-        ec = m_error;
+        ec = m_exceptionCode;
         return m_result.release();
     }
 
@@ -138,9 +139,9 @@ private:
     friend class SuccessCallbackImpl;
     friend class ErrorCallbackImpl;
 
-    void setError(ExceptionCode ec)
+    void setError(int code)
     {
-        m_error = ec;
+        m_exceptionCode = FileException::ErrorCodeToExceptionCode(code);
         m_completed = true;
     }
 
@@ -154,7 +155,7 @@ private:
     RefPtr<SuccessCallbackImpl> m_successCallback;
     RefPtr<ErrorCallbackImpl> m_errorCallback;
     RefPtr<ResultType> m_result;
-    ExceptionCode m_error;
+    ExceptionCode m_exceptionCode;
     bool m_completed;
 };
 
diff --git a/WebCore/page/DOMWindow.cpp b/WebCore/page/DOMWindow.cpp
index 030479d..3484a27 100644
--- a/WebCore/page/DOMWindow.cpp
+++ b/WebCore/page/DOMWindow.cpp
@@ -730,13 +730,13 @@ void DOMWindow::requestFileSystem(int type, long long size, PassRefPtr<FileSyste
         return;
 
     if (!AsyncFileSystem::isAvailable() || !document->securityOrigin()->canAccessFileSystem()) {
-        DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(SECURITY_ERR));
+        DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(FileError::SECURITY_ERR));
         return;
     }
 
     AsyncFileSystem::Type fileSystemType = static_cast<AsyncFileSystem::Type>(type);
     if (fileSystemType != AsyncFileSystem::Temporary && fileSystemType != AsyncFileSystem::Persistent) {
-        DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+        DOMFileSystem::scheduleCallback(document, errorCallback, FileError::create(FileError::INVALID_MODIFICATION_ERR));
         return;
     }
 
diff --git a/WebCore/workers/WorkerContext.cpp b/WebCore/workers/WorkerContext.cpp
index a535191..345e5b7 100644
--- a/WebCore/workers/WorkerContext.cpp
+++ b/WebCore/workers/WorkerContext.cpp
@@ -69,6 +69,7 @@
 #include "DOMFileSystemSync.h"
 #include "ErrorCallback.h"
 #include "FileError.h"
+#include "FileException.h"
 #include "FileSystemCallback.h"
 #include "FileSystemCallbacks.h"
 #include "LocalFileSystem.h"
@@ -355,13 +356,13 @@ void WorkerContext::revokeObjectURL(const String& blobURLString)
 void WorkerContext::requestFileSystem(int type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
 {
     if (!AsyncFileSystem::isAvailable() || !securityOrigin()->canAccessFileSystem()) {
-        DOMFileSystem::scheduleCallback(this, errorCallback, FileError::create(SECURITY_ERR));
+        DOMFileSystem::scheduleCallback(this, errorCallback, FileError::create(FileError::SECURITY_ERR));
         return;
     }
 
     AsyncFileSystem::Type fileSystemType = static_cast<AsyncFileSystem::Type>(type);
     if (fileSystemType != AsyncFileSystem::Temporary && fileSystemType != AsyncFileSystem::Persistent) {
-        DOMFileSystem::scheduleCallback(this, errorCallback, FileError::create(INVALID_MODIFICATION_ERR));
+        DOMFileSystem::scheduleCallback(this, errorCallback, FileError::create(FileError::INVALID_MODIFICATION_ERR));
         return;
     }
 
@@ -372,13 +373,13 @@ PassRefPtr<DOMFileSystemSync> WorkerContext::requestFileSystemSync(int type, lon
 {
     ec = 0;
     if (!AsyncFileSystem::isAvailable() || !securityOrigin()->canAccessFileSystem()) {
-        ec = SECURITY_ERR;
+        ec = FileException::SECURITY_ERR;
         return 0;
     }
 
     AsyncFileSystem::Type fileSystemType = static_cast<AsyncFileSystem::Type>(type);
     if (fileSystemType != AsyncFileSystem::Temporary && fileSystemType != AsyncFileSystem::Persistent) {
-        ec = INVALID_MODIFICATION_ERR;
+        ec = FileException::INVALID_MODIFICATION_ERR;
         return 0;
     }
 
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0dfe8b0..4f79483 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-20  Kinuko Yasuda  <kinuko at chromium.org>
+
+        Reviewed by Jian Li.
+
+        Renumber FileError/FileException error codes per latest File API spec changes
+        https://bugs.webkit.org/show_bug.cgi?id=47936
+
+        * public/WebFileError.h:
+        * src/AssertMatchingEnums.cpp:
+        * src/AsyncFileWriterChromium.cpp:
+        (WebCore::AsyncFileWriterChromium::didFail):
+
 2010-10-24  Sheriff Bot  <webkit.review.bot at gmail.com>
 
         Unreviewed, rolling out r70361.
diff --git a/WebKit/chromium/public/WebFileError.h b/WebKit/chromium/public/WebFileError.h
index cfe8882..e7a17c3 100644
--- a/WebKit/chromium/public/WebFileError.h
+++ b/WebKit/chromium/public/WebFileError.h
@@ -34,15 +34,18 @@ namespace WebKit {
 
 // File-related error code defined in HTML5 File API.
 enum WebFileError {
-    WebFileErrorNoModificationAllowed = 7,
-    WebFileErrorNotFound = 8,
-    WebFileErrorInvalidState = 11,
-    WebFileErrorInvalidModification = 13,
-    WebFileErrorSecurity = 18,
-    WebFileErrorAbort = 20,
-    WebFileErrorQuotaExceeded = 22,
-    WebFileErrorNotReadable = 24,
-    WebFileErrorEncoding = 26,
+    WebFileErrorNotFound = 1,
+    WebFileErrorSecurity = 2,
+    WebFileErrorAbort = 3,
+    WebFileErrorNotReadable = 4,
+    WebFileErrorEncoding = 5,
+    WebFileErrorNoModificationAllowed = 6,
+    WebFileErrorInvalidState = 7,
+    WebFileErrorSyntax = 8,
+    WebFileErrorInvalidModification = 9,
+    WebFileErrorQuotaExceeded = 10,
+    WebFileErrorTypeMismatch = 11,
+    WebFileErrorPathExists = 12,
 };
 
 } // namespace WebKit
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index 9647a44..ae2791d 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -37,6 +37,7 @@
 #include "ApplicationCacheHost.h"
 #include "AsyncFileSystem.h"
 #include "EditorInsertAction.h"
+#include "FileError.h"
 #include "FontDescription.h"
 #include "FontSmoothingMode.h"
 #include "HTMLInputElement.h"
@@ -56,6 +57,7 @@
 #include "WebClipboard.h"
 #include "WebCursorInfo.h"
 #include "WebEditingAction.h"
+#include "WebFileError.h"
 #include "WebFileSystem.h"
 #include "WebFontDescription.h"
 #include "WebIDBKey.h"
@@ -362,3 +364,16 @@ COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
 COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary);
 COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypePersistent, AsyncFileSystem::Persistent);
 #endif
+
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNotFound, FileError::NOT_FOUND_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorSecurity, FileError::SECURITY_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorAbort, FileError::ABORT_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNotReadable, FileError::NOT_READABLE_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorEncoding, FileError::ENCODING_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorNoModificationAllowed, FileError::NO_MODIFICATION_ALLOWED_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorInvalidState, FileError::INVALID_STATE_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorSyntax, FileError::SYNTAX_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorInvalidModification, FileError::INVALID_MODIFICATION_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorQuotaExceeded, FileError::QUOTA_EXCEEDED_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorTypeMismatch, FileError::TYPE_MISMATCH_ERR);
+COMPILE_ASSERT_MATCHING_ENUM(WebFileErrorPathExists, FileError::PATH_EXISTS_ERR);
diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.cpp b/WebKit/chromium/src/AsyncFileWriterChromium.cpp
index 8969094..71cf3b5 100644
--- a/WebKit/chromium/src/AsyncFileWriterChromium.cpp
+++ b/WebKit/chromium/src/AsyncFileWriterChromium.cpp
@@ -85,7 +85,7 @@ void AsyncFileWriterChromium::didTruncate()
 
 void AsyncFileWriterChromium::didFail(WebKit::WebFileError error)
 {
-    m_client->didFail(error);
+    m_client->didFail(static_cast<FileError::ErrorCode>(error));
 }
 
 } // namespace

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list