-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Fix hang when a macro awaits crypto.subtle.digest #39905
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
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
8b513f4
Service the regular loop's concurrent queue while a macro is being wa…
robobun f202cb0
[autofix.ci] apply automated fixes
autofix-ci[bot] b19e793
Tighten comments
robobun 2386c5a
Use into_task for the batch move, cover the un-awaited digest exit
robobun e6933c1
Fold take_concurrent_tasks into take_concurrent_batch
robobun 6a2a313
Share the ticket issue path between ticket and regular_ticket
robobun c6e5d93
Cover the other regular-loop producers a macro can await
dylan-conway 5eb0d4d
Route completions by the loop current when the work was initiated
dylan-conway 30dbe52
[autofix.ci] apply automated fixes
autofix-ci[bot] 9e92026
Assert the un-awaited digest continuation runs before exit
robobun c0e7d52
Take LoopKind across the FFI as the enum, not u8
dylan-conway ea43333
Capture the loop for cross-thread MessagePort and BroadcastChannel de…
dylan-conway 7da4c35
[autofix.ci] apply automated fixes
autofix-ci[bot] 5e922f9
Name BunLoopKind values loopKind, not loop
dylan-conway a5ead42
Make loopKind postTaskTo's second parameter, with no default
dylan-conway 6c974b9
[autofix.ci] apply automated fixes
autofix-ci[bot] a87fb37
Restore multi-line lambda layout at the postTaskTo call sites
dylan-conway add5509
Inline postTaskToWorkerObject at its call sites
dylan-conway 69704ce
JSCTaskScheduler: keep the two pending containers, store the loop kin…
dylan-conway 61822af
Use the currentLoopKind accessor at the JSWorker request-reply sites
robobun 1e73951
postTaskTo: use the caller's loopKind as given
dylan-conway 33cb02c
JSCTaskScheduler: minimal change — store the loop kind as the map val…
dylan-conway a622a44
WebCrypto: capture the loop kind at dispatch and pass it to postTaskT…
dylan-conway f094e2b
event_loop.rs: keep the original drain, add only the finished-macro a…
dylan-conway 80078b9
Rename finished_macro_loop to macro_loop_if_not_running
dylan-conway 8f1658d
Merge branch 'main' into farm/4186ec60/macro-webcrypto-hang
dylan-conway File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| #pragma once | ||
|
|
||
| #include <stdint.h> | ||
|
|
||
| // Which of a VM's two embedded event loops a posted completion belongs to | ||
| // (bun_jsc::LoopKind). Decided on the VM's own thread when the work is | ||
| // initiated: `Regular`, or `Macro` while a macro is being run, so that a | ||
| // macro's wait services what the macro started and nothing else. Work that | ||
| // no script initiated (the debugger, signals, another thread's own doing) | ||
| // is `Regular`. | ||
|
robobun marked this conversation as resolved.
|
||
| enum class BunLoopKind : uint8_t { | ||
| Regular = 0, | ||
| Macro = 1, | ||
| }; | ||
|
|
||
| // JS thread only: the loop the VM is currently running (what a ticket taken now would record). | ||
| extern "C" BunLoopKind Bun__VM__currentLoopKind(void* bunVM); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.