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 7852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7863 : name_count_(name_count), names_(names) { } | 7863 : name_count_(name_count), names_(names) { } |
7864 | 7864 |
7865 const char** begin() const { return &names_[0]; } | 7865 const char** begin() const { return &names_[0]; } |
7866 const char** end() const { return &names_[name_count_]; } | 7866 const char** end() const { return &names_[name_count_]; } |
7867 | 7867 |
7868 private: | 7868 private: |
7869 const int name_count_; | 7869 const int name_count_; |
7870 const char** names_; | 7870 const char** names_; |
7871 }; | 7871 }; |
7872 | 7872 |
| 7873 #ifndef V8_CONTEXT_PROXY_INTERNAL_FIELD_COUNT |
| 7874 // The number of required internal fields for global proxy objects can be |
| 7875 // defined by embedder. |
| 7876 #define V8_CONTEXT_PROXY_INTERNAL_FIELD_COUNT 2 |
| 7877 #endif |
7873 | 7878 |
7874 /** | 7879 /** |
7875 * A sandboxed execution context with its own set of built-in objects | 7880 * A sandboxed execution context with its own set of built-in objects |
7876 * and functions. | 7881 * and functions. |
7877 */ | 7882 */ |
7878 class V8_EXPORT Context { | 7883 class V8_EXPORT Context { |
7879 public: | 7884 public: |
7880 /** | 7885 /** |
7881 * Returns the global proxy object. | 7886 * Returns the global proxy object. |
7882 * | 7887 * |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8061 public: | 8066 public: |
8062 explicit V8_INLINE Scope(Local<Context> context) : context_(context) { | 8067 explicit V8_INLINE Scope(Local<Context> context) : context_(context) { |
8063 context_->Enter(); | 8068 context_->Enter(); |
8064 } | 8069 } |
8065 V8_INLINE ~Scope() { context_->Exit(); } | 8070 V8_INLINE ~Scope() { context_->Exit(); } |
8066 | 8071 |
8067 private: | 8072 private: |
8068 Local<Context> context_; | 8073 Local<Context> context_; |
8069 }; | 8074 }; |
8070 | 8075 |
| 8076 static const int kProxyInternalFieldCount = |
| 8077 V8_CONTEXT_PROXY_INTERNAL_FIELD_COUNT; |
| 8078 |
8071 private: | 8079 private: |
8072 friend class Value; | 8080 friend class Value; |
8073 friend class Script; | 8081 friend class Script; |
8074 friend class Object; | 8082 friend class Object; |
8075 friend class Function; | 8083 friend class Function; |
8076 | 8084 |
8077 Local<Value> SlowGetEmbedderData(int index); | 8085 Local<Value> SlowGetEmbedderData(int index); |
8078 void* SlowGetAlignedPointerFromEmbedderData(int index); | 8086 void* SlowGetAlignedPointerFromEmbedderData(int index); |
8079 }; | 8087 }; |
8080 | 8088 |
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9697 */ | 9705 */ |
9698 | 9706 |
9699 | 9707 |
9700 } // namespace v8 | 9708 } // namespace v8 |
9701 | 9709 |
9702 | 9710 |
9703 #undef TYPE_CHECK | 9711 #undef TYPE_CHECK |
9704 | 9712 |
9705 | 9713 |
9706 #endif // INCLUDE_V8_H_ | 9714 #endif // INCLUDE_V8_H_ |
OLD | NEW |