Chromium Code Reviews| 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; |
| } |