Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index ca8c0347ffe720b829b8fb386fdd5145b7cc2190..7f491b95c1ec9667caaf5d6e432da99b231fa9be 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -456,7 +456,6 @@ class WeakCallbackInfo { |
| void* embedder_fields_[kEmbedderFieldsInWeakCallback]; |
| }; |
| - |
| // kParameter will pass a void* parameter back to the callback, kInternalFields |
| // will pass the first two internal fields back to the callback, kFinalizer |
| // will pass a void* parameter back, but is invoked before the object is |
| @@ -2990,6 +2989,13 @@ enum class IndexFilter { kIncludeIndices, kSkipIndices }; |
| enum class IntegrityLevel { kFrozen, kSealed }; |
| /** |
| + * DONT_SKIP_INTERCEPTORS is the default behaviour and triggers the definer |
| + * interceptor when setting an own property on an object using |
| + * DefineProperty, while SKIP_INTERCEPTORS bypasses the interceptors. |
| + */ |
| +enum CallInterceptors { DONT_SKIP_INTERCEPTORS, SKIP_INTERCEPTORS }; |
|
jochen (gone - plz use gerrit)
2017/05/29 19:45:38
please use enum class CallInterceptors { kSkip, kD
|
| + |
| +/** |
| * A JavaScript object (ECMA-262, 4.3.3) |
| */ |
| class V8_EXPORT Object : public Value { |
| @@ -3026,7 +3032,8 @@ class V8_EXPORT Object : public Value { |
| // Returns true on success. |
| V8_WARN_UNUSED_RESULT Maybe<bool> DefineOwnProperty( |
| Local<Context> context, Local<Name> key, Local<Value> value, |
| - PropertyAttribute attributes = None); |
| + PropertyAttribute attributes = None, |
| + CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS); |
| // Implements Object.DefineProperty(O, P, Attributes), see Ecma-262 19.1.2.4. |
| // |
| @@ -3040,9 +3047,13 @@ class V8_EXPORT Object : public Value { |
| // |
| // The PropertyDescriptor can change when redefining a property. |
| // |
| + // CallInterceptors call_interceptors = SKIP_INTERCEPTORS |
| + // bypasses interceptors when setting property on an object. |
| + // |
| // Returns true on success. |
| V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty( |
| - Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor); |
| + Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor, |
| + CallInterceptors call_interceptors = DONT_SKIP_INTERCEPTORS); |
| // Sets an own property on this object bypassing interceptors and |
| // overriding accessors or read-only properties. |