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

Side by Side Diff: src/v8.cc

Issue 240193002: Serializer enable/disable flags need thread safety. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Setup and TearDown are controlled by V8::Initialize(). Created 6 years, 8 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
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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 ElementsAccessor::TearDown(); 105 ElementsAccessor::TearDown();
106 LOperand::TearDownCaches(); 106 LOperand::TearDownCaches();
107 ExternalReference::TearDownMathExpData(); 107 ExternalReference::TearDownMathExpData();
108 RegisteredExtension::UnregisterAll(); 108 RegisteredExtension::UnregisterAll();
109 Isolate::GlobalTearDown(); 109 Isolate::GlobalTearDown();
110 110
111 delete call_completed_callbacks_; 111 delete call_completed_callbacks_;
112 call_completed_callbacks_ = NULL; 112 call_completed_callbacks_ = NULL;
113 113
114 Sampler::TearDown(); 114 Sampler::TearDown();
115 Serializer::TearDown();
115 116
116 #ifdef V8_USE_DEFAULT_PLATFORM 117 #ifdef V8_USE_DEFAULT_PLATFORM
117 DefaultPlatform* platform = static_cast<DefaultPlatform*>(platform_); 118 DefaultPlatform* platform = static_cast<DefaultPlatform*>(platform_);
118 platform_ = NULL; 119 platform_ = NULL;
119 delete platform; 120 delete platform;
120 #endif 121 #endif
121 } 122 }
122 123
123 124
124 void V8::SetReturnAddressLocationResolver( 125 void V8::SetReturnAddressLocationResolver(
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 180
180 // Increase call depth to prevent recursive callbacks. 181 // Increase call depth to prevent recursive callbacks.
181 handle_scope_implementer->IncrementCallDepth(); 182 handle_scope_implementer->IncrementCallDepth();
182 Execution::RunMicrotasks(isolate); 183 Execution::RunMicrotasks(isolate);
183 handle_scope_implementer->DecrementCallDepth(); 184 handle_scope_implementer->DecrementCallDepth();
184 } 185 }
185 186
186 187
187 void V8::InitializeOncePerProcessImpl() { 188 void V8::InitializeOncePerProcessImpl() {
188 FlagList::EnforceFlagImplications(); 189 FlagList::EnforceFlagImplications();
190 Serializer::InitializeOncePerProcess();
189 191
190 if (FLAG_predictable && FLAG_random_seed == 0) { 192 if (FLAG_predictable && FLAG_random_seed == 0) {
191 // Avoid random seeds in predictable mode. 193 // Avoid random seeds in predictable mode.
192 FLAG_random_seed = 12347; 194 FLAG_random_seed = 12347;
193 } 195 }
194 196
195 if (FLAG_stress_compaction) { 197 if (FLAG_stress_compaction) {
196 FLAG_force_marking_deque_overflows = true; 198 FLAG_force_marking_deque_overflows = true;
197 FLAG_gc_global = true; 199 FLAG_gc_global = true;
198 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2; 200 FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
(...skipping 30 matching lines...) Expand all
229 platform_ = NULL; 231 platform_ = NULL;
230 } 232 }
231 233
232 234
233 v8::Platform* V8::GetCurrentPlatform() { 235 v8::Platform* V8::GetCurrentPlatform() {
234 ASSERT(platform_); 236 ASSERT(platform_);
235 return platform_; 237 return platform_;
236 } 238 }
237 239
238 } } // namespace v8::internal 240 } } // namespace v8::internal
OLDNEW
« src/serialize.cc ('K') | « src/serialize.cc ('k') | src/x64/assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698