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

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

Issue 1303003: Support setting brekpoint by script name set in //@ scriptURL= comment,... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: '' 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 | 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 } 320 }
321 }; 321 };
322 322
323 323
324 // Check whether a script matches this script break point. Currently this is 324 // Check whether a script matches this script break point. Currently this is
325 // only based on script name. 325 // only based on script name.
326 ScriptBreakPoint.prototype.matchesScript = function(script) { 326 ScriptBreakPoint.prototype.matchesScript = function(script) {
327 if (this.type_ == Debug.ScriptBreakPointType.ScriptId) { 327 if (this.type_ == Debug.ScriptBreakPointType.ScriptId) {
328 return this.script_id_ == script.id; 328 return this.script_id_ == script.id;
329 } else { // this.type_ == Debug.ScriptBreakPointType.ScriptName 329 } else { // this.type_ == Debug.ScriptBreakPointType.ScriptName
330 return this.script_name_ == script.name && 330 return this.script_name_ == script.nameOrSourceURL() &&
331 script.line_offset <= this.line_ && 331 script.line_offset <= this.line_ &&
332 this.line_ < script.line_offset + script.lineCount(); 332 this.line_ < script.line_offset + script.lineCount();
333 } 333 }
334 }; 334 };
335 335
336 336
337 // Set the script break point in a script. 337 // Set the script break point in a script.
338 ScriptBreakPoint.prototype.set = function (script) { 338 ScriptBreakPoint.prototype.set = function (script) {
339 var column = this.column(); 339 var column = this.column();
340 var line = this.line(); 340 var line = this.line();
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2123 case 'string': 2123 case 'string':
2124 case 'number': 2124 case 'number':
2125 json = value; 2125 json = value;
2126 break 2126 break
2127 2127
2128 default: 2128 default:
2129 json = null; 2129 json = null;
2130 } 2130 }
2131 return json; 2131 return json;
2132 } 2132 }
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