Some function calls cause lots of execution stack information in interpreted mode

RESOLVED FIXED

Status

Rhino
Core
--
major
RESOLVED FIXED
9 years ago
5 years ago

People

(Reporter: Marc, Unassigned)

Tracking

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042513 Ubuntu/8.04 (hardy) Firefox/3.0.10
Build Identifier: 

In interpreted mode, when an exception occurs after a call to some functions (like NativeString's toLowerCase), no script stacktrace is available.

The cause of the problem is that Context's lastInterpreterFrame is set to null after the function call and therefore the frame stack can't be retrieved.

Reproducible: Always
(Reporter)

Comment 1

9 years ago
Created attachment 376717 [details] [diff] [review]
Patch with unit test and fix

This patch fixes the problem without to break any of the existing working tests.
(Reporter)

Updated

9 years ago
Severity: normal → major
(Reporter)

Comment 2

9 years ago
Changed priority to major as it is a major inconvenient to understand errors in JS code
(Reporter)

Comment 3

9 years ago
Ping! Somebody here?

Comment 4

9 years ago
The line in Interpreter.java that was removed was originally added as part of the continuation api changes, but the regression test there executes successfully, so evidently the change isn't needed.

Committed:

Checking in src/org/mozilla/javascript/Interpreter.java;
/cvsroot/mozilla/js/rhino/src/org/mozilla/javascript/Interpreter.java,v  <--  Interpreter.java
new revision: 1.356; previous revision: 1.355
done
RCS file: /cvsroot/mozilla/js/rhino/testsrc/org/mozilla/javascript/tests/StackTraceTest.java,v
done
Checking in testsrc/org/mozilla/javascript/tests/StackTraceTest.java;
/cvsroot/mozilla/js/rhino/testsrc/org/mozilla/javascript/tests/StackTraceTest.java,v  <--  StackTraceTest.java
initial revision: 1.1
done
Status: UNCONFIRMED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Summary: Some function calls cause lost of execution stack information in interpreted mode → Some function calls cause lots of execution stack information in interpreted mode
(Reporter)

Comment 5

9 years ago
Thanks for applying the patch.
You need to log in before you can comment on or make changes to this bug.