pdfjschildbootstrap.js is executed every time a browser is opened, and should only run once per child process

RESOLVED FIXED in Firefox 42

Status

()

defect
P3
normal
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: mconley, Assigned: mconley)

Tracking

(Blocks 1 bug, {perf})

unspecified
Firefox 42
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 fixed)

Details

(Whiteboard: [pdfjs-c-integration])

Attachments

(1 attachment)

It looks like pdfjschildbootstrap.js is loaded in nsBrowserGlue.js into the window message manager, such that it is executed every time a browser is loaded.

I'm reasonably certain this should only run once per child process, and not once per browser.

Am I right on that, jimm?
Flags: needinfo?(jmathies)
Note that if we moved this to running only once per process as opposed to once per browser, this would eliminate a sync message that PdfjsContentUtils sends in order to figure out whether or not it's the default PDF handler. That'd be a nice result.
(In reply to Mike Conley (:mconley) - Needinfo me! from comment #0)
> It looks like pdfjschildbootstrap.js is loaded in nsBrowserGlue.js into the
> window message manager, such that it is executed every time a browser is
> loaded.
> 
> I'm reasonably certain this should only run once per child process, and not
> once per browser.
> 
> Am I right on that, jimm?

Yes I think so. The script needs to load into every process via a single call here, I'm guessing there's something for that?
Flags: needinfo?(jmathies)
Yeah, I believe billm added the ability to use "process scripts": 

https://developer.mozilla.org/en-US/Firefox/Multiprocess_Firefox/Message_Manager/Process_scripts

vladan - can I assign this to your intern?
Flags: needinfo?(vdjeric)
Flags: needinfo?(vdjeric)
Assignee

Updated

4 years ago
Mentor: mconley
Keywords: perf
Whiteboard: [good first bug]
Priority: -- → P3
Whiteboard: [good first bug] → [good first bug][pdfjs-c-integration]
Bug 1186448 - pdfjschildbootstrap.js should only be executed once per child process. r?jimm
Attachment #8643275 - Flags: review?(jmathies)
Comment on attachment 8643275 [details]
MozReview Request: Bug 1186448 - pdfjschildbootstrap.js should only be executed once per child process. r?jimm

https://reviewboard.mozilla.org/r/15013/#review13531

I'd suggest pushing to try as there are some basic tests for pdfjs in browser chrome.
Attachment #8643275 - Flags: review?(jmathies) → review+
Assignee

Updated

4 years ago
Blocks: 1174239
Assignee

Updated

4 years ago
Keywords: checkin-needed
url:        https://hg.mozilla.org/integration/fx-team/rev/670b14b5b033de46a55acfa8c985a116fefdffea
changeset:  670b14b5b033de46a55acfa8c985a116fefdffea
user:       Mike Conley <mconley@mozilla.com>
date:       Tue Aug 04 15:55:54 2015 -0400
description:
Bug 1186448 - pdfjschildbootstrap.js should only be executed once per child process. r=jimm

We were executing it once per tab, originally.
Assignee

Updated

4 years ago
Mentor: mconley
Keywords: checkin-needed
Whiteboard: [good first bug][pdfjs-c-integration] → [pdfjs-c-integration]
https://hg.mozilla.org/mozilla-central/rev/670b14b5b033
Assignee: nobody → mconley
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
You need to log in before you can comment on or make changes to this bug.