Closed
Bug 1164160
Opened 10 years ago
Closed 10 years ago
Local server pages don't restore properly on resume
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: st3fan, Assigned: st3fan)
References
Details
Attachments
(1 file)
Right now the web server picks a random port every time it starts. This causes trouble when tabs are restored or when the app comes back after being killed. SPecially when you had error or reading view pages open.
Either run the server on a fixed port or discover the port at runtime and update the port in the URL every time. THe latter would be nicer but maybe a fixed port is ok too?
Updated•10 years ago
|
tracking-fennec: ? → +
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → sarentz
Assignee | ||
Comment 1•10 years ago
|
||
This patch actually does the reverse. It leaves the internal web server on a random port. But it does a couple of things to support this:
* We now set the `GCDWebServerOption_AutomaticallySuspendInBackground` option to keep server alive and thus keep the port that was chosen upon application start.
* We do no longer store reader mode URLs in the application state. Instead we write a `SavedTab` object and mark it with `readerMode` and `selected` properties together with the original url. When the tab is restored we turn the original URL into the reader mode url.
This patch also contains two fixes for `ReaderModeUtils` to better recognize and parse reader mode URLs.
I understand the last part of this was not really part of this bug description but that was actually the reason why I wanted to run the web server on a fixed port.
Attachment #8608983 -
Flags: review?(bnicholson)
Updated•10 years ago
|
Status: NEW → ASSIGNED
Summary: Run our internal web server on a fixed port → Local server pages can't be restored after the app is killed
Comment 2•10 years ago
|
||
Comment on attachment 8608983 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/491
Sounds like you plan to update this, so clearing r? flag for now.
Attachment #8608983 -
Flags: review?(bnicholson) → feedback+
Assignee | ||
Updated•10 years ago
|
Summary: Local server pages can't be restored after the app is killed → Local server pages don't restore properly on resume
Assignee | ||
Comment 3•10 years ago
|
||
Comment on attachment 8608983 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/491
Although this is a relatively small patch, it fixes the following bugs:
* 1164160 - Local server pages don't restore properly on resume
* 1168687 - Screenshots do not restore on resume
* 1167310 - Do not store tab state at startup
* 1166491 - Session encoding unsafely unwraps web view's URL
These are combined in a rewrite of the code that implements the `UIStateRestoration` functions. That code may seem a bit overly verbose and pedantic. This is on purpose because this code must be very robust to not fail on startup.
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8608983 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/491
I'd like to land this early wednesday so that we can include these fixes in the new build. (At least some of these contribute to the startup crashes that people have reported).
Attachment #8608983 -
Flags: review?(sleroux)
Attachment #8608983 -
Flags: review?(bnicholson)
Comment 8•10 years ago
|
||
Comment on attachment 8608983 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/491
Nice, this looks great to me.
Attachment #8608983 -
Flags: review?(bnicholson)
Attachment #8608983 -
Flags: review+
Attachment #8608983 -
Flags: feedback+
Comment 9•10 years ago
|
||
Comment on attachment 8608983 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/491
LGTM!
Attachment #8608983 -
Flags: review?(sleroux) → review+
Assignee | ||
Updated•10 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•