Closed Bug 1138096 Opened 10 years ago Closed 10 years ago

Fix in-tree consumers that use non-standard flag argument of String.prototype.{search,match,replace} in mailnews/db/.

Categories

(MailNews Core :: Database, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 39.0

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

(same as bug 1131107) Before fixing bug 1108382, we need to replace all of them with regexp literal, new RegExp(...) or .split().join().
Blocks: 1108382
Hi, thanks for filing this to make us aware of the changes. Where can we find description of which arguments are considered non-stanadard? Bug 1108382 is especially empty, bug 1131107 is better.
3rd argument of String.prototype.replace, and 2nd argument of String.prototype.match/search. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace (no description for match/search on MDN though) I already prepared patch series for all of them, and now testing :)
Fixed String.prototype.replace call sites. Used .split().join() if pattern is variable, and used regexp literals for other cases. at least no regression on try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=7a729c78766a
Attachment #8570976 - Flags: review?(mozilla)
Comment on attachment 8570976 [details] [diff] [review] Do not use non-standard flag argument of String.prototype.replace in mailnews/db/. I'll look at this.
Attachment #8570976 - Flags: review?(mozilla) → review?(rkent)
Comment on attachment 8570976 [details] [diff] [review] Do not use non-standard flag argument of String.prototype.replace in mailnews/db/. Review of attachment 8570976 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Thanks for thinking of comm-central!
Attachment #8570976 - Flags: review?(rkent) → review+
Assignee: nobody → arai.unmht
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 39.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: