Closed
Bug 280629
Opened 20 years ago
Closed 20 years ago
When using the debugger within another program the only way to close it is kill the JVM (System.exit(0))
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bugzilla, Assigned: igor)
Details
Attachments
(1 file)
632 bytes,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Build Identifier:
We use the rhino debugger as part of a bigger process and just upgraded from
1.5 to 1.6
In version 1.5 there used to be an API Main.dispose() that closes the UI and
its threads.
Somewhere along the line the API disappeared and now the only possible way to
close
the debugger is with System.exit(). The problem is that we need to keep the JVM
to run well after
the debugger is used and currently when the program exits it hangs waiting for
the debuggers (we sometime start several of those)
windows to close.
Currently we modified the code of org.mozilla.javascript.tools.debugger.Main
to include at line 248:
public void close()
{
debugGui.dispose();
}
Reproducible: Always
Steps to Reproduce:
start the debugger in the following way:
mDebugger = new org.mozilla.javascript.tools.debugger.Main("JavaScript
Debugger");
mDebugger.attachTo(ContextFactory.getGlobal());
// Inform the debugger of the global execution scope
mDebugger.setScopeProvider(new ScopeProvider()
{
public Scriptable getScope()
{
return mRootScope;
}
});
mDebugger.pack();
mDebugger.setSize(800, 600);
mDebugger.setVisible(true);
Actual Results:
The program can never exit and waits for the debugger window. And there is now
way to close it using API.
Assignee | ||
Comment 1•20 years ago
|
||
To be precise: prior Rhino 1.6R1 the main Main class in the debugger extended
javax.swing.JFrame and so all methods from JFrame were available. In Rhino 1.6R1
debugger underwent reorganization to support debugging of independent Rhino
runtimes and as the result Main class extends just Object and so dispose method
is no longer available.
For compatibility with the previous Rhino releases few methods from JFrame were
added to Main during pre-release testing, but dispose was not on that list. So I
add it now.
Note also that dispose method in 1.5R5 would not break the association between
Rhino runtime and the debugger objects so even after the method call scripts
would continue to be executed in much slower debugging mode.
Assignee | ||
Comment 2•20 years ago
|
||
Assignee | ||
Comment 3•20 years ago
|
||
I committed the fix
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•