Issue #2387 - Collection of fixes related to a crash while canceling a dynamic import. Add AddRef/Release hooks for embedding's script or module private value and set this script source object where appropriate. https://bugzilla.mozilla.org/show_bug.cgi?id=1519140 Partial, no Value passing changes. Clear the list of dynamic import requests after cancelling them in ScriptLoader::ParsingComplete as we do for other requests. https://bugzilla.mozilla.org/show_bug.cgi?id=1291535 ScriptLoader::OnStreamComplete never returns a failure. https://bugzilla.mozilla.org/show_bug.cgi?id=1627275 Also cancel the correct kind of parser for Modules.

This commit is contained in:
Brian Smith 2023-11-27 23:30:25 -06:00 committed by roytam1
commit eef37b2cd5
10 changed files with 100 additions and 54 deletions

View file

@ -675,9 +675,7 @@ class ScriptSourceObject : public NativeObject
return static_cast<JSScript*>(untyped);
}
void setPrivate(const Value& value) {
setReservedSlot(PRIVATE_SLOT, value);
}
void setPrivate(JSRuntime* rt, const Value& value);
Value getPrivate() const {
return getReservedSlot(PRIVATE_SLOT);