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

Side by Side Diff: src/isolate.cc

Issue 2578923002: [inspector] async stacks for Promise.then calls... (Closed)
Patch Set: use set_private instead of weak map Created 4 years 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
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 3183 matching lines...) Expand 10 before | Expand all | Expand 10 after
3194 namespace { 3194 namespace {
3195 class PromiseDebugEventScope { 3195 class PromiseDebugEventScope {
3196 public: 3196 public:
3197 PromiseDebugEventScope(Isolate* isolate, Object* id, Object* name) 3197 PromiseDebugEventScope(Isolate* isolate, Object* id, Object* name)
3198 : isolate_(isolate), 3198 : isolate_(isolate),
3199 id_(id, isolate_), 3199 id_(id, isolate_),
3200 name_(name, isolate_), 3200 name_(name, isolate_),
3201 is_debug_active_(isolate_->debug()->is_active() && id_->IsNumber() && 3201 is_debug_active_(isolate_->debug()->is_active() && id_->IsNumber() &&
3202 name_->IsString()) { 3202 name_->IsString()) {
3203 if (is_debug_active_) { 3203 if (is_debug_active_) {
3204 isolate_->debug()->OnAsyncTaskEvent( 3204 isolate_->debug()->OnAsyncTaskEvent(debug::WillHandle, id_,
3205 isolate_->factory()->will_handle_string(), id_, 3205 Handle<String>::cast(name_));
3206 Handle<String>::cast(name_));
3207 } 3206 }
3208 } 3207 }
3209 3208
3210 ~PromiseDebugEventScope() { 3209 ~PromiseDebugEventScope() {
3211 if (is_debug_active_) { 3210 if (is_debug_active_) {
3212 isolate_->debug()->OnAsyncTaskEvent( 3211 isolate_->debug()->OnAsyncTaskEvent(debug::DidHandle, id_,
3213 isolate_->factory()->did_handle_string(), id_, 3212 Handle<String>::cast(name_));
3214 Handle<String>::cast(name_));
3215 } 3213 }
3216 } 3214 }
3217 3215
3218 private: 3216 private:
3219 Isolate* isolate_; 3217 Isolate* isolate_;
3220 Handle<Object> id_; 3218 Handle<Object> id_;
3221 Handle<Object> name_; 3219 Handle<Object> name_;
3222 bool is_debug_active_; 3220 bool is_debug_active_;
3223 }; 3221 };
3224 } // namespace 3222 } // namespace
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
3568 // Then check whether this scope intercepts. 3566 // Then check whether this scope intercepts.
3569 if ((flag & intercept_mask_)) { 3567 if ((flag & intercept_mask_)) {
3570 intercepted_flags_ |= flag; 3568 intercepted_flags_ |= flag;
3571 return true; 3569 return true;
3572 } 3570 }
3573 return false; 3571 return false;
3574 } 3572 }
3575 3573
3576 } // namespace internal 3574 } // namespace internal
3577 } // namespace v8 3575 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698