Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Google Inc. All rights reserved. | 3 * Copyright (C) 2013 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 923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 934 continue; | 934 continue; |
| 935 | 935 |
| 936 // Ignore size property of map, set. | 936 // Ignore size property of map, set. |
| 937 if ((this.subtype === "map" || this.subtype === "set") && name === " size") | 937 if ((this.subtype === "map" || this.subtype === "set") && name === " size") |
| 938 continue; | 938 continue; |
| 939 | 939 |
| 940 // Never preview prototype properties. | 940 // Never preview prototype properties. |
| 941 if (!descriptor.isOwn) | 941 if (!descriptor.isOwn) |
| 942 continue; | 942 continue; |
| 943 | 943 |
| 944 // Ignore computed properties. | 944 // Ignore computed properties unless they are getters. |
|
dgozman
2016/11/24 00:33:32
... they have getters.
luoe
2016/12/02 00:14:33
Done.
| |
| 945 if (!("value" in descriptor)) | 945 if (!("value" in descriptor)) { |
| 946 if (descriptor.get) | |
| 947 this._appendPropertyPreview(preview, { name: name, type: "ac cessor", __proto__: null }, propertiesThreshold); | |
| 946 continue; | 948 continue; |
| 949 } | |
| 947 | 950 |
| 948 var value = descriptor.value; | 951 var value = descriptor.value; |
| 949 var type = typeof value; | 952 var type = typeof value; |
| 950 | 953 |
| 951 // Never render functions in object preview. | 954 // Never render functions in object preview. |
| 952 if (type === "function" && (this.subtype !== "array" || !isUInt32(na me))) | 955 if (type === "function" && (this.subtype !== "array" || !isUInt32(na me))) |
| 953 continue; | 956 continue; |
| 954 | 957 |
| 955 // Special-case HTMLAll. | 958 // Special-case HTMLAll. |
| 956 if (type === "undefined" && injectedScript._isHTMLAllCollection(valu e)) | 959 if (type === "undefined" && injectedScript._isHTMLAllCollection(valu e)) |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1067 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf); | 1070 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf); |
| 1068 } | 1071 } |
| 1069 return string.substr(0, maxLength) + "\u2026"; | 1072 return string.substr(0, maxLength) + "\u2026"; |
| 1070 }, | 1073 }, |
| 1071 | 1074 |
| 1072 __proto__: null | 1075 __proto__: null |
| 1073 } | 1076 } |
| 1074 | 1077 |
| 1075 return injectedScript; | 1078 return injectedScript; |
| 1076 }) | 1079 }) |
| OLD | NEW |