nsPluginHost::TrySetUpPluginInstance() can return with the plugin instance owner holding a non initialized instance.

RESOLVED FIXED

Status

()

Core
Plug-ins
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: jst, Assigned: Josh Aas)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(blocking1.9.2 .2+, status1.9.2 .2-fixed, blocking1.9.1 .9+, status1.9.1 .9-fixed)

Details

Attachments

(2 attachments)

(Reporter)

Description

8 years ago
nsPluginHost::TrySetUpPluginInstance() right now contains the pseudo code:

  instance = CreateInstance()
  aOwner->SetInstance(instance)
  instance->Initialize()
  if (failed)
    return

which returns out of this code with the owner holding on to a plugin instance that was not successfully initialized. Depending on what happens next, this can cause problems down the road, especially if plugins are reloaded before the instance owner tries to tear down this instance. We should at the very least null out the instance in the owner when we fail to initialize the plugin instance here.
(Assignee)

Updated

8 years ago
Assignee: nobody → joshmoz
(Assignee)

Comment 1

8 years ago
Created attachment 416814 [details] [diff] [review]
fix v1.0
Attachment #416814 - Flags: review?(jst)
(Reporter)

Updated

8 years ago
Attachment #416814 - Flags: review?(jst) → review+
(Assignee)

Comment 2

8 years ago
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/6515875bfbc3
Status: NEW → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
(Reporter)

Comment 3

8 years ago
We should take this fix for 1.9.2 since this fixes bug 491722.
status1.9.2: --- → ?
(Reporter)

Updated

8 years ago
Attachment #416814 - Flags: approval1.9.2.2?
(Reporter)

Comment 4

8 years ago
Created attachment 425856 [details] [diff] [review]
Fix for 1.9.1
Attachment #425856 - Flags: review?(joshmoz)
(Assignee)

Updated

8 years ago
Attachment #425856 - Flags: review?(joshmoz) → review+
(Reporter)

Updated

7 years ago
blocking1.9.2: --- → ?
status1.9.2: ? → ---
blocking1.9.2: ? → .2+
Comment on attachment 416814 [details] [diff] [review]
fix v1.0

a1922=beltzner
Attachment #416814 - Flags: approval1.9.2.2? → approval1.9.2.2+
Blocks: 491722
(Assignee)

Comment 6

7 years ago
pushed to mozilla-1.9.2

http://hg.mozilla.org/releases/mozilla-1.9.2/rev/ecfa2e50f8d8
status1.9.2: --- → .2-fixed
Josh, is that 1.9.1 patch ready to go? We need it to fix the blocker bug 491722.
blocking1.9.1: --- → .9+
status1.9.1: --- → wanted
Comment on attachment 425856 [details] [diff] [review]
Fix for 1.9.1

Actually, just a=beltzner for 1.9.1 on this patch. It's reviewed and all :)
Attachment #425856 - Flags: approval1.9.1.9+
Whiteboard: [needs 1.9.1. landing]
(Reporter)

Comment 9

7 years ago
http://hg.mozilla.org/releases/mozilla-1.9.1/rev/2dd98f3f4d86
status1.9.1: wanted → .9-fixed
Is there a way for QA to verify this fix?
Whiteboard: [needs 1.9.1. landing]
You need to log in before you can comment on or make changes to this bug.