Bug 612164 - Give DATA_CLONE_ERR the right constant; r=jst a=blocking-beta8
authorMs2ger <ms2ger@gmail.com>
Fri, 26 Nov 2010 12:43:26 +0100
changeset 58255 114966e5b16843a42d0957df90dbaac63e735e0b
parent 58254 ff7070b8396450016845dc034fd38b2618b9abea
child 58256 f6ac6dfa96881dfc819378467952e40d91619519
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewersjst, blocking-beta8
bugs612164
milestone2.0b8pre
Bug 612164 - Give DATA_CLONE_ERR the right constant; r=jst a=blocking-beta8
dom/base/nsDOMError.h
dom/src/threads/test/json_worker.js
--- a/dom/base/nsDOMError.h
+++ b/dom/base/nsDOMError.h
@@ -38,64 +38,63 @@
 #ifndef nsDOMError_h__
 #define nsDOMError_h__
 
 #include "nsError.h"
 
 // XXX If you add a new error code, also add an error string to
 // dom/src/base/domerr.msg
 
-/* DOM error codes from http://www.w3.org/TR/REC-DOM-Level-1/ */
+/* Standard DOM error codes: http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html */
 
 #define NS_ERROR_DOM_INDEX_SIZE_ERR              NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,1)
 #define NS_ERROR_DOM_DOMSTRING_SIZE_ERR          NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,2)
 #define NS_ERROR_DOM_HIERARCHY_REQUEST_ERR       NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,3)
 #define NS_ERROR_DOM_WRONG_DOCUMENT_ERR          NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,4)
 #define NS_ERROR_DOM_INVALID_CHARACTER_ERR       NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,5)
 #define NS_ERROR_DOM_NO_DATA_ALLOWED_ERR         NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,6)
 #define NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,7)
 #define NS_ERROR_DOM_NOT_FOUND_ERR               NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,8)
 #define NS_ERROR_DOM_NOT_SUPPORTED_ERR           NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,9)
 #define NS_ERROR_DOM_INUSE_ATTRIBUTE_ERR         NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,10)
-
-/* DOM error codes from http://www.w3.org/TR/DOM-Level-2/ */
-
 #define NS_ERROR_DOM_INVALID_STATE_ERR           NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,11)
 #define NS_ERROR_DOM_SYNTAX_ERR                  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,12)
 #define NS_ERROR_DOM_INVALID_MODIFICATION_ERR    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,13)
 #define NS_ERROR_DOM_NAMESPACE_ERR               NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,14)
 #define NS_ERROR_DOM_INVALID_ACCESS_ERR          NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,15)
+#define NS_ERROR_DOM_VALIDATION_ERR              NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,16)
+#define NS_ERROR_DOM_TYPE_MISMATCH_ERR           NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,17)
+/* 18: SECURITY_ERR */
+/* 19: NETWORK_ERR */
+/* 20: ABORT_ERR */
+/* 21: URL_MISMATCH_ERR */
+/* 22: QUOTA_EXCEEDED_ERR */
+/* 23: TIMEOUT_ERR */
+/* 24: NOT_READABLE_ERR */
+#define NS_ERROR_DOM_DATA_CLONE_ERR              NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,25)
+/* 26: ENCODING_ERR */
 
 /* DOM error codes from http://www.w3.org/TR/DOM-Level-2/range.html */
 
 #define NS_ERROR_DOM_RANGE_BAD_BOUNDARYPOINTS_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_RANGE, 1)
 #define NS_ERROR_DOM_RANGE_INVALID_NODE_TYPE_ERR  NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_RANGE, 2)
 
-/* DOM error codes from http://www.w3.org/TR/DOM-Level-3/ */
-
-#define NS_ERROR_DOM_VALIDATION_ERR              NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,16)
-#define NS_ERROR_DOM_TYPE_MISMATCH_ERR           NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,17)
-
 /* SVG DOM error codes from http://www.w3.org/TR/SVG11/svgdom.html */
 
 #ifdef MOZ_SVG
 #define NS_ERROR_DOM_SVG_WRONG_TYPE_ERR          NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG,0)
 #define NS_ERROR_DOM_SVG_INVALID_VALUE_ERR       NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG,1)
 #define NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_SVG,2)
 #endif
 
 /* DOM error codes from http://www.w3.org/TR/DOM-Level-3-XPath/ */
 
 #define NS_ERROR_DOM_INVALID_EXPRESSION_ERR      NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_XPATH, 51)
 #define NS_ERROR_DOM_TYPE_ERR                    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_XPATH, 52)
 
-/* HTML5 error codes http://dev.w3.org/html5/spec/Overview.html */
-
-#define NS_ERROR_DOM_DATA_CLONE_ERR              NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM,18)
-
 /* IndexedDB error codes http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html */
 
 #define NS_ERROR_DOM_INDEXEDDB_UNKNOWN_ERR       NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB,0)
 #define NS_ERROR_DOM_INDEXEDDB_NON_TRANSIENT_ERR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB,1)
 #define NS_ERROR_DOM_INDEXEDDB_NOT_FOUND_ERR     NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB,2)
 #define NS_ERROR_DOM_INDEXEDDB_CONSTRAINT_ERR    NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB,3)
 #define NS_ERROR_DOM_INDEXEDDB_DATA_ERR          NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB,4)
 #define NS_ERROR_DOM_INDEXEDDB_NOT_ALLOWED_ERR   NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_DOM_INDEXEDDB,5)
--- a/dom/src/threads/test/json_worker.js
+++ b/dom/src/threads/test/json_worker.js
@@ -310,17 +310,17 @@ for (var index = 0; index < messages.len
 function onmessage(event) {
   for (var index = 0; index < messages.length; index++) {
     var exception = undefined;
 
     try {
       postMessage(messages[index].value);
     }
     catch (e) {
-      if (e.result != 2152923154) {
+      if (e.result != 2152923161) {
         throw "Exception of the wrong type: " + e.result;
       }
       exception = e;
     }
 
     if ((exception !== undefined && !messages[index].exception) ||
         (exception === undefined && messages[index].exception)) {
       throw "Exception inconsistency [index = " + index + ", " +