Chromium Code Reviews| 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; |
| } |
| } |