Closed Bug 307152 Opened 21 years ago Closed 15 years ago

JS_EvaluateUCInStackFrame() cannot resolve local vars and function args

Categories

(Core :: JavaScript Engine, defect)

1.8 Branch
x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: daumling, Unassigned)

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6 If JS_EvaluateUCInStackFrame() is called from a debugger while the current stack frame is inside a scripted function, neither local variables nor function arguments are resolved. Reproducible: Always Steps to Reproduce: 1. Implement JS_EvaluateUCInStackFrame() as a scripted call as, say, frameEval() 2. Place that call into a JS function definition (see below) 3. Run the script Actual Results: a is undefined Expected Results: shold return the contents of a When callin JS_GetFrameCallObject() before the call to JS_EvaluateUCInStackFrame(), it forces the creation of the arguments and the call object (they are probably created on demand), and JS_EvaluateUCInStackFrame() needs these two objects to resolve local variables and call arguments. Sample script: function testit (a) { return testEval("a"); } testit ("hi world"); This script generates an error (assuming testEval() is implemented as a function that calls JS_EvaluateUSInStackFrame())
Version: Trunk → 1.8 Branch
Flags: testcase-
Status: UNCONFIRMED → NEW
Ever confirmed: true
This works in current TM: $ obj~/js -d js> function t(a) { return evalInFrame(0, 'a'); } js> t('hi world') "hi world" js>
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.