Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 9141cb9785ab8ca49ebecce9c07a6175f1d379e7..f60c630a56b4e6a60d875865906b28a58453e990 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1859,6 +1859,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(); |
@@ -2314,11 +2319,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); |
@@ -2507,7 +2509,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); |
}; |