OLD | NEW |
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 Loading... |
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 Loading... |
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 } |
OLD | NEW |