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

Side by Side Diff: Source/devtools/front_end/utilities.js

Issue 135973010: Revert of DevTools: Fix console.log for arrays in some corner cases. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 10 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 | « Source/devtools/front_end/ConsoleMessage.js ('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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2012 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 return chunkb.length - chunka.length; 280 return chunkb.length - chunka.length;
281 } 281 }
282 } else if (chunka !== chunkb) 282 } else if (chunka !== chunkb)
283 return (chunka < chunkb) ? -1 : 1; 283 return (chunka < chunkb) ? -1 : 1;
284 a = a.substring(chunka.length); 284 a = a.substring(chunka.length);
285 b = b.substring(chunkb.length); 285 b = b.substring(chunkb.length);
286 } 286 }
287 } 287 }
288 288
289 /** 289 /**
290 * @param {string} name
291 * @param {number=} arrayLength
292 * @return {boolean}
293 */
294 String.isArrayIndexPropertyName = function(name, arrayLength)
295 {
296 // Array index check according to the ES5-15.4.
297 var index = name >>> 0;
298 return String(index) === name && index !== 0xffffffff && (typeof arrayLength === "undefined" || index < arrayLength);
299 }
300
301 /**
302 * @param {number} num 290 * @param {number} num
303 * @param {number} min 291 * @param {number} min
304 * @param {number} max 292 * @param {number} max
305 * @return {number} 293 * @return {number}
306 */ 294 */
307 Number.constrain = function(num, min, max) 295 Number.constrain = function(num, min, max)
308 { 296 {
309 if (num < min) 297 if (num < min)
310 num = min; 298 num = min;
311 else if (num > max) 299 else if (num > max)
(...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1515 this._outgoingCallback(); 1503 this._outgoingCallback();
1516 } 1504 }
1517 } 1505 }
1518 1506
1519 /** 1507 /**
1520 * @param {*} value 1508 * @param {*} value
1521 */ 1509 */
1522 function suppressUnused(value) 1510 function suppressUnused(value)
1523 { 1511 {
1524 } 1512 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ConsoleMessage.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698