| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 for (int i = 0; i < kInternalFieldsInWeakCallback; ++i) { | 411 for (int i = 0; i < kInternalFieldsInWeakCallback; ++i) { |
| 412 internal_fields_[i] = internal_fields[i]; | 412 internal_fields_[i] = internal_fields[i]; |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 | 415 |
| 416 V8_INLINE Isolate* GetIsolate() const { return isolate_; } | 416 V8_INLINE Isolate* GetIsolate() const { return isolate_; } |
| 417 V8_INLINE T* GetParameter() const { return parameter_; } | 417 V8_INLINE T* GetParameter() const { return parameter_; } |
| 418 V8_INLINE void* GetInternalField(int index) const; | 418 V8_INLINE void* GetInternalField(int index) const; |
| 419 | 419 |
| 420 V8_INLINE V8_DEPRECATE_SOON("use indexed version", | 420 V8_INLINE V8_DEPRECATE_SOON("use indexed version", |
| 421 void* GetInternalField1()) const { | 421 void* GetInternalField1() const) { |
| 422 return internal_fields_[0]; | 422 return internal_fields_[0]; |
| 423 } | 423 } |
| 424 V8_INLINE V8_DEPRECATE_SOON("use indexed version", | 424 V8_INLINE V8_DEPRECATE_SOON("use indexed version", |
| 425 void* GetInternalField2()) const { | 425 void* GetInternalField2() const) { |
| 426 return internal_fields_[1]; | 426 return internal_fields_[1]; |
| 427 } | 427 } |
| 428 | 428 |
| 429 bool IsFirstPass() const { return callback_ != nullptr; } | 429 bool IsFirstPass() const { return callback_ != nullptr; } |
| 430 | 430 |
| 431 // When first called, the embedder MUST Reset() the Global which triggered the | 431 // When first called, the embedder MUST Reset() the Global which triggered the |
| 432 // callback. The Global itself is unusable for anything else. No v8 other api | 432 // callback. The Global itself is unusable for anything else. No v8 other api |
| 433 // calls may be called in the first callback. Should additional work be | 433 // calls may be called in the first callback. Should additional work be |
| 434 // required, the embedder must set a second pass callback, which will be | 434 // required, the embedder must set a second pass callback, which will be |
| 435 // called after all the initial callbacks are processed. | 435 // called after all the initial callbacks are processed. |
| (...skipping 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3089 /** | 3089 /** |
| 3090 * Create a function in the current execution context | 3090 * Create a function in the current execution context |
| 3091 * for a given FunctionCallback. | 3091 * for a given FunctionCallback. |
| 3092 */ | 3092 */ |
| 3093 static Local<Function> New(Isolate* isolate, | 3093 static Local<Function> New(Isolate* isolate, |
| 3094 FunctionCallback callback, | 3094 FunctionCallback callback, |
| 3095 Local<Value> data = Local<Value>(), | 3095 Local<Value> data = Local<Value>(), |
| 3096 int length = 0); | 3096 int length = 0); |
| 3097 | 3097 |
| 3098 V8_DEPRECATE_SOON("Use maybe version", | 3098 V8_DEPRECATE_SOON("Use maybe version", |
| 3099 Local<Object> NewInstance(int argc, | 3099 Local<Object> NewInstance(int argc, Handle<Value> argv[]) |
| 3100 Handle<Value> argv[])) const; | 3100 const); |
| 3101 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( | 3101 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( |
| 3102 Local<Context> context, int argc, Handle<Value> argv[]) const; | 3102 Local<Context> context, int argc, Handle<Value> argv[]) const; |
| 3103 | 3103 |
| 3104 V8_DEPRECATE_SOON("Use maybe version", Local<Object> NewInstance() const); | 3104 V8_DEPRECATE_SOON("Use maybe version", Local<Object> NewInstance() const); |
| 3105 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( | 3105 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance( |
| 3106 Local<Context> context) const { | 3106 Local<Context> context) const { |
| 3107 return NewInstance(context, 0, nullptr); | 3107 return NewInstance(context, 0, nullptr); |
| 3108 } | 3108 } |
| 3109 | 3109 |
| 3110 V8_DEPRECATE_SOON("Use maybe version", | 3110 V8_DEPRECATE_SOON("Use maybe version", |
| (...skipping 4985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8096 */ | 8096 */ |
| 8097 | 8097 |
| 8098 | 8098 |
| 8099 } // namespace v8 | 8099 } // namespace v8 |
| 8100 | 8100 |
| 8101 | 8101 |
| 8102 #undef TYPE_CHECK | 8102 #undef TYPE_CHECK |
| 8103 | 8103 |
| 8104 | 8104 |
| 8105 #endif // V8_H_ | 8105 #endif // V8_H_ |
| OLD | NEW |