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

Unified Diff: Source/core/inspector/InjectedScriptSource.js

Issue 401843002: DevTools: Change RemoteObject._describe method for Errors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 5 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
« no previous file with comments | « LayoutTests/inspector/sources/debugger/debugger-expand-scope-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InjectedScriptSource.js
diff --git a/Source/core/inspector/InjectedScriptSource.js b/Source/core/inspector/InjectedScriptSource.js
index 4660bb19cfaf3693edd895463ba1fbb2ef81a2d3..0d03ec579e6dffe97cebc08ac3ee80efee84f3c8 100644
--- a/Source/core/inspector/InjectedScriptSource.js
+++ b/Source/core/inspector/InjectedScriptSource.js
@@ -682,9 +682,11 @@ InjectedScript.prototype = {
_createThrownValue: function(value, objectGroup, exceptionDetails)
{
var remoteObject = this._wrapObject(value, objectGroup);
- try {
- remoteObject.description = toStringDescription(value);
- } catch (e) {}
+ if (!remoteObject.description){
+ try {
+ remoteObject.description = toStringDescription(value);
+ } catch (e) {}
+ }
return { wasThrown: true, result: remoteObject, exceptionDetails: exceptionDetails, __proto__: null };
},
@@ -1042,6 +1044,9 @@ InjectedScript.prototype = {
}
}
+ if (obj instanceof Error && !!obj.message)
aandrey 2014/07/18 16:10:30 obj.message can throw
+ return className + ": " + obj.message;
+
return className;
}
}
« no previous file with comments | « LayoutTests/inspector/sources/debugger/debugger-expand-scope-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698