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

Side by Side Diff: include/v8.h

Issue 1407313004: Adds the possibility of setting a Code object as the callback of a FunctionTemplate. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 5 years 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 | « build/features.gypi ('k') | 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 4393 matching lines...) Expand 10 before | Expand all | Expand 10 after
4404 * \endcode 4404 * \endcode
4405 */ 4405 */
4406 class V8_EXPORT FunctionTemplate : public Template { 4406 class V8_EXPORT FunctionTemplate : public Template {
4407 public: 4407 public:
4408 /** Creates a function template.*/ 4408 /** Creates a function template.*/
4409 static Local<FunctionTemplate> New( 4409 static Local<FunctionTemplate> New(
4410 Isolate* isolate, FunctionCallback callback = 0, 4410 Isolate* isolate, FunctionCallback callback = 0,
4411 Local<Value> data = Local<Value>(), 4411 Local<Value> data = Local<Value>(),
4412 Local<Signature> signature = Local<Signature>(), int length = 0); 4412 Local<Signature> signature = Local<Signature>(), int length = 0);
4413 4413
4414 /**
4415 * Creates a function template with a fast handler. If a fast handler is set,
4416 * the callback cannot be null.
4417 */
4418 static Local<FunctionTemplate> NewWithFastHandler(
4419 Isolate* isolate, FunctionCallback callback, Local<Value> fast_handler,
4420 Local<Value> data = Local<Value>(),
4421 Local<Signature> signature = Local<Signature>(), int length = 0);
4422
4414 /** Returns the unique function instance in the current execution context.*/ 4423 /** Returns the unique function instance in the current execution context.*/
4415 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction()); 4424 V8_DEPRECATE_SOON("Use maybe version", Local<Function> GetFunction());
4416 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction( 4425 V8_WARN_UNUSED_RESULT MaybeLocal<Function> GetFunction(
4417 Local<Context> context); 4426 Local<Context> context);
4418 4427
4419 /** 4428 /**
4420 * Set the call-handler callback for a FunctionTemplate. This 4429 * Set the call-handler callback for a FunctionTemplate. This
4421 * callback is called whenever the function created from this 4430 * callback is called whenever the function created from this
4422 * FunctionTemplate is called. 4431 * FunctionTemplate is called.
4423 */ 4432 */
4424 void SetCallHandler(FunctionCallback callback, 4433 void SetCallHandler(FunctionCallback callback,
4425 Local<Value> data = Local<Value>()); 4434 Local<Value> data = Local<Value>(),
4435 Local<Value> fast_handler = Local<Value>());
4426 4436
4427 /** Set the predefined length property for the FunctionTemplate. */ 4437 /** Set the predefined length property for the FunctionTemplate. */
4428 void SetLength(int length); 4438 void SetLength(int length);
4429 4439
4430 /** Get the InstanceTemplate. */ 4440 /** Get the InstanceTemplate. */
4431 Local<ObjectTemplate> InstanceTemplate(); 4441 Local<ObjectTemplate> InstanceTemplate();
4432 4442
4433 /** Causes the function template to inherit from a parent function template.*/ 4443 /** Causes the function template to inherit from a parent function template.*/
4434 void Inherit(Local<FunctionTemplate> parent); 4444 void Inherit(Local<FunctionTemplate> parent);
4435 4445
(...skipping 4030 matching lines...) Expand 10 before | Expand all | Expand 10 after
8466 */ 8476 */
8467 8477
8468 8478
8469 } // namespace v8 8479 } // namespace v8
8470 8480
8471 8481
8472 #undef TYPE_CHECK 8482 #undef TYPE_CHECK
8473 8483
8474 8484
8475 #endif // V8_H_ 8485 #endif // V8_H_
OLDNEW
« no previous file with comments | « build/features.gypi ('k') | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698