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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js

Issue 2605693003: DevTools: introduce object previews experiment (Closed)
Patch Set: rebase Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
index 22513acb29a796012e3c8e90d93203916acf4ac4..ba9737d2dbd803b8955b0fcfd85c6508d0a4f8a6 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
@@ -571,7 +571,7 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
var functionLocation = callFrame.functionLocation();
if (localScope && functionLocation) {
Sources.SourceMapNamesResolver.resolveScopeInObject(localScope)
- .getAllProperties(false, this._prepareScopeVariables.bind(this, callFrame));
+ .getAllProperties(false, false, this._prepareScopeVariables.bind(this, callFrame));
}
if (this._clearValueWidgetsTimer) {
@@ -689,10 +689,12 @@ Sources.JavaScriptSourceFrame = class extends SourceFrame.UISourceCodeFrame {
var value = valuesMap.get(name);
var propertyCount = value.preview ? value.preview.properties.length : 0;
var entryCount = value.preview && value.preview.entries ? value.preview.entries.length : 0;
- if (value.preview && propertyCount + entryCount < 10)
- formatter.appendObjectPreview(nameValuePair, value.preview);
- else
- nameValuePair.appendChild(Components.ObjectPropertiesSection.createValueElement(value, false));
+ if (value.preview && propertyCount + entryCount < 10) {
+ formatter.appendObjectPreview(nameValuePair, value.preview, false /* isEntry */);
+ } else {
+ nameValuePair.appendChild(Components.ObjectPropertiesSection.createValueElement(
+ value, false /* wasThrown */, false /* showPreview */));
+ }
++renderedNameCount;
}

Powered by Google App Engine
This is Rietveld 408576698