OLD | NEW |
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 4546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4557 */ | 4557 */ |
4558 class V8_EXPORT Template : public Data { | 4558 class V8_EXPORT Template : public Data { |
4559 public: | 4559 public: |
4560 /** | 4560 /** |
4561 * Adds a property to each instance created by this template. | 4561 * Adds a property to each instance created by this template. |
4562 * | 4562 * |
4563 * The property must be defined either as a primitive value, or a template. | 4563 * The property must be defined either as a primitive value, or a template. |
4564 */ | 4564 */ |
4565 void Set(Local<Name> name, Local<Data> value, | 4565 void Set(Local<Name> name, Local<Data> value, |
4566 PropertyAttribute attributes = None); | 4566 PropertyAttribute attributes = None); |
| 4567 void SetPrivate(Local<Private> name, Local<Data> value, |
| 4568 PropertyAttribute attributes = None); |
4567 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value); | 4569 V8_INLINE void Set(Isolate* isolate, const char* name, Local<Data> value); |
4568 | 4570 |
4569 void SetAccessorProperty( | 4571 void SetAccessorProperty( |
4570 Local<Name> name, | 4572 Local<Name> name, |
4571 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), | 4573 Local<FunctionTemplate> getter = Local<FunctionTemplate>(), |
4572 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), | 4574 Local<FunctionTemplate> setter = Local<FunctionTemplate>(), |
4573 PropertyAttribute attribute = None, | 4575 PropertyAttribute attribute = None, |
4574 AccessControl settings = DEFAULT); | 4576 AccessControl settings = DEFAULT); |
4575 | 4577 |
4576 /** | 4578 /** |
(...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5029 /** | 5031 /** |
5030 * Creates a function template with a fast handler. If a fast handler is set, | 5032 * Creates a function template with a fast handler. If a fast handler is set, |
5031 * the callback cannot be null. | 5033 * the callback cannot be null. |
5032 */ | 5034 */ |
5033 static Local<FunctionTemplate> NewWithFastHandler( | 5035 static Local<FunctionTemplate> NewWithFastHandler( |
5034 Isolate* isolate, FunctionCallback callback, | 5036 Isolate* isolate, FunctionCallback callback, |
5035 experimental::FastAccessorBuilder* fast_handler = nullptr, | 5037 experimental::FastAccessorBuilder* fast_handler = nullptr, |
5036 Local<Value> data = Local<Value>(), | 5038 Local<Value> data = Local<Value>(), |
5037 Local<Signature> signature = Local<Signature>(), int length = 0); | 5039 Local<Signature> signature = Local<Signature>(), int length = 0); |
5038 | 5040 |
| 5041 /** |
| 5042 * Creates a function template backed/cached by a private property. |
| 5043 */ |
| 5044 static Local<FunctionTemplate> NewWithCache( |
| 5045 Isolate* isolate, FunctionCallback callback, |
| 5046 Local<Private> cache_property, Local<Value> data = Local<Value>(), |
| 5047 Local<Signature> signature = Local<Signature>(), int length = 0); |
| 5048 |
5039 /** Returns the unique function instance in the current execution context.*/ | 5049 /** Returns the unique function instance in the current execution context.*/ |
5040 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); | 5050 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); |
5041 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( | 5051 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( |
5042 Local<Context> context); | 5052 Local<Context> context); |
5043 | 5053 |
5044 /** | 5054 /** |
5045 * Similar to Context::NewRemoteContext, this creates an instance that | 5055 * Similar to Context::NewRemoteContext, this creates an instance that |
5046 * isn't backed by an actual object. | 5056 * isn't backed by an actual object. |
5047 * | 5057 * |
5048 * The InstanceTemplate of this FunctionTemplate must have access checks with | 5058 * The InstanceTemplate of this FunctionTemplate must have access checks with |
(...skipping 4524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9573 */ | 9583 */ |
9574 | 9584 |
9575 | 9585 |
9576 } // namespace v8 | 9586 } // namespace v8 |
9577 | 9587 |
9578 | 9588 |
9579 #undef TYPE_CHECK | 9589 #undef TYPE_CHECK |
9580 | 9590 |
9581 | 9591 |
9582 #endif // INCLUDE_V8_H_ | 9592 #endif // INCLUDE_V8_H_ |
OLD | NEW |