| Index: third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
|
| index d105466f9c1f06d68e59203c38fbf26db2ec7985..176fa8e392a8fd2bf4973c73e246760e6cdca61d 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/workspace/UISourceCode.js
|
| @@ -439,7 +439,7 @@ Workspace.UISourceCode = class extends Common.Object {
|
|
|
| resetWorkingCopy() {
|
| this._innerResetWorkingCopy();
|
| - this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChanged);
|
| + this._workingCopyChanged();
|
| }
|
|
|
| _innerResetWorkingCopy() {
|
| @@ -453,13 +453,16 @@ Workspace.UISourceCode = class extends Common.Object {
|
| setWorkingCopy(newWorkingCopy) {
|
| this._workingCopy = newWorkingCopy;
|
| delete this._workingCopyGetter;
|
| - this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChanged);
|
| - this._project.workspace().dispatchEventToListeners(
|
| - Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this});
|
| + this._workingCopyChanged();
|
| }
|
|
|
| setWorkingCopyGetter(workingCopyGetter) {
|
| this._workingCopyGetter = workingCopyGetter;
|
| + this._workingCopyChanged();
|
| + }
|
| +
|
| + _workingCopyChanged() {
|
| + this._removeAllMessages();
|
| this.dispatchEventToListeners(Workspace.UISourceCode.Events.WorkingCopyChanged);
|
| this._project.workspace().dispatchEventToListeners(
|
| Workspace.Workspace.Events.WorkingCopyChanged, {uiSourceCode: this});
|
| @@ -595,7 +598,7 @@ Workspace.UISourceCode = class extends Common.Object {
|
| this.dispatchEventToListeners(Workspace.UISourceCode.Events.MessageRemoved, message);
|
| }
|
|
|
| - removeAllMessages() {
|
| + _removeAllMessages() {
|
| var messages = this._messages;
|
| this._messages = [];
|
| for (var message of messages)
|
|
|