Closed Bug 1258546 Opened 4 years ago Closed 4 years ago

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


(DevTools :: General, defect, P2)



(firefox48 fixed)

Firefox 48
Tracking Status
firefox48 --- fixed


(Reporter: ochameau, Assigned: ochameau)



(Whiteboard: [btpp-fix-later])


(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[";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
Bug 1258546 - Reload chrome locales when reloading devtools via the addon. r=jryans
Bug 1258546 - Ensure reloading devtools frame script and loader in child processes. r=jryans
Closed: 4 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.