Bug 1572644 - Part 4: Add WorkletLoadContext and nsMainThreadPtrHandle to delegate WorkletFetchHandler on the worklet thread. r=jonco,yulia

Add nsMainThreadPtrHandle to delegate WorkletFetchHandler.
Add WorkletLoadContext to wrap nsMainThreadPtrHandle.



Depends on D166541

Differential Revision: https://phabricator.services.mozilla.com/D166542
This commit is contained in:
Yoshi Cheng-Hao Huang
2023-03-13 22:59:37 +00:00
parent 32b3d9b5ad
commit a800ffea91
6 changed files with 55 additions and 7 deletions

View File

@@ -138,6 +138,11 @@ mozilla::dom::WorkerLoadContext* ScriptLoadRequest::GetWorkerLoadContext() {
return mLoadContext->AsWorkerContext();
}
mozilla::dom::WorkletLoadContext* ScriptLoadRequest::GetWorkletLoadContext() {
MOZ_ASSERT(mLoadContext);
return mLoadContext->AsWorkletContext();
}
ModuleLoadRequest* ScriptLoadRequest::AsModuleRequest() {
MOZ_ASSERT(IsModuleRequest());
return static_cast<ModuleLoadRequest*>(this);