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

Side by Side Diff: src/v8threads.cc

Issue 3121009: [Isolates] Fix Linux build in Isolates branch. (Closed)
Patch Set: Fixed the crash due to incorrect usage of API in test. Created 10 years, 4 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
« no previous file with comments | « src/platform-linux.cc ('k') | test/cctest/test-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 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 #ifdef ENABLE_DEBUGGER_SUPPORT 334 #ifdef ENABLE_DEBUGGER_SUPPORT
335 isolate_->debug()->FreeThreadResources(); 335 isolate_->debug()->FreeThreadResources();
336 #endif 336 #endif
337 isolate_->stack_guard()->FreeThreadResources(); 337 isolate_->stack_guard()->FreeThreadResources();
338 isolate_->regexp_stack()->FreeThreadResources(); 338 isolate_->regexp_stack()->FreeThreadResources();
339 isolate_->bootstrapper()->FreeThreadResources(); 339 isolate_->bootstrapper()->FreeThreadResources();
340 } 340 }
341 341
342 342
343 bool ThreadManager::IsArchived() { 343 bool ThreadManager::IsArchived() {
344 return Isolate::CurrentPerIsolateThreadData()->thread_state() != NULL; 344 Isolate::PerIsolateThreadData* data = Isolate::CurrentPerIsolateThreadData();
345 return data != NULL && data->thread_state() != NULL;
345 } 346 }
346 347
347 348
348 void ThreadManager::Iterate(ObjectVisitor* v) { 349 void ThreadManager::Iterate(ObjectVisitor* v) {
349 // Expecting no threads during serialization/deserialization 350 // Expecting no threads during serialization/deserialization
350 for (ThreadState* state = FirstThreadStateInUse(); 351 for (ThreadState* state = FirstThreadStateInUse();
351 state != NULL; 352 state != NULL;
352 state = state->Next()) { 353 state = state->Next()) {
353 char* data = state->data(); 354 char* data = state->data();
354 data = HandleScopeImplementer::Iterate(v, data); 355 data = HandleScopeImplementer::Iterate(v, data);
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 // Acknowledge the preemption by the receiving thread. 463 // Acknowledge the preemption by the receiving thread.
463 void ContextSwitcher::PreemptionReceived() { 464 void ContextSwitcher::PreemptionReceived() {
464 ASSERT(Locker::IsLocked()); 465 ASSERT(Locker::IsLocked());
465 // There is currently no accounting being done for this. But could be in the 466 // There is currently no accounting being done for this. But could be in the
466 // future, which is why we leave this in. 467 // future, which is why we leave this in.
467 } 468 }
468 469
469 470
470 } // namespace internal 471 } // namespace internal
471 } // namespace v8 472 } // namespace v8
OLDNEW
« no previous file with comments | « src/platform-linux.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698