summaryrefslogtreecommitdiffstats
path: root/js/src/vm/NativeObject.h
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-06-19 10:56:35 +0000
committerGitHub <noreply@github.com>2019-06-19 10:56:35 +0000
commit276f6583e00edf2a217a3092471ca2aa3aab5a09 (patch)
tree202c502b7e964384fb7f0639b756353374b0c045 /js/src/vm/NativeObject.h
parent77a9720accf21b790ab88ca4b3658c8412889d30 (diff)
parentfcc11b2fec61c37c90ffe40e8f406eba64654a9c (diff)
downloadUXP-276f6583e00edf2a217a3092471ca2aa3aab5a09.tar
UXP-276f6583e00edf2a217a3092471ca2aa3aab5a09.tar.gz
UXP-276f6583e00edf2a217a3092471ca2aa3aab5a09.tar.lz
UXP-276f6583e00edf2a217a3092471ca2aa3aab5a09.tar.xz
UXP-276f6583e00edf2a217a3092471ca2aa3aab5a09.zip
Merge pull request #1137 from MoonchildProductions/remove-unboxed-checked
Remove unboxed (checked branch)
Diffstat (limited to 'js/src/vm/NativeObject.h')
-rw-r--r--js/src/vm/NativeObject.h15
1 files changed, 11 insertions, 4 deletions
diff --git a/js/src/vm/NativeObject.h b/js/src/vm/NativeObject.h
index 4dbc167ab..da4f873a6 100644
--- a/js/src/vm/NativeObject.h
+++ b/js/src/vm/NativeObject.h
@@ -339,16 +339,19 @@ IsObjectValueInCompartment(const Value& v, JSCompartment* comp);
#endif
// Operations which change an object's dense elements can either succeed, fail,
-// or be unable to complete. For native objects, the latter is used when the
-// object's elements must become sparse instead. The enum below is used for
-// such operations, and for similar operations on unboxed arrays and methods
-// that work on both kinds of objects.
+// or be unable to complete. The latter is used when the object's elements must
+// become sparse instead. The enum below is used for such operations.
enum class DenseElementResult {
Failure,
Success,
Incomplete
};
+enum class ShouldUpdateTypes {
+ Update,
+ DontUpdate
+};
+
/*
* NativeObject specifies the internal implementation of a native object.
*
@@ -1147,6 +1150,10 @@ class NativeObject : public ShapedObject
elementsRangeWriteBarrierPost(dstStart, count);
}
+ inline DenseElementResult
+ setOrExtendDenseElements(JSContext* cx, uint32_t start, const Value* vp, uint32_t count,
+ ShouldUpdateTypes updateTypes = ShouldUpdateTypes::Update);
+
bool shouldConvertDoubleElements() {
return getElementsHeader()->shouldConvertDoubleElements();
}