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

Side by Side Diff: src/global-handles.cc

Issue 1409993012: Add {CancelableTaskManager} to handle {Cancelable} concurrent tasks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 1 month 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/cancelable-task.cc ('k') | src/heap/incremental-marking-job.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 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
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
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
OLDNEW
« no previous file with comments | « src/cancelable-task.cc ('k') | src/heap/incremental-marking-job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698