Closed Bug 1329915 Opened 5 years ago Closed 5 years ago

[Mortar] Fix loading multiple instances of a mortar plugin

Categories

(Firefox :: PDF Viewer, defect, P2)

defect

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox53 --- affected

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file)

Attached patch v1Splinter Review
No description provided.
Comment on attachment 8825314 [details] [diff] [review]
v1

I just read and tried this patch, and it works well. Both UI behavior and log look correct.

Here I would like to add more problem description for a record (and make sure I understand this patch correctly):

We accidentally initiated PPAPIRuntime multiple times because the frame script will be loaded once every time there is a new pdf opened. These frame scripts do not run in the same scope so the guarding code |if (!rt) { ... }| didn't work as excepted.

This patch moves the guarding code to the jsm to ensure PPAPIRuntime's singleton pattern. With this global singleton, we then can create multiple instances that are controlled by it.
Attachment #8825314 - Flags: review+
Severity: normal → critical
Component: Plug-ins → PDF Viewer
Priority: -- → P2
Product: Core → Firefox
Summary: [jsplugins] Fix loading multiple instances of a mortar plugin → [Mortar] Fix loading multiple instances of a mortar plugin
We have other plan for Flash, so these bugs become won't fix.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.