W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2011

Re: Interesting spec ambiguity: cross-frame "this"

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Mon, 18 Apr 2011 15:08:50 -0700
Cc: es-discuss <es-discuss@mozilla.org>, public-script-coord@w3.org, es5-discuss@mozilla.org
Message-Id: <344E3488-8DC7-4F26-A3A7-10B01A1979DE@wirfs-brock.com>
To: "Mark S. Miller" <erights@google.com>

On Apr 18, 2011, at 2:28 PM, Mark S. Miller wrote:

> 
> Good. I went through a similarly indirect analysis, reading between the lines, and arrived at the same conclusion for canary.html and canary-orig.html. As for canary-direct.html, I think both FF4.0's apparent behavior (it is a direct eval) and apparent Nightly6.0beta's behavior (it is an indirect eval) are justifiable, but I prefer the latter.
> 

I can tell you the intent of the language in15.1.2.1.1.  IThe intent was that the resolved value of "eval" is the SameValue as the original value of the global named 'eval' defined in 15.1.2.1.  By the same logic that I used in my previous response that should be the original eval value of the global environment that is in scope for the code containing the possibly direct eval.  In other words, the eval call in canary-direct is not a direct eval.

As an indirect eval, the global object is uses should be the global object captured the eval function which should be the frame's eval. That appears to be the Nightly6.0 result.

Allen
Received on Monday, 18 April 2011 22:09:26 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:03 UTC