summaryrefslogtreecommitdiffstats
path: root/js/src/vm/UnboxedObject-inl.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-17 18:37:23 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-17 18:37:23 +0000
commit3c878b1e3bbb043b22ab032bce1fe111b8062ca9 (patch)
treeaefb6e52600ba4732334f43ada963186825ac6bc /js/src/vm/UnboxedObject-inl.h
parent9153838ea299da3bd00767394ff021318c1e0f12 (diff)
downloadUXP-3c878b1e3bbb043b22ab032bce1fe111b8062ca9.tar
UXP-3c878b1e3bbb043b22ab032bce1fe111b8062ca9.tar.gz
UXP-3c878b1e3bbb043b22ab032bce1fe111b8062ca9.tar.lz
UXP-3c878b1e3bbb043b22ab032bce1fe111b8062ca9.tar.xz
UXP-3c878b1e3bbb043b22ab032bce1fe111b8062ca9.zip
Convert CopyBoxedOrUnboxedDenseElements to something that doesn't crash.
Diffstat (limited to 'js/src/vm/UnboxedObject-inl.h')
-rw-r--r--js/src/vm/UnboxedObject-inl.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/js/src/vm/UnboxedObject-inl.h b/js/src/vm/UnboxedObject-inl.h
index 711a064f2..069527141 100644
--- a/js/src/vm/UnboxedObject-inl.h
+++ b/js/src/vm/UnboxedObject-inl.h
@@ -226,24 +226,6 @@ MoveBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, uint32_t dstStart,
return DenseElementResult::Success;
}
-static inline DenseElementResult
-CopyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* dst, JSObject* src,
- uint32_t dstStart, uint32_t srcStart, uint32_t length)
-{
- MOZ_ASSERT(src->isNative());
- MOZ_ASSERT(dst->isNative());
- MOZ_ASSERT(dst->as<NativeObject>().getDenseInitializedLength() == dstStart);
- MOZ_ASSERT(src->as<NativeObject>().getDenseInitializedLength() >= srcStart + length);
- MOZ_ASSERT(dst->as<NativeObject>().getDenseCapacity() >= dstStart + length);
-
- dst->as<NativeObject>().setDenseInitializedLength(dstStart + length);
-
- const Value* vp = src->as<NativeObject>().getDenseElements() + srcStart;
- dst->as<NativeObject>().initDenseElements(dstStart, vp, length);
-
- return DenseElementResult::Success;
-}
-
} // namespace js
#endif // vm_UnboxedObject_inl_h