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

Side by Side Diff: src/debug.h

Issue 19753: Changed the debugger API to allow only one debug event listener to be registe... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/d8.cc ('k') | src/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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 Handle<Object> script_function, 365 Handle<Object> script_function,
366 bool* caught_exception); 366 bool* caught_exception);
367 static void OnDebugBreak(Handle<Object> break_points_hit); 367 static void OnDebugBreak(Handle<Object> break_points_hit);
368 static void OnException(Handle<Object> exception, bool uncaught); 368 static void OnException(Handle<Object> exception, bool uncaught);
369 static void OnBeforeCompile(Handle<Script> script); 369 static void OnBeforeCompile(Handle<Script> script);
370 static void OnAfterCompile(Handle<Script> script, 370 static void OnAfterCompile(Handle<Script> script,
371 Handle<JSFunction> fun); 371 Handle<JSFunction> fun);
372 static void OnNewFunction(Handle<JSFunction> fun); 372 static void OnNewFunction(Handle<JSFunction> fun);
373 static void ProcessDebugEvent(v8::DebugEvent event, 373 static void ProcessDebugEvent(v8::DebugEvent event,
374 Handle<Object> event_data); 374 Handle<Object> event_data);
375 static void SetEventListener(Handle<Object> callback, Handle<Object> data);
375 static void SetMessageHandler(v8::DebugMessageHandler handler, void* data); 376 static void SetMessageHandler(v8::DebugMessageHandler handler, void* data);
376 static void SendMessage(Vector<uint16_t> message); 377 static void SendMessage(Vector<uint16_t> message);
377 static void ProcessCommand(Vector<const uint16_t> command); 378 static void ProcessCommand(Vector<const uint16_t> command);
378 static void UpdateActiveDebugger(); 379 static void UpdateActiveDebugger();
379 static Handle<Object> Call(Handle<JSFunction> fun, 380 static Handle<Object> Call(Handle<JSFunction> fun,
380 Handle<Object> data, 381 Handle<Object> data,
381 bool* pending_exception); 382 bool* pending_exception);
382 383
383 inline static bool EventActive(v8::DebugEvent event) { 384 inline static bool EventActive(v8::DebugEvent event) {
384 // Currently argument event is not used. 385 // Currently argument event is not used.
385 return !Debugger::compiling_natives_ && Debugger::debugger_active_; 386 return !Debugger::compiling_natives_ && Debugger::debugger_active_;
386 } 387 }
387 388
388 static void set_debugger_active(bool debugger_active) { 389 static void set_debugger_active(bool debugger_active) {
389 Debugger::debugger_active_ = debugger_active; 390 Debugger::debugger_active_ = debugger_active;
390 } 391 }
391 static bool debugger_active() { return Debugger::debugger_active_; } 392 static bool debugger_active() { return Debugger::debugger_active_; }
392 static void set_compiling_natives(bool compiling_natives) { 393 static void set_compiling_natives(bool compiling_natives) {
393 Debugger::compiling_natives_ = compiling_natives; 394 Debugger::compiling_natives_ = compiling_natives;
394 } 395 }
395 static bool compiling_natives() { return Debugger::compiling_natives_; } 396 static bool compiling_natives() { return Debugger::compiling_natives_; }
396 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; } 397 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; }
397 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; } 398 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; }
398 399
399 private: 400 private:
401 static Handle<Object> event_listener_; // Global handle to listener
402 static Handle<Object> event_listener_data_;
400 static bool debugger_active_; // Are there any active debugger? 403 static bool debugger_active_; // Are there any active debugger?
401 static bool compiling_natives_; // Are we compiling natives? 404 static bool compiling_natives_; // Are we compiling natives?
402 static bool is_loading_debugger_; // Are we loading the debugger? 405 static bool is_loading_debugger_; // Are we loading the debugger?
403 static DebugMessageThread* message_thread_; 406 static DebugMessageThread* message_thread_;
404 static v8::DebugMessageHandler debug_message_handler_; 407 static v8::DebugMessageHandler debug_message_handler_;
405 static void* debug_message_handler_data_; 408 static void* debug_message_handler_data_;
406 }; 409 };
407 410
408 411
409 // A Queue of Vector<uint16_t> objects. A thread-safe version is 412 // A Queue of Vector<uint16_t> objects. A thread-safe version is
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 } 597 }
595 private: 598 private:
596 Debug::AddressId id_; 599 Debug::AddressId id_;
597 int reg_; 600 int reg_;
598 }; 601 };
599 602
600 603
601 } } // namespace v8::internal 604 } } // namespace v8::internal
602 605
603 #endif // V8_V8_DEBUG_H_ 606 #endif // V8_V8_DEBUG_H_
OLDNEW
« no previous file with comments | « src/d8.cc ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698