| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/global-handles.h" | 5 #include "src/global-handles.h" |
| 6 | 6 |
| 7 #include "src/api.h" | 7 #include "src/api.h" |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 #include "src/vm-state-inl.h" | 9 #include "src/vm-state-inl.h" |
| 10 | 10 |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 public: | 526 public: |
| 527 // Takes ownership of the contents of pending_phantom_callbacks, leaving it in | 527 // Takes ownership of the contents of pending_phantom_callbacks, leaving it in |
| 528 // the same state it would be after a call to Clear(). | 528 // the same state it would be after a call to Clear(). |
| 529 PendingPhantomCallbacksSecondPassTask( | 529 PendingPhantomCallbacksSecondPassTask( |
| 530 List<PendingPhantomCallback>* pending_phantom_callbacks, Isolate* isolate) | 530 List<PendingPhantomCallback>* pending_phantom_callbacks, Isolate* isolate) |
| 531 : CancelableTask(isolate) { | 531 : CancelableTask(isolate) { |
| 532 pending_phantom_callbacks_.Swap(pending_phantom_callbacks); | 532 pending_phantom_callbacks_.Swap(pending_phantom_callbacks); |
| 533 } | 533 } |
| 534 | 534 |
| 535 void RunInternal() override { | 535 void RunInternal() override { |
| 536 isolate_->heap()->CallGCPrologueCallbacks( | 536 isolate()->heap()->CallGCPrologueCallbacks( |
| 537 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); | 537 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); |
| 538 InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate_); | 538 InvokeSecondPassPhantomCallbacks(&pending_phantom_callbacks_, isolate()); |
| 539 isolate_->heap()->CallGCEpilogueCallbacks( | 539 isolate()->heap()->CallGCEpilogueCallbacks( |
| 540 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); | 540 GCType::kGCTypeProcessWeakCallbacks, kNoGCCallbackFlags); |
| 541 } | 541 } |
| 542 | 542 |
| 543 private: | 543 private: |
| 544 List<PendingPhantomCallback> pending_phantom_callbacks_; | 544 List<PendingPhantomCallback> pending_phantom_callbacks_; |
| 545 | 545 |
| 546 DISALLOW_COPY_AND_ASSIGN(PendingPhantomCallbacksSecondPassTask); | 546 DISALLOW_COPY_AND_ASSIGN(PendingPhantomCallbacksSecondPassTask); |
| 547 }; | 547 }; |
| 548 | 548 |
| 549 | 549 |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1376 blocks_[block][offset] = object; | 1376 blocks_[block][offset] = object; |
| 1377 if (isolate->heap()->InNewSpace(object)) { | 1377 if (isolate->heap()->InNewSpace(object)) { |
| 1378 new_space_indices_.Add(size_); | 1378 new_space_indices_.Add(size_); |
| 1379 } | 1379 } |
| 1380 *index = size_++; | 1380 *index = size_++; |
| 1381 } | 1381 } |
| 1382 | 1382 |
| 1383 | 1383 |
| 1384 } // namespace internal | 1384 } // namespace internal |
| 1385 } // namespace v8 | 1385 } // namespace v8 |
| OLD | NEW |