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

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

Issue 2592893003: [inspector] migrate AsycEvent to tupple (Closed)
Patch Set: 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 | « src/api.cc ('k') | src/debug/debug-interface.h » ('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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 1839
1840 void Debug::OnAsyncTaskEvent(debug::AsyncTaskEventType type, Handle<Object> id, 1840 void Debug::OnAsyncTaskEvent(debug::AsyncTaskEventType type, Handle<Object> id,
1841 Handle<String> name) { 1841 Handle<String> name) {
1842 DCHECK(id->IsNumber()); 1842 DCHECK(id->IsNumber());
1843 if (in_debug_scope() || ignore_events()) return; 1843 if (in_debug_scope() || ignore_events()) return;
1844 1844
1845 HandleScope scope(isolate_); 1845 HandleScope scope(isolate_);
1846 DebugScope debug_scope(this); 1846 DebugScope debug_scope(this);
1847 if (debug_scope.failed()) return; 1847 if (debug_scope.failed()) return;
1848 1848
1849 Handle<Smi> type_smi(Smi::FromInt(type), isolate_);
1850 if (event_listener_.is_null()) {
1851 ProcessDebugEvent(v8::AsyncTaskEvent,
1852 Handle<JSObject>::cast(
1853 isolate_->factory()->NewTuple3(type_smi, id, name)),
1854 true);
1855 return;
1856 }
1857
1849 // Create the script collected state object. 1858 // Create the script collected state object.
1850 Handle<Object> event_data; 1859 Handle<Object> event_data;
1851 // Bail out and don't call debugger if exception. 1860 // Bail out and don't call debugger if exception.
1852 Handle<Smi> type_smi(Smi::FromInt(type), isolate_);
1853 if (!MakeAsyncTaskEvent(type_smi, id, name).ToHandle(&event_data)) return; 1861 if (!MakeAsyncTaskEvent(type_smi, id, name).ToHandle(&event_data)) return;
1854 1862
1855 // Process debug event. 1863 // Process debug event.
1856 ProcessDebugEvent(v8::AsyncTaskEvent, Handle<JSObject>::cast(event_data), 1864 ProcessDebugEvent(v8::AsyncTaskEvent, Handle<JSObject>::cast(event_data),
1857 true); 1865 true);
1858 } 1866 }
1859 1867
1860 void Debug::ProcessDebugEvent(v8::DebugEvent event, Handle<JSObject> event_data, 1868 void Debug::ProcessDebugEvent(v8::DebugEvent event, Handle<JSObject> event_data,
1861 bool auto_continue) { 1869 bool auto_continue) {
1862 HandleScope scope(isolate_); 1870 HandleScope scope(isolate_);
(...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after
2553 logger_->DebugEvent("Put", message.text()); 2561 logger_->DebugEvent("Put", message.text());
2554 } 2562 }
2555 2563
2556 void LockingCommandMessageQueue::Clear() { 2564 void LockingCommandMessageQueue::Clear() {
2557 base::LockGuard<base::Mutex> lock_guard(&mutex_); 2565 base::LockGuard<base::Mutex> lock_guard(&mutex_);
2558 queue_.Clear(); 2566 queue_.Clear();
2559 } 2567 }
2560 2568
2561 } // namespace internal 2569 } // namespace internal
2562 } // namespace v8 2570 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/debug/debug-interface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698