Skip to content
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

Load errors for worker resources should dispatch an error event at the worker #4511

Closed
jdm opened this issue Dec 29, 2014 · 3 comments · Fixed by #4931
Closed

Load errors for worker resources should dispatch an error event at the worker #4511

jdm opened this issue Dec 29, 2014 · 3 comments · Fixed by #4931
Labels
A-content/dom Interacting with the DOM from web content C-assigned There is someone working on resolving the issue E-more-complex Variable effort required; may require a mentor. Recommended solution is clearly described in the iss

Comments

@jdm
Copy link
Member

jdm commented Dec 29, 2014

According to https://html.spec.whatwg.org/multipage/workers.html#processing-model-11:

Attempt to fetch the resource identified by url, from the origin specified by settings object, using parent referrer source as the referrer source (not using the referrer source specified by settings object!), and with the blocking flag set and the force same-origin flag set.

If the attempt fails, then for each Worker or SharedWorker object associated with worker global scope, queue a task to fire a simple event named error at that object. Abort these steps.

This should be a Runnable object containing a TrustedWorkerAddress field.

@jdm jdm added A-content/dom Interacting with the DOM from web content E-more-complex Variable effort required; may require a mentor. Recommended solution is clearly described in the iss labels Dec 29, 2014
@Ms2ger
Copy link
Contributor

Ms2ger commented Dec 30, 2014

I never quite figured out what "If the attempt fails" means here.

@jdm
Copy link
Member Author

jdm commented Dec 30, 2014

I would assume a non-200 HTTP response.

@KiChjang
Copy link
Contributor

Found the relevant code under DedicatedWorkerGlobalScope::run_worker_scope. The entire URL fetching functionality is handled by net::resource_task::load_whole_resource.

I can try handling this... but I'll need some literature about creating and firing events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content C-assigned There is someone working on resolving the issue E-more-complex Variable effort required; may require a mentor. Recommended solution is clearly described in the iss
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants