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

Side by Side Diff: include/v8.h

Issue 2286323002: [api] Add documentation for PropertyQueryCallback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@DocPropertyAttribute
Patch Set: Improve note about triggering in some cases. 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 | test/cctest/test-api-interceptors.cc » ('j') | 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 4525 matching lines...) Expand 10 before | Expand all | Expand 10 after
4536 * isolate, receiver, return value, or whether running in `'use strict'` mode. 4536 * isolate, receiver, return value, or whether running in `'use strict'` mode.
4537 * See `PropertyCallbackInfo`. 4537 * See `PropertyCallbackInfo`.
4538 * 4538 *
4539 * See also 4539 * See also
4540 * `ObjectTemplate::SetNamedPropertyHandler.` 4540 * `ObjectTemplate::SetNamedPropertyHandler.`
4541 */ 4541 */
4542 typedef void (*GenericNamedPropertySetterCallback)( 4542 typedef void (*GenericNamedPropertySetterCallback)(
4543 Local<Name> property, Local<Value> value, 4543 Local<Name> property, Local<Value> value,
4544 const PropertyCallbackInfo<Value>& info); 4544 const PropertyCallbackInfo<Value>& info);
4545 4545
4546
4547 /** 4546 /**
4548 * Returns a non-empty handle if the interceptor intercepts the request. 4547 * Intercepts all requests that query the attributes of the
4549 * The result is an integer encoding property attributes (like v8::None, 4548 * property, e.g., getOwnPropertyDescriptor(), propertyIsEnumerable(), and
4550 * v8::DontEnum, etc.) 4549 * defineProperty().
4550 *
4551 * Use `info.GetReturnValue().Set(value)` to set the property attributes. The
4552 * value is an interger encoding a `v8::PropertyAttribute`.
4553 *
4554 * \param property The name of the property for which the request was
4555 * intercepted.
4556 * \param info Information about the intercepted request, such as
4557 * isolate, receiver, return value, or whether running in `'use strict'` mode.
4558 * See `PropertyCallbackInfo`.
4559 *
4560 * \note Some functions query the property attributes internally, even though
4561 * they do not return the attributes. For example, `hasOwnProperty()` can
4562 * trigger this interceptor depending on the state of the object.
4563 *
4564 * See also
4565 * `ObjectTemplate::SetNamedPropertyHandler.`
4551 */ 4566 */
4552 typedef void (*GenericNamedPropertyQueryCallback)( 4567 typedef void (*GenericNamedPropertyQueryCallback)(
4553 Local<Name> property, const PropertyCallbackInfo<Integer>& info); 4568 Local<Name> property, const PropertyCallbackInfo<Integer>& info);
4554 4569
4555 4570
4556 /** 4571 /**
4557 * Returns a non-empty handle if the deleter intercepts the request. 4572 * Returns a non-empty handle if the deleter intercepts the request.
4558 * The return value is true if the property could be deleted and false 4573 * The return value is true if the property could be deleted and false
4559 * otherwise. 4574 * otherwise.
4560 */ 4575 */
(...skipping 4678 matching lines...) Expand 10 before | Expand all | Expand 10 after
9239 */ 9254 */
9240 9255
9241 9256
9242 } // namespace v8 9257 } // namespace v8
9243 9258
9244 9259
9245 #undef TYPE_CHECK 9260 #undef TYPE_CHECK
9246 9261
9247 9262
9248 #endif // INCLUDE_V8_H_ 9263 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | test/cctest/test-api-interceptors.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698