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

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

Issue 364853002: DevTools: Fix the way source map treats single field segment in the very end of mappings. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 while (stringCharIterator.peek() === ";") { 262 while (stringCharIterator.peek() === ";") {
263 lineNumber += 1; 263 lineNumber += 1;
264 columnNumber = 0; 264 columnNumber = 0;
265 stringCharIterator.next(); 265 stringCharIterator.next();
266 } 266 }
267 if (!stringCharIterator.hasNext()) 267 if (!stringCharIterator.hasNext())
268 break; 268 break;
269 } 269 }
270 270
271 columnNumber += this._decodeVLQ(stringCharIterator); 271 columnNumber += this._decodeVLQ(stringCharIterator);
272 if (this._isSeparator(stringCharIterator.peek())) { 272 if (!stringCharIterator.hasNext() || this._isSeparator(stringCharIte rator.peek())) {
273 this._mappings.push([lineNumber, columnNumber]); 273 this._mappings.push([lineNumber, columnNumber]);
274 continue; 274 continue;
275 } 275 }
276 276
277 var sourceIndexDelta = this._decodeVLQ(stringCharIterator); 277 var sourceIndexDelta = this._decodeVLQ(stringCharIterator);
278 if (sourceIndexDelta) { 278 if (sourceIndexDelta) {
279 sourceIndex += sourceIndexDelta; 279 sourceIndex += sourceIndexDelta;
280 sourceURL = sources[sourceIndex]; 280 sourceURL = sources[sourceIndex];
281 } 281 }
282 sourceLineNumber += this._decodeVLQ(stringCharIterator); 282 sourceLineNumber += this._decodeVLQ(stringCharIterator);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 }, 364 },
365 365
366 /** 366 /**
367 * @return {boolean} 367 * @return {boolean}
368 */ 368 */
369 hasNext: function() 369 hasNext: function()
370 { 370 {
371 return this._position < this._string.length; 371 return this._position < this._string.length;
372 } 372 }
373 } 373 }
OLDNEW
« no previous file with comments | « 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