-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Are the “active script” & “base URL” assertions in the timer initialization steps correct? #9633
Comments
I think you're right. The execution context stack just consists of the realm execution context, and nothing else. This was added in 12cdfef. It seems the issue was discussed in #3117 and #3163 was supposed to fix it, but only fixed it for something like So yeah, we should probably account for cases like this, similar to the defaulting we do in https://html.spec.whatwg.org/#hostloadimportedmodule . |
I see. This is basically a symptom of whatwg/webidl#902. If we properly propagated the active script, this would not be an issue. But we don't, and I've kind of given up on anyone implementing that. |
The assertion at step 8 of the timer initialization steps —
— seems like it may be incorrect? If I’m reading this right, active script and GetActiveScriptOrModule would return null for the second invocation of “timer initialization steps” kicked off by
setTimeout(setTimeout.bind(this, () => {}))
, for example.The initiating script is used by the task created at step 9 to determine the base URL if the handler is a string, with another assertion (under 9.3):
If I’m correct that these assertions are wrong, I suspect base URL should be getting set to the API base URL of the settings object of the incumbent realm (captured prior to the step 9 task steps) when initializing script is null. Or something like that.
The text was updated successfully, but these errors were encountered: