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

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

Issue 2623313005: [inspector] introduced debug::SetAsyncTaskListener (Closed)
Patch Set: added missing header Created 3 years, 11 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 | « src/api.cc ('k') | src/debug/debug.cc » ('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 #ifndef V8_DEBUG_DEBUG_H_ 5 #ifndef V8_DEBUG_DEBUG_H_
6 #define V8_DEBUG_DEBUG_H_ 6 #define V8_DEBUG_DEBUG_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
459 void ClearStepOut(); 459 void ClearStepOut();
460 460
461 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared); 461 bool PrepareFunctionForBreakPoints(Handle<SharedFunctionInfo> shared);
462 bool GetPossibleBreakpoints(Handle<Script> script, int start_position, 462 bool GetPossibleBreakpoints(Handle<Script> script, int start_position,
463 int end_position, std::set<int>* positions); 463 int end_position, std::set<int>* positions);
464 464
465 void RecordGenerator(Handle<JSGeneratorObject> generator_object); 465 void RecordGenerator(Handle<JSGeneratorObject> generator_object);
466 466
467 int NextAsyncTaskId(Handle<JSObject> promise); 467 int NextAsyncTaskId(Handle<JSObject> promise);
468 468
469 void SetAsyncTaskListener(debug::AsyncTaskListener listener, void* data);
470
469 // Returns whether the operation succeeded. Compilation can only be triggered 471 // Returns whether the operation succeeded. Compilation can only be triggered
470 // if a valid closure is passed as the second argument, otherwise the shared 472 // if a valid closure is passed as the second argument, otherwise the shared
471 // function needs to be compiled already. 473 // function needs to be compiled already.
472 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared, 474 bool EnsureDebugInfo(Handle<SharedFunctionInfo> shared,
473 Handle<JSFunction> function); 475 Handle<JSFunction> function);
474 void CreateDebugInfo(Handle<SharedFunctionInfo> shared); 476 void CreateDebugInfo(Handle<SharedFunctionInfo> shared);
475 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared); 477 static Handle<DebugInfo> GetDebugInfo(Handle<SharedFunctionInfo> shared);
476 478
477 template <typename C> 479 template <typename C>
478 bool CompileToRevealInnerFunctions(C* compilable); 480 bool CompileToRevealInnerFunctions(C* compilable);
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 656
655 void PrintBreakLocation(); 657 void PrintBreakLocation();
656 658
657 // Global handles. 659 // Global handles.
658 Handle<Context> debug_context_; 660 Handle<Context> debug_context_;
659 Handle<Object> event_listener_; 661 Handle<Object> event_listener_;
660 Handle<Object> event_listener_data_; 662 Handle<Object> event_listener_data_;
661 663
662 v8::Debug::MessageHandler message_handler_; 664 v8::Debug::MessageHandler message_handler_;
663 665
666 debug::AsyncTaskListener async_task_listener_ = nullptr;
667 void* async_task_listener_data_ = nullptr;
668
664 static const int kQueueInitialSize = 4; 669 static const int kQueueInitialSize = 4;
665 base::Semaphore command_received_; // Signaled for each command received. 670 base::Semaphore command_received_; // Signaled for each command received.
666 LockingCommandMessageQueue command_queue_; 671 LockingCommandMessageQueue command_queue_;
667 672
668 // Debugger is active, i.e. there is a debug event listener attached. 673 // Debugger is active, i.e. there is a debug event listener attached.
669 bool is_active_; 674 bool is_active_;
670 // Debugger needs to be notified on every new function call. 675 // Debugger needs to be notified on every new function call.
671 // Used for stepping and read-only checks 676 // Used for stepping and read-only checks
672 bool hook_on_function_call_; 677 bool hook_on_function_call_;
673 // Suppress debug events. 678 // Suppress debug events.
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 Handle<Code> code); 869 Handle<Code> code);
865 static bool DebugBreakSlotIsPatched(Address pc); 870 static bool DebugBreakSlotIsPatched(Address pc);
866 static void ClearDebugBreakSlot(Isolate* isolate, Address pc); 871 static void ClearDebugBreakSlot(Isolate* isolate, Address pc);
867 }; 872 };
868 873
869 874
870 } // namespace internal 875 } // namespace internal
871 } // namespace v8 876 } // namespace v8
872 877
873 #endif // V8_DEBUG_DEBUG_H_ 878 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698