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

Side by Side Diff: src/inspector/injected-script-source.js

Issue 2508423002: Add getter properties to array entry previews (Closed)
Patch Set: rebase Created 4 years 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 | « no previous file | test/inspector/runtime/evaluate-with-generate-preview.js » ('j') | 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) 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 918 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 continue; 929 continue;
930 930
931 // Ignore size property of map, set. 931 // Ignore size property of map, set.
932 if ((this.subtype === "map" || this.subtype === "set") && name === " size") 932 if ((this.subtype === "map" || this.subtype === "set") && name === " size")
933 continue; 933 continue;
934 934
935 // Never preview prototype properties. 935 // Never preview prototype properties.
936 if (!descriptor.isOwn) 936 if (!descriptor.isOwn)
937 continue; 937 continue;
938 938
939 // Ignore computed properties. 939 // Ignore computed properties unless they have getters.
940 if (!("value" in descriptor)) 940 if (!("value" in descriptor)) {
941 if (descriptor.get)
942 this._appendPropertyPreview(preview, { name: name, type: "ac cessor", __proto__: null }, propertiesThreshold);
941 continue; 943 continue;
944 }
942 945
943 var value = descriptor.value; 946 var value = descriptor.value;
944 var type = typeof value; 947 var type = typeof value;
945 948
946 // Never render functions in object preview. 949 // Never render functions in object preview.
947 if (type === "function" && (this.subtype !== "array" || !isUInt32(na me))) 950 if (type === "function" && (this.subtype !== "array" || !isUInt32(na me)))
948 continue; 951 continue;
949 952
950 // Special-case HTMLAll. 953 // Special-case HTMLAll.
951 if (type === "undefined" && injectedScript._isHTMLAllCollection(valu e)) 954 if (type === "undefined" && injectedScript._isHTMLAllCollection(valu e))
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf); 1065 return string.substr(0, leftHalf) + "\u2026" + string.substr(string. length - rightHalf, rightHalf);
1063 } 1066 }
1064 return string.substr(0, maxLength) + "\u2026"; 1067 return string.substr(0, maxLength) + "\u2026";
1065 }, 1068 },
1066 1069
1067 __proto__: null 1070 __proto__: null
1068 } 1071 }
1069 1072
1070 return injectedScript; 1073 return injectedScript;
1071 }) 1074 })
OLDNEW
« no previous file with comments | « no previous file | test/inspector/runtime/evaluate-with-generate-preview.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698