Commit 2e47a102 authored by sergeyv@chromium.org's avatar sergeyv@chromium.org

DevTools: Fix displayName for workers in console selector

BUG=

Review URL: https://codereview.chromium.org/468123002

git-svn-id: svn://svn.chromium.org/blink/trunk@180181 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 0d82337a
...@@ -281,14 +281,16 @@ WebInspector.ConsoleView.prototype = { ...@@ -281,14 +281,16 @@ WebInspector.ConsoleView.prototype = {
*/ */
_titleFor: function(executionContext) _titleFor: function(executionContext)
{ {
var result = executionContext.name; var result;
if (executionContext.isMainWorldContext && executionContext.frameId) { if (executionContext.isMainWorldContext) {
if (executionContext.frameId) {
var frame = executionContext.target().resourceTreeModel.frameForId(executionContext.frameId); var frame = executionContext.target().resourceTreeModel.frameForId(executionContext.frameId);
result = frame ? frame.displayName() : result; result = frame ? frame.displayName() : executionContext.name;
} else {
result = WebInspector.displayNameForURL(executionContext.name)
} }
} else
if (!executionContext.isMainWorldContext) result = "\u00a0\u00a0\u00a0\u00a0" + executionContext.name;
result = "\u00a0\u00a0\u00a0\u00a0" + result;
var maxLength = 50; var maxLength = 50;
return result.trimMiddle(maxLength); return result.trimMiddle(maxLength);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment