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

Side by Side 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, 3 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 | src/heap/heap.h » ('j') | test/cctest/test-debug.cc » ('J')
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 "src/api.h" 7 #include "src/api.h"
8 #include "src/arguments.h" 8 #include "src/arguments.h"
9 #include "src/bootstrapper.h" 9 #include "src/bootstrapper.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2269 // Ignore debug break if debugger is not active. 2269 // Ignore debug break if debugger is not active.
2270 if (!is_active()) return; 2270 if (!is_active()) return;
2271 2271
2272 StackLimitCheck check(isolate_); 2272 StackLimitCheck check(isolate_);
2273 if (check.HasOverflowed()) return; 2273 if (check.HasOverflowed()) return;
2274 2274
2275 { JavaScriptFrameIterator it(isolate_); 2275 { JavaScriptFrameIterator it(isolate_);
2276 DCHECK(!it.done()); 2276 DCHECK(!it.done());
2277 Object* fun = it.frame()->function(); 2277 Object* fun = it.frame()->function();
2278 if (fun && fun->IsJSFunction()) { 2278 if (fun && fun->IsJSFunction()) {
2279 HandleScope scope(isolate_);
2279 // Don't stop in builtin functions. 2280 // Don't stop in builtin functions.
2280 if (!JSFunction::cast(fun)->IsSubjectToDebugging()) return; 2281 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.
2281 GlobalObject* global = JSFunction::cast(fun)->context()->global_object(); 2282 if (!jsfun->IsSubjectToDebugging()) {
2283 // Make an exception for futexWait.
2284 Handle<String> name(String::cast(jsfun->shared()->name()));
2285 if (!String::Equals(name, isolate_->factory()->futexWait_string())) {
2286 return;
2287 }
2288 }
2289 GlobalObject* global = jsfun->context()->global_object();
2282 // Don't stop in debugger functions. 2290 // Don't stop in debugger functions.
2283 if (IsDebugGlobal(global)) return; 2291 if (IsDebugGlobal(global)) return;
2284 } 2292 }
2285 } 2293 }
2286 2294
2287 // Collect the break state before clearing the flags. 2295 // Collect the break state before clearing the flags.
2288 bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() && 2296 bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() &&
2289 !isolate_->stack_guard()->CheckDebugBreak(); 2297 !isolate_->stack_guard()->CheckDebugBreak();
2290 2298
2291 isolate_->stack_guard()->ClearDebugBreak(); 2299 isolate_->stack_guard()->ClearDebugBreak();
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 } 2621 }
2614 2622
2615 2623
2616 void LockingCommandMessageQueue::Clear() { 2624 void LockingCommandMessageQueue::Clear() {
2617 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2625 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2618 queue_.Clear(); 2626 queue_.Clear();
2619 } 2627 }
2620 2628
2621 } // namespace internal 2629 } // namespace internal
2622 } // namespace v8 2630 } // namespace v8
OLDNEW
« 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