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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/SourceMap.js

Issue 2222713004: [devtools] _parseMap in SourceMap.js does not strictly follow specs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: [devtools] _parseMap in SourceMap.js does not strictly follow specs Created 4 years, 3 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 | « third_party/WebKit/LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/compiler-script-mapping-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698