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

Side by Side Diff: src/bootstrapper.h

Issue 130213009: Various extension-related cleanup and simplifications. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Whitespace Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « include/v8.h ('k') | src/bootstrapper.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 FixedArray* cache_; 83 FixedArray* cache_;
84 DISALLOW_COPY_AND_ASSIGN(SourceCodeCache); 84 DISALLOW_COPY_AND_ASSIGN(SourceCodeCache);
85 }; 85 };
86 86
87 87
88 // The Boostrapper is the public interface for creating a JavaScript global 88 // The Boostrapper is the public interface for creating a JavaScript global
89 // context. 89 // context.
90 class Bootstrapper { 90 class Bootstrapper {
91 public: 91 public:
92 static void InitializeOncePerProcess(); 92 static void InitializeOncePerProcess();
93 static void TearDownExtensions();
93 94
94 // Requires: Heap::SetUp has been called. 95 // Requires: Heap::SetUp has been called.
95 void Initialize(bool create_heap_objects); 96 void Initialize(bool create_heap_objects);
96 void TearDown(); 97 void TearDown();
97 98
98 // Creates a JavaScript Global Context with initial object graph. 99 // Creates a JavaScript Global Context with initial object graph.
99 // The returned value is a global handle casted to V8Environment*. 100 // The returned value is a global handle casted to V8Environment*.
100 Handle<Context> CreateEnvironment( 101 Handle<Context> CreateEnvironment(
101 Handle<Object> global_object, 102 Handle<Object> global_object,
102 v8::Handle<v8::ObjectTemplate> global_template, 103 v8::Handle<v8::ObjectTemplate> global_template,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 List<char*>* delete_these_non_arrays_on_tear_down_; 140 List<char*>* delete_these_non_arrays_on_tear_down_;
140 // This is for delete[] 141 // This is for delete[]
141 List<char*>* delete_these_arrays_on_tear_down_; 142 List<char*>* delete_these_arrays_on_tear_down_;
142 143
143 friend class BootstrapperActive; 144 friend class BootstrapperActive;
144 friend class Isolate; 145 friend class Isolate;
145 friend class NativesExternalStringResource; 146 friend class NativesExternalStringResource;
146 147
147 explicit Bootstrapper(Isolate* isolate); 148 explicit Bootstrapper(Isolate* isolate);
148 149
150 static v8::Extension* free_buffer_extension_;
151 static v8::Extension* gc_extension_;
152 static v8::Extension* externalize_string_extension_;
153 static v8::Extension* statistics_extension_;
154 static v8::Extension* trigger_failure_extension_;
155
149 DISALLOW_COPY_AND_ASSIGN(Bootstrapper); 156 DISALLOW_COPY_AND_ASSIGN(Bootstrapper);
150 }; 157 };
151 158
152 159
153 class BootstrapperActive BASE_EMBEDDED { 160 class BootstrapperActive BASE_EMBEDDED {
154 public: 161 public:
155 explicit BootstrapperActive(Bootstrapper* bootstrapper) 162 explicit BootstrapperActive(Bootstrapper* bootstrapper)
156 : bootstrapper_(bootstrapper) { 163 : bootstrapper_(bootstrapper) {
157 ++bootstrapper_->nesting_; 164 ++bootstrapper_->nesting_;
158 } 165 }
(...skipping 24 matching lines...) Expand all
183 return length_; 190 return length_;
184 } 191 }
185 private: 192 private:
186 const char* data_; 193 const char* data_;
187 size_t length_; 194 size_t length_;
188 }; 195 };
189 196
190 }} // namespace v8::internal 197 }} // namespace v8::internal
191 198
192 #endif // V8_BOOTSTRAPPER_H_ 199 #endif // V8_BOOTSTRAPPER_H_
OLDNEW
« no previous file with comments | « include/v8.h ('k') | src/bootstrapper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698