Closed
Bug 897919
Opened 12 years ago
Closed 12 years ago
Handle lazy scripts in debugger.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla25
People
(Reporter: till, Assigned: jimb)
References
Details
Attachments
(1 file, 1 obsolete file)
3.02 KB,
patch
|
sfink
:
review+
|
Details | Diff | Splinter Review |
I stumbled upon this while debugging another issue. I can reproduce a crash caused by the `nonLazyScript` in `DebuggerObject_getScript`, but the STR are kinda annoying. I can provide them, if you want me to, of course, but this is a pretty straight-forward change.
The other changed locations look equally fishy to me, but maybe with some knowledge about how exactly they're used, one can be sure that they never deal with lazy scripts. In that case, I'd happily revert them, of course.
Reporter | ||
Comment 1•12 years ago
|
||
Attachment #780902 -
Flags: review?(jimb)
Assignee | ||
Updated•12 years ago
|
Summary: Handle lazy scripts in debugger. r=:jimb → Handle lazy scripts in debugger.
Assignee | ||
Comment 2•12 years ago
|
||
Comment on attachment 780902 [details] [diff] [review]
Handle lazy scripts in debugger
Review of attachment 780902 [details] [diff] [review]:
-----------------------------------------------------------------
I think this definitely needs regression tests. Is it possible to capture the steps to reproduce in a js/src/jit-test/tests/debug test?
Attachment #780902 -
Flags: review?(jimb)
Assignee | ||
Comment 3•12 years ago
|
||
For the record, I'm quite confident the fix is correct. But I'm mystified as to why this wasn't caught by the unit tests. There must be some systemic reason our tests never hit lazy functions, which is quite worrisome. I'd very much like to understand that part of the story before we proceed; we might be able to catch many other bugs.
For what it's worth: the patch covers both DebuggerObject_getScript and DebuggerFrame_getScript. In the latter case, the use of nonLazyScript might be justified: we can't have stack frames running lazy scripts, can we?
Assignee | ||
Comment 4•12 years ago
|
||
This patch has regression tests, deals with cross-compartment issues, and assumes that once a stack frame is running a function, it's no longer lazy.
Assignee: till → jimb
Attachment #780902 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #784102 -
Flags: review?(sphink)
Comment 5•12 years ago
|
||
Comment on attachment 784102 [details] [diff] [review]
Correctly de-lazify functions before trying to inspect their scripts.
Review of attachment 784102 [details] [diff] [review]:
-----------------------------------------------------------------
Seems reasonable, based only on staring at the patch.
Attachment #784102 -
Flags: review?(sphink) → review+
Assignee | ||
Comment 6•12 years ago
|
||
Assignee | ||
Comment 7•12 years ago
|
||
Flags: in-testsuite+
Target Milestone: --- → mozilla25
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 10•12 years ago
|
||
Should we uplift this to Firefox 25 to resolve Bug 898867 ? Not sure if this already made it.
Flags: needinfo?(jimb)
Assignee | ||
Comment 11•12 years ago
|
||
Yes, this patch is in Firefox 25; that's why I set the "target milestone" to "mozilla25". Isn't that our process for answering these questions?
I checked the mozilla-aurora head to be sure, and the patch's changes are present there.
Flags: needinfo?(jimb)
You need to log in
before you can comment on or make changes to this bug.
Description
•