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

feat(ext/web): Add reportError() #13799

Merged
merged 99 commits into from
Apr 19, 2022
Merged

Conversation

nayeemrmn
Copy link
Collaborator

@nayeemrmn nayeemrmn commented Mar 1, 2022

Blocked on #14159.
Closes #13484.

.github/workflows/ci.yml Outdated Show resolved Hide resolved
core/bindings.rs Outdated Show resolved Hide resolved
core/error.rs Outdated Show resolved Hide resolved
tools/wpt/expectation.json Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member

@nayeemrmn I think this is good implementation wise. I want to get some more eyes on it before landing.

@crowlKats @lucacasonato please take a look

ext/web/16_report_error.js Outdated Show resolved Hide resolved
ext/web/lib.deno_web.d.ts Outdated Show resolved Hide resolved
@nayeemrmn nayeemrmn requested a review from AaronO as a code owner March 9, 2022 08:39
Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

Actually, WPTs don't pass with my WPT patch:

Going to run 2 test files.
----------------------------------------
/html/webappapis/scripting/reporterror.any.html

test self.reportError(1) ... ok
test self.reportError(TypeError) ... ok
test self.reportError(undefined) ... failed
test self.reportError() (without arguments) throws ... ok
test self.reportError() doesn't invoke getters ... ok
test stderr:

file result: failed. the event loop run out of tasks during the test

@nayeemrmn
Copy link
Collaborator Author

@lucacasonato #13799 (comment). Chrome also fails that right now. We can get compliant FireFox behaviour by adding an internal escape hatch to ErrorEvent. I'd like to either do that in a follow up PR or wait for resolution on the spec side in case they go with option 1.

@lucacasonato
Copy link
Member

My concern is not that failing test, but the "event loop ran out of tasks" thing.

@nayeemrmn
Copy link
Collaborator Author

My concern is not that failing test, but the "event loop ran out of tasks" thing.

Running locally I got varied results... eventually I reproduced this but now it's happening for every test even after I switch wpt back to main branch 😓I'm going to try in CI here.

@nayeemrmn nayeemrmn marked this pull request as draft April 15, 2022 20:38
@nayeemrmn
Copy link
Collaborator Author

My concern is not that failing test, but the "event loop ran out of tasks" thing.

It seems like it's not related to this PR, but some change in wpt since web-platform-tests/wpt@96f98c4 (deno main) and wpt master is making this happen to every test.

This reverts commit 708d012.
@nayeemrmn nayeemrmn marked this pull request as ready for review April 15, 2022 22:51
@bartlomieju
Copy link
Member

Discussed with @lucacasonato, he'll try to fix the WPT runner before merging this PR

@lucacasonato
Copy link
Member

@nayeemrmn Can you rebase once more? WPT is updated on main, and should now be working once again.

@nayeemrmn
Copy link
Collaborator Author

@lucacasonato Ready

Copy link
Member

@lucacasonato lucacasonato left a comment

Choose a reason for hiding this comment

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

LGTM!

@lucacasonato
Copy link
Member

Sorry this one took so long to land @nayeemrmn. Thank you very much for this work!

@lucacasonato lucacasonato merged commit c30d95f into denoland:main Apr 19, 2022
@nayeemrmn nayeemrmn deleted the report-error branch April 19, 2022 22:39
@KnorpelSenf
Copy link
Contributor

KnorpelSenf commented Apr 29, 2022

Given #13987 (comment), this seems to be the only other PR which affects networking in the 1.21.0 release. Could this be responsible for #14437? Based on the code changes, I don't really understand how, though …

@KnorpelSenf
Copy link
Contributor

fetch is still not able to send files reliably. Does anyone know if this is actually the offending PR? Are there maybe any other changes in https://github.com/denoland/deno/releases/tag/v1.21.0 that could have broken it?

It seems to me like fetch is a relatively important thing for Deno and I'm a bit puzzled that one cannot trust it to send buffers and byte streams, as it seems to be messing with the data in some ways. In case you're not willing to look into this, could you shed some light on why #14437 isn't a priority?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

window.reportError(e)?
5 participants