| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 971 var savedOwnProperties; | 971 var savedOwnProperties; |
| 972 var savedAccessorProperties; | 972 var savedAccessorProperties; |
| 973 var savedInternalProperties; | 973 var savedInternalProperties; |
| 974 var resultCounter = 2; | 974 var resultCounter = 2; |
| 975 | 975 |
| 976 function processCallback() | 976 function processCallback() |
| 977 { | 977 { |
| 978 if (--resultCounter) | 978 if (--resultCounter) |
| 979 return; | 979 return; |
| 980 if (savedOwnProperties && savedAccessorProperties) { | 980 if (savedOwnProperties && savedAccessorProperties) { |
| 981 var combinedList = savedAccessorProperties.slice(0); | 981 var propertiesMap = new Map(); |
| 982 var propertySymbols = []; |
| 983 for (var i = 0; i < savedAccessorProperties.length; i++) { |
| 984 var property = savedAccessorProperties[i]; |
| 985 if (property.symbol) |
| 986 propertySymbols.push(property); |
| 987 else |
| 988 propertiesMap.set(property.name, property); |
| 989 } |
| 982 for (var i = 0; i < savedOwnProperties.length; i++) { | 990 for (var i = 0; i < savedOwnProperties.length; i++) { |
| 983 var property = savedOwnProperties[i]; | 991 var property = savedOwnProperties[i]; |
| 984 if (!property.isAccessorProperty()) | 992 if (property.isAccessorProperty()) |
| 985 combinedList.push(property); | 993 continue; |
| 994 if (property.symbol) |
| 995 propertySymbols.push(property); |
| 996 else |
| 997 propertiesMap.set(property.name, property); |
| 986 } | 998 } |
| 987 return callback(combinedList, savedInternalProperties ? savedInterna
lProperties : null); | 999 return callback(propertiesMap.valuesArray().concat(propertySymbols),
savedInternalProperties ? savedInternalProperties : null); |
| 988 } else { | 1000 } else { |
| 989 callback(null, null); | 1001 callback(null, null); |
| 990 } | 1002 } |
| 991 } | 1003 } |
| 992 | 1004 |
| 993 /** | 1005 /** |
| 994 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties | 1006 * @param {?Array.<!WebInspector.RemoteObjectProperty>} properties |
| 995 * @param {?Array.<!WebInspector.RemoteObjectProperty>} internalProperties | 1007 * @param {?Array.<!WebInspector.RemoteObjectProperty>} internalProperties |
| 996 */ | 1008 */ |
| 997 function allAccessorPropertiesCallback(properties, internalProperties) | 1009 function allAccessorPropertiesCallback(properties, internalProperties) |
| (...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1646 { | 1658 { |
| 1647 if (!this._cachedDescription) { | 1659 if (!this._cachedDescription) { |
| 1648 var children = this._children(); | 1660 var children = this._children(); |
| 1649 this._cachedDescription = "{" + this._formatValue(children[0].value)
+ " => " + this._formatValue(children[1].value) + "}"; | 1661 this._cachedDescription = "{" + this._formatValue(children[0].value)
+ " => " + this._formatValue(children[1].value) + "}"; |
| 1650 } | 1662 } |
| 1651 return this._cachedDescription; | 1663 return this._cachedDescription; |
| 1652 }, | 1664 }, |
| 1653 | 1665 |
| 1654 __proto__: WebInspector.LocalJSONObject.prototype | 1666 __proto__: WebInspector.LocalJSONObject.prototype |
| 1655 } | 1667 } |
| OLD | NEW |