Bug 990725 - Rename ErrorEvent.column to .colno to match spec change; r=smaug

This commit is contained in:
Aryeh Gregor 2014-04-23 14:55:58 +03:00
parent 4265c19aa6
commit 8a9f071657
6 changed files with 7 additions and 7 deletions

View File

@ -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!");

View File

@ -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);

View File

@ -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 ]
]);
</script>

View File

@ -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;
};

View File

@ -3147,7 +3147,7 @@ WorkerPrivateParent<Derived>::BroadcastErrorToSharedWorkers(
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"),

View File

@ -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;