Closed Bug 566773 Opened 14 years ago Closed 14 years ago

indirect eval calls js_GetCallObject

Categories

(Core :: JavaScript Engine, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: dvander, Assigned: mrbkap)

Details

Attachments

(1 file)

/*
     * If the caller is a lightweight function and doesn't have a variables
     * object, then we need to provide one for the compiler to stick any
     * declared (var) variables into.
     */
   if (caller->fun && !caller->callobj && !js_GetCallObject(cx, caller))
        return JS_FALSE;
We should get this fixed fast, avoid confusion and potential future bugs. Blake?

/be
blocking2.0: --- → ?
I'll patch this tomorrow. We should be able to assert that there is already a call object, I think, because the only way to generate JSOP_EVAL is "eval()", which makes the function heavyweight.
Assignee: general → mrbkap
The paragraph cited in comment 0 runs for indirect as well as direct evals, so I don't see how we can assert, unless you meant JS_ASSERT_IF(!indirectCall, ...).

/be
Attached patch FixSplinter Review
Attachment #447204 - Flags: review?(brendan)
Attachment #447204 - Flags: review?(brendan) → review+
http://hg.mozilla.org/mozilla-central/rev/8bc3bb17cb43
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
blocking2.0: ? → betaN+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: