Would it make sense for Web IDL [[Call]] to do the current execution context munging that ES6 functions' default [[Call]] does?

Right now ES6 seems to have the following abstract operations defined:

1)  GetGlobalObject.  This will get the global of the current execution 

2)  GetFunctionRealm.  This takes a function object and returns its realm.

That's it.

So if a Web IDL function wants to get at its own global it has to call 
GetFunctionRealm on itself and then extract the global from the Realm. 
There is no abstract operation for this last bit; it'd just have to poke 
at internal slots.

If Web IDL functions munged the current execution context, we could just 
GetGlobalObject() to do the right thing in spec algorithms as needed.

Furthermore, I suspect that suspending the current execution context on 
function entry is in fact needed to properly interop with some ES 


Received on Thursday, 28 August 2014 16:44:02 UTC