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

Unified Diff: src/debug-delay.js

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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.cc ('k') | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug-delay.js
===================================================================
--- src/debug-delay.js (revision 1198)
+++ src/debug-delay.js (working copy)
@@ -363,15 +363,13 @@
}
-Debug.addListener = function(listener, opt_data) {
- if (!IS_FUNCTION(listener)) throw new Error('Parameters have wrong types.');
- %AddDebugEventListener(listener, opt_data);
+Debug.setListener = function(listener, opt_data) {
+ if (!IS_FUNCTION(listener) && !IS_UNDEFINED(listener) && !IS_NULL(listener)) {
+ throw new Error('Parameters have wrong types.');
+ }
+ %SetDebugEventListener(listener, opt_data);
};
-Debug.removeListener = function(listener) {
- if (!IS_FUNCTION(listener)) throw new Error('Parameters have wrong types.');
- %RemoveDebugEventListener(listener);
-};
Debug.breakExecution = function(f) {
%Break();
« no previous file with comments | « src/debug.cc ('k') | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698