Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug

1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process

Differential Revision: https://phabricator.services.mozilla.com/D23330
This commit is contained in:
Eden Chuang
2019-04-01 22:42:34 +00:00
parent 3184e4a3ac
commit 805df63f08
38 changed files with 199 additions and 63 deletions

View File

@@ -1148,7 +1148,8 @@ nsresult nsScriptSecurityManager::ReportError(const char* aMessageTag,
// using category of "SOP" so we can link to MDN
rv = error->Init(message, EmptyString(), EmptyString(), 0, 0,
nsIScriptError::errorFlag, "SOP", aFromPrivateWindow);
nsIScriptError::errorFlag, "SOP", aFromPrivateWindow,
true /* From chrome context */);
NS_ENSURE_SUCCESS(rv, rv);
console->LogMessage(error);
return NS_OK;