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

Side by Side Diff: include/v8.h

Issue 2405213002: V8 support for cached accessors. (Closed)
Patch Set: Toon's feedback. Created 4 years, 1 month 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') | 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 4616 matching lines...) Expand 10 before | Expand all | Expand 10 after
4627 */ 4627 */
4628 class V8_EXPORT Template : public Data { 4628 class V8_EXPORT Template : public Data {
4629 public: 4629 public:
4630 /** 4630 /**
4631 * Adds a property to each instance created by this template. 4631 * Adds a property to each instance created by this template.
4632 * 4632 *
4633 * The property must be defined either as a primitive value, or a template. 4633 * The property must be defined either as a primitive value, or a template.
4634 */ 4634 */
4635 void Set(Local<Name> name, Local<Data> value, 4635 void Set(Local<Name> name, Local<Data> value,
4636 PropertyAttribute attributes = None); 4636 PropertyAttribute attributes = None);
4637 void SetPrivate(Local<Private> name, Local<Data> value,
4638 PropertyAttribute attributes = None);
4637 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value); 4639 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value);
4638 4640
4639 void SetAccessorProperty( 4641 void SetAccessorProperty(
4640 Local<Name> name, 4642 Local<Name> name,
4641 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), 4643 Local<FunctionTemplate> getter = Local<FunctionTemplate>(),
4642 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), 4644 Local<FunctionTemplate> setter = Local<FunctionTemplate>(),
4643 PropertyAttribute attribute = None, 4645 PropertyAttribute attribute = None,
4644 AccessControl settings = DEFAULT); 4646 AccessControl settings = DEFAULT);
4645 4647
4646 /** 4648 /**
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
5107 /** 5109 /**
5108 * Creates a function template with a fast handler. If a fast handler is set, 5110 * Creates a function template with a fast handler. If a fast handler is set,
5109 * the callback cannot be null. 5111 * the callback cannot be null.
5110 */ 5112 */
5111 static Local<FunctionTemplate> NewWithFastHandler( 5113 static Local<FunctionTemplate> NewWithFastHandler(
5112 Isolate* isolate, FunctionCallback callback, 5114 Isolate* isolate, FunctionCallback callback,
5113 experimental::FastAccessorBuilder* fast_handler = nullptr, 5115 experimental::FastAccessorBuilder* fast_handler = nullptr,
5114 Local<Value> data = Local<Value>(), 5116 Local<Value> data = Local<Value>(),
5115 Local<Signature> signature = Local<Signature>(), int length = 0); 5117 Local<Signature> signature = Local<Signature>(), int length = 0);
5116 5118
5119 /**
5120 * Creates a function template backed/cached by a private property.
5121 */
5122 static Local<FunctionTemplate> NewWithCache(
5123 Isolate* isolate, FunctionCallback callback,
5124 Local<Private> cache_property, Local<Value> data = Local<Value>(),
5125 Local<Signature> signature = Local<Signature>(), int length = 0);
5126
5117 /** Returns the unique function instance in the current execution context.*/ 5127 /** Returns the unique function instance in the current execution context.*/
5118 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); 5128 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction());
5119 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( 5129 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
5120 Local<Context> context); 5130 Local<Context> context);
5121 5131
5122 /** 5132 /**
5123 * Similar to Context::NewRemoteContext, this creates an instance that 5133 * Similar to Context::NewRemoteContext, this creates an instance that
5124 * isn't backed by an actual object. 5134 * isn't backed by an actual object.
5125 * 5135 *
5126 * The InstanceTemplate of this FunctionTemplate must have access checks with 5136 * The InstanceTemplate of this FunctionTemplate must have access checks with
(...skipping 4570 matching lines...) Expand 10 before | Expand all | Expand 10 after
9697 */ 9707 */
9698 9708
9699 9709
9700 } // namespace v8 9710 } // namespace v8
9701 9711
9702 9712
9703 #undef TYPE_CHECK 9713 #undef TYPE_CHECK
9704 9714
9705 9715
9706 #endif // INCLUDE_V8_H_ 9716 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698