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

Side by Side Diff: src/isolate.cc

Issue 2929853003: Fix use of history timers in background threads. (Closed)
Patch Set: Make explicit when async_counters is needed. Created 3 years, 5 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/isolate.h ('k') | src/wasm/module-compiler.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/isolate.h" 5 #include "src/isolate.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <fstream> // NOLINT(readability/streams) 9 #include <fstream> // NOLINT(readability/streams)
10 #include <sstream> 10 #include <sstream>
(...skipping 2613 matching lines...) Expand 10 before | Expand all | Expand 10 after
2624 handler->exception_ = pending_exception(); 2624 handler->exception_ = pending_exception();
2625 // Propagate to the external try-catch only if we got an actual message. 2625 // Propagate to the external try-catch only if we got an actual message.
2626 if (thread_local_top_.pending_message_obj_->IsTheHole(this)) return true; 2626 if (thread_local_top_.pending_message_obj_->IsTheHole(this)) return true;
2627 2627
2628 handler->message_obj_ = thread_local_top_.pending_message_obj_; 2628 handler->message_obj_ = thread_local_top_.pending_message_obj_;
2629 } 2629 }
2630 return true; 2630 return true;
2631 } 2631 }
2632 2632
2633 bool Isolate::InitializeCounters() { 2633 bool Isolate::InitializeCounters() {
2634 if (counters_shared_) return false; 2634 if (async_counters_) return false;
2635 counters_shared_ = std::make_shared<Counters>(this); 2635 async_counters_ = std::make_shared<Counters>(this);
2636 return true; 2636 return true;
2637 } 2637 }
2638 2638
2639 void Isolate::InitializeLoggingAndCounters() { 2639 void Isolate::InitializeLoggingAndCounters() {
2640 if (logger_ == NULL) { 2640 if (logger_ == NULL) {
2641 logger_ = new Logger(this); 2641 logger_ = new Logger(this);
2642 } 2642 }
2643 InitializeCounters(); 2643 InitializeCounters();
2644 } 2644 }
2645 2645
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
3766 // Then check whether this scope intercepts. 3766 // Then check whether this scope intercepts.
3767 if ((flag & intercept_mask_)) { 3767 if ((flag & intercept_mask_)) {
3768 intercepted_flags_ |= flag; 3768 intercepted_flags_ |= flag;
3769 return true; 3769 return true;
3770 } 3770 }
3771 return false; 3771 return false;
3772 } 3772 }
3773 3773
3774 } // namespace internal 3774 } // namespace internal
3775 } // namespace v8 3775 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/wasm/module-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698