Bug 1200484 (part 2) - Use JS column numbers in ReportWrapperDenial(). r=mrbkap.

This commit is contained in:
Nicholas Nethercote 2015-08-31 21:28:50 -07:00
parent f2d29c76bb
commit 9c78b5237a

View File

@ -199,13 +199,13 @@ ReportWrapperDenial(JSContext* cx, HandleId id, WrapperDenialType type, const ch
if (!propertyName.init(cx, id))
return false;
AutoFilename filename;
unsigned line = 0;
DescribeScriptedCaller(cx, &filename, &line);
unsigned line = 0, column = 0;
DescribeScriptedCaller(cx, &filename, &line, &column);
// Warn to the terminal for the logs.
NS_WARNING(nsPrintfCString("Silently denied access to property |%s|: %s (@%s:%u)",
NS_WARNING(nsPrintfCString("Silently denied access to property |%s|: %s (@%s:%u:%u)",
NS_LossyConvertUTF16toASCII(propertyName).get(), reason,
filename.get(), line).get());
filename.get(), line, column).get());
// If this isn't the first warning on this topic for this global, we've
// already bailed out in opt builds. Now that the NS_WARNING is done, bail
@ -252,7 +252,7 @@ ReportWrapperDenial(JSContext* cx, HandleId id, WrapperDenialType type, const ch
nsresult rv = errorObject->InitWithWindowID(NS_ConvertASCIItoUTF16(errorMessage.ref()),
filenameStr,
EmptyString(),
line, 0,
line, column,
nsIScriptError::warningFlag,
"XPConnect",
windowId);