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 4404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4415 * \endcode | 4415 * \endcode |
4416 */ | 4416 */ |
4417 class V8_EXPORT FunctionTemplate : public Template { | 4417 class V8_EXPORT FunctionTemplate : public Template { |
4418 public: | 4418 public: |
4419 /** Creates a function template.*/ | 4419 /** Creates a function template.*/ |
4420 static Local<FunctionTemplate> New( | 4420 static Local<FunctionTemplate> New( |
4421 Isolate* isolate, FunctionCallback callback = 0, | 4421 Isolate* isolate, FunctionCallback callback = 0, |
4422 Local<Value> data = Local<Value>(), | 4422 Local<Value> data = Local<Value>(), |
4423 Local<Signature> signature = Local<Signature>(), int length = 0); | 4423 Local<Signature> signature = Local<Signature>(), int length = 0); |
4424 | 4424 |
4425 #ifdef V8_FAST_ACCESSORS | |
4426 /** Creates a function template with a code object. */ | |
4427 static Local<FunctionTemplate> New( | |
4428 Isolate* isolate, Local<Value> fast_handler, FunctionCallback callback, | |
vogelheim
2015/11/18 17:30:05
nitpick: Wouldn't it make more sense to have fast_
epertoso
2015/11/20 15:27:13
Resolved according to the offline discussion we ha
| |
4429 Local<Value> data = Local<Value>(), | |
4430 Local<Signature> signature = Local<Signature>(), int length = 0); | |
4431 #endif | |
4432 | |
4425 /** Returns the unique function instance in the current execution context.*/ | 4433 /** Returns the unique function instance in the current execution context.*/ |
4426 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); | 4434 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); |
4427 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( | 4435 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( |
4428 Local<Context> context); | 4436 Local<Context> context); |
4429 | 4437 |
4430 /** | 4438 /** |
4431 * Set the call-handler callback for a FunctionTemplate. This | 4439 * Set the call-handler callback for a FunctionTemplate. This |
4432 * callback is called whenever the function created from this | 4440 * callback is called whenever the function created from this |
4433 * FunctionTemplate is called. | 4441 * FunctionTemplate is called. |
4434 */ | 4442 */ |
4435 void SetCallHandler(FunctionCallback callback, | 4443 void SetCallHandler(FunctionCallback callback, |
4436 Local<Value> data = Local<Value>()); | 4444 Local<Value> data = Local<Value>(), |
4445 Local<Value> fast_handler = Local<Value>()); | |
vogelheim
2015/11/18 17:30:05
The FunctionTemplate::New version is #ifdef-ed, bu
epertoso
2015/11/20 15:27:13
Removed the #ifdefs.
| |
4437 | 4446 |
4438 /** Set the predefined length property for the FunctionTemplate. */ | 4447 /** Set the predefined length property for the FunctionTemplate. */ |
4439 void SetLength(int length); | 4448 void SetLength(int length); |
4440 | 4449 |
4441 /** Get the InstanceTemplate. */ | 4450 /** Get the InstanceTemplate. */ |
4442 Local<ObjectTemplate> InstanceTemplate(); | 4451 Local<ObjectTemplate> InstanceTemplate(); |
4443 | 4452 |
4444 /** Causes the function template to inherit from a parent function template.*/ | 4453 /** Causes the function template to inherit from a parent function template.*/ |
4445 void Inherit(Local<FunctionTemplate> parent); | 4454 void Inherit(Local<FunctionTemplate> parent); |
4446 | 4455 |
(...skipping 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8477 */ | 8486 */ |
8478 | 8487 |
8479 | 8488 |
8480 } // namespace v8 | 8489 } // namespace v8 |
8481 | 8490 |
8482 | 8491 |
8483 #undef TYPE_CHECK | 8492 #undef TYPE_CHECK |
8484 | 8493 |
8485 | 8494 |
8486 #endif // V8_H_ | 8495 #endif // V8_H_ |
OLD | NEW |