Re: [heycam/webidl] Propagate active script to callbacks (#902)

Oh my.  I'm sorry.  Now I read this PR a little more carefully.  IIUC, `active script` is not always the script or module of the `incumbent realm`, so we have to track `active script` in addition to `incumbent`.  It means another runtime cost.  Is this correct?

If so, it will be 25% object size increase of all IDL callback functions and IDL callback interfaces (in Blink).  Probably it's okay, but if there is a guarantee that, in case of IDL callbacks, the incumbent settings object's execution context's ScriptOrModule never be null, that's great.  (Anyway, I think IDL callbacks will be okay.)

I think it's better to notify those who will implement Promise callbacks and WeakRef callbacks of Chromium.  They will need to implement not only the incumbent but also the active script.

Summary:
1. I think we can support active script in IDL callback functions/interfaces.  But not sure about Promise and WeakRef callbacks.
2. Q: Is there a case that IDL callback's incumbent's execution context's ScriptOrModule is null?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/902#issuecomment-657639297

Received on Monday, 13 July 2020 15:49:32 UTC