Show deprecation warning for non-standard RegExp.multiline.

RESOLVED FIXED in Firefox 46

Status

()

Core
JavaScript Engine
RESOLVED FIXED
2 years ago
2 years ago

People

(Reporter: arai, Assigned: arai)

Tracking

({dev-doc-complete, site-compat})

Trunk
mozilla46
dev-doc-complete, site-compat
Points:
---

Firefox Tracking Flags

(firefox45 affected, firefox46 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
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.
(Assignee)

Comment 1

2 years ago
Created attachment 8691859 [details] [diff] [review]
Show deprecation warning for non-standard RegExp.multiline.

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+
(Assignee)

Comment 3

2 years ago
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).
(Assignee)

Comment 4

2 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ac90824efedaa33efdce5acc42d61fa0bdb7dc8
Bug 1220457 - Show deprecation warning for non-standard RegExp.multiline. r=till

Comment 5

2 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/5ac90824efed
Status: NEW → RESOLVED
Last Resolved: 2 years ago
status-firefox46: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla46

Updated

2 years ago
Keywords: dev-doc-needed, site-compat
Posted the site compatibility doc: https://www.fxsitecompat.com/en-US/docs/2015/regexp-multiline-global-switch-has-been-deprecated/
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.