| Index: Source/devtools/front_end/console/ConsoleView.js
|
| diff --git a/Source/devtools/front_end/console/ConsoleView.js b/Source/devtools/front_end/console/ConsoleView.js
|
| index e34354b2b225cfad48ea2fe14284096e959ed3cc..576d45206233d0fcf99c7a0eff4118a40b112721 100644
|
| --- a/Source/devtools/front_end/console/ConsoleView.js
|
| +++ b/Source/devtools/front_end/console/ConsoleView.js
|
| @@ -282,14 +282,16 @@ WebInspector.ConsoleView.prototype = {
|
| */
|
| _titleFor: function(executionContext)
|
| {
|
| - var result = executionContext.name;
|
| - if (executionContext.isMainWorldContext && executionContext.frameId) {
|
| - var frame = executionContext.target().resourceTreeModel.frameForId(executionContext.frameId);
|
| - result = frame ? frame.displayName() : result;
|
| - }
|
| -
|
| - if (!executionContext.isMainWorldContext)
|
| - result = "\u00a0\u00a0\u00a0\u00a0" + result;
|
| + var result;
|
| + if (executionContext.isMainWorldContext) {
|
| + if (executionContext.frameId) {
|
| + var frame = executionContext.target().resourceTreeModel.frameForId(executionContext.frameId);
|
| + result = frame ? frame.displayName() : executionContext.name;
|
| + } else {
|
| + result = WebInspector.displayNameForURL(executionContext.name)
|
| + }
|
| + } else
|
| + result = "\u00a0\u00a0\u00a0\u00a0" + executionContext.name;
|
|
|
| var maxLength = 50;
|
| return result.trimMiddle(maxLength);
|
|
|