Closed
Bug 1443079
Opened 7 years ago
Closed 7 years ago
nsScriptError.isFromPrivateWindow is always false
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla61
People
(Reporter: nchevobbe, Assigned: baku)
References
Details
Attachments
(1 file, 1 obsolete file)
46.57 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
**Steps to reproduce**
1. Open a private window
2. Navigate to https://nchevobbe.github.io/demo/console-test-app.html
3. Open the browser console
4. Hit the "Exception" button
**Expected results**
In [1] pageError.isFromPrivateWindow is true
**Actual results**
In [1]. pageError.isFromPrivateWindow is false
---
As far as I understand it, isFromPrivateWindow is set in [2], and I don't think there's a test covering the correctness of this attribute.
[1] https://searchfox.org/mozilla-central/rev/d2b4b40901c15614fad2fa34718eea428774306e/devtools/server/actors/webconsole.js#1624
[2] https://searchfox.org/mozilla-central/rev/d2b4b40901c15614fad2fa34718eea428774306e/dom/bindings/nsScriptError.cpp#78-79
Reporter | ||
Comment 1•7 years ago
|
||
I think you're the last person making changes to those lines.
Would you know what's happening here ?
Flags: needinfo?(bent.mozilla)
Comment 2•7 years ago
|
||
baku is just changing some related code in some other bug.
Flags: needinfo?(amarchesini)
Updated•7 years ago
|
Flags: needinfo?(bent.mozilla)
Assignee | ||
Comment 3•7 years ago
|
||
> [1]
> https://searchfox.org/mozilla-central/rev/
> d2b4b40901c15614fad2fa34718eea428774306e/devtools/server/actors/webconsole.
> js#1624
This is not triggered by the STR.
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 4•7 years ago
|
||
Attachment #8956838 -
Flags: review?(bugs)
Comment 5•7 years ago
|
||
Comment on attachment 8956838 [details] [diff] [review]
scriptError.patch
>@@ -4151,17 +4151,18 @@ nsContentUtils::LogSimpleConsoleError(co
> nsCOMPtr<nsIScriptError> scriptError =
> do_CreateInstance(NS_SCRIPTERROR_CONTRACTID);
> if (scriptError) {
> nsCOMPtr<nsIConsoleService> console =
> do_GetService(NS_CONSOLESERVICE_CONTRACTID);
> if (console && NS_SUCCEEDED(scriptError->Init(aErrorText, EmptyString(),
> EmptyString(), 0, 0,
> nsIScriptError::errorFlag,
>- classification))) {
>+ classification,
>+ false /* from private window */))) {
Why is this right? This code sure can be called from a private window
>+++ b/dom/indexedDB/ScriptErrorHelper.cpp
>@@ -138,17 +138,18 @@ public:
> } else {
> MOZ_ALWAYS_SUCCEEDS(
> scriptError->Init(aMessage,
> aFilename,
> /* aSourceLine */ EmptyString(),
> aLineNumber,
> aColumnNumber,
> aSeverityFlag,
>- category.get()));
>+ category.get(),
>+ /* from private window */ false));
Why false?
>+++ b/dom/websocket/WebSocket.cpp
>@@ -385,17 +385,18 @@ WebSocketImpl::PrintErrorOnConsole(const
> EmptyString(), mScriptLine,
> mScriptColumn,
> nsIScriptError::errorFlag, "Web Socket",
> mInnerWindowID);
> } else {
> rv = errorObject->Init(message,
> NS_ConvertUTF8toUTF16(mScriptFile),
> EmptyString(), mScriptLine, mScriptColumn,
>- nsIScriptError::errorFlag, "Web Socket");
>+ nsIScriptError::errorFlag, "Web Socket",
>+ false /* from private window */);
Why false?
>+++ b/netwerk/protocol/http/nsCORSListenerProxy.cpp
>@@ -1593,16 +1593,17 @@ nsCORSListenerProxy::LogBlockedCORSReque
> }
> else {
> rv = scriptError->Init(aMessage,
> EmptyString(), // sourceName
> EmptyString(), // sourceLine
> 0, // lineNumber
> 0, // columnNumber
> nsIScriptError::warningFlag,
>- "CORS");
>+ "CORS",
>+ false); // Private Window
why false?
Attachment #8956838 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 6•7 years ago
|
||
Attachment #8956838 -
Attachment is obsolete: true
Attachment #8958072 -
Flags: review?(bugs)
Updated•7 years ago
|
Attachment #8958072 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/47a89fa7cfd2
nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug
Comment 8•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•7 years ago
|
Updated•7 years ago
|
QA Whiteboard: [good first verify]
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•