Closed Bug 1138099 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 suite/.

Categories

(SeaMonkey :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.36

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
> -    let hosts = Object.keys(cookieHosts).join("|").replace("\\.", "\\.", "g");
> +    let hosts = Object.keys(cookieHosts).join("|").replace(/\./g, "\\.");

I think this is same issue as bug 1131107 comment #23, pre-existing bug that it does not replace anything, but it should replace "." with BACKSLASH+"."
Applied same change as mozilla-central.

at least no regression on try run: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=7a729c78766a
Attachment #8570979 - Flags: review?(iann_bugzilla)
(In reply to Tooru Fujisawa [:arai] from comment #1)
> Created attachment 8570979 [details] [diff] [review]
> Do not use non-standard flag argument of String.prototype.replace in suite/.
> 
> > -    let hosts = Object.keys(cookieHosts).join("|").replace("\\.", "\\.", "g");
> > +    let hosts = Object.keys(cookieHosts).join("|").replace(/\./g, "\\.");
> 
> I think this is same issue as bug 1131107 comment #23, pre-existing bug that
> it does not replace anything, but it should replace "." with BACKSLASH+"."
> Applied same change as mozilla-central.
> 
> at least no regression on try run:
> https://treeherder.mozilla.org/#/jobs?repo=try-comm-
> central&revision=7a729c78766a

fwiw, try-comm-central only do tests against mail/ code.  suite/ code
changes, while applied to the try-tree, are not tested (and iirc, 
not even built by default.)  Testing against suite/ will require a 
.mozconfig change also  (just saying)
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Attachment #8570979 - Flags: review?(iann_bugzilla) → review+
Thank you for reviewing!

Is it required to run try with .mozconfig change?
If so, is there any example for the change?
Keywords: checkin-needed
Pushed to comm-central:
https://hg.mozilla.org/comm-central/rev/94a6184a5646
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.36
Thanks for the patch :arai!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: