Closed
Bug 150087
Opened 22 years ago
Closed 22 years ago
Need a way to reset DOM plugin array from plugin code
Categories
(Core Graveyard :: Plug-ins, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.1beta
People
(Reporter: serhunt, Assigned: serhunt)
References
Details
(Whiteboard: [ADT2][PL RTM])
Attachments
(2 files)
(deleted),
patch
|
serhunt
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
sicking
:
review+
alecf
:
superreview+
jud
:
approval+
|
Details | Diff | Splinter Review |
If we rescan plugins to update the plugin list not through JavaScript, we should
instruct DOM to refresh its list too. The following steps can show what this bug
results in:
1. have Flash plugin absent somehow
2. start browser, in about:plugins there should be no Flash
3. add Flash plugin to the Plugins folder
4. go to a page which requires the plugin, this will cause plugin rescan
5. the plugin should be picked up and work fine
6. load about:plugins, it is not there
Expected: it should be listed in the about:plugins page.
This is a regression caused by patch from bug 144058 which got incorporated to a
bigger patch from bug 143178. If we reload plugins internally, not via
JavaScript, DOM arrays don't change and when the time comes DOM does not know
that plugins have changed and reports the old array.
Comment 3•22 years ago
|
||
Is not this array supposed to be recreated for each document and on reload?
Comment 4•22 years ago
|
||
Hmm, window.navigator (NavigatorImpl) owns the plugin array, and
window.navigator (the native object) is re-used within a window, so the plugin
array would not be re-created when loading a new document or reloading a
document. This is fixable by releasing mNavigator in
GlobalWindowImpl::SetNewDocument().
Comment 5•22 years ago
|
||
*** Bug 152457 has been marked as a duplicate of this bug. ***
Comment 6•22 years ago
|
||
Not sure if this is the optimal way to fix this bug, but here's a patch that
resets the navigator object and in turn resets the plugins and mime types array
on page load. Reloading or re-visting the page now works.
Comment 7•22 years ago
|
||
Comment on attachment 88478 [details] [diff] [review]
patch to reset navigator object on page page load
sr=jst
Attachment #88478 -
Flags: superreview+
Comment on attachment 88478 [details] [diff] [review]
patch to reset navigator object on page page load
Confirm that this fixes the bug, r=av
Attachment #88478 -
Flags: review+
Comment 9•22 years ago
|
||
patch in turnk, marking FIXED
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 10•22 years ago
|
||
nominating, this is important to get plugin detection correct.
Whiteboard: [PL RTM]
Comment 11•22 years ago
|
||
adding ADT impact: note the DOM is not refreshed, consequently the DOM will be
out of sync -- and that can cause unexpected results. As explained here, the
About plugins page will get out of sync with what has really been installed, if
that happens the user experience could be they end up being asked to reinstall
the plug-in they just installed.
Assignee | ||
Comment 12•22 years ago
|
||
I verify that the problem is now fixed on today trunk build.
Status: RESOLVED → VERIFIED
Comment 13•22 years ago
|
||
I should've caught this when sr'ing, but I didn't :-( Well, better late than
never...
Comment 14•22 years ago
|
||
The original patch in this bug does fix the problem reported here, but it leaves
a potential crash bihind... The new patch fixes that potential crash. Reopening
to get this potential crash fixed too.
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Comment on attachment 89346 [details] [diff] [review]
We also need to null out the docshell ptr in the navigator object!
r=sicking
Attachment #89346 -
Flags: review+
Comment 16•22 years ago
|
||
Comment on attachment 89346 [details] [diff] [review]
We also need to null out the docshell ptr in the navigator object!
sr=alecf
Attachment #89346 -
Flags: superreview+
Comment 17•22 years ago
|
||
Fix checked in.
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Comment 18•22 years ago
|
||
Shrir, can you verify this fix on the trunk. Thx.
Comment 19•22 years ago
|
||
verified on trunk 0627. works fine.
Status: RESOLVED → VERIFIED
Keywords: verifyme
Comment 20•22 years ago
|
||
adt1.0.1+ (on ADT's behalf) approval for checkin to the 1.0 branch, pending
drivers approval. pls check this in asap, then add the "fixed1.0.1" keyword.
Comment 21•22 years ago
|
||
please checkin to the 1.0.1 branch. once there, remove the "mozilla1.0.1+"
keyword and add the "fixed1.0.1" keyword.
Keywords: mozilla1.0.1 → mozilla1.0.1+
Updated•22 years ago
|
Attachment #89346 -
Flags: approval+
Comment 23•22 years ago
|
||
verified on branch 0823, this works now.
Keywords: fixed1.0.1 → verified1.0.1
Comment 24•21 years ago
|
||
*** Bug 85488 has been marked as a duplicate of this bug. ***
Updated•2 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•