Title: [119698] trunk
Revision
119698
Author
[email protected]
Date
2012-06-07 02:42:57 -0700 (Thu, 07 Jun 2012)

Log Message

[FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING
https://bugs.webkit.org/show_bug.cgi?id=88212

Patch by Li Yin <[email protected]> on 2012-06-07
Reviewed by Jian Li.

Source/WebCore:

>From Spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR
when the readyState is LOADING.
Also delete OperationNotAllowedException related code, because it is not longer needed.

Tests: fast/files/read-file-async.html
       fast/files/workers/worker-read-file-async.html

* CMakeLists.txt:
* DerivedSources.cpp:
* DerivedSources.make:
* DerivedSources.pri:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* dom/DOMExceptions.in:
* fileapi/FileReader.cpp:
(WebCore::FileReader::readInternal): Changed it to throw INVALID_STATE_ERR.
* fileapi/FileReader.idl: Changed it to raise DOMException for all read methods.
* fileapi/OperationNotAllowedException.cpp: Removed.
* fileapi/OperationNotAllowedException.h: Removed.
* fileapi/OperationNotAllowedException.idl: Removed.

LayoutTests:

>From spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR.

* fast/files/read-file-async-expected.txt:
* fast/files/workers/worker-read-file-async-expected.txt:

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (119697 => 119698)


--- trunk/LayoutTests/ChangeLog	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/LayoutTests/ChangeLog	2012-06-07 09:42:57 UTC (rev 119698)
@@ -1,3 +1,16 @@
+2012-06-07  Li Yin  <[email protected]>
+
+        [FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING
+        https://bugs.webkit.org/show_bug.cgi?id=88212
+
+        Reviewed by Jian Li.
+
+        From spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
+        FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR.
+
+        * fast/files/read-file-async-expected.txt:
+        * fast/files/workers/worker-read-file-async-expected.txt:
+
 2012-06-07  Hironori Bono  <[email protected]>
 
         Use light gray for grammar markers on Windows and Linux

Modified: trunk/LayoutTests/fast/files/read-file-async-expected.txt (119697 => 119698)


--- trunk/LayoutTests/fast/files/read-file-async-expected.txt	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/LayoutTests/fast/files/read-file-async-expected.txt	2012-06-07 09:42:57 UTC (rev 119698)
@@ -173,10 +173,10 @@
 Received loadend event
 Test calling multiple concurrent read methods
 readyState: 0
-Received exception 1: NOT_ALLOWED_ERR
-Received exception 1: NOT_ALLOWED_ERR
-Received exception 1: NOT_ALLOWED_ERR
-Received exception 1: NOT_ALLOWED_ERR
+Received exception 11: INVALID_STATE_ERR
+Received exception 11: INVALID_STATE_ERR
+Received exception 11: INVALID_STATE_ERR
+Received exception 11: INVALID_STATE_ERR
 Received loadstart event
 readyState: 1
 Received load event

Modified: trunk/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt (119697 => 119698)


--- trunk/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/LayoutTests/fast/files/workers/worker-read-file-async-expected.txt	2012-06-07 09:42:57 UTC (rev 119698)
@@ -174,10 +174,10 @@
 Received loadend event
 Test calling multiple concurrent read methods
 readyState: 0
-Received exception 1: NOT_ALLOWED_ERR
-Received exception 1: NOT_ALLOWED_ERR
-Received exception 1: NOT_ALLOWED_ERR
-Received exception 1: NOT_ALLOWED_ERR
+Received exception 11: INVALID_STATE_ERR
+Received exception 11: INVALID_STATE_ERR
+Received exception 11: INVALID_STATE_ERR
+Received exception 11: INVALID_STATE_ERR
 Received loadstart event
 readyState: 1
 Received load event

Modified: trunk/Source/WebCore/CMakeLists.txt (119697 => 119698)


--- trunk/Source/WebCore/CMakeLists.txt	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/CMakeLists.txt	2012-06-07 09:42:57 UTC (rev 119698)
@@ -734,7 +734,6 @@
     fileapi/File.cpp
     fileapi/FileException.cpp
     fileapi/FileList.cpp
-    fileapi/OperationNotAllowedException.cpp
     fileapi/ThreadableBlobRegistry.cpp
     fileapi/WebKitBlobBuilder.cpp
 
@@ -1515,7 +1514,6 @@
     LIST(APPEND WebCore_IDL_FILES
         fileapi/FileException.idl
         fileapi/FileReaderSync.idl
-        fileapi/OperationNotAllowedException.idl
     )
 ENDIF ()
 

Modified: trunk/Source/WebCore/ChangeLog (119697 => 119698)


--- trunk/Source/WebCore/ChangeLog	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/ChangeLog	2012-06-07 09:42:57 UTC (rev 119698)
@@ -1,3 +1,35 @@
+2012-06-07  Li Yin  <[email protected]>
+
+        [FileAPI] FileReader should throw an InvalidStateError exception when readyState is LOADING
+        https://bugs.webkit.org/show_bug.cgi?id=88212
+
+        Reviewed by Jian Li.
+
+        From Spec: http://www.w3.org/TR/FileAPI/#readAsBinaryString
+        FileReader should throw an InvalidStateError exception instead of NOT_ALLOWED_ERR
+        when the readyState is LOADING.
+        Also delete OperationNotAllowedException related code, because it is not longer needed.
+
+        Tests: fast/files/read-file-async.html
+               fast/files/workers/worker-read-file-async.html
+
+        * CMakeLists.txt:
+        * DerivedSources.cpp:
+        * DerivedSources.make:
+        * DerivedSources.pri:
+        * GNUmakefile.list.am:
+        * Target.pri:
+        * WebCore.gypi:
+        * WebCore.vcproj/WebCore.vcproj:
+        * WebCore.xcodeproj/project.pbxproj:
+        * dom/DOMExceptions.in:
+        * fileapi/FileReader.cpp:
+        (WebCore::FileReader::readInternal): Changed it to throw INVALID_STATE_ERR.
+        * fileapi/FileReader.idl: Changed it to raise DOMException for all read methods.
+        * fileapi/OperationNotAllowedException.cpp: Removed.
+        * fileapi/OperationNotAllowedException.h: Removed.
+        * fileapi/OperationNotAllowedException.idl: Removed.
+
 2012-06-07  Sheriff Bot  <[email protected]>
 
         Unreviewed, rolling out r119689.

Modified: trunk/Source/WebCore/DerivedSources.cpp (119697 => 119698)


--- trunk/Source/WebCore/DerivedSources.cpp	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/DerivedSources.cpp	2012-06-07 09:42:57 UTC (rev 119698)
@@ -255,7 +255,6 @@
 #include "JSNotation.cpp"
 #include "JSNotificationCenter.cpp"
 #include "JSNotification.cpp"
-#include "JSOperationNotAllowedException.cpp"
 #include "JSOverflowEvent.cpp"
 #include "JSPageTransitionEvent.cpp"
 #include "JSPerformance.cpp"

Modified: trunk/Source/WebCore/DerivedSources.make (119697 => 119698)


--- trunk/Source/WebCore/DerivedSources.make	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/DerivedSources.make	2012-06-07 09:42:57 UTC (rev 119698)
@@ -253,7 +253,6 @@
     $(WebCore)/fileapi/FileList.idl \
     $(WebCore)/fileapi/FileReader.idl \
     $(WebCore)/fileapi/FileReaderSync.idl \
-    $(WebCore)/fileapi/OperationNotAllowedException.idl \
     $(WebCore)/fileapi/WebKitBlobBuilder.idl \
     $(WebCore)/html/DOMFormData.idl \
     $(WebCore)/html/DOMSettableTokenList.idl \

Modified: trunk/Source/WebCore/DerivedSources.pri (119697 => 119698)


--- trunk/Source/WebCore/DerivedSources.pri	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/DerivedSources.pri	2012-06-07 09:42:57 UTC (rev 119698)
@@ -267,7 +267,6 @@
     $$PWD/fileapi/FileList.idl \
     $$PWD/fileapi/FileReader.idl \
     $$PWD/fileapi/FileReaderSync.idl \
-    $$PWD/fileapi/OperationNotAllowedException.idl \
     $$PWD/fileapi/WebKitBlobBuilder.idl \
     $$PWD/html/canvas/ArrayBufferView.idl \
     $$PWD/html/canvas/ArrayBuffer.idl \

Modified: trunk/Source/WebCore/GNUmakefile.list.am (119697 => 119698)


--- trunk/Source/WebCore/GNUmakefile.list.am	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/GNUmakefile.list.am	2012-06-07 09:42:57 UTC (rev 119698)
@@ -439,8 +439,6 @@
 	DerivedSources/WebCore/JSOESTextureFloat.h \
 	DerivedSources/WebCore/JSOESVertexArrayObject.cpp \
 	DerivedSources/WebCore/JSOESVertexArrayObject.h \
-	DerivedSources/WebCore/JSOperationNotAllowedException.cpp \
-	DerivedSources/WebCore/JSOperationNotAllowedException.h \
 	DerivedSources/WebCore/JSOscillator.cpp \
 	DerivedSources/WebCore/JSOscillator.h \
 	DerivedSources/WebCore/JSOverflowEvent.cpp \
@@ -804,7 +802,6 @@
 	$(WebCore)/fileapi/FileList.idl \
 	$(WebCore)/fileapi/FileReader.idl \
 	$(WebCore)/fileapi/FileReaderSync.idl \
-	$(WebCore)/fileapi/OperationNotAllowedException.idl \
 	$(WebCore)/fileapi/WebKitBlobBuilder.idl \
 	$(WebCore)/html/DOMFormData.idl \
 	$(WebCore)/html/DOMSettableTokenList.idl \
@@ -2193,8 +2190,6 @@
 	Source/WebCore/fileapi/FileThread.cpp \
 	Source/WebCore/fileapi/FileThread.h \
 	Source/WebCore/fileapi/FileThreadTask.h \
-	Source/WebCore/fileapi/OperationNotAllowedException.cpp \
-	Source/WebCore/fileapi/OperationNotAllowedException.h \
 	Source/WebCore/fileapi/ThreadableBlobRegistry.cpp \
 	Source/WebCore/fileapi/ThreadableBlobRegistry.h \
 	Source/WebCore/fileapi/WebKitBlobBuilder.cpp \

Modified: trunk/Source/WebCore/Target.pri (119697 => 119698)


--- trunk/Source/WebCore/Target.pri	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/Target.pri	2012-06-07 09:42:57 UTC (rev 119698)
@@ -706,7 +706,6 @@
     fileapi/FileReaderLoader.cpp \
     fileapi/FileReaderSync.cpp \
     fileapi/FileThread.cpp \
-    fileapi/OperationNotAllowedException.cpp \
     fileapi/ThreadableBlobRegistry.cpp \
     fileapi/WebKitBlobBuilder.cpp \
     history/BackForwardController.cpp \
@@ -1871,7 +1870,6 @@
     fileapi/FileReaderSync.h \
     fileapi/FileThread.h \
     fileapi/FileThreadTask.h \
-    fileapi/OperationNotAllowedException.h \
     fileapi/WebKitBlobBuilder.h \
     history/BackForwardController.h \
     history/BackForwardListImpl.h \

Modified: trunk/Source/WebCore/WebCore.gypi (119697 => 119698)


--- trunk/Source/WebCore/WebCore.gypi	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/WebCore.gypi	2012-06-07 09:42:57 UTC (rev 119698)
@@ -993,7 +993,6 @@
             'fileapi/FileList.idl',
             'fileapi/FileReader.idl',
             'fileapi/FileReaderSync.idl',
-            'fileapi/OperationNotAllowedException.idl',
             'fileapi/WebKitBlobBuilder.idl',
             'html/DOMFormData.idl',
             'html/DOMSettableTokenList.idl',
@@ -2695,8 +2694,6 @@
             'fileapi/FileThread.cpp',
             'fileapi/FileThread.h',
             'fileapi/FileThreadTask.h',
-            'fileapi/OperationNotAllowedException.cpp',
-            'fileapi/OperationNotAllowedException.h',
             'fileapi/ThreadableBlobRegistry.cpp',
             'fileapi/ThreadableBlobRegistry.h',
             'fileapi/WebKitBlobBuilder.cpp',
@@ -7735,8 +7732,6 @@
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOESTextureFloat.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOESVertexArrayObject.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOESVertexArrayObject.h',
-            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOperationNotAllowedException.cpp',
-            '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOperationNotAllowedException.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOverflowEvent.cpp',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSOverflowEvent.h',
             '<(PRODUCT_DIR)/DerivedSources/WebCore/JSPageTransitionEvent.cpp',

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (119697 => 119698)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2012-06-07 09:42:57 UTC (rev 119698)
@@ -12206,14 +12206,6 @@
 				>
 			</File>
 			<File
-				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSOperationNotAllowedException.cpp"
-				>
-			</File>
-			<File
-				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSOperationNotAllowedException.h"
-				>
-			</File>
-			<File
 				RelativePath="$(ConfigurationBuildDir)\obj\$(ProjectName)\DerivedSources\JSOverflowEvent.cpp"
 				>
 				<FileConfiguration
@@ -62595,18 +62587,6 @@
 				>
 			</File>
 			<File
-				RelativePath="..\fileapi\OperationNotAllowedException.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\fileapi\OperationNotAllowedException.h"
-				>
-			</File>
-			<File
-				RelativePath="..\fileapi\OperationNotAllowedException.h"
-				>
-			</File>
-			<File
 				RelativePath="..\html\PasswordInputType.cpp"
 				>
 			</File>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (119697 => 119698)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-06-07 09:42:57 UTC (rev 119698)
@@ -772,9 +772,6 @@
 		2E0888D41148848A00AF4265 /* JSDOMFormData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */; };
 		2E0888D51148848A00AF4265 /* JSDOMFormData.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E0888D31148848A00AF4265 /* JSDOMFormData.h */; };
 		2E0888E6114884E200AF4265 /* JSDOMFormDataCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E0888E5114884E200AF4265 /* JSDOMFormDataCustom.cpp */; };
-		2E2445F71395893A004B6C19 /* OperationNotAllowedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2445F51395893A004B6C19 /* OperationNotAllowedException.h */; };
-		2E24476813959173004B6C19 /* JSOperationNotAllowedException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E24476613959173004B6C19 /* JSOperationNotAllowedException.cpp */; };
-		2E24476913959173004B6C19 /* JSOperationNotAllowedException.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E24476713959173004B6C19 /* JSOperationNotAllowedException.h */; };
 		2E2D99CD10E2BBDA00496337 /* JSBlob.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */; };
 		2E2D99CE10E2BBDA00496337 /* JSBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99CC10E2BBDA00496337 /* JSBlob.h */; };
 		2E2D99E710E2BC1C00496337 /* DOMBlob.h in Headers */ = {isa = PBXBuildFile; fileRef = 2E2D99E510E2BC1C00496337 /* DOMBlob.h */; };
@@ -3510,7 +3507,6 @@
 		978AD67414130A8D00C7CAE3 /* HTMLSpanElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978AD67114130A8D00C7CAE3 /* HTMLSpanElement.cpp */; };
 		978AD67514130A8D00C7CAE3 /* HTMLSpanElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 978AD67214130A8D00C7CAE3 /* HTMLSpanElement.h */; };
 		978D07B6145A0F030096908D /* FileException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07B5145A0F030096908D /* FileException.cpp */; };
-		978D07B8145A0F1B0096908D /* OperationNotAllowedException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07B7145A0F1B0096908D /* OperationNotAllowedException.cpp */; };
 		978D07BA145A0F3C0096908D /* RangeException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07B9145A0F3C0096908D /* RangeException.cpp */; };
 		978D07BC145A0F560096908D /* EventException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07BB145A0F560096908D /* EventException.cpp */; };
 		978D07BE145A0F6C0096908D /* DOMCoreException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978D07BD145A0F6C0096908D /* DOMCoreException.cpp */; };
@@ -7737,10 +7733,6 @@
 		2E0888D21148848A00AF4265 /* JSDOMFormData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFormData.cpp; sourceTree = "<group>"; };
 		2E0888D31148848A00AF4265 /* JSDOMFormData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDOMFormData.h; sourceTree = "<group>"; };
 		2E0888E5114884E200AF4265 /* JSDOMFormDataCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMFormDataCustom.cpp; sourceTree = "<group>"; };
-		2E2445F51395893A004B6C19 /* OperationNotAllowedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OperationNotAllowedException.h; path = fileapi/OperationNotAllowedException.h; sourceTree = "<group>"; };
-		2E2445F61395893A004B6C19 /* OperationNotAllowedException.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OperationNotAllowedException.idl; path = fileapi/OperationNotAllowedException.idl; sourceTree = "<group>"; };
-		2E24476613959173004B6C19 /* JSOperationNotAllowedException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSOperationNotAllowedException.cpp; sourceTree = "<group>"; };
-		2E24476713959173004B6C19 /* JSOperationNotAllowedException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSOperationNotAllowedException.h; sourceTree = "<group>"; };
 		2E2D99CB10E2BBDA00496337 /* JSBlob.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSBlob.cpp; sourceTree = "<group>"; };
 		2E2D99CC10E2BBDA00496337 /* JSBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSBlob.h; sourceTree = "<group>"; };
 		2E2D99E510E2BC1C00496337 /* DOMBlob.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMBlob.h; sourceTree = "<group>"; };
@@ -10577,7 +10569,6 @@
 		978AD67214130A8D00C7CAE3 /* HTMLSpanElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLSpanElement.h; sourceTree = "<group>"; };
 		978AD67314130A8D00C7CAE3 /* HTMLSpanElement.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HTMLSpanElement.idl; sourceTree = "<group>"; };
 		978D07B5145A0F030096908D /* FileException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileException.cpp; path = fileapi/FileException.cpp; sourceTree = "<group>"; };
-		978D07B7145A0F1B0096908D /* OperationNotAllowedException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OperationNotAllowedException.cpp; path = fileapi/OperationNotAllowedException.cpp; sourceTree = "<group>"; };
 		978D07B9145A0F3C0096908D /* RangeException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RangeException.cpp; sourceTree = "<group>"; };
 		978D07BB145A0F560096908D /* EventException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EventException.cpp; sourceTree = "<group>"; };
 		978D07BD145A0F6C0096908D /* DOMCoreException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMCoreException.cpp; sourceTree = "<group>"; };
@@ -16771,8 +16762,6 @@
 				898785A1122CA2A7003AABDA /* JSMetadata.h */,
 				898785A2122CA2A7003AABDA /* JSMetadataCallback.cpp */,
 				898785A3122CA2A7003AABDA /* JSMetadataCallback.h */,
-				2E24476613959173004B6C19 /* JSOperationNotAllowedException.cpp */,
-				2E24476713959173004B6C19 /* JSOperationNotAllowedException.h */,
 				89CD029111C85B870070B791 /* JSWebKitBlobBuilder.cpp */,
 				89CD029211C85B870070B791 /* JSWebKitBlobBuilder.h */,
 			);
@@ -17598,9 +17587,6 @@
 				E1AB1EC114E9E3CC00449E13 /* Metadata.idl */,
 				89878551122CA064003AABDA /* MetadataCallback.h */,
 				E1AB1EC214E9E3D500449E13 /* MetadataCallback.idl */,
-				978D07B7145A0F1B0096908D /* OperationNotAllowedException.cpp */,
-				2E2445F51395893A004B6C19 /* OperationNotAllowedException.h */,
-				2E2445F61395893A004B6C19 /* OperationNotAllowedException.idl */,
 				976D6C75122B8A3D001FD1F7 /* ThreadableBlobRegistry.cpp */,
 				976D6C76122B8A3D001FD1F7 /* ThreadableBlobRegistry.h */,
 				976D6C5C122B8A3D001FD1F7 /* WebKitBlobBuilder.cpp */,
@@ -23568,7 +23554,6 @@
 				6EBF0E7712A9868800DB1709 /* JSOESTextureFloat.h in Headers */,
 				77A17AA712F28B2A004E02F6 /* JSOESVertexArrayObject.h in Headers */,
 				FDF6BAF9134A4C9800822920 /* JSOfflineAudioCompletionEvent.h in Headers */,
-				2E24476913959173004B6C19 /* JSOperationNotAllowedException.h in Headers */,
 				FDEA6243152102E200479DF0 /* JSOscillator.h in Headers */,
 				1A0D57410A5C7867007EDD4C /* JSOverflowEvent.h in Headers */,
 				E1284BB110449FFA00EAEB52 /* JSPageTransitionEvent.h in Headers */,
@@ -23992,7 +23977,6 @@
 				FDA3E95A134A49EF008D4B5A /* OfflineAudioCompletionEvent.h in Headers */,
 				FDA3E95C134A49EF008D4B5A /* OfflineAudioDestinationNode.h in Headers */,
 				F4EAF4AF10C742B1009100D3 /* OpenTypeSanitizer.h in Headers */,
-				2E2445F71395893A004B6C19 /* OperationNotAllowedException.h in Headers */,
 				0014628B103CD1DE000B20DB /* OriginAccessEntry.h in Headers */,
 				97BC6A381505F081001B74AC /* OriginQuotaManager.h in Headers */,
 				97BC6A3A1505F081001B74AC /* OriginUsageRecord.h in Headers */,
@@ -26778,7 +26762,6 @@
 				6EBF0E7612A9868800DB1709 /* JSOESTextureFloat.cpp in Sources */,
 				77A17AA612F28B2A004E02F6 /* JSOESVertexArrayObject.cpp in Sources */,
 				FDF6BAF8134A4C9800822920 /* JSOfflineAudioCompletionEvent.cpp in Sources */,
-				2E24476813959173004B6C19 /* JSOperationNotAllowedException.cpp in Sources */,
 				FDEA6242152102E200479DF0 /* JSOscillator.cpp in Sources */,
 				1A0D57400A5C7867007EDD4C /* JSOverflowEvent.cpp in Sources */,
 				E1284BB210449FFA00EAEB52 /* JSPageTransitionEvent.cpp in Sources */,
@@ -27219,7 +27202,6 @@
 				FDA3E959134A49EF008D4B5A /* OfflineAudioCompletionEvent.cpp in Sources */,
 				FDA3E95B134A49EF008D4B5A /* OfflineAudioDestinationNode.cpp in Sources */,
 				F4EAF4AE10C742B1009100D3 /* OpenTypeSanitizer.cpp in Sources */,
-				978D07B8145A0F1B0096908D /* OperationNotAllowedException.cpp in Sources */,
 				0014628A103CD1DE000B20DB /* OriginAccessEntry.cpp in Sources */,
 				97BC6A371505F081001B74AC /* OriginQuotaManager.cpp in Sources */,
 				97BC6A391505F081001B74AC /* OriginUsageRecord.cpp in Sources */,

Modified: trunk/Source/WebCore/dom/DOMExceptions.in (119697 => 119698)


--- trunk/Source/WebCore/dom/DOMExceptions.in	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/dom/DOMExceptions.in	2012-06-07 09:42:57 UTC (rev 119698)
@@ -4,7 +4,6 @@
 EventException
 FileException conditional=BLOB
 IDBDatabaseException conditional=INDEXED_DATABASE
-OperationNotAllowedException conditional=BLOB
 RangeException
 SQLException conditional=SQL_DATABASE
 SVGException conditional=SVG

Modified: trunk/Source/WebCore/fileapi/FileReader.cpp (119697 => 119698)


--- trunk/Source/WebCore/fileapi/FileReader.cpp	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/fileapi/FileReader.cpp	2012-06-07 09:42:57 UTC (rev 119698)
@@ -35,9 +35,9 @@
 #include "FileReader.h"
 
 #include "CrossThreadTask.h"
+#include "ExceptionCode.h"
 #include "File.h"
 #include "Logging.h"
-#include "OperationNotAllowedException.h"
 #include "ProgressEvent.h"
 #include "ScriptExecutionContext.h"
 #include <wtf/ArrayBuffer.h>
@@ -133,9 +133,9 @@
 
 void FileReader::readInternal(Blob* blob, FileReaderLoader::ReadType type, ExceptionCode& ec)
 {
-    // If multiple concurrent read methods are called on the same FileReader, OperationNotAllowedException should be thrown when the state is LOADING.
+    // If multiple concurrent read methods are called on the same FileReader, INVALID_STATE_ERR should be thrown when the state is LOADING.
     if (m_state == LOADING) {
-        ec = OperationNotAllowedException::NOT_ALLOWED_ERR;
+        ec = INVALID_STATE_ERR;
         return;
     }
 

Modified: trunk/Source/WebCore/fileapi/FileReader.idl (119697 => 119698)


--- trunk/Source/WebCore/fileapi/FileReader.idl	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/fileapi/FileReader.idl	2012-06-07 09:42:57 UTC (rev 119698)
@@ -46,13 +46,13 @@
 
         // async read methods
         void readAsArrayBuffer(in Blob blob)
-            raises(OperationNotAllowedException);
+            raises(DOMException);
         void readAsBinaryString(in Blob blob)
-            raises(OperationNotAllowedException);
+            raises(DOMException);
         void readAsText(in Blob blob, in [Optional] DOMString encoding)
-            raises(OperationNotAllowedException);
+            raises(DOMException);
         void readAsDataURL(in Blob blob)
-            raises(OperationNotAllowedException);
+            raises(DOMException);
 
         void abort();
 

Deleted: trunk/Source/WebCore/fileapi/OperationNotAllowedException.cpp (119697 => 119698)


--- trunk/Source/WebCore/fileapi/OperationNotAllowedException.cpp	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/fileapi/OperationNotAllowedException.cpp	2012-06-07 09:42:57 UTC (rev 119698)
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY GOOGLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#if ENABLE(BLOB)
-
-#include "OperationNotAllowedException.h"
-
-namespace WebCore {
-
-static struct OperationNotAllowedExceptionNameDescription {
-    const char* const name;
-    const char* const description;
-} operationNotAllowedExceptions[] = {
-    { "NOT_ALLOWED_ERR", "A read method was called while the object was in the LOADING state due to a previous read call." }
-};
-
-bool OperationNotAllowedException::initializeDescription(ExceptionCode ec, ExceptionCodeDescription* description)
-{
-    if (ec < OperationNotAllowedExceptionOffset || ec > OperationNotAllowedExceptionMax)
-        return false;
-
-    description->typeName = "DOM OperationNotAllowed";
-    description->code = ec - OperationNotAllowedExceptionOffset;
-    description->type = OperationNotAllowedExceptionType;
-
-    size_t tableSize = WTF_ARRAY_LENGTH(operationNotAllowedExceptions);
-    size_t tableIndex = ec - NOT_ALLOWED_ERR;
-
-    description->name = tableIndex < tableSize ? operationNotAllowedExceptions[tableIndex].name : 0;
-    description->description = tableIndex < tableSize ? operationNotAllowedExceptions[tableIndex].description : 0;
-
-    return true;
-}
-
-} // namespace WebCore
-
-#endif // ENABLE(BLOB)

Deleted: trunk/Source/WebCore/fileapi/OperationNotAllowedException.h (119697 => 119698)


--- trunk/Source/WebCore/fileapi/OperationNotAllowedException.h	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/fileapi/OperationNotAllowedException.h	2012-06-07 09:42:57 UTC (rev 119698)
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef OperationNotAllowedException_h
-#define OperationNotAllowedException_h
-
-#if ENABLE(BLOB)
-
-#include "ExceptionBase.h"
-
-namespace WebCore {
-
-class OperationNotAllowedException : public ExceptionBase {
-public:
-    static PassRefPtr<OperationNotAllowedException> create(const ExceptionCodeDescription& description)
-    {
-        return adoptRef(new OperationNotAllowedException(description));
-    }
-
-    static const int OperationNotAllowedExceptionOffset = 1300;
-    static const int OperationNotAllowedExceptionMax = 1399;
-
-    enum OperationNotAllowedExceptionCode {
-        NOT_ALLOWED_ERR = OperationNotAllowedExceptionOffset + 1,
-    };
-
-    static bool initializeDescription(ExceptionCode, ExceptionCodeDescription*);
-
-private:
-    OperationNotAllowedException(const ExceptionCodeDescription& description)
-        : ExceptionBase(description)
-    {
-    }
-};
-
-} // namespace WebCore
-
-#endif // ENABLE(BLOB)
-
-#endif // OperationNotAllowedException_h

Deleted: trunk/Source/WebCore/fileapi/OperationNotAllowedException.idl (119697 => 119698)


--- trunk/Source/WebCore/fileapi/OperationNotAllowedException.idl	2012-06-07 09:38:45 UTC (rev 119697)
+++ trunk/Source/WebCore/fileapi/OperationNotAllowedException.idl	2012-06-07 09:42:57 UTC (rev 119698)
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2011 Google Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-module html {
-    exception [
-        Conditional=BLOB,
-        DoNotCheckConstants,
-        JSNoStaticTables
-    ] OperationNotAllowedException {
-        readonly attribute unsigned short   code;
-        readonly attribute DOMString        name;
-        readonly attribute DOMString        message;
-
-#if defined(LANGUAGE_JAVASCRIPT) && LANGUAGE_JAVASCRIPT
-        // Override in a Mozilla compatible format
-        [NotEnumerable] DOMString toString();
-#endif
-
-        const unsigned short NOT_ALLOWED_ERR = 1;
-    };
-}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to