Closed Bug 1117224 Opened 5 years ago Closed 5 years ago

Create group message manager to only load content.js framescript for tab <browser> elements

Categories

(Firefox for Android :: General, defect)

35 Branch
All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 37

People

(Reporter: Margaret, Assigned: Margaret)

References

Details

Attachments

(1 file, 1 obsolete file)

From bug 1111142 comment 7:

>+    window.messageManager.loadFrameScript("chrome://browser/content/content.js", true);

You originally tried using window.getGroupMessageManager("browsers").loadFrameScript(...), but that was failing. I think that's because we weren't adding message="true" and groupmessagemanager="browsers" to the <browser>s we create in Tab.createBrowser

See:
http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml#1582

Might be good to try that again (in a followup or here) to keep the messages from polluting other <browser> objects we might create.
See Also: → 990812
Attachment #8543420 - Flags: review?(mark.finkle)
/r/1979 - Bug 1117224 - Create group message manager to only load content.js framescript for tab <browser> elements. r=mfinkle

Pull down this commit:

hg pull review -r 4d41808464f86d6fe2762f875e3dcf886a02bd99
Any idea what "message=true" does?
Attachment #8543420 - Flags: review?(mark.finkle) → review+
https://reviewboard.mozilla.org/r/1977/#review1255

I know you tested to make sure this is all we need :)
(In reply to Mark Finkle (:mfinkle) from comment #3)
> Any idea what "message=true" does?

I looked at hg blame, and saw this was added in an earlier changeset, so I don't think it's related. Digging back, it landed in 2007, before e10s:
http://hg.mozilla.org/mozilla-central/rev/973de3d4e4f6

It looks like it's used (or was used) for showing messages in the browser.

And yes, I did test :)
Blocks: 1111142
No longer depends on: 1111142
https://hg.mozilla.org/mozilla-central/rev/0e6ad992ae07
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Attachment #8543420 - Attachment is obsolete: true
Attachment #8619046 - Flags: review+
Any chance that the "browsers" message manager could be exposed as a window property, since it would seem to be preferable in nearly every case to use this rather than window.messageManager?  Or at least document it?  Here?:
https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/Message_manager_overview
You need to log in before you can comment on or make changes to this bug.