mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-11-01 20:17:33 +09:00
Clean up and rename MoveBoxedOrUnboxedDenseElements.
This commit is contained in:
parent
ec0e78d127
commit
79dfc644d3
2 changed files with 19 additions and 22 deletions
|
|
@ -210,22 +210,6 @@ SetOrExtendBoxedOrUnboxedDenseElements(ExclusiveContext* cx, JSObject* obj,
|
|||
return DenseElementResult::Success;
|
||||
}
|
||||
|
||||
static inline DenseElementResult
|
||||
MoveBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, uint32_t dstStart, uint32_t srcStart,
|
||||
uint32_t length)
|
||||
{
|
||||
MOZ_ASSERT(obj->isNative());
|
||||
|
||||
if (obj->as<NativeObject>().denseElementsAreFrozen())
|
||||
return DenseElementResult::Incomplete;
|
||||
|
||||
if (!obj->as<NativeObject>().maybeCopyElementsForWrite(cx))
|
||||
return DenseElementResult::Failure;
|
||||
obj->as<NativeObject>().moveDenseElements(dstStart, srcStart, length);
|
||||
|
||||
return DenseElementResult::Success;
|
||||
}
|
||||
|
||||
} // namespace js
|
||||
|
||||
#endif // vm_UnboxedObject_inl_h
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue