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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js

Issue 1963753003: DevTools: default all console object previews to lossy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/components/RemoteObjectPreviewFormatter.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
index 27b73b602efc2f04ed1bc0929e11876685880977..703db5f911aeba4702918697f76cfb92ae7e31f6 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/RemoteObjectPreviewFormatter.js
@@ -13,22 +13,20 @@ WebInspector.RemoteObjectPreviewFormatter.prototype = {
/**
* @param {!Element} parentElement
* @param {!RuntimeAgent.ObjectPreview} preview
- * @return {boolean} true iff preview captured all information.
*/
appendObjectPreview: function(parentElement, preview)
{
var description = preview.description;
- if (preview.type !== "object" || preview.subtype === "null") {
+ if (preview.type !== "object" || preview.subtype === "null")
parentElement.appendChild(this.renderPropertyPreview(preview.type, preview.subtype, description));
- return true;
- }
if (description && preview.subtype !== "array") {
var text = preview.subtype ? description : this._abbreviateFullQualifiedClassName(description);
parentElement.createTextChildren(text, " ");
}
if (preview.entries)
- return this._appendEntriesPreview(parentElement, preview);
- return this._appendPropertiesPreview(parentElement, preview);
+ this._appendEntriesPreview(parentElement, preview);
+ else
+ this._appendPropertiesPreview(parentElement, preview);
},
/**
@@ -46,7 +44,6 @@ WebInspector.RemoteObjectPreviewFormatter.prototype = {
/**
* @param {!Element} parentElement
* @param {!RuntimeAgent.ObjectPreview} preview
- * @return {boolean} true iff preview captured all information.
*/
_appendPropertiesPreview: function(parentElement, preview)
{
@@ -101,18 +98,15 @@ WebInspector.RemoteObjectPreviewFormatter.prototype = {
if (preview.overflow)
parentElement.createChild("span").textContent = "\u2026";
parentElement.createTextChild(isArray ? "]" : "}");
- return preview.lossless;
},
/**
* @param {!Element} parentElement
* @param {!RuntimeAgent.ObjectPreview} preview
- * @return {boolean} true iff preview captured all information.
*/
_appendEntriesPreview: function(parentElement, preview)
{
- var lossless = preview.lossless && !preview.properties.length;
parentElement.createTextChild("{");
for (var i = 0; i < preview.entries.length; ++i) {
if (i > 0)
@@ -128,7 +122,6 @@ WebInspector.RemoteObjectPreviewFormatter.prototype = {
if (preview.overflow)
parentElement.createChild("span").textContent = "\u2026";
parentElement.createTextChild("}");
- return lossless;
},

Powered by Google App Engine
This is Rietveld 408576698