Given the in-memory cache no longer need any operation once it's stored into
the in-memory cache and we start collecting the delazifications, the
cache queue needs to be used only for disk cache.
Differential Revision: https://phabricator.services.mozilla.com/D269522
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.
Differential Revision: https://phabricator.services.mozilla.com/D267360
In order to remove ScriptLoadRequest::mReferrerPolicy field, we should directly
pass ReferrerPolicy to the LoadedScript constructor.
Differential Revision: https://phabricator.services.mozilla.com/D267354
In the same way as Part 1, CheckContentPolicy can be called before LoadedScript
is created, and it should receive related parameters separately in addition to
ScriptLoadRequest.
Differential Revision: https://phabricator.services.mozilla.com/D267350
This is a preparation for the later patches.
ScriptFetchOptions and URI fields are duplicated between ScriptLoadRequest and
LoadedScript, and this patch stack is going to remove them from
ScriptLoadRequest.
At the point of ScriptLoader::TryUseCache, LoadedScript is not yet created,
and ScriptHashKey needs to receive ScriptFetchOptions and URI in addition to
ScriptLoadRequest.
In order to avoid misuse, ScriptHashKey constructor is split into two variants.
One receives ScriptLoadRequest+ScriptFetchOptions+nsIURI, which is for
the case LoadedScript is not yet created,
and the other receives ScriptLoadRequest+LoadedScript, which is for the case
LoadedScript is already created.
Differential Revision: https://phabricator.services.mozilla.com/D267349
In contrast to other fields, mBaseURL is not populated in the constructors.
Thus we just need to remove the ScriptLoadRequest::mBaseURL field and
use the LoadedScript::mBaseURL instead.
Differential Revision: https://phabricator.services.mozilla.com/D267360
In order to remove ScriptLoadRequest::mReferrerPolicy field, we should directly
pass ReferrerPolicy to the LoadedScript constructor.
Differential Revision: https://phabricator.services.mozilla.com/D267354
In the same way as Part 1, CheckContentPolicy can be called before LoadedScript
is created, and it should receive related parameters separately in addition to
ScriptLoadRequest.
Differential Revision: https://phabricator.services.mozilla.com/D267350
This is a preparation for the later patches.
ScriptFetchOptions and URI fields are duplicated between ScriptLoadRequest and
LoadedScript, and this patch stack is going to remove them from
ScriptLoadRequest.
At the point of ScriptLoader::TryUseCache, LoadedScript is not yet created,
and ScriptHashKey needs to receive ScriptFetchOptions and URI in addition to
ScriptLoadRequest.
In order to avoid misuse, ScriptHashKey constructor is split into two variants.
One receives ScriptLoadRequest+ScriptFetchOptions+nsIURI, which is for
the case LoadedScript is not yet created,
and the other receives ScriptLoadRequest+LoadedScript, which is for the case
LoadedScript is already created.
Differential Revision: https://phabricator.services.mozilla.com/D267349
Now the effect of JS::FinishCollectingDelazifications is only to
stop collecting delazifications, which is not necessary for the consumer's side.
The cost of collecting delazification is also negligible with the
InitialStencilAndDelazifications structure, and also keeping the stencil
reference won't result in too much trouble.
Differential Revision: https://phabricator.services.mozilla.com/D266618
scriptloader_bytecode_saved and scriptloader_bytecode_failed are
testing-only events. The tests use them are disabled right now,
and they should be rewritten with the updated cache mechanism.
Differential Revision: https://phabricator.services.mozilla.com/D266616
This reverts commit b10b7c8add.
Revert "Bug 1991081 - Part 6: Remove testing-only events from EncodeBytecodeAndSave. r=nbp"
This reverts commit caf275708e.
Revert "Bug 1991081 - Part 5: Use single field for SRI and optional bytecode, for bytecode case and for cached stencil case. r=nbp"
This reverts commit 86631a6e10.
Revert "Bug 1991081 - Part 4: Use LoadedScript for logging in EncodeBytecodeAndSave. r=nbp"
This reverts commit 0f9d7f11e8.
Revert "Bug 1991081 - Part 3: Store nsICacheInfoChannel to LoadedScript also in text and bytecode variants. r=nbp"
This reverts commit 370f5bcd48.
Revert "Bug 1991081 - Part 2: Store stencil to LoadedScript also in text and bytecode variants. r=nbp"
This reverts commit 7eaf4f425f.
Revert "Bug 1991081 - Part 1: Rename Stencil variant to CachedStencil in LoadedScript. r=nbp"
This reverts commit a7a6ce8f6f.
scriptloader_bytecode_saved and scriptloader_bytecode_failed are
testing-only events. The tests use them are disabled right now,
and they should be rewritten with the updated cache mechanism.
Differential Revision: https://phabricator.services.mozilla.com/D266616