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

Side by Side Diff: src/debug-delay.js

Issue 43130: Fix the handling of line offset when getting the source line from a ScriptMirror (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 9 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 | « no previous file | src/messages.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 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 if (script.type == Debug.ScriptType.Native) { 514 if (script.type == Debug.ScriptType.Native) {
515 throw new Error('Cannot set break point in native code.'); 515 throw new Error('Cannot set break point in native code.');
516 } 516 }
517 // If the script for the function has a name convert this to a script break 517 // If the script for the function has a name convert this to a script break
518 // point. 518 // point.
519 if (script && script.id) { 519 if (script && script.id) {
520 // Adjust the source position to be script relative. 520 // Adjust the source position to be script relative.
521 source_position += %FunctionGetScriptSourcePosition(func); 521 source_position += %FunctionGetScriptSourcePosition(func);
522 // Find line and column for the position in the script and set a script 522 // Find line and column for the position in the script and set a script
523 // break point from that. 523 // break point from that.
524 var location = script.locationFromPosition(source_position); 524 var location = script.locationFromPosition(source_position, false);
525 return this.setScriptBreakPointById(script.id, 525 return this.setScriptBreakPointById(script.id,
526 location.line, location.column, 526 location.line, location.column,
527 opt_condition); 527 opt_condition);
528 } else { 528 } else {
529 // Set a break point directly on the function. 529 // Set a break point directly on the function.
530 var break_point = MakeBreakPoint(source_position, opt_line, opt_column); 530 var break_point = MakeBreakPoint(source_position, opt_line, opt_column);
531 %SetFunctionBreakPoint(func, source_position, break_point); 531 %SetFunctionBreakPoint(func, source_position, break_point);
532 break_point.setCondition(opt_condition); 532 break_point.setCondition(opt_condition);
533 return break_point.number(); 533 return break_point.number();
534 } 534 }
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1807 json += NumberToJSON_(elem); 1807 json += NumberToJSON_(elem);
1808 } else if (IS_STRING(elem)) { 1808 } else if (IS_STRING(elem)) {
1809 json += StringToJSON_(elem); 1809 json += StringToJSON_(elem);
1810 } else { 1810 } else {
1811 json += elem; 1811 json += elem;
1812 } 1812 }
1813 } 1813 }
1814 json += ']'; 1814 json += ']';
1815 return json; 1815 return json;
1816 } 1816 }
OLDNEW
« no previous file with comments | « no previous file | src/messages.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698