Skip to content

Commit

Permalink
Bug 1613367 - Set Cu.reportError message as from chrome context if in…
Browse files Browse the repository at this point in the history
…nerWindowId is 0 r=baku

Differential Revision: https://phabricator.services.mozilla.com/D65952

--HG--
extra : moz-landing-system : lando
  • Loading branch information
edenchuang committed Mar 10, 2020
1 parent 0ae0e57 commit fa546ee
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions js/xpconnect/src/XPCComponents.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1420,7 +1420,8 @@ nsXPCComponents_Utils::ReportError(HandleValue error, HandleValue stack,
fileUni,
linebuf ? nsDependentString(linebuf, err->linebufLength())
: EmptyString(),
err->lineno, column, err->flags, "XPConnect JavaScript", innerWindowID);
err->lineno, column, err->flags, "XPConnect JavaScript", innerWindowID,
innerWindowID == 0 ? true : false);
NS_ENSURE_SUCCESS(rv, NS_OK);

console->LogMessage(scripterr);
Expand All @@ -1438,9 +1439,9 @@ nsXPCComponents_Utils::ReportError(HandleValue error, HandleValue stack,
return NS_OK;
}

nsresult rv =
scripterr->InitWithWindowID(msg, fileName, EmptyString(), lineNo, 0, 0,
"XPConnect JavaScript", innerWindowID, true);
nsresult rv = scripterr->InitWithWindowID(
msg, fileName, EmptyString(), lineNo, 0, 0, "XPConnect JavaScript",
innerWindowID, innerWindowID ? true : false);
NS_ENSURE_SUCCESS(rv, NS_OK);

console->LogMessage(scripterr);
Expand Down

0 comments on commit fa546ee

Please sign in to comment.