Closed Bug 1258546 Opened 9 years ago Closed 9 years ago

modules loaded in child processes don't get reloaded via detools addon

Categories

(DevTools :: General, defect, P2)

defect

Tracking

(firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: ochameau, Assigned: ochameau)

References

Details

(Whiteboard: [btpp-fix-later])

Attachments

(2 files, 1 obsolete file)

Any module loaded in the child doesn't get reloaded for two reasons: * devtools/server/child.js frame script doesn't get reloaded loadFrameScript caches scripts and unfortunately there is no way to force reload nor purge the cache. I opened bug 1258496 to address that. * Loader.jsm doesn't get reloaded So that even if the frame script is reloaded the JSM keeps the same modules instances. We have to communicate with child processes to call its reload method.
I needed that in order to get chrome://devtools/locale/ to be updated. That allowed me to work on menuitems and shortcuts via the addon.
Attachment #8733092 - Flags: review?(jryans)
chrome-flush-caches in child process is still at risk in bug 1258496. May change this patch accordingly.
Attachment #8733093 - Flags: review?(jryans)
Comment on attachment 8733093 [details] [diff] [review] Ensure reloading devtools frame script and loader in child processes. Review of attachment 8733093 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/bootstrap.js @@ +87,5 @@ > + // Flush message manager cached frame scripts in child processes > + Services.ppmm.loadProcessScript("data:,new " + function () { > + let obs = Components.classes["@mozilla.org/observer-service;1"] > + .getService(Components.interfaces.nsIObserverService); > + obs.notifyObservers(null, "chrome-flush-caches", null); Add a comment about the bug which may break this.
Attachment #8733093 - Flags: review?(jryans) → review+
Priority: -- → P2
Whiteboard: [btpp-fix-later]
Blocks: 1261665
Rebased. Use new notification name.
Attachment #8739207 - Flags: review+
Attachment #8733093 - Attachment is obsolete: true
https://hg.mozilla.org/integration/fx-team/rev/625ed96745ea86e9db9de05cbb459acd19512de2 Bug 1258546 - Reload chrome locales when reloading devtools via the addon. r=jryans https://hg.mozilla.org/integration/fx-team/rev/4276c4ae6d52c0cd1d69cee55d6a077b59a7dd88 Bug 1258546 - Ensure reloading devtools frame script and loader in child processes. r=jryans
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: