Bug 1200484 (part 6) - Use JS column numbers in ContentParent::OnChannelError(). r=billm.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 01 Sep 2015 17:56:03 -0700
changeset 260466 ab12904f46893a8285d9105a60035473927bfe30
parent 260465 7b1b725f1f1da3fca2a341524a99906fc7a2eb4a
child 260467 0b6d99eaee3f8af5c5e461b93f565508dd19d671
push id29311
push usercbook@mozilla.com
push dateWed, 02 Sep 2015 11:53:18 +0000
treeherdermozilla-central@1b687fcb5213 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1200484
milestone43.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 1200484 (part 6) - Use JS column numbers in ContentParent::OnChannelError(). r=billm.
dom/ipc/ContentParent.cpp
--- a/dom/ipc/ContentParent.cpp
+++ b/dom/ipc/ContentParent.cpp
@@ -1840,21 +1840,22 @@ ContentParent::OnChannelError()
 void
 ContentParent::OnBeginSyncTransaction() {
     if (XRE_IsParentProcess()) {
         nsCOMPtr<nsIConsoleService> console(do_GetService(NS_CONSOLESERVICE_CONTRACTID));
         JSContext *cx = nsContentUtils::GetCurrentJSContext();
         if (!sDisableUnsafeCPOWWarnings) {
             if (console && cx) {
                 nsAutoString filename;
-                uint32_t lineno = 0;
-                nsJSUtils::GetCallingLocation(cx, filename, &lineno);
+                uint32_t lineno = 0, column = 0;
+                nsJSUtils::GetCallingLocation(cx, filename, &lineno, &column);
                 nsCOMPtr<nsIScriptError> error(do_CreateInstance(NS_SCRIPTERROR_CONTRACTID));
-                error->Init(NS_LITERAL_STRING("unsafe CPOW usage"), filename, EmptyString(),
-                            lineno, 0, nsIScriptError::warningFlag, "chrome javascript");
+                error->Init(NS_LITERAL_STRING("unsafe CPOW usage"), filename,
+                            EmptyString(), lineno, column,
+                            nsIScriptError::warningFlag, "chrome javascript");
                 console->LogMessage(error);
             } else {
                 NS_WARNING("Unsafe synchronous IPC message");
             }
         }
     }
 }