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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js

Issue 2236033002: [DevTools] Simplify evaluation callbacks on frontend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-was-thrown
Patch Set: addressed comments Created 4 years, 4 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/sdk/RemoteObject.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
index f3ffecd8973d23b97a3dceefec10586579183be5..cf61a22a5ff961686b608965075aaaeccb77c5c6 100644
--- a/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
+++ b/third_party/WebKit/Source/devtools/front_end/sdk/RemoteObject.js
@@ -393,8 +393,9 @@ WebInspector.RemoteObjectImpl = function(target, objectId, type, subtype, value,
this._hasChildren = (type !== "symbol");
this._preview = preview;
} else {
- // Primitive or null object.
- this._description = description || (value + "");
+ this._description = description;
+ if (!this._description && (typeof value !== "object" || value === null))
+ this._description = value + "";
this._hasChildren = false;
if (typeof unserializableValue !== "undefined") {
this._unserializableValue = unserializableValue;

Powered by Google App Engine
This is Rietveld 408576698