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

Unified Diff: src/debug/debug.cc

Issue 1321543004: [futex] Allow debugger to break in the middle of a futexWait Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | test/cctest/test-debug.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index 99036d71e7e7c6df559e192591ff1d36598e35ef..50b7afc4131d90632e576aeb2b7254e1162e3773 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -2276,9 +2276,17 @@ void Debug::HandleDebugBreak() {
DCHECK(!it.done());
Object* fun = it.frame()->function();
if (fun && fun->IsJSFunction()) {
+ HandleScope scope(isolate_);
// Don't stop in builtin functions.
- if (!JSFunction::cast(fun)->IsSubjectToDebugging()) return;
- GlobalObject* global = JSFunction::cast(fun)->context()->global_object();
+ Handle<JSFunction> jsfun(JSFunction::cast(fun));
Yang 2015/08/27 06:27:25 I think it might be cleaner to just pass in an opt
binji 2015/08/31 21:25:18 Done.
+ if (!jsfun->IsSubjectToDebugging()) {
+ // Make an exception for futexWait.
+ Handle<String> name(String::cast(jsfun->shared()->name()));
+ if (!String::Equals(name, isolate_->factory()->futexWait_string())) {
+ return;
+ }
+ }
+ GlobalObject* global = jsfun->context()->global_object();
// Don't stop in debugger functions.
if (IsDebugGlobal(global)) return;
}
« no previous file with comments | « no previous file | src/heap/heap.h » ('j') | test/cctest/test-debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698