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

Side by Side Diff: src/isolate.cc

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: avoid calling functions Created 3 years, 11 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/js/async-await.js » ('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 3247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3258 namespace { 3258 namespace {
3259 class PromiseDebugEventScope { 3259 class PromiseDebugEventScope {
3260 public: 3260 public:
3261 PromiseDebugEventScope(Isolate* isolate, int id, int name) 3261 PromiseDebugEventScope(Isolate* isolate, int id, int name)
3262 : isolate_(isolate), 3262 : isolate_(isolate),
3263 id_(id), 3263 id_(id),
3264 name_(static_cast<PromiseDebugActionName>(name)), 3264 name_(static_cast<PromiseDebugActionName>(name)),
3265 is_debug_active_(isolate_->debug()->is_active() && 3265 is_debug_active_(isolate_->debug()->is_active() &&
3266 id != kDebugPromiseNoID && name_ != kDebugNotActive) { 3266 id != kDebugPromiseNoID && name_ != kDebugNotActive) {
3267 if (is_debug_active_) { 3267 if (is_debug_active_) {
3268 isolate_->debug()->OnAsyncTaskEvent(kDebugWillHandle, id_, name_); 3268 isolate_->debug()->OnAsyncTaskEvent(debug::kDebugWillHandle, id_, name_);
3269 } 3269 }
3270 } 3270 }
3271 3271
3272 ~PromiseDebugEventScope() { 3272 ~PromiseDebugEventScope() {
3273 if (is_debug_active_) { 3273 if (is_debug_active_) {
3274 isolate_->debug()->OnAsyncTaskEvent(kDebugDidHandle, id_, name_); 3274 isolate_->debug()->OnAsyncTaskEvent(debug::kDebugDidHandle, id_, name_);
3275 } 3275 }
3276 } 3276 }
3277 3277
3278 private: 3278 private:
3279 Isolate* isolate_; 3279 Isolate* isolate_;
3280 int id_; 3280 int id_;
3281 PromiseDebugActionName name_; 3281 PromiseDebugActionName name_;
3282 bool is_debug_active_; 3282 bool is_debug_active_;
3283 }; 3283 };
3284 } // namespace 3284 } // namespace
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
3656 // Then check whether this scope intercepts. 3656 // Then check whether this scope intercepts.
3657 if ((flag & intercept_mask_)) { 3657 if ((flag & intercept_mask_)) {
3658 intercepted_flags_ |= flag; 3658 intercepted_flags_ |= flag;
3659 return true; 3659 return true;
3660 } 3660 }
3661 return false; 3661 return false;
3662 } 3662 }
3663 3663
3664 } // namespace internal 3664 } // namespace internal
3665 } // namespace v8 3665 } // namespace v8
OLDNEW
« no previous file with comments | « src/isolate.h ('k') | src/js/async-await.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698