Closed Bug 202140 Opened 22 years ago Closed 22 years ago

compilation does not trigger update of source in 1.5R4

Categories

(Rhino Graveyard :: Core, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 193168

People

(Reporter: mpg, Assigned: norrisboyd)

Details

User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0) Build Identifier: Not Applicable! This is a Rhino bug in a standalone application or browser of your choice. This method in 1.5R4pre: handleCompilationDone(...) had its implementation refactored a bit in 1.5R4. Unfortunately, if the sourceInfo is found in the cache (Hashtable) the registerSource(String, String) neglects to call setSource(String) on the sourceInfo object. The result of which is that a compile does not update the debugger window that contains the script. Reproducible: Always Steps to Reproduce: 1. Launch the debugger by creating an instance of the Main class. 2. Create a context and load your script using this method: result = cx.evaluateString(getScope(), getScript(), sourceName, startline, null); 3. The first time the debugger window will show your script in the window. But if you update the script the debugger won't update. E.g., add a method to the end of your script (we have a text area for editing the script) and recompile. The debugger won't update. Actual Results: The source window didn't update. Expected Results: Change the current implementation of the following method: org.mozilla.javascript.tools.debugger.Main.registerSource(...) to: private SourceInfo registerSource(String sourceUrl, String source) { SourceInfo si; synchronized (sourceNames) { si = (SourceInfo)sourceNames.get(sourceUrl); if (si == null) { si = new SourceInfo(sourceUrl, source); sourceNames.put(sourceUrl, si); } else { si.setSource(source); } } return si; }
cc'ing Igor -
This is already fixed, see the bug 193168 *** This bug has been marked as a duplicate of 193168 ***
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → DUPLICATE
Marking Verified -
Status: RESOLVED → VERIFIED
Targeting as resolved against 1.5R5
Target Milestone: --- → 1.5R5
You need to log in before you can comment on or make changes to this bug.