diff options
author | Moonchild <moonchild@palemoon.org> | 2020-11-27 15:47:49 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-11-27 15:47:49 +0000 |
commit | 15914ec5780e7867ab508a48a83311c56950f8a9 (patch) | |
tree | 80562c8ff9e25d119fde8725fa89d171ef20bb42 /dom/script/ModuleScript.cpp | |
parent | b863bd2edc94c16498edc3274531f57fbfc30d3f (diff) | |
download | uxp-15914ec5780e7867ab508a48a83311c56950f8a9.tar.gz |
Issue #1691 - Part 1: Provide a way of associating a private value with a script
or module.
This is a prerequisite for dynamic import
Diffstat (limited to 'dom/script/ModuleScript.cpp')
-rw-r--r-- | dom/script/ModuleScript.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dom/script/ModuleScript.cpp b/dom/script/ModuleScript.cpp index 9f7fe9ab92..b2a72e6287 100644 --- a/dom/script/ModuleScript.cpp +++ b/dom/script/ModuleScript.cpp @@ -58,9 +58,9 @@ ModuleScript::UnlinkModuleRecord() { // Remove module's back reference to this object request if present. if (mModuleRecord) { - MOZ_ASSERT(JS::GetModuleHostDefinedField(mModuleRecord).toPrivate() == + MOZ_ASSERT(JS::GetModulePrivate(mModuleRecord).toPrivate() == this); - JS::SetModuleHostDefinedField(mModuleRecord, JS::UndefinedValue()); + JS::SetModulePrivate(mModuleRecord, JS::UndefinedValue()); mModuleRecord = nullptr; } } @@ -83,7 +83,7 @@ ModuleScript::SetModuleRecord(JS::Handle<JSObject*> aModuleRecord) // Make module's host defined field point to this module script object. // This is cleared in the UnlinkModuleRecord(). - JS::SetModuleHostDefinedField(mModuleRecord, JS::PrivateValue(this)); + JS::SetModulePrivate(mModuleRecord, JS::PrivateValue(this)); HoldJSObjects(this); } |