Closed
Bug 1062077
Opened 10 years ago
Closed 10 years ago
Unify xpc::SystemErrorReporter and NS_ScriptErrorReporter
Categories
(Core :: XPConnect, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
People
(Reporter: bholley, Assigned: bholley)
References
Details
Attachments
(6 files)
18.18 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
9.53 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
2.89 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
5.66 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
7.27 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
2.59 KB,
patch
|
bzbarsky
:
review+
|
Details | Diff | Splinter Review |
Buckle up.
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Comment 2•10 years ago
|
||
Assignee | ||
Comment 3•10 years ago
|
||
I've got it! Let's just wrap the JS thing in an XPCOM thing that duplicates
its fields with a different ownership model! We totally need another one of
those, right? And we could even stick it in XPConnect! </sarcasm>
In seriousness - the code to own, format, and display error reports is
currently spread between the JS engine, JSErrorReporters, an async Runnable
abstraction, and elsewhere. We need to condense it somewhere to start chipping
away at this mess.
Attachment #8484781 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 4•10 years ago
|
||
Attachment #8484782 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 5•10 years ago
|
||
Attachment #8484783 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 6•10 years ago
|
||
Note that this is a no-op right now, because NS_ScriptErrorReporter currently
relies on nsIScriptContext to get its global, and thus will only ever operate
on window globals. But that will change once we merge this code with that in
xpc::SystemErrorReporter.
Attachment #8484784 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 7•10 years ago
|
||
We keep the latter name because it's referenced in more places. Error reporters
will go away entirely in bug 981187.
Attachment #8484785 -
Flags: review?(bzbarsky)
Assignee | ||
Comment 8•10 years ago
|
||
In the past this might theoretically have switched us from
NS_ScriptErrorReporter to xpc::SystemErrorReporter, but those have now been
merged.
Attachment #8484786 -
Flags: review?(bzbarsky)
![]() |
||
Comment 9•10 years ago
|
||
I won't get to this until Monday or more likely Tuesday.
![]() |
||
Comment 10•10 years ago
|
||
Comment on attachment 8484781 [details] [diff] [review]
Part 1 - Introduce xpc::ErrorReport. v1
r=me
Attachment #8484781 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 11•10 years ago
|
||
Comment on attachment 8484782 [details] [diff] [review]
Part 2 - Hoist console logging duties into xpc::ErrorReport. v1
This introduces a behavior change. Before this patch, the NSPR and stderr logging happened no matter what. After this change it only happens if the window's onerror event handler doesn't suppress the error report (which is when we go ahead and log to console).
I'm probably OK with this change, though it might be nice to preserve the old behavior...
Attachment #8484782 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 12•10 years ago
|
||
Comment on attachment 8484782 [details] [diff] [review]
Part 2 - Hoist console logging duties into xpc::ErrorReport. v1
Actually, this also stops logging to stderr if there is no console service. I expect we'd want to fix that, at the very least.
![]() |
||
Comment 13•10 years ago
|
||
Comment on attachment 8484783 [details] [diff] [review]
Part 3 - Switch SystemErrorReporter to xpc::ErrorReport. v1
r=me assuming the stderr bits from part 2 are fixed.
Attachment #8484783 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 14•10 years ago
|
||
Comment on attachment 8484784 [details] [diff] [review]
Part 4 - Report exceptions immediately for non-window globals, and assert that we have a window in ScriptErrorEvent. v1
r=me
Attachment #8484784 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 15•10 years ago
|
||
Comment on attachment 8484785 [details] [diff] [review]
Part 5 - Merge NS_ScriptErrorReporter and xpc::SystemErrorReporter. v1
r=me
Attachment #8484785 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 16•10 years ago
|
||
Comment on attachment 8484786 [details] [diff] [review]
Part 6 - Remove now-no-op error reporter munging in mozJSSubScriptLoader.cpp. v1
r=me
Attachment #8484786 -
Flags: review?(bzbarsky) → review+
Assignee | ||
Comment 17•10 years ago
|
||
Thanks for the reviews, Boris!
Full try push: https://tbpl.mozilla.org/?tree=Try&rev=4fb3317d59fd
Assignee | ||
Comment 18•10 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/cf4859464f9e
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c905979c161e
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/67e8b7d84de8
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/3568bcb8b6c6
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/519e6a37545d
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/1b8da12b68dc
Comment 19•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/cf4859464f9e
https://hg.mozilla.org/mozilla-central/rev/c905979c161e
https://hg.mozilla.org/mozilla-central/rev/67e8b7d84de8
https://hg.mozilla.org/mozilla-central/rev/3568bcb8b6c6
https://hg.mozilla.org/mozilla-central/rev/519e6a37545d
https://hg.mozilla.org/mozilla-central/rev/1b8da12b68dc
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•