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

Unified Diff: src/inspector/injected-script-source.js

Issue 2508423002: Add getter properties to array entry previews (Closed)
Patch Set: just getters Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: src/inspector/injected-script-source.js
diff --git a/src/inspector/injected-script-source.js b/src/inspector/injected-script-source.js
index 39c6c9c1e84b0d461a415ab5f9a6d6ec2588f1a2..fa105ca2d484e36ac1030993ea275d12ba2c06ff 100644
--- a/src/inspector/injected-script-source.js
+++ b/src/inspector/injected-script-source.js
@@ -941,9 +941,12 @@ InjectedScript.RemoteObject.prototype = {
if (!descriptor.isOwn)
continue;
- // Ignore computed properties.
- if (!("value" in descriptor))
+ // 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.
+ if (!("value" in descriptor)) {
+ if (descriptor.get)
+ this._appendPropertyPreview(preview, { name: name, type: "accessor", __proto__: null }, propertiesThreshold);
continue;
+ }
var value = descriptor.value;
var type = typeof value;

Powered by Google App Engine
This is Rietveld 408576698