Closed
Bug 1277278
Opened 9 years ago
Closed 8 years ago
Make autoJSAPIOwnsErrorReporting the default
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
Details
Attachments
(5 files)
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
Once all dependent bugs are fixed, we should do a Try run to double check we use autoJSAPIOwnsErrorReporting everywhere.
If that's green, we can remove the autoJSAPIOwnsErrorReporting and dontReportUncaught options.
After that, we can rename JS_SetErrorReporter to JS_SetWarningReporter and remove a lot of code (AutoLastFrameCheck, JS_ReportPendingException, ReportUncaughtException, etc).
Assignee | ||
Comment 1•9 years ago
|
||
The first bomb. This removes ContextOptions, AutoLastFrameCheck and some related code.
This leaves some stale comments related to the error/warning reporter, but other patches will address that.
21 files changed, 17 insertions(+), 292 deletions(-)
Attachment #8759994 -
Flags: review?(jorendorff)
Assignee | ||
Comment 2•9 years ago
|
||
The main problem was PrepareScriptEnvironmentAndInvoke: if we don't have a scriptEnvironmentPreparer callback we will use JS_ReportPendingException.
I changed this to MOZ_RELEASE_ASSERT we have a scriptEnvironmentPreparer. We could also print to stderr or ignore the exception if you prefer that.
Attachment #8759996 -
Flags: review?(jorendorff)
Assignee | ||
Comment 3•9 years ago
|
||
Renames JS_{Get,Set}ErrorReporter to JS::{Get,Set}WarningReporter. It also renames some related code from error to warning.
Attachment #8760000 -
Flags: review?(jorendorff)
Assignee | ||
Comment 4•9 years ago
|
||
ErrorToException returns false if the report is a warning. We can change this to an assert, and have the callers check for warnings themselves before calling ErrorToException.
Attachment #8760001 -
Flags: review?(jorendorff)
Assignee | ||
Comment 5•9 years ago
|
||
The ErrorToException callers no longer care about the return value, so we can just make ErrorToException's return void. This nicely simplifies things.
That's the last patch for this bug, but there's a lot more we can clean up in followup bugs.
Attachment #8760003 -
Flags: review?(jorendorff)
Assignee | ||
Comment 6•8 years ago
|
||
Luke, do you want to take these reviews? Jason is on PTO this week and it's mostly code removal/simplification.
Flags: needinfo?(luke)
Comment 7•8 years ago
|
||
Comment on attachment 8759994 [details] [diff] [review]
Part 1 - Remove ContextOptions
Review of attachment 8759994 [details] [diff] [review]:
-----------------------------------------------------------------
You bet I do. This is glorious.
Attachment #8759994 -
Flags: review?(jorendorff) → review+
Updated•8 years ago
|
Attachment #8759996 -
Flags: review?(jorendorff) → review+
Updated•8 years ago
|
Attachment #8760000 -
Flags: review?(jorendorff) → review+
Updated•8 years ago
|
Attachment #8760001 -
Flags: review?(jorendorff) → review+
Updated•8 years ago
|
Attachment #8760003 -
Flags: review?(jorendorff) → review+
Pushed by jandemooij@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/aaebaccae0a2
part 1 - Remove ContextOptions and make autoJSAPIOwnsErrorReporting the default. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/3e9f480972b4
part 2 - Remove JS_ReportPendingException and js::ReportUncaughtException. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/3b42129e45a9
part 3 - Rename error reporter callback to warning reporter, assert it's only used for warnings. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/b605a7bb8c49
part 4 - Remove the warning case from ErrorToException. r=luke
https://hg.mozilla.org/integration/mozilla-inbound/rev/bd2089fe075e
part 5 - Change ErrorToException's return type from bool to void. r=luke
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aaebaccae0a2
https://hg.mozilla.org/mozilla-central/rev/3e9f480972b4
https://hg.mozilla.org/mozilla-central/rev/3b42129e45a9
https://hg.mozilla.org/mozilla-central/rev/b605a7bb8c49
https://hg.mozilla.org/mozilla-central/rev/bd2089fe075e
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•