Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: include/v8.h

Issue 2312863003: [api] Improve documentation for PropertyDeleterCallback. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after
4677 * \note Some functions query the property attributes internally, even though 4677 * \note Some functions query the property attributes internally, even though
4678 * they do not return the attributes. For example, `hasOwnProperty()` can 4678 * they do not return the attributes. For example, `hasOwnProperty()` can
4679 * trigger this interceptor depending on the state of the object. 4679 * trigger this interceptor depending on the state of the object.
4680 * 4680 *
4681 * See also 4681 * See also
4682 * `ObjectTemplate::SetNamedPropertyHandler.` 4682 * `ObjectTemplate::SetNamedPropertyHandler.`
4683 */ 4683 */
4684 typedef void (*GenericNamedPropertyQueryCallback)( 4684 typedef void (*GenericNamedPropertyQueryCallback)(
4685 Local<Name> property, const PropertyCallbackInfo<Integer>& info); 4685 Local<Name> property, const PropertyCallbackInfo<Integer>& info);
4686 4686
4687
4688 /** 4687 /**
4689 * Returns a non-empty handle if the deleter intercepts the request. 4688 * Interceptor for delete requests on an object.
4690 * The return value is true if the property could be deleted and false 4689 *
4691 * otherwise. 4690 * Use `info.GetReturnValue()` to indicate whether the request was intercepted
4691 * or not. If the deleter successfully intercepts the request, i.e., if the
4692 * request should not be further executed, call
4693 * `info.GetReturnValue().Set(value)` with a boolean `value`. The `value` is
4694 * used as the return value of `delete`.
4695 *
4696 * \param property The name of the property for which the request was
4697 * intercepted.
4698 * \param info Information about the intercepted request, such as
4699 * isolate, receiver, return value, or whether running in `'use strict'` mode.
4700 * See `PropertyCallbackInfo`.
4701 *
4702 * \note If you need to mimic the behavior of `delete`, i.e., throw in strict
4703 * mode instead of returning false, use `info.ShouldThrowOnError()` to determine
4704 * if you are in strict mode.
4705 *
4706 * See also `ObjectTemplate::SetNamedPropertyHandler.`
4692 */ 4707 */
4693 typedef void (*GenericNamedPropertyDeleterCallback)( 4708 typedef void (*GenericNamedPropertyDeleterCallback)(
4694 Local<Name> property, const PropertyCallbackInfo<Boolean>& info); 4709 Local<Name> property, const PropertyCallbackInfo<Boolean>& info);
4695 4710
4696 4711
4697 /** 4712 /**
4698 * Returns an array containing the names of the properties the named 4713 * Returns an array containing the names of the properties the named
4699 * property getter intercepts. 4714 * property getter intercepts.
4700 */ 4715 */
4701 typedef void (*GenericNamedPropertyEnumeratorCallback)( 4716 typedef void (*GenericNamedPropertyEnumeratorCallback)(
(...skipping 4744 matching lines...) Expand 10 before | Expand all | Expand 10 after
9446 */ 9461 */
9447 9462
9448 9463
9449 } // namespace v8 9464 } // namespace v8
9450 9465
9451 9466
9452 #undef TYPE_CHECK 9467 #undef TYPE_CHECK
9453 9468
9454 9469
9455 #endif // INCLUDE_V8_H_ 9470 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698