| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index e8e7f221d355ca641063050538a9da61dd196a4e..f6c3477d6eb99b7ef37c88fdfbc024cb3677f52f 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -1864,8 +1864,19 @@ class JSReceiver: public HeapObject {
|
| static bool GetOwnPropertyDescriptor(LookupIterator* it,
|
| PropertyDescriptor* desc);
|
|
|
| - // Disallow further properties to be added to the object. This is
|
| - // ES6's [[PreventExtensions]] when passed DONT_THROW.
|
| + typedef PropertyAttributes IntegrityLevel;
|
| +
|
| + // ES6 7.3.14 (when passed DONT_THROW)
|
| + // 'level' must be SEALED or FROZEN.
|
| + MUST_USE_RESULT static Maybe<bool> SetIntegrityLevel(
|
| + Handle<JSReceiver> object, IntegrityLevel lvl, ShouldThrow should_throw);
|
| +
|
| + // ES6 7.3.15
|
| + // 'level' must be SEALED or FROZEN.
|
| + MUST_USE_RESULT static Maybe<bool> TestIntegrityLevel(
|
| + Handle<JSReceiver> object, IntegrityLevel lvl);
|
| +
|
| + // ES6 [[PreventExtensions]] (when passed DONT_THROW)
|
| MUST_USE_RESULT static Maybe<bool> PreventExtensions(
|
| Handle<JSReceiver> object, ShouldThrow should_throw);
|
|
|
| @@ -1919,6 +1930,13 @@ class JSReceiver: public HeapObject {
|
|
|
| enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
|
|
|
| + // ES6 [[OwnPropertyKeys]] (modulo return type)
|
| + MUST_USE_RESULT static MaybeHandle<FixedArray> OwnPropertyKeys(
|
| + Handle<JSReceiver> object) {
|
| + return GetKeys(object, JSReceiver::OWN_ONLY, ALL_PROPERTIES,
|
| + CONVERT_TO_STRING);
|
| + }
|
| +
|
| // Computes the enumerable keys for a JSObject. Used for implementing
|
| // "for (n in object) { }".
|
| MUST_USE_RESULT static MaybeHandle<FixedArray> GetKeys(
|
| @@ -2342,12 +2360,6 @@ class JSObject: public JSReceiver {
|
|
|
| static bool IsExtensible(Handle<JSObject> object);
|
|
|
| - // ES5 Object.seal
|
| - MUST_USE_RESULT static MaybeHandle<Object> Seal(Handle<JSObject> object);
|
| -
|
| - // ES5 Object.freeze
|
| - MUST_USE_RESULT static MaybeHandle<Object> Freeze(Handle<JSObject> object);
|
| -
|
| // Called the first time an object is observed with ES7 Object.observe.
|
| static void SetObserved(Handle<JSObject> object);
|
|
|
|
|