Closed
Bug 400031
Opened 18 years ago
Closed 17 years ago
Fix for Bug 352319 broken when context has debugger attached.
Categories
(Rhino Graveyard :: Core, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: kruland, Unassigned)
Details
Attachments
(1 file)
|
1.56 KB,
application/x-gzip-compressed
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: 1.6R7
I took the example code attached to Bug 352319 and attached a trivial debugger to the context. When I execute the example code it blows up in Interpreter.enterFrame.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
| Reporter | ||
Comment 1•18 years ago
|
||
This is exactly the source from Bug 352319 except for the addition of a simple debugger to the context. The debugger source is included in the tgz.
| Reporter | ||
Comment 2•17 years ago
|
||
I have played around with Rhino 1.6R7 and found the following code change to Interpreter.java fixes the problem. Unfortunately, I don't have a deep enough understanding if this patch is correct or if it breaks anything else.
*** rhino1_6R7-rlg/src/org/mozilla/javascript/Interpreter.java 2008-02-06 16:05:49.000000000 -0600
--- rhino1_6R7/src/org/mozilla/javascript/Interpreter.java 2008-02-06 16:16:41.000000000 -0600
***************
*** 4074,4080 ****
// block ("catch" implicitly uses NativeWith to create a scope
// to expose the exception variable).
for(;;) {
! if(scope instanceof NativeCall || scope instanceof NativeObject) {
break;
} else {
scope = scope.getParentScope();
--- 4074,4080 ----
// block ("catch" implicitly uses NativeWith to create a scope
// to expose the exception variable).
for(;;) {
! if(scope instanceof NativeCall) {
break;
} else {
scope = scope.getParentScope();
Comment 3•17 years ago
|
||
+szegedia@freemail.hu
Attila, can you comment on the proposed patch?
Comment 4•17 years ago
|
||
I'll need to spend some time on understanding it -- I myself only have incomplete understanding of how interpreter code works, so I'll want to stare a bit at it; probably tomorrow morning (europaish time)
Comment 5•17 years ago
|
||
I'm looking into this now.
Comment 6•17 years ago
|
||
Committed a (slightly modified) patch -- looping just while we're encountering NativeWith. The problem seemed to be that top-level invocation of a Script object (which is also a function) won't get a NativeCall object even when it should be activatable (i.e. because a DebugFrame is created by a debugger for it, or because of a top-level try/catch or with statement.
Checking in src/org/mozilla/javascript/Interpreter.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Interpreter.java,v <-- Interpreter.java
new revision: 1.342; previous revision: 1.341
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•