summaryrefslogtreecommitdiffstats
path: root/dom/script/ScriptLoader.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2020-08-06 18:31:36 +0000
committerMoonchild <moonchild@palemoon.org>2020-08-06 18:31:36 +0000
commit9b6252893876995ae4c1f278fc8d1cbdfb72e94d (patch)
treecf42ccabb78f3abb13e8df6a0512e3a43258f7c2 /dom/script/ScriptLoader.h
parentc349f04f9501c5035667f8064782d06e298cb52a (diff)
downloadUXP-9b6252893876995ae4c1f278fc8d1cbdfb72e94d.tar
UXP-9b6252893876995ae4c1f278fc8d1cbdfb72e94d.tar.gz
UXP-9b6252893876995ae4c1f278fc8d1cbdfb72e94d.tar.lz
UXP-9b6252893876995ae4c1f278fc8d1cbdfb72e94d.tar.xz
UXP-9b6252893876995ae4c1f278fc8d1cbdfb72e94d.zip
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.
Diffstat (limited to 'dom/script/ScriptLoader.h')
-rw-r--r--dom/script/ScriptLoader.h5
1 files changed, 3 insertions, 2 deletions
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<mozilla::GenericPromise> 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<JSObject*> aModule,
+ JS::Handle<JSString*> aSpecifier);
nsresult CreateModuleScript(ModuleLoadRequest* aRequest);
nsresult ProcessFetchedModuleSource(ModuleLoadRequest* aRequest);