mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
36d681723d
So far we've simply used DOMTitleChanged as a proxy for navigation, since it's the earliest opportunity at which we have all necessary data for a new history entry (session history itself as well as tab URL and *title*) available. However it turns out that this is not 100 % reliable, since some pages might e.g. implement their navigation in JS using the history API, which won't necessarily trigger any DOMTitleChanged events. In those case we'd fail to update the tab's session history in the session store unless the user eventually navigated to someplace else that actually triggers a title change event again - if the browser was closed before that, we'd fail to properly restore the user's state. To fix this, we take a similar approach as the desktop session store and collect a tab's history data again when receiving any history change notification for that tab. Because the OnHistory... notifications are mostly cancellable, the session history hasn't been actually updated yet at the point the history listener is being called. We therefore can't synchronously call onTabLoad() from within our history change notification handler and have to schedule an async timeout instead so as to give the session history a chance to complete updating its state. MozReview-Commit-ID: LgHer940QwT --HG-- extra : rebase_source : f5ec320bd21dac91bf1baa162aaabae3ced911e3 |
||
---|---|---|
.. | ||
build | ||
extensions | ||
AboutRedirector.js | ||
AddonUpdateService.js | ||
BlocklistPrompt.js | ||
BrowserCLH.js | ||
ColorPicker.js | ||
ContentDispatchChooser.js | ||
ContentPermissionPrompt.js | ||
DirectoryProvider.js | ||
FilePicker.js | ||
FxAccountsPush.js | ||
HelperAppDialog.js | ||
ImageBlockingPolicy.js | ||
LoginManagerPrompter.js | ||
MobileComponents.manifest | ||
moz.build | ||
NSSDialogService.js | ||
PersistentNotificationHandler.js | ||
PresentationDevicePrompt.js | ||
PresentationRequestUIGlue.js | ||
PromptService.js | ||
SessionStore.idl | ||
SessionStore.js | ||
SiteSpecificUserAgent.js | ||
Snippets.js | ||
TabSource.js | ||
XPIDialogService.js |