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

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

Issue 2530093002: [debug] do not retroactively apply script break points. (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | src/debug/debug.js » ('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 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after
1868 script->type() != i::Script::TYPE_WASM) { 1868 script->type() != i::Script::TYPE_WASM) {
1869 return; 1869 return;
1870 } 1870 }
1871 SuppressDebug while_processing(this); 1871 SuppressDebug while_processing(this);
1872 1872
1873 bool in_nested_debug_scope = in_debug_scope(); 1873 bool in_nested_debug_scope = in_debug_scope();
1874 HandleScope scope(isolate_); 1874 HandleScope scope(isolate_);
1875 DebugScope debug_scope(this); 1875 DebugScope debug_scope(this);
1876 if (debug_scope.failed()) return; 1876 if (debug_scope.failed()) return;
1877 1877
1878 if (event == v8::AfterCompile) {
1879 // If debugging there might be script break points registered for this
1880 // script. Make sure that these break points are set.
1881 Handle<Object> argv[] = {Script::GetWrapper(script)};
1882 if (CallFunction("UpdateScriptBreakPoints", arraysize(argv), argv)
1883 .is_null()) {
1884 return;
1885 }
1886 }
1887
1888 // Create the compile state object. 1878 // Create the compile state object.
1889 Handle<Object> event_data; 1879 Handle<Object> event_data;
1890 // Bail out and don't call debugger if exception. 1880 // Bail out and don't call debugger if exception.
1891 if (!MakeCompileEvent(script, event).ToHandle(&event_data)) return; 1881 if (!MakeCompileEvent(script, event).ToHandle(&event_data)) return;
1892 1882
1893 // Don't call NotifyMessageHandler if already in debug scope to avoid running 1883 // Don't call NotifyMessageHandler if already in debug scope to avoid running
1894 // nested command loop. 1884 // nested command loop.
1895 if (in_nested_debug_scope) { 1885 if (in_nested_debug_scope) {
1896 if (event_listener_.is_null()) return; 1886 if (event_listener_.is_null()) return;
1897 // Create the execution state. 1887 // Create the execution state.
(...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 logger_->DebugEvent("Put", message.text()); 2498 logger_->DebugEvent("Put", message.text());
2509 } 2499 }
2510 2500
2511 void LockingCommandMessageQueue::Clear() { 2501 void LockingCommandMessageQueue::Clear() {
2512 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2502 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2513 queue_.Clear(); 2503 queue_.Clear();
2514 } 2504 }
2515 2505
2516 } // namespace internal 2506 } // namespace internal
2517 } // namespace v8 2507 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698