Closed Bug 533030 Opened 15 years ago Closed 15 years ago

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

Categories

(Core Graveyard :: Plug-ins, defect)

defect
Not set
normal

Tracking

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

RESOLVED FIXED
Tracking Status
blocking1.9.2 --- .2+
status1.9.2 --- .2-fixed
blocking1.9.1 --- .9+
status1.9.1 --- .9-fixed

People

(Reporter: jst, Assigned: jaas)

References

Details

Attachments

(2 files)

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: nobody → joshmoz
Attached patch fix v1.0Splinter Review
Attachment #416814 - Flags: review?(jst)
Attachment #416814 - Flags: review?(jst) → review+
pushed to mozilla-central

http://hg.mozilla.org/mozilla-central/rev/6515875bfbc3
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
We should take this fix for 1.9.2 since this fixes bug 491722.
status1.9.2: --- → ?
Attachment #416814 - Flags: approval1.9.2.2?
Attached patch Fix for 1.9.1Splinter Review
Attachment #425856 - Flags: review?(joshmoz)
Attachment #425856 - Flags: review?(joshmoz) → review+
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
Josh, is that 1.9.1 patch ready to go? We need it to fix the blocker bug 491722.
blocking1.9.1: --- → .9+
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]
Is there a way for QA to verify this fix?
Whiteboard: [needs 1.9.1. landing]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: