Closed Bug 355928 Opened 19 years ago Closed 14 years ago

"invalid string escape mask" messages are strange

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: jruderman, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 obsolete file)

js> escape("foo", NaN) typein:10: Error: invalid string escape mask 7 js> escape("foo", 1e90) typein:20: Error: invalid string escape mask 7fffffff
Attached patch patch (obsolete) — Splinter Review
This fixes the examples in comment 0 but not stuff like escape("", {}). I don't think it's worth the effort to store and root the original value of argv[1] to get these edge cases right? Making digits static isn't related to this bug, just a quick way to save some bytes I noticed while looking at this code.
Attachment #343701 - Flags: review?(mrbkap)
Attachment #343701 - Attachment is obsolete: true
Attachment #343701 - Flags: review?(mrbkap)
js> escape("foo", NaN) "foo" js> escape("foo", 1e90) "foo" js> escape("foo", {}) "foo" Should these be showing |%20foo%20|?
Flags: in-testsuite?
OS: Mac OS X → All
Hardware: PowerPC → All
Bug 666448 made escape() behavior not depend on a non-standard second argument, fixing this.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: