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

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

Issue 2781923002: [WIP] DevTools: user SourceMapManager in Debugger (Closed)
Patch Set: works great Created 3 years, 8 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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after
1206 /** 1206 /**
1207 * @return {number} 1207 * @return {number}
1208 */ 1208 */
1209 get size() { 1209 get size() {
1210 return this._map.size; 1210 return this._map.size;
1211 }, 1211 },
1212 1212
1213 /** 1213 /**
1214 * @param {K} key 1214 * @param {K} key
1215 * @param {V} value 1215 * @param {V} value
1216 * @return {boolean}
1216 */ 1217 */
1217 remove: function(key, value) { 1218 remove: function(key, value) {
1218 var values = this.get(key); 1219 var values = this.get(key);
1219 values.delete(value); 1220 var result = values.delete(value);
1220 if (!values.size) 1221 if (!values.size)
1221 this._map.delete(key); 1222 this._map.delete(key);
1223 return result;
1222 }, 1224 },
1223 1225
1224 /** 1226 /**
1225 * @param {K} key 1227 * @param {K} key
1226 */ 1228 */
1227 removeAll: function(key) { 1229 removeAll: function(key) {
1228 this._map.delete(key); 1230 this._map.delete(key);
1229 }, 1231 },
1230 1232
1231 /** 1233 /**
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
1435 function windowLoaded() { 1437 function windowLoaded() {
1436 self.removeEventListener('DOMContentLoaded', windowLoaded, false); 1438 self.removeEventListener('DOMContentLoaded', windowLoaded, false);
1437 callback(); 1439 callback();
1438 } 1440 }
1439 1441
1440 if (document.readyState === 'complete' || document.readyState === 'interactive ') 1442 if (document.readyState === 'complete' || document.readyState === 'interactive ')
1441 callback(); 1443 callback();
1442 else 1444 else
1443 self.addEventListener('DOMContentLoaded', windowLoaded, false); 1445 self.addEventListener('DOMContentLoaded', windowLoaded, false);
1444 } 1446 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698