From 8a9f071657bbf13e1b33c85cbbd630f97818985f Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Wed, 23 Apr 2014 14:55:58 +0300 Subject: [PATCH] Bug 990725 - Rename ErrorEvent.column to .colno to match spec change; r=smaug --- dom/base/nsJSEnvironment.cpp | 2 +- dom/events/JSEventHandler.cpp | 2 +- dom/events/test/test_error_events.html | 2 +- dom/webidl/ErrorEvent.webidl | 4 ++-- dom/workers/WorkerPrivate.cpp | 2 +- dom/workers/test/test_sharedWorker.html | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dom/base/nsJSEnvironment.cpp b/dom/base/nsJSEnvironment.cpp index 7ac2cbba7d6..09938d18182 100644 --- a/dom/base/nsJSEnvironment.cpp +++ b/dom/base/nsJSEnvironment.cpp @@ -482,7 +482,7 @@ public: if (sameOrigin) { init.mMessage = mErrorMsg; init.mLineno = mLineNumber; - init.mColumn = mColumn; + init.mColno = mColumn; init.mError = mError; } else { NS_WARNING("Not same origin error!"); diff --git a/dom/events/JSEventHandler.cpp b/dom/events/JSEventHandler.cpp index 9e77f924ad7..37eeccc3f48 100644 --- a/dom/events/JSEventHandler.cpp +++ b/dom/events/JSEventHandler.cpp @@ -142,7 +142,7 @@ JSEventHandler::HandleEvent(nsIDOMEvent* aEvent) lineNumber.Value() = scriptEvent->Lineno(); columnNumber.Construct(); - columnNumber.Value() = scriptEvent->Column(); + columnNumber.Value() = scriptEvent->Colno(); ThreadsafeAutoJSContext cx; error.Construct(cx); diff --git a/dom/events/test/test_error_events.html b/dom/events/test/test_error_events.html index 8f8abc0ce4b..da52df1a81b 100644 --- a/dom/events/test/test_error_events.html +++ b/dom/events/test/test_error_events.html @@ -37,7 +37,7 @@ [ "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 ] ]); diff --git a/dom/webidl/ErrorEvent.webidl b/dom/webidl/ErrorEvent.webidl index 3349078ba0a..2e7c000ff40 100644 --- a/dom/webidl/ErrorEvent.webidl +++ b/dom/webidl/ErrorEvent.webidl @@ -9,7 +9,7 @@ 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; }; @@ -18,6 +18,6 @@ dictionary ErrorEventInit : EventInit DOMString message = ""; DOMString filename = ""; unsigned long lineno = 0; - unsigned long column = 0; + unsigned long colno = 0; any error = null; }; diff --git a/dom/workers/WorkerPrivate.cpp b/dom/workers/WorkerPrivate.cpp index c83822edd7e..47a9e943a3a 100644 --- a/dom/workers/WorkerPrivate.cpp +++ b/dom/workers/WorkerPrivate.cpp @@ -3147,7 +3147,7 @@ WorkerPrivateParent::BroadcastErrorToSharedWorkers( errorInit.mMessage = aMessage; errorInit.mFilename = aFilename; errorInit.mLineno = aLineNumber; - errorInit.mColumn = aColumnNumber; + errorInit.mColno = aColumnNumber; nsRefPtr errorEvent = ErrorEvent::Constructor(sharedWorker, NS_LITERAL_STRING("error"), diff --git a/dom/workers/test/test_sharedWorker.html b/dom/workers/test/test_sharedWorker.html index 79e197c0afb..38b65f6453f 100644 --- a/dom/workers/test/test_sharedWorker.html +++ b/dom/workers/test/test_sharedWorker.html @@ -57,7 +57,7 @@ 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;