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

Side by Side Diff: Source/WebCore/inspector/front-end/utilities.js

Issue 12208136: Merge 142128 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 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
« no previous file with comments | « LayoutTests/inspector/map-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) 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 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 ++this._size; 698 ++this._size;
699 this._map[objectIdentifier] = [key, value]; 699 this._map[objectIdentifier] = [key, value];
700 }, 700 },
701 701
702 /** 702 /**
703 * @param {Object} key 703 * @param {Object} key
704 */ 704 */
705 remove: function(key) 705 remove: function(key)
706 { 706 {
707 var result = this._map[key.__identifier]; 707 var result = this._map[key.__identifier];
708 if (!result)
709 return undefined;
710 --this._size;
708 delete this._map[key.__identifier]; 711 delete this._map[key.__identifier];
709 --this._size; 712 return result[1];
710 return result ? result[1] : undefined;
711 }, 713 },
712 714
713 /** 715 /**
714 * @return {Array.<Object>} 716 * @return {Array.<Object>}
715 */ 717 */
716 keys: function() 718 keys: function()
717 { 719 {
718 return this._list(0); 720 return this._list(0);
719 }, 721 },
720 722
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 function importScript(scriptName) 855 function importScript(scriptName)
854 { 856 {
855 if (_importedScripts[scriptName]) 857 if (_importedScripts[scriptName])
856 return; 858 return;
857 _importedScripts[scriptName] = true; 859 _importedScripts[scriptName] = true;
858 var xhr = new XMLHttpRequest(); 860 var xhr = new XMLHttpRequest();
859 xhr.open("GET", scriptName, false); 861 xhr.open("GET", scriptName, false);
860 xhr.send(null); 862 xhr.send(null);
861 window.eval(xhr.responseText + "\n//@ sourceURL=" + scriptName); 863 window.eval(xhr.responseText + "\n//@ sourceURL=" + scriptName);
862 } 864 }
OLDNEW
« no previous file with comments | « LayoutTests/inspector/map-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698