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

Side by Side Diff: src/bootstrapper.cc

Issue 23494046: some random isolate threading (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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 | « src/bootstrapper.h ('k') | src/checks.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 // 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 isolate_->factory()->NewExternalStringFromAscii(resource); 91 isolate_->factory()->NewExternalStringFromAscii(resource);
92 heap->natives_source_cache()->set(index, *source_code); 92 heap->natives_source_cache()->set(index, *source_code);
93 } 93 }
94 Handle<Object> cached_source(heap->natives_source_cache()->get(index), 94 Handle<Object> cached_source(heap->natives_source_cache()->get(index),
95 isolate_); 95 isolate_);
96 return Handle<String>::cast(cached_source); 96 return Handle<String>::cast(cached_source);
97 } 97 }
98 98
99 99
100 void Bootstrapper::Initialize(bool create_heap_objects) { 100 void Bootstrapper::Initialize(bool create_heap_objects) {
101 extensions_cache_.Initialize(create_heap_objects); 101 extensions_cache_.Initialize(isolate_, create_heap_objects);
102 } 102 }
103 103
104 104
105 void Bootstrapper::InitializeOncePerProcess() { 105 void Bootstrapper::InitializeOncePerProcess() {
106 GCExtension::Register(); 106 GCExtension::Register();
107 ExternalizeStringExtension::Register(); 107 ExternalizeStringExtension::Register();
108 StatisticsExtension::Register(); 108 StatisticsExtension::Register();
109 #if defined(V8_I18N_SUPPORT) 109 #if defined(V8_I18N_SUPPORT)
110 v8_i18n::Extension::Register(); 110 v8_i18n::Extension::Register();
111 #endif 111 #endif
(...skipping 28 matching lines...) Expand all
140 int len = delete_these_arrays_on_tear_down_->length(); 140 int len = delete_these_arrays_on_tear_down_->length();
141 ASSERT(len < 1000); // Don't use this mechanism for unbounded allocations. 141 ASSERT(len < 1000); // Don't use this mechanism for unbounded allocations.
142 for (int i = 0; i < len; i++) { 142 for (int i = 0; i < len; i++) {
143 delete[] delete_these_arrays_on_tear_down_->at(i); 143 delete[] delete_these_arrays_on_tear_down_->at(i);
144 delete_these_arrays_on_tear_down_->at(i) = NULL; 144 delete_these_arrays_on_tear_down_->at(i) = NULL;
145 } 145 }
146 delete delete_these_arrays_on_tear_down_; 146 delete delete_these_arrays_on_tear_down_;
147 delete_these_arrays_on_tear_down_ = NULL; 147 delete_these_arrays_on_tear_down_ = NULL;
148 } 148 }
149 149
150 extensions_cache_.Initialize(false); // Yes, symmetrical 150 extensions_cache_.Initialize(isolate_, false); // Yes, symmetrical
151 } 151 }
152 152
153 153
154 class Genesis BASE_EMBEDDED { 154 class Genesis BASE_EMBEDDED {
155 public: 155 public:
156 Genesis(Isolate* isolate, 156 Genesis(Isolate* isolate,
157 Handle<Object> global_object, 157 Handle<Object> global_object,
158 v8::Handle<v8::ObjectTemplate> global_template, 158 v8::Handle<v8::ObjectTemplate> global_template,
159 v8::ExtensionConfiguration* extensions); 159 v8::ExtensionConfiguration* extensions);
160 ~Genesis() { } 160 ~Genesis() { }
(...skipping 2516 matching lines...) Expand 10 before | Expand all | Expand 10 after
2677 return from + sizeof(NestingCounterType); 2677 return from + sizeof(NestingCounterType);
2678 } 2678 }
2679 2679
2680 2680
2681 // Called when the top-level V8 mutex is destroyed. 2681 // Called when the top-level V8 mutex is destroyed.
2682 void Bootstrapper::FreeThreadResources() { 2682 void Bootstrapper::FreeThreadResources() {
2683 ASSERT(!IsActive()); 2683 ASSERT(!IsActive());
2684 } 2684 }
2685 2685
2686 } } // namespace v8::internal 2686 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/bootstrapper.h ('k') | src/checks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698