Closed Bug 200591 Opened 23 years ago Closed 23 years ago

File Options > Don't Debug Eval/Timeouts isn't working

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: pschwartau, Assigned: rginda)

Details

Attachments

(2 files, 1 obsolete file)

Using Mozilla trunk 2003033105 on WinNT. Using Venkman version 0.9.57 STEPS TO REPRODUCE 1. Bring up Mozilla 2. Bring up Venkman 3. Load the test HTML file I will attach below 4. In Venkman, right-click on the file in the Loaded Scripts view 5. Select "File Options" 6. Select "Don't Debug Eval/Timeouts" 7. Hit the Stop button in Venkman 8. Bug: the yellow line appears in the Source Code view, and we are now stopped in the setInterval() code of the test file. Expected Results: Venkman shouldn't stop in any setTimeout() or setInterval() code in this file CONTINUATION ON THE ABOVE 9. Hit the Continue button in Venkman to break out of the setInterval() 10. Reload the test file in Mozilla 11. Right-click on the file in the Venkman Loaded Scripts view 12. Note the "Don't Debug Eval/Timeouts" selection has persisted 13. Hit the Stop button in Venkman 14. Bug: once again we are stopped in the setInterval() code
Attached file Testcase
So, we only pay attention to the "don't debug" flag of the top stack frame. In addition to that, the jsd code *removes* any frames marked "don't debug" from the stack chain. To fix this, the front end code will need to check to see if the bottom stack frame is an eval/timeout (and that these "transients" are disabled.) Before it can do that though, jsd needs to stop hiding these disabled frames. This patch takes care of leaving disabled frames in the stack trace.
Attachment #120655 - Flags: review?(brendan)
Comment on attachment 120655 [details] [diff] [review] Don't remove disabled frames from the call stack actually, I want to think about this one a little more. This might be the right way, but maybe not.
Attachment #120655 - Flags: review?(brendan)
Attached patch new patchSplinter Review
Rather than leave the determination up to the front end, this patch decides whether or not to invoke the call hook right in the jsd code. My big concern is that I'll find out later that this is going to cause other problems, like if XBL javascript were to call into web content, or something. To hedge against this I exposed a few new flags that can be used to get the old behavior back in a hurry. It's a bit more to think about, but I'm more comfortable doing it this way, especially if 1.4 is going to be a long-lived branch. I also added some versioning information to the interface, so clients know who they're dealing with.
Attachment #120655 - Attachment is obsolete: true
Comment on attachment 120879 [details] [diff] [review] new patch brendan: got time for another review?
Attachment #120879 - Flags: review?(brendan)
Comment on attachment 120879 [details] [diff] [review] new patch rubbery r=brendan, I'm in a hurry and you're the jsd guru. /be
Attachment #120879 - Flags: review?(brendan) → review+
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Verified FIXED. Using Mozilla trunk builds on Linux and WinNT dated 2003-04-23. File Options > Don't Debug Eval/Timeouts now works fine on the attached testcase. We can toggle it on and off after the test has loaded, to control whether we do or do not stop in the setInterval() loop.
Status: RESOLVED → VERIFIED
Product: Core → Other Applications
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: