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

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

Issue 546125: A brutal approach to V8 script liveedit (Closed)
Patch Set: merge Created 10 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
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/debug-liveedit-2.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Flags: --expose-debug-as debug
2 // Get the Debug object exposed from the debug context global object.
3
4 Debug = debug.Debug
5
6 eval("var something1 = 25; "
7 + " function ChooseAnimal() { return 'Cat'; } "
8 + " ChooseAnimal.Helper = function() { return 'Help!'; }");
9
10 assertEquals("Cat", ChooseAnimal());
11
12 var script = Debug.findScript(ChooseAnimal);
13
14 var orig_animal = "Cat";
15 var patch_pos = script.source.indexOf(orig_animal);
16 var new_animal_patch = "Cap' + 'y' + 'bara";
17
18 Debug.change_script_live(script, patch_pos, orig_animal.length, new_animal_patch );
19
20 assertEquals("Capybara", ChooseAnimal());
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | test/mjsunit/debug-liveedit-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698