[api] Improve documentation for PropertyDeleterCallback.

BUG=v8:5260

Review-Url: https://codereview.chromium.org/2312863003
Cr-Commit-Position: refs/heads/master@{#39215}
This commit is contained in:
franzih 2016-09-06 08:53:11 -07:00 committed by Commit bot
parent 5dd940082b
commit ca6c87341f

View File

@ -4684,11 +4684,26 @@ typedef void (*GenericNamedPropertySetterCallback)(
typedef void (*GenericNamedPropertyQueryCallback)( typedef void (*GenericNamedPropertyQueryCallback)(
Local<Name> property, const PropertyCallbackInfo<Integer>& info); Local<Name> property, const PropertyCallbackInfo<Integer>& info);
/** /**
* Returns a non-empty handle if the deleter intercepts the request. * Interceptor for delete requests on an object.
* The return value is true if the property could be deleted and false *
* otherwise. * Use `info.GetReturnValue()` to indicate whether the request was intercepted
* or not. If the deleter successfully intercepts the request, i.e., if the
* request should not be further executed, call
* `info.GetReturnValue().Set(value)` with a boolean `value`. The `value` is
* used as the return value of `delete`.
*
* \param property The name of the property for which the request was
* intercepted.
* \param info Information about the intercepted request, such as
* isolate, receiver, return value, or whether running in `'use strict'` mode.
* See `PropertyCallbackInfo`.
*
* \note If you need to mimic the behavior of `delete`, i.e., throw in strict
* mode instead of returning false, use `info.ShouldThrowOnError()` to determine
* if you are in strict mode.
*
* See also `ObjectTemplate::SetNamedPropertyHandler.`
*/ */
typedef void (*GenericNamedPropertyDeleterCallback)( typedef void (*GenericNamedPropertyDeleterCallback)(
Local<Name> property, const PropertyCallbackInfo<Boolean>& info); Local<Name> property, const PropertyCallbackInfo<Boolean>& info);