eval checks if the outer window is global

RESOLVED FIXED

Status

()

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: mrbkap, Assigned: mrbkap)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [compartments] fixed-in-tracemonkey)

Attachments

(1 attachment)

Created attachment 464678 [details] [diff] [review]
Proposed fix

In order to allow |window.eval()|, eval needs to innerize the 'this' object before checking for globalness.
Attachment #464678 - Flags: review?(jorendorff)
Comment on attachment 464678 [details] [diff] [review]
Proposed fix

I think it's safe to move the existing OBJ_TO_INNER_OBJECT call (just before the following use of obj) to this point instead of duplicating it.

The comment says "Ban all indirect uses", but that disagrees with the code, which issues a warning. Fix the comment while you're here?
Attachment #464678 - Flags: review?(jorendorff) → review+
That comment lies. Really, I do not think we should throw EvalError, but this is a separate bug. Fixing the comment here would be good, though.

/be

Updated

8 years ago
Whiteboard: [compartments]

Updated

8 years ago
Assignee: general → mrbkap
http://hg.mozilla.org/tracemonkey/rev/864731efc7d3
Whiteboard: [compartments] → [compartments] fixed-in-tracemonkey

Comment 4

8 years ago
http://hg.mozilla.org/mozilla-central/rev/864731efc7d3
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.