Closed
Bug 307152
Opened 19 years ago
Closed 13 years ago
JS_EvaluateUCInStackFrame() cannot resolve local vars and function args
Categories
(Core :: JavaScript Engine, defect)
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())| Reporter | ||
Updated•19 years ago
|
Version: Trunk → 1.8 Branch
Updated•19 years ago
|
Flags: testcase-
Updated•19 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 1•13 years ago
|
||
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: 13 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•