Closed Bug 1220457 Opened 9 years ago Closed 9 years ago

Show deprecation warning for non-standard RegExp.multiline.

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla46
Tracking Status
firefox45 --- affected
firefox46 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

(Keywords: dev-doc-complete, site-compat)

Attachments

(1 file)

Derived from bug 1219757.

bug 1219757 is going to remove non-standard RegExp.multiline.  It should be better to show warning message for some cycles.
It won't be used in web content as it's non-standard.  also, it's rarely used in add-ons in AMO, so I guess it's also rarely used in non-AMO add-ons.  So telemetry could be an overkill.
Added warning for setting and getting RegExp.multiline (but warn only once per compartment)
Assignee: nobody → arai.unmht
Attachment #8691859 - Flags: review?(till)
Comment on attachment 8691859 [details] [diff] [review]
Show deprecation warning for non-standard RegExp.multiline.

Review of attachment 8691859 [details] [diff] [review]:
-----------------------------------------------------------------

Thank you, r=me with nit addressed.

::: js/src/builtin/RegExp.cpp
@@ +652,5 @@
> +{
> +    if (!cx->compartment()->warnedAboutRegExpMultiline) {
> +        if (!JS_ReportErrorFlagsAndNumber(cx, JSREPORT_WARNING, GetErrorMessage, nullptr,
> +                                          JSMSG_DEPRECATED_REGEXP_MULTILINE))
> +            return false;

Nit: braces required because of the multi-line condition.
Attachment #8691859 - Flags: review?(till) → review+
Thanks!

as discussed in IRC, this patch should *not* be landed to firefox45, to avoid showing warning for enigmail in Thunderbird45.
I will land it after next aurora merge (so firefox46).
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ac90824efedaa33efdce5acc42d61fa0bdb7dc8
Bug 1220457 - Show deprecation warning for non-standard RegExp.multiline. r=till
https://hg.mozilla.org/mozilla-central/rev/5ac90824efed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla46
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: