- From: Allen Wirfs-Brock <allen@wirfs-brock.com>
- Date: Thu, 28 Aug 2014 11:22:15 -0700
- To: Boris Zbarsky <bzbarsky@mit.edu>
- Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Aug 28, 2014, at 11:03 AM, Boris Zbarsky wrote: > On 8/28/14, 1:37 PM, Allen Wirfs-Brock wrote: > >> Not sure what you mean by "If WebIDL function munged the current >> execution context". > > What I had meant was performing the steps at http://people.mozilla.org/~jorendorff/es6-draft.html#sec-built-in-function-objects-call-thisargument-argumentslist (thank you for the link; I was looking at http://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-function-objects-call-thisargument-argumentslist before that, which has a bunch of complications that don't seem relevant here). > >> From an ES perspective I expect that every [[Call]] to a WebIDL >> function suspends the calling execution context and establishes a new >> execution context in conformance to [3]. > > Ah, I see. I had recalled Web IDL defining its own [[Call]] for methods, but looks like it does not. It just talks about "a Function object whose behavior is as follows". So it should just explicitly say this is a "built-in Function object" and then I think we're good, mostly, right? Yes, the extension points I intended are in steps 7 and 9 of 9.3.1. But remember that a "built-in function" is allowed to be implemented as an ECMAScript function in which case any additional special WebIDL processing would have to be done in the body of the function. > > I say mostly, because there _are_ some cases where Web IDL defines its own [[Call]]. Specifically, for constructors and legacycallers. Is there a way those [[Call]] definitions could just have the steps of #sec-built-in-function-objects-call-thisargument-argumentslist performed without copy/pasting them? That's fine. You should be able to do whatever you need as part of the step 7 or 9 extension points. Or, you can define a new [[Call]] that is a superset of that specified in 9.3.1. allen
Received on Thursday, 28 August 2014 18:22:47 UTC