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

Side by Side Diff: test/mjsunit/debug-evaluate.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, 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
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 // Indicate that all was processed. 89 // Indicate that all was processed.
90 listenerComplete = true; 90 listenerComplete = true;
91 } 91 }
92 } catch (e) { 92 } catch (e) {
93 exception = e 93 exception = e
94 }; 94 };
95 }; 95 };
96 96
97 // Add the debug event listener. 97 // Add the debug event listener.
98 Debug.addListener(listener); 98 Debug.setListener(listener);
99 99
100 function f() { 100 function f() {
101 var a = 3; 101 var a = 3;
102 }; 102 };
103 103
104 function g() { 104 function g() {
105 var a = 2; 105 var a = 2;
106 f(); 106 f();
107 }; 107 };
108 108
109 a = 1; 109 a = 1;
110 110
111 // Set a break point at return in f and invoke g to hit the breakpoint. 111 // Set a break point at return in f and invoke g to hit the breakpoint.
112 Debug.setBreakPoint(f, 2, 0); 112 Debug.setBreakPoint(f, 2, 0);
113 g(); 113 g();
114 114
115 // Make sure that the debug event listener vas invoked. 115 // Make sure that the debug event listener vas invoked.
116 assertTrue(listenerComplete, "listener did not run to completion"); 116 assertTrue(listenerComplete, "listener did not run to completion");
117 assertFalse(exception, "exception in listener") 117 assertFalse(exception, "exception in listener")
OLDNEW
« no previous file with comments | « test/mjsunit/debug-enable-disable-breakpoints.js ('k') | test/mjsunit/debug-evaluate-arguments.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698