Closed
Bug 1283058
Opened 8 years ago
Closed 8 years ago
Remove JSREPORT_UC and JSREPORT_STRICT_MODE_ERROR.
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(3 files)
(deleted),
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
JSREPORT_UC is not passed from any part of the code.
https://dxr.mozilla.org/mozilla-central/search?q=JSREPORT_UC&redirect=false
https://dxr.mozilla.org/mozilla-central/rev/e45890951ce77c3df05575bd54072b9f300d77b0/js/src/frontend/TokenStream.h#1044
> // Steal one JSREPORT_* bit (see jsapi.h) to tell that arguments to the error
> // message have const char16_t* type, not const char*.
> #define JSREPORT_UC 0x100
https://dxr.mozilla.org/mozilla-central/rev/e45890951ce77c3df05575bd54072b9f300d77b0/js/src/frontend/TokenStream.cpp#652
> err.argumentsType = (flags & JSREPORT_UC) ? ArgumentsAreUnicode : ArgumentsAreASCII;
JSREPORT_EXCEPTION is used but not checked at all, so it could be replaced with JSREPORT_ERROR.
https://dxr.mozilla.org/mozilla-central/search?q=JSREPORT_EXCEPTION&redirect=false
JSREPORT_STRICT_MODE_ERROR is not used at all.
https://dxr.mozilla.org/mozilla-central/search?q=JSREPORT_STRICT_MODE_ERROR&redirect=false
They should be removed, and some part related to JSREPORT_UC could be simplified.
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Comment 1•8 years ago
|
||
JSREPORT_EXCEPTION was actually used with different constant :/
https://dxr.mozilla.org/mozilla-central/rev/39dffbba764210b25bfc1e749b4f16db77fa0d46/js/xpconnect/idl/nsIScriptError.idl#28
> /** exception was thrown for this case - exception-aware hosts can ignore */
> const unsigned long exceptionFlag = 0x2;
Summary: Remove JSREPORT_UC, JSREPORT_EXCEPTION, and JSREPORT_STRICT_MODE_ERROR. → Remove JSREPORT_UC and JSREPORT_STRICT_MODE_ERROR.
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → arai.unmht
Assignee | ||
Comment 2•8 years ago
|
||
prepared 3 patches.
Part 1 just removes JSREPORT_UC.
Part 2 removes CompileError.argumentsType, that can only be ArgumentsAreASCII.
Part 3 removes JSREPORT_STRICT_MODE_ERROR.
Attachment #8767525 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 3•8 years ago
|
||
Attachment #8767526 -
Flags: review?(jwalden+bmo)
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8767527 -
Flags: review?(jwalden+bmo)
Updated•8 years ago
|
Attachment #8767525 -
Flags: review?(jwalden+bmo) → review+
Updated•8 years ago
|
Attachment #8767526 -
Flags: review?(jwalden+bmo) → review+
Comment 5•8 years ago
|
||
Comment on attachment 8767527 [details] [diff] [review]
Part 3: Remove JSREPORT_STRICT_MODE_ERROR and JSREPORT_IS_STRICT_MODE_ERROR.
Review of attachment 8767527 [details] [diff] [review]:
-----------------------------------------------------------------
I always hated JSREPORT_STRICT_MODE_ERROR, seemed like something callers should know themselves -- and not have to look up again by (slowly) computing pc, &c. Glad to see that's finally become the case.
Attachment #8767527 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 6•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/45a6ed90fe016018f780ff5a8a1887a97508293e
Bug 1283058 - Part 1: Remove JSREPORT_UC. r=jwalden
https://hg.mozilla.org/integration/mozilla-inbound/rev/9a06052355a5f9d4a0f7d0ba151420868b581b5f
Bug 1283058 - Part 2: Remove CompileError.argumentsType. r=jwalden
https://hg.mozilla.org/integration/mozilla-inbound/rev/a1058ffb4ecef32ab3f6a4ca6d6ea63ea5e4ea54
Bug 1283058 - Part 3: Remove JSREPORT_STRICT_MODE_ERROR and JSREPORT_IS_STRICT_MODE_ERROR. r=jwalden
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/45a6ed90fe01
https://hg.mozilla.org/mozilla-central/rev/9a06052355a5
https://hg.mozilla.org/mozilla-central/rev/a1058ffb4ece
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
You need to log in
before you can comment on or make changes to this bug.
Description
•