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/v8.cc

Issue 10084003: Valgrind cleanliness, part 6: Introduce OS::TearDown, cleaning up 2 mutexes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed typo. Created 8 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
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 RegisteredExtension::UnregisterAll(); 111 RegisteredExtension::UnregisterAll();
112 112
113 isolate->TearDown(); 113 isolate->TearDown();
114 delete isolate; 114 delete isolate;
115 115
116 is_running_ = false; 116 is_running_ = false;
117 has_been_disposed_ = true; 117 has_been_disposed_ = true;
118 118
119 delete call_completed_callbacks_; 119 delete call_completed_callbacks_;
120 call_completed_callbacks_ = NULL; 120 call_completed_callbacks_ = NULL;
121
122 OS::TearDown();
121 } 123 }
122 124
123 125
124 static void seed_random(uint32_t* state) { 126 static void seed_random(uint32_t* state) {
125 for (int i = 0; i < 2; ++i) { 127 for (int i = 0; i < 2; ++i) {
126 if (FLAG_random_seed != 0) { 128 if (FLAG_random_seed != 0) {
127 state[i] = FLAG_random_seed; 129 state[i] = FLAG_random_seed;
128 } else if (entropy_source != NULL) { 130 } else if (entropy_source != NULL) {
129 uint32_t val; 131 uint32_t val;
130 ScopedLock lock(entropy_mutex.Pointer()); 132 ScopedLock lock(entropy_mutex.Pointer());
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 static const double binary_million = 1048576.0; 243 static const double binary_million = 1048576.0;
242 r.double_value = binary_million; 244 r.double_value = binary_million;
243 r.uint64_t_value |= random_bits; 245 r.uint64_t_value |= random_bits;
244 r.double_value -= binary_million; 246 r.double_value -= binary_million;
245 247
246 HeapNumber::cast(heap_number)->set_value(r.double_value); 248 HeapNumber::cast(heap_number)->set_value(r.double_value);
247 return heap_number; 249 return heap_number;
248 } 250 }
249 251
250 void V8::InitializeOncePerProcessImpl() { 252 void V8::InitializeOncePerProcessImpl() {
251 // Set up the platform OS support.
252 OS::SetUp(); 253 OS::SetUp();
253 254
254 use_crankshaft_ = FLAG_crankshaft; 255 use_crankshaft_ = FLAG_crankshaft;
255 256
256 if (Serializer::enabled()) { 257 if (Serializer::enabled()) {
257 use_crankshaft_ = false; 258 use_crankshaft_ = false;
258 } 259 }
259 260
260 CPU::SetUp(); 261 CPU::SetUp();
261 if (!CPU::SupportsCrankshaft()) { 262 if (!CPU::SupportsCrankshaft()) {
(...skipping 16 matching lines...) Expand all
278 SetUpJSCallerSavedCodeData(); 279 SetUpJSCallerSavedCodeData();
279 SamplerRegistry::SetUp(); 280 SamplerRegistry::SetUp();
280 ExternalReference::SetUp(); 281 ExternalReference::SetUp();
281 } 282 }
282 283
283 void V8::InitializeOncePerProcess() { 284 void V8::InitializeOncePerProcess() {
284 CallOnce(&init_once, &InitializeOncePerProcessImpl); 285 CallOnce(&init_once, &InitializeOncePerProcessImpl);
285 } 286 }
286 287
287 } } // namespace v8::internal 288 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/platform-win32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698