Worklet: Introduce "pending tasks struct" concept defined in the Worklet spec
This is split from https://codereview.chromium.org/2840523002/ This CL introduces "pending tasks struct" concept defined in the Worklet spec: https://drafts.css-houdini.org/worklets/#pending-tasks-struct The pending tasks struct is used as a kind of barrier closure: when Worklet::addModule() is called, multiple WorkletGlobalScopes associated with the Worklet may start module loading. The struct waits until they all are completed and then resolves a promise. If one of them is failed, the struct immediately rejects a promise and ignores following completions. This CL also removes WorkletObjectProxy and the request id mechanism in MainThreadWorklet using the pending tasks struct. BUG=627945 Review-Url: https://codereview.chromium.org/2839123003 Cr-Commit-Position: refs/heads/master@{#467908}
Showing
Please register or sign in to comment