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

Side by Side Diff: include/v8.h

Issue 2807333003: [api] Add DefineProperty() method that skips interceptors.
Patch Set: Created 3 years, 8 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 | src/api.cc » ('j') | src/builtins/builtins-object.cc » ('J')
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 2988 matching lines...) Expand 10 before | Expand all | Expand 10 after
2999 // 2999 //
3000 // In general, CreateDataProperty is faster, however, does not allow 3000 // In general, CreateDataProperty is faster, however, does not allow
3001 // for specifying attributes or an accessor descriptor. 3001 // for specifying attributes or an accessor descriptor.
3002 // 3002 //
3003 // The PropertyDescriptor can change when redefining a property. 3003 // The PropertyDescriptor can change when redefining a property.
3004 // 3004 //
3005 // Returns true on success. 3005 // Returns true on success.
3006 V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty( 3006 V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty(
3007 Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor); 3007 Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor);
3008 3008
3009 V8_WARN_UNUSED_RESULT Maybe<bool> DefinePropertyWithoutInterceptors(
Franzi 2017/04/12 08:58:17 Can you add a comment please. Maybe make the funct
3010 Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor);
3011
3009 // Sets an own property on this object bypassing interceptors and 3012 // Sets an own property on this object bypassing interceptors and
3010 // overriding accessors or read-only properties. 3013 // overriding accessors or read-only properties.
3011 // 3014 //
3012 // Note that if the object has an interceptor the property will be set 3015 // Note that if the object has an interceptor the property will be set
3013 // locally, but since the interceptor takes precedence the local property 3016 // locally, but since the interceptor takes precedence the local property
3014 // will only be returned if the interceptor doesn't return a value. 3017 // will only be returned if the interceptor doesn't return a value.
3015 // 3018 //
3016 // Note also that this only works for named properties. 3019 // Note also that this only works for named properties.
3017 V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty", 3020 V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty",
3018 bool ForceSet(Local<Value> key, Local<Value> value, 3021 bool ForceSet(Local<Value> key, Local<Value> value,
(...skipping 6972 matching lines...) Expand 10 before | Expand all | Expand 10 after
9991 */ 9994 */
9992 9995
9993 9996
9994 } // namespace v8 9997 } // namespace v8
9995 9998
9996 9999
9997 #undef TYPE_CHECK 10000 #undef TYPE_CHECK
9998 10001
9999 10002
10000 #endif // INCLUDE_V8_H_ 10003 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/builtins/builtins-object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698