Closed Bug 193168 Opened 22 years ago Closed 22 years ago

Rhino debugger in v1.5R4 fails to update script source when a script is reloaded.

Categories

(Rhino Graveyard :: Core, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
1.5R4.1

People

(Reporter: steven.beal, Assigned: norrisboyd)

References

Details

Attachments

(1 file)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)
Build Identifier: 

Rhino debugger in v1.5R4 fails to update script source when a script is 
reloaded.  The executing code reflects the new script source but the
source displayed in the debugger is out of sync.

Reproducible: Always

Steps to Reproduce:
1.Reload a script using Context.getCurrentContext().evaluateReader()
2.The script is reloaded but the source displayed in the debugger does not 
reflect the new source loaded.




This problem is a regression introduced with v1.29 of 
org.mozilla.javascript.tools.debugger.Main.java.

Attached is a patch that restores the original behavior.
The refactorings introduced with v1.29 are preserved but the handling of
previously loaded SourceInfo objects is restored and the
check for previously loaded ScriptItem instances
removed.
This problem was resolved on the rhino tip with v1.36 of 
org.mozilla.javascript.tools.debugger.Main.java.

If this fix is required without any other post 1.5R4 changes
use the attached patch.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Verified FIXED. I made a small test file as follows:

var x;
x = 1;
x = 2;
x = 3;
//x = 4;
//x = 5; 
print(x);

Before I downloaded the patch for this bug, I ran this file in
the Rhino debugger and entered |x| into the Watch pane. I saw
the value of x correctly increment from 1 to 3.

I went to the source and removed the comment signs. Back in the
debugger, I ran the file again. In the Watch pane, I could see
|x| increment from 1 to 5 this time, but the source pane still
showed these lines as commented out!

After downloading the fix for this bug, I repeated the same steps.
This time, the source pane updated correctly to the new source,
as the variable |x| incremented from 1 to 5:

var x;
x = 1;
x = 2;
x = 3;
x = 4;
x = 5; 
print(x);
Status: RESOLVED → VERIFIED
Blocks: 196149
*** Bug 202140 has been marked as a duplicate of this bug. ***
Targeting as resolved against 1.5R4.1
Target Milestone: --- → 1.5R4.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: