mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-06 07:48:38 +09:00
Revert #1142 - Remove unboxed objects
- accounting for removal of watch()/unwatch()
This commit is contained in:
parent
90e01a7329
commit
47781d6165
48 changed files with 3400 additions and 75 deletions
|
|
@ -5016,6 +5016,11 @@ js::NewObjectOperationWithTemplate(JSContext* cx, HandleObject templateObject)
|
|||
|
||||
NewObjectKind newKind = templateObject->group()->shouldPreTenure() ? TenuredObject : GenericObject;
|
||||
|
||||
if (templateObject->group()->maybeUnboxedLayout()) {
|
||||
RootedObjectGroup group(cx, templateObject->group());
|
||||
return UnboxedPlainObject::create(cx, group, newKind);
|
||||
}
|
||||
|
||||
JSObject* obj = CopyInitializerObject(cx, templateObject.as<PlainObject>(), newKind);
|
||||
if (!obj)
|
||||
return nullptr;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue