diff options
author | Brian Smith <brian@dbsoft.org> | 2023-04-11 12:58:23 -0500 |
---|---|---|
committer | Brian Smith <brian@dbsoft.org> | 2023-04-27 13:33:47 -0500 |
commit | 6b69dad2aa76481c1850bc0f88e1993103bf49c4 (patch) | |
tree | f1e865858760608070ff54aa7f749f7a11017e1f /dom | |
parent | e4c920f39705f9f328e32ebb00a39dcb26a39a0d (diff) | |
download | uxp-6b69dad2aa76481c1850bc0f88e1993103bf49c4.tar.gz |
Issue #1691 - Part 6c: Fix a few issues with the earlier commits.
Need PNK_CALL_IMPORT and PNK_IMPORT_META in the node children list or it will abort.
When porting ScriptFetchOptions support, I had 2 constructors, I picked the wrong one.
Missed adding the preference javascript.options.dynamicImport to all.js.
(cherry picked from commit b95ccb711dc41b343d02ae69b3dc4747bbbe86fb)
Diffstat (limited to 'dom')
-rw-r--r-- | dom/script/ScriptLoader.cpp | 29 | ||||
-rw-r--r-- | dom/script/ScriptLoader.h | 22 |
2 files changed, 30 insertions, 21 deletions
diff --git a/dom/script/ScriptLoader.cpp b/dom/script/ScriptLoader.cpp index 4b773def50..73ec25acd9 100644 --- a/dom/script/ScriptLoader.cpp +++ b/dom/script/ScriptLoader.cpp @@ -118,6 +118,35 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(ScriptLoadRequest) NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mFetchOptions) NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END + +ScriptLoadRequest::ScriptLoadRequest(ScriptKind aKind, + nsIURI* aURI, + ScriptFetchOptions* aFetchOptions, + const SRIMetadata& aIntegrity, + nsIURI* aReferrer) + : mKind(aKind), + mScriptMode(ScriptMode::eBlocking), + mProgress(Progress::Loading), + mIsInline(true), + mHasSourceMapURL(false), + mInDeferList(false), + mInAsyncList(false), + mIsNonAsyncScriptInserted(false), + mIsXSLT(false), + mIsCanceled(false), + mWasCompiledOMT(false), + mOffThreadToken(nullptr), + mScriptTextBuf(nullptr), + mScriptTextLength(0), + mURI(aURI), + mLineNo(1), + mIntegrity(aIntegrity), + mReferrer(aReferrer), + mFetchOptions(aFetchOptions) +{ + MOZ_ASSERT(mFetchOptions); +} + ScriptLoadRequest::~ScriptLoadRequest() { js_free(mScriptTextBuf); diff --git a/dom/script/ScriptLoader.h b/dom/script/ScriptLoader.h index a3d01fe061..2e2b1592cd 100644 --- a/dom/script/ScriptLoader.h +++ b/dom/script/ScriptLoader.h @@ -91,27 +91,7 @@ public: nsIURI* aURI, ScriptFetchOptions* aFetchOptions, const SRIMetadata& aIntegrity, - nsIURI* aReferrer) - : mKind(aKind), - mScriptMode(ScriptMode::eBlocking), - mProgress(Progress::Loading), - mIsInline(true), - mHasSourceMapURL(false), - mInDeferList(false), - mInAsyncList(false), - mIsNonAsyncScriptInserted(false), - mIsXSLT(false), - mIsCanceled(false), - mWasCompiledOMT(false), - mOffThreadToken(nullptr), - mScriptTextBuf(nullptr), - mScriptTextLength(0), - mURI(aURI), - mLineNo(1), - mIntegrity(aIntegrity), - mReferrer(aReferrer) - { - } + nsIURI* aReferrer); NS_DECL_CYCLE_COLLECTING_ISUPPORTS NS_DECL_CYCLE_COLLECTION_CLASS(ScriptLoadRequest) |