Closed Bug 1283058 Opened 8 years ago Closed 8 years ago

Remove JSREPORT_UC and JSREPORT_STRICT_MODE_ERROR.

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox50 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(3 files)

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.
See Also: → 1283710
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.
See Also: → 1284099
Assignee: nobody → arai.unmht
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)
Attachment #8767526 - Flags: review?(jwalden+bmo)
Blocks: 1283710
Attachment #8767525 - Flags: review?(jwalden+bmo) → review+
Attachment #8767526 - Flags: review?(jwalden+bmo) → review+
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+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: