Closed Bug 391923 Opened 17 years ago Closed 17 years ago

window.parent.eval uses "window" scope instead of "window.parent"

Categories

(Core :: JavaScript Engine, defect)

x86
Windows Server 2003
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 383682

People

(Reporter: fredck, Unassigned)

Details

(Keywords: regression)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9a8pre) Gecko/2007081105 Minefield/3.0a8pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9a8pre) Gecko/2007081105 Minefield/3.0a8pre

Making the following call in an IFRAME:

    window.parent.eval( 'var MyObject = new Object();' ) ;

Will result "MyObject" being created inside "window", not "window.parent".

It seams that this behavior has been introduced with the work done to remove object.prototype.eval. As discussed in other tickets, w.eval (where "w" is a window) should be maintained, but it has no sense if the evaluated expression is not executed in the "w" scope.

Reproducible: Always
This bug breaks FCKeditor compatibility:
http://dev.fckeditor.net/ticket/1060
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → Trunk
Flags: blocking1.9?
Keywords: regression
Jesse:  Is your nomination for blocking1.9 a confirmation?
This should be fixed now.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Flags: blocking1.9?
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.