| Index: third_party/WebKit/Source/devtools/front_end/sdk/Target.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
|
| index 857aab54e7385fad2209bba00d8d08b8b26c70e9..f6b0db16038f4cfffa5cb98fec6ad10b1b532631 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/sdk/Target.js
|
| @@ -57,7 +57,7 @@ WebInspector.Target.prototype = {
|
| */
|
| name: function()
|
| {
|
| - return this._name;
|
| + return this._name || this._inspectedURLName;
|
| },
|
|
|
| /**
|
| @@ -213,8 +213,13 @@ WebInspector.Target.prototype = {
|
| setInspectedURL: function(inspectedURL)
|
| {
|
| this._inspectedURL = inspectedURL;
|
| - InspectorFrontendHost.inspectedURLChanged(inspectedURL || "");
|
| + var parsedURL = inspectedURL.asParsedURL();
|
| + this._inspectedURLName = parsedURL ? parsedURL.lastPathComponentWithFragment() : "#" + this._id;
|
| + if (!this.parentTarget())
|
| + InspectorFrontendHost.inspectedURLChanged(inspectedURL || "");
|
| this._targetManager.dispatchEventToListeners(WebInspector.TargetManager.Events.InspectedURLChanged, this);
|
| + if (!this._name)
|
| + this._targetManager.dispatchEventToListeners(WebInspector.TargetManager.Events.NameChanged, this);
|
| },
|
|
|
| __proto__: Protocol.Agents.prototype
|
|
|