Bug 990725 - Rename ErrorEvent.column to .colno to match spec change; r=smaug
authorAryeh Gregor <ayg@aryeh.name>
Wed, 23 Apr 2014 14:55:58 +0300
changeset 179774 5d418a48ba48c527595ff82cbd294f03c8bc778c
parent 179773 1e0f8b517b86e3fe3775edc3df05ea8fe49cf9b3
child 179775 ad32581cd49a3f7be2dd29eae704e34b059c5f89
push id26639
push userryanvm@gmail.com
push dateWed, 23 Apr 2014 20:42:51 +0000
treeherdermozilla-central@ed0236a51ed3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs990725
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 990725 - Rename ErrorEvent.column to .colno to match spec change; r=smaug
dom/base/nsJSEnvironment.cpp
dom/events/JSEventHandler.cpp
dom/events/test/test_error_events.html
dom/webidl/ErrorEvent.webidl
dom/workers/WorkerPrivate.cpp
dom/workers/test/test_sharedWorker.html
--- a/dom/base/nsJSEnvironment.cpp
+++ b/dom/base/nsJSEnvironment.cpp
@@ -477,17 +477,17 @@ public:
             sameOrigin = false;
           }
         }
 
         NS_NAMED_LITERAL_STRING(xoriginMsg, "Script error.");
         if (sameOrigin) {
           init.mMessage = mErrorMsg;
           init.mLineno = mLineNumber;
-          init.mColumn = mColumn;
+          init.mColno = mColumn;
           init.mError = mError;
         } else {
           NS_WARNING("Not same origin error!");
           init.mMessage = xoriginMsg;
           init.mLineno = 0;
         }
 
         nsRefPtr<ErrorEvent> event =
--- a/dom/events/JSEventHandler.cpp
+++ b/dom/events/JSEventHandler.cpp
@@ -137,17 +137,17 @@ JSEventHandler::HandleEvent(nsIDOMEvent*
 
       scriptEvent->GetFilename(file);
       fileName = &file;
 
       lineNumber.Construct();
       lineNumber.Value() = scriptEvent->Lineno();
 
       columnNumber.Construct();
-      columnNumber.Value() = scriptEvent->Column();
+      columnNumber.Value() = scriptEvent->Colno();
 
       ThreadsafeAutoJSContext cx;
       error.Construct(cx);
       error.Value() = scriptEvent->Error(cx);
     } else {
       msgOrEvent.SetAsEvent() = aEvent->InternalDOMEvent();
     }
 
--- a/dom/events/test/test_error_events.html
+++ b/dom/events/test/test_error_events.html
@@ -32,17 +32,17 @@
     [ "Event filename", errorEvent.filename, location.href ],
     [ "Callback filename", file, location.href ],
     [ "Event line number", errorEvent.lineno, 27 ],
     [ "Callback line number", line, 27 ],
     [ "Event message", errorEvent.message, "Error: hello" ],
     [ "Callback message", msg, "Error: hello" ],
     [ "Event error-object", errorEvent.error, thrown],
     [ "Callback error-object", error, thrown ],
-    [ "Event column", errorEvent.column, 0 ], // Sadly not correct right now
+    [ "Event column", errorEvent.colno, 0 ], // Sadly not correct right now
     [ "Callback column", column, 0 ]
   ]);
 </script>
 <script>
   var workerLocation = location.protocol + "//" + location.host +
     location.pathname.replace("test_error_events.html", "error_event_worker.js");
   var eventFileTest = async_test("Worker event filename");
   var eventLineTest = async_test("Worker event line number");
--- a/dom/webidl/ErrorEvent.webidl
+++ b/dom/webidl/ErrorEvent.webidl
@@ -4,20 +4,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 [Constructor(DOMString type, optional ErrorEventInit eventInitDict)]
 interface ErrorEvent : Event
 {
   readonly attribute DOMString message;
   readonly attribute DOMString filename;
   readonly attribute unsigned long lineno;
-  readonly attribute unsigned long column;
+  readonly attribute unsigned long colno;
   readonly attribute any error;
 };
 
 dictionary ErrorEventInit : EventInit
 {
   DOMString message = "";
   DOMString filename = "";
   unsigned long lineno = 0;
-  unsigned long column = 0;
+  unsigned long colno = 0;
   any error = null;
 };
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -3142,17 +3142,17 @@ WorkerPrivateParent<Derived>::BroadcastE
     }
 
     RootedDictionary<ErrorEventInit> errorInit(aCx);
     errorInit.mBubbles = false;
     errorInit.mCancelable = true;
     errorInit.mMessage = aMessage;
     errorInit.mFilename = aFilename;
     errorInit.mLineno = aLineNumber;
-    errorInit.mColumn = aColumnNumber;
+    errorInit.mColno = aColumnNumber;
 
     nsRefPtr<ErrorEvent> errorEvent =
       ErrorEvent::Constructor(sharedWorker, NS_LITERAL_STRING("error"),
                               errorInit);
     if (!errorEvent) {
       Throw(cx, NS_ERROR_UNEXPECTED);
       JS_ReportPendingException(cx);
       continue;
--- a/dom/workers/test/test_sharedWorker.html
+++ b/dom/workers/test/test_sharedWorker.html
@@ -52,17 +52,17 @@
             receivedMessage = event.data;
           };
 
           worker.onerror = function(event) {
             ok(event instanceof ErrorEvent, "Got an ErrorEvent");
             is(event.message, "Error: " + sentMessage, "Got correct error");
             is(event.filename, errorFilename, "Got correct filename");
             is(event.lineno, errorLine, "Got correct lineno");
-            is(event.column, errorColumn, "Got correct column");
+            is(event.colno, errorColumn, "Got correct column");
             ok(receivedMessage !== undefined, "Got message already");
             ok(receivedError === undefined, "Haven't gotten error yet");
             receivedError = event.message;
             event.preventDefault();
             SimpleTest.finish();
           };
 
           worker.port.postMessage(sentMessage);