Commit 65bb0259 authored by kingwl's avatar kingwl Committed by Commit Bot

[objects] Correctly Object.isSeal for TypedArray

Add a special handle of TypedArray elements in TestElementsIntegrityLevel

Bug: v8:8082
Change-Id: I60be644801618b576b0b8b1883ac67bf0040c849
Reviewed-on: https://chromium-review.googlesource.com/c/1412133Reviewed-by: 's avatarPeter Marshall <petermarshall@chromium.org>
Commit-Queue: Peter Marshall <petermarshall@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58874}
parent 2600bba4
...@@ -165,6 +165,7 @@ Victor Costan <costan@gmail.com> ...@@ -165,6 +165,7 @@ Victor Costan <costan@gmail.com>
Vlad Burlik <vladbph@gmail.com> Vlad Burlik <vladbph@gmail.com>
Vladimir Krivosheev <develar@gmail.com> Vladimir Krivosheev <develar@gmail.com>
Vladimir Shutoff <vovan@shutoff.ru> Vladimir Shutoff <vovan@shutoff.ru>
Wenlu Wang <kingwenlu@gmail.com>
Wiktor Garbacz <wiktor.garbacz@gmail.com> Wiktor Garbacz <wiktor.garbacz@gmail.com>
Xiaoyin Liu <xiaoyin.l@outlook.com> Xiaoyin Liu <xiaoyin.l@outlook.com>
Yannic Bonenberger <contact@yannic-bonenberger.com> Yannic Bonenberger <contact@yannic-bonenberger.com>
......
...@@ -8441,6 +8441,9 @@ bool TestElementsIntegrityLevel(JSObject object, PropertyAttributes level) { ...@@ -8441,6 +8441,9 @@ bool TestElementsIntegrityLevel(JSObject object, PropertyAttributes level) {
NumberDictionary::cast(object->elements()), object->GetReadOnlyRoots(), NumberDictionary::cast(object->elements()), object->GetReadOnlyRoots(),
level); level);
} }
if (IsFixedTypedArrayElementsKind(kind)) {
return TestPropertiesIntegrityLevel(object, level);
}
ElementsAccessor* accessor = ElementsAccessor::ForKind(kind); ElementsAccessor* accessor = ElementsAccessor::ForKind(kind);
// Only DICTIONARY_ELEMENTS and SLOW_SLOPPY_ARGUMENTS_ELEMENTS have // Only DICTIONARY_ELEMENTS and SLOW_SLOPPY_ARGUMENTS_ELEMENTS have
......
...@@ -389,3 +389,7 @@ Object.seal(Sealed); ...@@ -389,3 +389,7 @@ Object.seal(Sealed);
assertDoesNotThrow(function() { return new Sealed(); }); assertDoesNotThrow(function() { return new Sealed(); });
Sealed.prototype.prototypeExists = true; Sealed.prototype.prototypeExists = true;
assertTrue((new Sealed()).prototypeExists); assertTrue((new Sealed()).prototypeExists);
obj = new Int32Array(10)
Object.seal(obj);
assertTrue(Object.isSealed(obj));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment