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

Side by Side Diff: include/v8.h

Issue 2467073002: Revert "Create internal fields on global proxy objects" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 1 month 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 | 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 7852 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
7878 7873
7879 /** 7874 /**
7880 * A sandboxed execution context with its own set of built-in objects 7875 * A sandboxed execution context with its own set of built-in objects
7881 * and functions. 7876 * and functions.
7882 */ 7877 */
7883 class V8_EXPORT Context { 7878 class V8_EXPORT Context {
7884 public: 7879 public:
7885 /** 7880 /**
7886 * Returns the global proxy object. 7881 * Returns the global proxy object.
7887 * 7882 *
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
8066 public: 8061 public:
8067 explicit V8_INLINE Scope(Local<Context> context) : context_(context) { 8062 explicit V8_INLINE Scope(Local<Context> context) : context_(context) {
8068 context_->Enter(); 8063 context_->Enter();
8069 } 8064 }
8070 V8_INLINE ~Scope() { context_->Exit(); } 8065 V8_INLINE ~Scope() { context_->Exit(); }
8071 8066
8072 private: 8067 private:
8073 Local<Context> context_; 8068 Local<Context> context_;
8074 }; 8069 };
8075 8070
8076 static const int kProxyInternalFieldCount =
8077 V8_CONTEXT_PROXY_INTERNAL_FIELD_COUNT;
8078
8079 private: 8071 private:
8080 friend class Value; 8072 friend class Value;
8081 friend class Script; 8073 friend class Script;
8082 friend class Object; 8074 friend class Object;
8083 friend class Function; 8075 friend class Function;
8084 8076
8085 Local<Value> SlowGetEmbedderData(int index); 8077 Local<Value> SlowGetEmbedderData(int index);
8086 void* SlowGetAlignedPointerFromEmbedderData(int index); 8078 void* SlowGetAlignedPointerFromEmbedderData(int index);
8087 }; 8079 };
8088 8080
(...skipping 1616 matching lines...) Expand 10 before | Expand all | Expand 10 after
9705 */ 9697 */
9706 9698
9707 9699
9708 } // namespace v8 9700 } // namespace v8
9709 9701
9710 9702
9711 #undef TYPE_CHECK 9703 #undef TYPE_CHECK
9712 9704
9713 9705
9714 #endif // INCLUDE_V8_H_ 9706 #endif // INCLUDE_V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698