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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/platform/utilities.js

Issue 1774503005: [DevTools] Roll closure compiler to ToT version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 /** 1263 /**
1264 * @return {!Array.<T>} 1264 * @return {!Array.<T>}
1265 * @template T 1265 * @template T
1266 */ 1266 */
1267 Set.prototype.valuesArray = function() 1267 Set.prototype.valuesArray = function()
1268 { 1268 {
1269 return Array.from(this.values()); 1269 return Array.from(this.values());
1270 } 1270 }
1271 1271
1272 /** 1272 /**
1273 * @param {!Iterable<T>} iterable 1273 * @param {!Iterable<T>|!Array<!T>} iterable
1274 * @template T 1274 * @template T
1275 */ 1275 */
1276 Set.prototype.addAll = function(iterable) 1276 Set.prototype.addAll = function(iterable)
1277 { 1277 {
1278 for (var e of iterable) 1278 for (var e of iterable)
1279 this.add(e); 1279 this.add(e);
1280 } 1280 }
1281 1281
1282 /** 1282 /**
1283 * @return {T} 1283 * @return {T}
1284 * @template T 1284 * @template T
1285 */ 1285 */
1286 Map.prototype.remove = function(key) 1286 Map.prototype.remove = function(key)
1287 { 1287 {
1288 var value = this.get(key); 1288 var value = this.get(key);
1289 this.delete(key); 1289 this.delete(key);
1290 return value; 1290 return value;
1291 } 1291 }
1292 1292
1293 /** 1293 /**
1294 * @return {!Array.<V>} 1294 * @return {!Array<!VALUE>}
1295 * @template K, V
1296 * @this {Map.<K, V>}
1297 */ 1295 */
1298 Map.prototype.valuesArray = function() 1296 Map.prototype.valuesArray = function()
1299 { 1297 {
1300 return Array.from(this.values()); 1298 return Array.from(this.values());
1301 } 1299 }
1302 1300
1303 /** 1301 /**
1304 * @return {!Array<K>} 1302 * @return {!Array<!KEY>}
1305 * @template K, V
1306 * @this {Map<K, V>}
1307 */ 1303 */
1308 Map.prototype.keysArray = function() 1304 Map.prototype.keysArray = function()
1309 { 1305 {
1310 return Array.from(this.keys()); 1306 return Array.from(this.keys());
1311 } 1307 }
1312 1308
1313 /** 1309 /**
1314 * @constructor 1310 * @constructor
1315 * @template K, V 1311 * @template K, V
1316 */ 1312 */
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
1649 _tryMerge: function(first, second) 1645 _tryMerge: function(first, second)
1650 { 1646 {
1651 var merged = this._mergeCallback && this._mergeCallback(first, second); 1647 var merged = this._mergeCallback && this._mergeCallback(first, second);
1652 if (!merged) 1648 if (!merged)
1653 return null; 1649 return null;
1654 merged.begin = first.begin; 1650 merged.begin = first.begin;
1655 merged.end = Math.max(first.end, second.end); 1651 merged.end = Math.max(first.end, second.end);
1656 return merged; 1652 return merged;
1657 } 1653 }
1658 } 1654 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698