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

Side by Side Diff: include/v8.h

Issue 2269053002: [api] Improve documentation for NamedPropertySetterCallback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@DocPropertyCallbackInfo
Patch Set: Remove wrong sentence about Holder(). 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 4277 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 4288
4289 4289
4290 /** 4290 /**
4291 * NamedProperty[Getter|Setter] are used as interceptors on object. 4291 * NamedProperty[Getter|Setter] are used as interceptors on object.
4292 * See ObjectTemplate::SetNamedPropertyHandler. 4292 * See ObjectTemplate::SetNamedPropertyHandler.
4293 */ 4293 */
4294 typedef void (*NamedPropertyGetterCallback)( 4294 typedef void (*NamedPropertyGetterCallback)(
4295 Local<String> property, 4295 Local<String> property,
4296 const PropertyCallbackInfo<Value>& info); 4296 const PropertyCallbackInfo<Value>& info);
4297 4297
4298
4299 /** 4298 /**
4300 * Returns the value if the setter intercepts the request. 4299 * Interceptor for set requests on an object.
4301 * Otherwise, returns an empty handle. 4300 *
4301 * Use `info.GetReturnValue()` to indicate whether the request was intercepted
4302 * or not. If the setter successfully intercepts the request, i.e., if the
4303 * request should not be further executed, call
4304 * `info.GetReturnValue().Set(value)`. If the setter
4305 * did not intercept the request, i.e., if the request should be handled as
4306 * if no interceptor is present, do not not call `Set()` or call it with
4307 * an empty handle `info.GetReturnValue().Set(Local<Value>())`.
jochen (gone - plz use gerrit) 2016/08/24 21:01:03 nah, please no empty handle
4308 *
4309 * \param property The name of the property for which the request was
4310 * intercepted.
4311 * \param value The value which the property will have if the request
4312 * is not intercepted.
4313 * \param info Information about the intercepted request, such as
4314 * isolate, receiver, return value, or whether running in `'use strict'` mode.
4315 * See `PropertyCallbackInfo`.
4316 *
4317 * See also
4318 * `ObjectTemplate::SetNamedPropertyHandler.`
4302 */ 4319 */
4303 typedef void (*NamedPropertySetterCallback)( 4320 typedef void (*NamedPropertySetterCallback)(
4304 Local<String> property, 4321 Local<String> property,
4305 Local<Value> value, 4322 Local<Value> value,
4306 const PropertyCallbackInfo<Value>& info); 4323 const PropertyCallbackInfo<Value>& info);
4307 4324
4308 4325
4309 /** 4326 /**
4310 * Returns a non-empty handle if the interceptor intercepts the request. 4327 * Returns a non-empty handle if the interceptor intercepts the request.
4311 * The result is an integer encoding property attributes (like v8::None, 4328 * The result is an integer encoding property attributes (like v8::None,
(...skipping 4708 matching lines...) Expand 10 before | Expand all | Expand 10 after
9020 */ 9037 */
9021 9038
9022 9039
9023 } // namespace v8 9040 } // namespace v8
9024 9041
9025 9042
9026 #undef TYPE_CHECK 9043 #undef TYPE_CHECK
9027 9044
9028 9045
9029 #endif // INCLUDE_V8_H_ 9046 #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