Skip to content

Conversation

@krichprollsch
Copy link
Member

fix #464

@krichprollsch krichprollsch self-assigned this Mar 14, 2025
// if no src is present, we evaluate the text source.
// https://html.spec.whatwg.org/multipage/scripting.html#script-processing-model
fn evalScript(self: *Page, s: Script) !void {
self.current_script = &s;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something weird about taking the address of this value and storing it as a field. But it does work, especially since you null it before you exit.

Would be nice if the module loader took arbitrary state per-load, but that's a bigger change, and would likely require allocating something on the heap to pass it through.

I do think evalScript should take a *const Script though. It won't change much - you'll still be storing a stack address in the field - but there's no reason for it to take a copy.

@krichprollsch krichprollsch merged commit 671dbcf into main Mar 17, 2025
10 checks passed
@krichprollsch krichprollsch deleted the resove-module branch March 17, 2025 10:34
@github-actions github-actions bot locked and limited conversation to collaborators Mar 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

module: Invalid URL resolution

3 participants