OLD | NEW |
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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
381 isolate_->bootstrapper()->FreeThreadResources(); | 381 isolate_->bootstrapper()->FreeThreadResources(); |
382 } | 382 } |
383 | 383 |
384 | 384 |
385 bool ThreadManager::IsArchived() { | 385 bool ThreadManager::IsArchived() { |
386 Isolate::PerIsolateThreadData* data = | 386 Isolate::PerIsolateThreadData* data = |
387 isolate_->FindPerThreadDataForThisThread(); | 387 isolate_->FindPerThreadDataForThisThread(); |
388 return data != NULL && data->thread_state() != NULL; | 388 return data != NULL && data->thread_state() != NULL; |
389 } | 389 } |
390 | 390 |
| 391 |
391 void ThreadManager::Iterate(ObjectVisitor* v) { | 392 void ThreadManager::Iterate(ObjectVisitor* v) { |
392 // Expecting no threads during serialization/deserialization | 393 // Expecting no threads during serialization/deserialization |
393 for (ThreadState* state = FirstThreadStateInUse(); | 394 for (ThreadState* state = FirstThreadStateInUse(); |
394 state != NULL; | 395 state != NULL; |
395 state = state->Next()) { | 396 state = state->Next()) { |
396 char* data = state->data(); | 397 char* data = state->data(); |
397 data = HandleScopeImplementer::Iterate(v, data); | 398 data = HandleScopeImplementer::Iterate(v, data); |
398 data = isolate_->Iterate(v, data); | 399 data = isolate_->Iterate(v, data); |
399 data = Relocatable::Iterate(v, data); | 400 data = Relocatable::Iterate(v, data); |
400 } | 401 } |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
484 // Acknowledge the preemption by the receiving thread. | 485 // Acknowledge the preemption by the receiving thread. |
485 void ContextSwitcher::PreemptionReceived() { | 486 void ContextSwitcher::PreemptionReceived() { |
486 ASSERT(Locker::IsLocked(i::Isolate::GetDefaultIsolateForLocking())); | 487 ASSERT(Locker::IsLocked(i::Isolate::GetDefaultIsolateForLocking())); |
487 // There is currently no accounting being done for this. But could be in the | 488 // There is currently no accounting being done for this. But could be in the |
488 // future, which is why we leave this in. | 489 // future, which is why we leave this in. |
489 } | 490 } |
490 | 491 |
491 | 492 |
492 } // namespace internal | 493 } // namespace internal |
493 } // namespace v8 | 494 } // namespace v8 |
OLD | NEW |