| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 6c209b179207407623aa850d85587528c23b0a1c..37618b42fc6aa2a64f1c7d627e94f6ae3a19593f 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -1865,6 +1865,11 @@ 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.
|
| + MUST_USE_RESULT static Maybe<bool> PreventExtensions(
|
| + Handle<JSReceiver> object, ShouldThrow should_throw);
|
| +
|
| // Tests for the fast common case for property enumeration.
|
| bool IsSimpleEnum();
|
|
|
| @@ -2324,11 +2329,8 @@ class JSObject: public JSReceiver {
|
| // Check whether this object references another object
|
| bool ReferencesObject(Object* obj);
|
|
|
| - // Disallow further properties to be added to the oject.
|
| - MUST_USE_RESULT static Maybe<bool> PreventExtensionsInternal(
|
| - Handle<JSObject> object); // ES [[PreventExtensions]]
|
| - MUST_USE_RESULT static MaybeHandle<Object> PreventExtensions(
|
| - Handle<JSObject> object); // ES Object.preventExtensions
|
| + MUST_USE_RESULT static Maybe<bool> PreventExtensions(
|
| + Handle<JSObject> object, ShouldThrow should_throw);
|
|
|
| static bool IsExtensible(Handle<JSObject> object);
|
|
|
| @@ -2517,7 +2519,7 @@ class JSObject: public JSReceiver {
|
| // attrs is one of NONE, SEALED, or FROZEN (depending on the operation).
|
| template <PropertyAttributes attrs>
|
| MUST_USE_RESULT static Maybe<bool> PreventExtensionsWithTransition(
|
| - Handle<JSObject> object);
|
| + Handle<JSObject> object, ShouldThrow should_throw);
|
|
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(JSObject);
|
| };
|
|
|