| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 continue; | 450 continue; |
| 451 } | 451 } |
| 452 | 452 |
| 453 var sourceIndexDelta = this._decodeVLQ(stringCharIterator); | 453 var sourceIndexDelta = this._decodeVLQ(stringCharIterator); |
| 454 if (sourceIndexDelta) { | 454 if (sourceIndexDelta) { |
| 455 sourceIndex += sourceIndexDelta; | 455 sourceIndex += sourceIndexDelta; |
| 456 sourceURL = sources[sourceIndex]; | 456 sourceURL = sources[sourceIndex]; |
| 457 } | 457 } |
| 458 sourceLineNumber += this._decodeVLQ(stringCharIterator); | 458 sourceLineNumber += this._decodeVLQ(stringCharIterator); |
| 459 sourceColumnNumber += this._decodeVLQ(stringCharIterator); | 459 sourceColumnNumber += this._decodeVLQ(stringCharIterator); |
| 460 if (!this._isSeparator(stringCharIterator.peek())) | |
| 461 nameIndex += this._decodeVLQ(stringCharIterator); | |
| 462 | 460 |
| 461 if (!stringCharIterator.hasNext() || this._isSeparator(stringCharIte
rator.peek())) { |
| 462 this._mappings.push(new WebInspector.SourceMapEntry(lineNumber,
columnNumber, sourceURL, sourceLineNumber, sourceColumnNumber)); |
| 463 continue; |
| 464 } |
| 465 |
| 466 nameIndex += this._decodeVLQ(stringCharIterator); |
| 463 this._mappings.push(new WebInspector.SourceMapEntry(lineNumber, colu
mnNumber, sourceURL, sourceLineNumber, sourceColumnNumber, names[nameIndex])); | 467 this._mappings.push(new WebInspector.SourceMapEntry(lineNumber, colu
mnNumber, sourceURL, sourceLineNumber, sourceColumnNumber, names[nameIndex])); |
| 464 } | 468 } |
| 465 | 469 |
| 466 for (var i = 0; i < this._mappings.length; ++i) { | 470 for (var i = 0; i < this._mappings.length; ++i) { |
| 467 var mapping = this._mappings[i]; | 471 var mapping = this._mappings[i]; |
| 468 var url = mapping.sourceURL; | 472 var url = mapping.sourceURL; |
| 469 if (!url) | 473 if (!url) |
| 470 continue; | 474 continue; |
| 471 if (!this._reverseMappingsBySourceURL.has(url)) | 475 if (!this._reverseMappingsBySourceURL.has(url)) |
| 472 this._reverseMappingsBySourceURL.set(url, []); | 476 this._reverseMappingsBySourceURL.set(url, []); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 567 }, | 571 }, |
| 568 | 572 |
| 569 /** | 573 /** |
| 570 * @return {boolean} | 574 * @return {boolean} |
| 571 */ | 575 */ |
| 572 hasNext: function() | 576 hasNext: function() |
| 573 { | 577 { |
| 574 return this._position < this._string.length; | 578 return this._position < this._string.length; |
| 575 } | 579 } |
| 576 } | 580 } |
| OLD | NEW |