From 10a10fd3757374123eb5e3aab1e4720f86575f47 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Thu, 6 Aug 2020 18:31:36 +0000 Subject: Issue #618 - Simplify module resolve hook to be a function pointer This is an ahead-of time port to try and address #1624. This is based on BZ 1461751 and Jon Coppeard's work in it. --- dom/script/ScriptLoader.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'dom/script/ScriptLoader.h') diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h index 3cbecbf03..4155f08f8 100644 --- a/dom/script/ScriptLoader.h +++ b/dom/script/ScriptLoader.h @@ -579,8 +579,9 @@ private: RefPtr WaitForModuleFetch(nsIURI* aURL); ModuleScript* GetFetchedModule(nsIURI* aURL) const; - friend bool - HostResolveImportedModule(JSContext* aCx, unsigned argc, JS::Value* vp); + friend JSObject* + HostResolveImportedModule(JSContext* aCx, JS::Handle aModule, + JS::Handle aSpecifier); nsresult CreateModuleScript(ModuleLoadRequest* aRequest); nsresult ProcessFetchedModuleSource(ModuleLoadRequest* aRequest); -- cgit v1.2.3