Closed
Bug 946947
Opened 11 years ago
Closed 10 years ago
getLineNumberOffsets requires a numeric number
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla29
People
(Reporter: sfink, Assigned: sfink)
Details
(Whiteboard: [qa-])
Attachments
(1 file)
1.56 KB,
patch
|
jimb
:
review+
|
Details | Diff | Splinter Review |
I was passing it the value that the user typed in, which was of course a string.
Assignee | ||
Comment 1•11 years ago
|
||
I don't know if you want this, and I didn't bother to test it at all, and really I'm just a jerk. But I felt bad about just complaining about it on IRC and not doing anything.
Attachment #8343321 -
Flags: review?(jimb)
Comment 2•11 years ago
|
||
Comment on attachment 8343321 [details] [diff] [review] Convert getLineNumberOffsets param to a number instead of insisting on a number Review of attachment 8343321 [details] [diff] [review]: ----------------------------------------------------------------- I guess I'm surprised there isn't a function that captures all that Value-to-double-to-size_t-check-for-lost-bits dance in a nice package, that we could just call here... ::: js/src/vm/Debugger.cpp @@ +3384,5 @@ > THIS_DEBUGSCRIPT_SCRIPT(cx, argc, vp, "getLineOffsets", args, obj, script); > REQUIRE_ARGC("Debugger.Script.getLineOffsets", 1); > > /* Parse lineno argument. */ > + RootedValue linenoValue(cx, args[0]); Nit: could we make this local to the block, and put the ToNumber call inside the block, too? Then linenoValue's scope would be clearer, and the block would look less like the if's body.
Attachment #8343321 -
Flags: review?(jimb) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/375387aa7835
Comment 4•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/375387aa7835
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Updated•10 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•