From 7e673b1dbe5c0130e4a227a5a2db1fe7b91f0026 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Sun, 2 Aug 2020 12:46:52 -0400 Subject: Issue #618 - Simplify module map interface Ref: BZ 1365187 --- dom/script/ScriptLoader.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'dom/script/ScriptLoader.h') diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h index db2eeed31..955ac2cb7 100644 --- a/dom/script/ScriptLoader.h +++ b/dom/script/ScriptLoader.h @@ -572,8 +572,8 @@ private: bool IsFetchingModule(ModuleLoadRequest *aRequest) const; - bool ModuleMapContainsModule(ModuleLoadRequest *aRequest) const; - RefPtr WaitForModuleFetch(ModuleLoadRequest *aRequest); + bool ModuleMapContainsURL(nsIURI* aURL) const; + RefPtr WaitForModuleFetch(nsIURI* aURL); ModuleScript* GetFetchedModule(nsIURI* aURL) const; friend bool -- cgit v1.2.3 From 15a7be79bd1396df9d19e15fd072bb825b0d9313 Mon Sep 17 00:00:00 2001 From: Gaming4JC Date: Mon, 3 Aug 2020 10:44:39 -0400 Subject: Issue #618 - Keep track of which modules in a graph have been fetched using a visited set Ref: BZ 1365187 --- dom/script/ScriptLoader.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'dom/script/ScriptLoader.h') diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h index 955ac2cb7..3cbecbf03 100644 --- a/dom/script/ScriptLoader.h +++ b/dom/script/ScriptLoader.h @@ -62,6 +62,7 @@ protected: public: ScriptLoadRequest(ScriptKind aKind, + nsIURI* aURI, nsIScriptElement* aElement, uint32_t aVersion, mozilla::CORSMode aCORSMode, @@ -81,6 +82,7 @@ public: mScriptTextBuf(nullptr), mScriptTextLength(0), mJSVersion(aVersion), + mURI(aURI), mLineNo(1), mCORSMode(aCORSMode), mIntegrity(aIntegrity), @@ -165,7 +167,7 @@ public: char16_t* mScriptTextBuf; // Holds script text for non-inline scripts. Don't size_t mScriptTextLength; // use nsString so we can give ownership to jsapi. uint32_t mJSVersion; - nsCOMPtr mURI; + const nsCOMPtr mURI; nsCOMPtr mOriginPrincipal; nsAutoCString mURL; // Keep the URI's filename alive during off thread parsing. int32_t mLineNo; @@ -470,6 +472,7 @@ private: ScriptLoadRequest* CreateLoadRequest( ScriptKind aKind, + nsIURI* aURI, nsIScriptElement* aElement, uint32_t aVersion, mozilla::CORSMode aCORSMode, @@ -588,7 +591,7 @@ private: void StartFetchingModuleDependencies(ModuleLoadRequest* aRequest); RefPtr - StartFetchingModuleAndDependencies(ModuleLoadRequest* aRequest, nsIURI* aURI); + StartFetchingModuleAndDependencies(ModuleLoadRequest* aParent, nsIURI* aURI); nsIDocument* mDocument; // [WEAK] nsCOMArray mObservers; -- cgit v1.2.3