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

Side by Side Diff: test/mjsunit/debug-liveedit-check-stack.js

Issue 1697016: LiveEdit: clean JS sources a bit (Closed)
Patch Set: tab Created 10 years, 8 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 | « test/mjsunit/debug-liveedit-2.js ('k') | test/mjsunit/debug-liveedit-patch-positions.js » ('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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 var got_exception = false; 54 var got_exception = false;
55 var successfully_changed = false; 55 var successfully_changed = false;
56 56
57 // Should be called from Debug context. 57 // Should be called from Debug context.
58 this.ScriptChanger = function() { 58 this.ScriptChanger = function() {
59 assertEquals(false, successfully_changed, "applying patch second time"); 59 assertEquals(false, successfully_changed, "applying patch second time");
60 // Runs in debugger context. 60 // Runs in debugger context.
61 var change_log = new Array(); 61 var change_log = new Array();
62 try { 62 try {
63 Debug.LiveEdit.ApplyPatch(script, patch_pos, orig_animal.length, new_anima l_patch, change_log); 63 Debug.LiveEdit.TestApi.ApplySingleChunkPatch(script, patch_pos, orig_anima l.length, new_animal_patch, change_log);
64 } finally { 64 } finally {
65 print("Change log: " + JSON.stringify(change_log) + "\n"); 65 print("Change log: " + JSON.stringify(change_log) + "\n");
66 } 66 }
67 successfully_changed = true; 67 successfully_changed = true;
68 }; 68 };
69 } 69 }
70 70
71 function Noop() {} 71 function Noop() {}
72 72
73 function WrapInCatcher(f, holder) { 73 function WrapInCatcher(f, holder) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 133
134 test = new TestBase("Test with function on stack and with constructor frame"); 134 test = new TestBase("Test with function on stack and with constructor frame");
135 assertEquals("Capybara", test.ChooseAnimal(WrapInConstructor(WrapInDebuggerCall( WrapInRestartProof(test.ScriptChanger))))); 135 assertEquals("Capybara", test.ChooseAnimal(WrapInConstructor(WrapInDebuggerCall( WrapInRestartProof(test.ScriptChanger)))));
136 136
137 test = new TestBase("Test with C++ frame above ChooseAnimal frame"); 137 test = new TestBase("Test with C++ frame above ChooseAnimal frame");
138 exception_holder = {}; 138 exception_holder = {};
139 assertEquals("Cat", test.ChooseAnimal(WrapInNativeCall(WrapInDebuggerCall(WrapIn Catcher(test.ScriptChanger, exception_holder))))); 139 assertEquals("Cat", test.ChooseAnimal(WrapInNativeCall(WrapInDebuggerCall(WrapIn Catcher(test.ScriptChanger, exception_holder)))));
140 assertTrue(!!exception_holder[0]); 140 assertTrue(!!exception_holder[0]);
141 141
OLDNEW
« no previous file with comments | « test/mjsunit/debug-liveedit-2.js ('k') | test/mjsunit/debug-liveedit-patch-positions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698