Port Bug 561702 [sessionstore should not use RegExp static state] to SeaMonkey

RESOLVED FIXED in seamonkey2.1a2

Status

SeaMonkey
Session Restore
RESOLVED FIXED
7 years ago
7 years ago

People

(Reporter: Misak Khachatryan, Assigned: Misak Khachatryan)

Tracking

Trunk
seamonkey2.1a2

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

2.45 KB, patch
neil@parkwaycc.co.uk
: review+
neil@parkwaycc.co.uk
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

7 years ago
Created attachment 447057 [details] [diff] [review]
patch

From parent bug:

RegExp.$* shouldn't be used. Its a non-standard JS api.
Attachment #447057 - Flags: superreview?(neil)
Attachment #447057 - Flags: review?(neil)

Comment 1

7 years ago
Comment on attachment 447057 [details] [diff] [review]
patch

>+      var match;
>+      if ((match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url)) != null) {
Write this as
var match = /^https?:\/\/(?:[^@\/\s]+@)?([\w.-]+)/.exec(aEntry.url);
if (match)
[The other two would be harder to rewrite so leave them as they are.]
Attachment #447057 - Flags: superreview?(neil)
Attachment #447057 - Flags: superreview+
Attachment #447057 - Flags: review?(neil)
Attachment #447057 - Flags: review+
(Assignee)

Comment 2

7 years ago
Fixed nit and pushed: http://hg.mozilla.org/comm-central/rev/23551ff0a6af
Status: ASSIGNED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.1a2
You need to log in before you can comment on or make changes to this bug.