Closed Bug 1413799 Opened 2 years ago Closed 2 years ago

Improve offset out of bound error message

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox58 --- wontfix
firefox59 --- fixed

People

(Reporter: kikuchi1024r, Assigned: kikuchi1024r)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.75 Safari/537.36

Steps to reproduce:

Improve this line. 
https://dxr.mozilla.org/mozilla-central/rev/cd7217cf05a2332a8fd7b498767a07b2c31ea657/js/src/shell/js.cpp#1117

see also
Bug 1245495
Blocks: jserror
Severity: normal → enhancement
See Also: → 1245495
Status: UNCONFIRMED → NEW
Ever confirmed: true
Attached patch bug1413799.patch (obsolete) — Splinter Review
before the error message is "RangeError: argument 2 accesses an index that is out of range"

I'll change like this

>js> createMappedArrayBuffer("config.log",1000000)
>typein:17:1 RangeError: offset is larger than filesize
Attachment #8924454 - Flags: review?(arai.unmht)
Comment on attachment 8924454 [details] [diff] [review]
bug1413799.patch

Review of attachment 8924454 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks!
Can you fix the commit message to "Bug 1413799 - Express that offset is lager than filesize" ?
(a space after "Bug" and "-", and also capitalize the initial letter)
Attachment #8924454 - Flags: review?(arai.unmht) → feedback+
Priority: -- → P3
Attached patch bug1413799.patchSplinter Review
Thank you for your review!
I changed the commit message.
Attachment #8924454 - Attachment is obsolete: true
Attachment #8925416 - Flags: review?(arai.unmht)
Comment on attachment 8925416 [details] [diff] [review]
bug1413799.patch

Review of attachment 8925416 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks again!

here's try run:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=e254ded717cb202e1725fd016a46fb331bd28419
Attachment #8925416 - Flags: review?(arai.unmht) → review+
https://hg.mozilla.org/mozilla-central/rev/f196f626243a
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Assignee: nobody → kikuchi1024r
You need to log in before you can comment on or make changes to this bug.