Bug 1499049 - (Part 8) Clear the changes store when about to navigate to a new page; r=pbro

Depends on D9257
We need to clear the store of previous changes but we should not remove
references and event listeners to the ChangesActor since the DevTools
session is still active.

MozReview-Commit-ID: Okp2CcSlfw

Differential Revision: https://phabricator.services.mozilla.com/D9659
This commit is contained in:
Razvan Caliman
2018-10-25 08:07:40 +00:00
parent ef75f84ca4
commit 812c57c474

View File

@@ -44,9 +44,7 @@ class ChangesView {
store: this.store,
}, changesApp);
// TODO: save store and restore/replay on refresh.
// Bug 1478439 - https://bugzilla.mozilla.org/show_bug.cgi?id=1478439
this.inspector.target.once("will-navigate", this.destroy);
this.inspector.target.on("will-navigate", this.onClearChanges);
// Sync the store to the changes stored on the server. The
// syncChangesToServer() method is async, but we don't await it since