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

Side by Side Diff: src/debug/debug.cc

Issue 2648353006: [inspector] ignores debugger; in blackboxed code (Closed)
Patch Set: added a comment Created 3 years, 10 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 | « no previous file | test/inspector/debugger/framework-break-expected.txt » ('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/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2130 // Ignore debug break if debugger is not active. 2130 // Ignore debug break if debugger is not active.
2131 if (!is_active()) return; 2131 if (!is_active()) return;
2132 2132
2133 StackLimitCheck check(isolate_); 2133 StackLimitCheck check(isolate_);
2134 if (check.HasOverflowed()) return; 2134 if (check.HasOverflowed()) return;
2135 2135
2136 { JavaScriptFrameIterator it(isolate_); 2136 { JavaScriptFrameIterator it(isolate_);
2137 DCHECK(!it.done()); 2137 DCHECK(!it.done());
2138 Object* fun = it.frame()->function(); 2138 Object* fun = it.frame()->function();
2139 if (fun && fun->IsJSFunction()) { 2139 if (fun && fun->IsJSFunction()) {
2140 // Don't stop in builtin functions. 2140 // Don't stop in builtin and blackboxed functions.
2141 if (!JSFunction::cast(fun)->shared()->IsSubjectToDebugging()) return; 2141 if (!JSFunction::cast(fun)->shared()->IsSubjectToDebugging() ||
2142 if (isolate_->stack_guard()->CheckDebugBreak() &&
2143 IsBlackboxed(JSFunction::cast(fun)->shared())) { 2142 IsBlackboxed(JSFunction::cast(fun)->shared())) {
2143 // Inspector uses pause on next statement for asynchronous breakpoints.
2144 // When breakpoint is fired we try to break on first not blackboxed
2145 // statement. To achieve this goal we need to deoptimize current
2146 // function and don't clear requested DebugBreak even if it's blackboxed
2147 // to be able to break on not blackboxed function call.
2148 // TODO(yangguo): introduce break_on_function_entry since current
2149 // implementation is slow.
2144 Deoptimizer::DeoptimizeFunction(JSFunction::cast(fun)); 2150 Deoptimizer::DeoptimizeFunction(JSFunction::cast(fun));
2145 return; 2151 return;
2146 } 2152 }
2147 JSGlobalObject* global = 2153 JSGlobalObject* global =
2148 JSFunction::cast(fun)->context()->global_object(); 2154 JSFunction::cast(fun)->context()->global_object();
2149 // Don't stop in debugger functions. 2155 // Don't stop in debugger functions.
2150 if (IsDebugGlobal(global)) return; 2156 if (IsDebugGlobal(global)) return;
2151 // Don't stop if the break location is muted. 2157 // Don't stop if the break location is muted.
2152 if (IsMutedAtCurrentLocation(it.frame())) return; 2158 if (IsMutedAtCurrentLocation(it.frame())) return;
2153 } 2159 }
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
2334 return v8::Utils::ToLocal(callback_data_); 2340 return v8::Utils::ToLocal(callback_data_);
2335 } 2341 }
2336 2342
2337 2343
2338 v8::Isolate* EventDetailsImpl::GetIsolate() const { 2344 v8::Isolate* EventDetailsImpl::GetIsolate() const {
2339 return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate()); 2345 return reinterpret_cast<v8::Isolate*>(exec_state_->GetIsolate());
2340 } 2346 }
2341 2347
2342 } // namespace internal 2348 } // namespace internal
2343 } // namespace v8 2349 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/inspector/debugger/framework-break-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698