Closed
Bug 1032098
Opened 10 years ago
Closed 10 years ago
app-actor-front.js' reloadApp() should be smarter
Categories
(DevTools Graveyard :: WebIDE, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1082561
People
(Reporter: paul, Unassigned)
References
Details
First, if in the manifest the launch_path has changed, the app doesn't load the new path. Also, when the app has several windows, all windows but the main one should be closed.
Reporter | ||
Comment 1•10 years ago
|
||
Alex, what's the best strategy to implement these 2 features? Any idea how to check if the launch_path has has changed? Maybe we should do a full restart on any change in the manifest (there's also the type field, or the name, …).
Reporter | ||
Updated•10 years ago
|
Flags: needinfo?(poirot.alex)
Comment 2•10 years ago
|
||
There is two way to think about that, either WebIDE is smarter and knows when we need to just reload the page or the whole app. In such case, it would either call reload or stop/start. But we can also tweak the actors. The two features are really different. 1) launch_path modification: I see two options, instead of reloading the current URI, we can tell to load the current launch_path, but it will most likely require to do that from the webapps actor, as I imagine it will require some apps specific magic to compute the launch_path URL. Or we can include something within install process, which can know more about what is being changed, and have an option to reload the app as much as needed within the install request. 2) all but main window close: We would need to make an app actor specific request. It should be easy to identify the frames now that we have the iframe abstraction (AppFrames.jsm) The main frame has its "name" attribute set to "main". But I'm not completely sure we can just remove the iframes from the webapps actors. The Window Manager from gaia may be unhappy. We may have to completely shutdown the app, or ask the window manager to reload the app sanely.
Flags: needinfo?(poirot.alex)
(In reply to Alexandre Poirot [:ochameau] from comment #2) > There is two way to think about that, either WebIDE is smarter and knows > when we need to just reload the page or the whole app. In such case, it > would either call reload or stop/start. > > But we can also tweak the actors. As long as it's reasonable to do, I think detection like this should be in app actor. The reason is that WebIDE doesn't really know the exact state of the app that is already installed, as the files could have been edited outside of WebIDE. Since the app actor is on device, and the device can check easily what's already installed, it seems better to me to put such "smarts" in the actor. Hopefully it doesn't make things too complex... > The two features are really different. Yes, let's break this into two bugs please. > 2) all but main window close: > We would need to make an app actor specific request. It should be easy to > identify the frames now that we have the iframe abstraction (AppFrames.jsm) > The main frame has its "name" attribute set to "main". But I'm not > completely sure we can just remove the iframes from the webapps actors. The > Window Manager from gaia may be unhappy. We may have to completely shutdown > the app, or ask the window manager to reload the app sanely. I am not really sure what "ask the window manager to reload" means, but is something that would for all reloading scenarios? I am hoping there can be just one "reload" code path (and not several based on app type or what it does), whether it's via the window manager or whatever else...
Comment 4•10 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] from comment #3) > I am not really sure what "ask the window manager to reload" means, but is > something that would for all reloading scenarios? I am hoping there can be > just one "reload" code path (and not several based on app type or what it > does), whether it's via the window manager or whatever else... Yes, it may have some parameters to give an hint how much we would need to reload, but the window manager, within gaia would handle the reload of frames. I'm afraid we can't just remove frames at gecko's level by just removing them from the DOM. I can easily see gaia code failing everywhere because of dead frames references being kept here and there. One iteration could be to look at install request to see if we can easily answer a flag telling if a full restart is needed, then client could ask request TabActor.reload or WebappsActor.stop&start; or just do the reload/restart as part of the install request...
Reporter | ||
Comment 5•10 years ago
|
||
(In reply to J. Ryan Stinnett [:jryans] from comment #3) > (In reply to Alexandre Poirot [:ochameau] from comment #2) > > The two features are really different. > > Yes, let's break this into two bugs please. bug 1082561 bug 1082562
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•4 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•