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

Side by Side Diff: include/v8.h

Issue 2133133002: Version 5.3.332.12 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.3
Patch Set: Created 4 years, 5 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 | include/v8-version.h » ('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 3241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3252 static const int kDataIndex = 5; 3252 static const int kDataIndex = 5;
3253 static const int kThisIndex = 6; 3253 static const int kThisIndex = 6;
3254 3254
3255 V8_INLINE PropertyCallbackInfo(internal::Object** args) : args_(args) {} 3255 V8_INLINE PropertyCallbackInfo(internal::Object** args) : args_(args) {}
3256 internal::Object** args_; 3256 internal::Object** args_;
3257 }; 3257 };
3258 3258
3259 3259
3260 typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info); 3260 typedef void (*FunctionCallback)(const FunctionCallbackInfo<Value>& info);
3261 3261
3262 enum class ConstructorBehavior { kThrow, kAllow };
3262 3263
3263 /** 3264 /**
3264 * A JavaScript function object (ECMA-262, 15.3). 3265 * A JavaScript function object (ECMA-262, 15.3).
3265 */ 3266 */
3266 class V8_EXPORT Function : public Object { 3267 class V8_EXPORT Function : public Object {
3267 public: 3268 public:
3268 /** 3269 /**
3269 * Create a function in the current execution context 3270 * Create a function in the current execution context
3270 * for a given FunctionCallback. 3271 * for a given FunctionCallback.
3271 */ 3272 */
3272 static MaybeLocal<Function> New(Local<Context> context, 3273 static MaybeLocal<Function> New(
3273 FunctionCallback callback, 3274 Local<Context> context, FunctionCallback callback,
3274 Local<Value> data = Local<Value>(), 3275 Local<Value> data = Local<Value>(), int length = 0,
3275 int length = 0); 3276 ConstructorBehavior behavior = ConstructorBehavior::kAllow);
3276 static V8_DEPRECATE_SOON( 3277 static V8_DEPRECATE_SOON(
3277 "Use maybe version", 3278 "Use maybe version",
3278 Local<Function> New(Isolate* isolate, FunctionCallback callback, 3279 Local<Function> New(Isolate* isolate, FunctionCallback callback,
3279 Local<Value> data = Local<Value>(), int length = 0)); 3280 Local<Value> data = Local<Value>(), int length = 0));
3280 3281
3281 V8_DEPRECATED("Use maybe version", 3282 V8_DEPRECATED("Use maybe version",
3282 Local<Object> NewInstance(int argc, Local<Value> argv[]) const); 3283 Local<Object> NewInstance(int argc, Local<Value> argv[]) const);
3283 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( 3284 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(
3284 Local<Context> context, int argc, Local<Value> argv[]) const; 3285 Local<Context> context, int argc, Local<Value> argv[]) const;
3285 3286
(...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after
4480 * child_instance.instance_accessor calls 'InstanceAccessorCallback' 4481 * child_instance.instance_accessor calls 'InstanceAccessorCallback'
4481 * child_instance.instance_property == 3; 4482 * child_instance.instance_property == 3;
4482 * \endcode 4483 * \endcode
4483 */ 4484 */
4484 class V8_EXPORT FunctionTemplate : public Template { 4485 class V8_EXPORT FunctionTemplate : public Template {
4485 public: 4486 public:
4486 /** Creates a function template.*/ 4487 /** Creates a function template.*/
4487 static Local<FunctionTemplate> New( 4488 static Local<FunctionTemplate> New(
4488 Isolate* isolate, FunctionCallback callback = 0, 4489 Isolate* isolate, FunctionCallback callback = 0,
4489 Local<Value> data = Local<Value>(), 4490 Local<Value> data = Local<Value>(),
4490 Local<Signature> signature = Local<Signature>(), int length = 0); 4491 Local<Signature> signature = Local<Signature>(), int length = 0,
4492 ConstructorBehavior behavior = ConstructorBehavior::kAllow);
4491 4493
4492 /** Get a template included in the snapshot by index. */ 4494 /** Get a template included in the snapshot by index. */
4493 static Local<FunctionTemplate> FromSnapshot(Isolate* isolate, size_t index); 4495 static Local<FunctionTemplate> FromSnapshot(Isolate* isolate, size_t index);
4494 4496
4495 /** 4497 /**
4496 * Creates a function template with a fast handler. If a fast handler is set, 4498 * Creates a function template with a fast handler. If a fast handler is set,
4497 * the callback cannot be null. 4499 * the callback cannot be null.
4498 */ 4500 */
4499 static Local<FunctionTemplate> NewWithFastHandler( 4501 static Local<FunctionTemplate> NewWithFastHandler(
4500 Isolate* isolate, FunctionCallback callback, 4502 Isolate* isolate, FunctionCallback callback,
(...skipping 4390 matching lines...) Expand 10 before | Expand all | Expand 10 after
8891 */ 8893 */
8892 8894
8893 8895
8894 } // namespace v8 8896 } // namespace v8
8895 8897
8896 8898
8897 #undef TYPE_CHECK 8899 #undef TYPE_CHECK
8898 8900
8899 8901
8900 #endif // INCLUDE_V8_H_ 8902 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8-version.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698