Bug 1200484 (part 6) - Use JS column numbers in ContentParent::OnChannelError(). r=billm.

--HG--
extra : rebase_source : 38dfaf616ffeef688190ed7609307b6e262e0365
This commit is contained in:
Nicholas Nethercote 2015-09-01 17:56:03 -07:00
Родитель 92315e0173
Коммит 93ef609bf3
1 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -1845,11 +1845,12 @@ ContentParent::OnBeginSyncTransaction() {
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");