mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-16 01:13:08 +09:00
Issue #1691 - Part 11: Fix incorrect reference counting in ModuleScript class.
(cherry picked from commit 4ef1fa98c9518f5c107424667229ddb6f9f97767)
This commit is contained in:
parent
7e056a6f72
commit
edb82ec9f2
1 changed files with 2 additions and 1 deletions
|
|
@ -132,6 +132,7 @@ ModuleScript::UnlinkModuleRecord()
|
|||
this);
|
||||
JS::SetModulePrivate(mModuleRecord, JS::UndefinedValue());
|
||||
mModuleRecord = nullptr;
|
||||
Release();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -156,6 +157,7 @@ ModuleScript::SetModuleRecord(JS::Handle<JSObject*> aModuleRecord)
|
|||
MOZ_ASSERT(JS::GetModulePrivate(mModuleRecord).isUndefined());
|
||||
JS::SetModulePrivate(mModuleRecord, JS::PrivateValue(this));
|
||||
HoldJSObjects(this);
|
||||
AddRef();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -168,7 +170,6 @@ ModuleScript::SetParseError(const JS::Value& aError)
|
|||
UnlinkModuleRecord();
|
||||
mParseError = aError;
|
||||
HoldJSObjects(this);
|
||||
AddRef();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue