Closed
Bug 1145336
Opened 9 years ago
Closed 9 years ago
[EME] Uninstall old GMPs during updates
Categories
(Firefox :: General, defect)
Firefox
General
Tracking
()
RESOLVED
FIXED
Firefox 39
People
(Reporter: spohl, Assigned: spohl)
References
Details
(Keywords: qawanted)
Attachments
(3 files, 5 obsolete files)
1.07 KB,
patch
|
jwwang
:
review+
|
Details | Diff | Splinter Review |
7.43 KB,
patch
|
spohl
:
review+
|
Details | Diff | Splinter Review |
8.43 KB,
patch
|
spohl
:
review+
Sylvestre
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
We currently leave old GMPs on disk and simply remove them from the addons manager. We should remove them from disk during an update.
Assignee | ||
Comment 1•9 years ago
|
||
This is a completely untested patch. I'm curious if this is at all the right approach (by putting this in GMPService), or if we need to tackle this differently. Chris or Anthony, can one of you answer this question, or is there someone else familiar with GMPService?
Flags: needinfo?(cpearce)
Flags: needinfo?(ajones)
I'll let cpearce answer this.
Flags: needinfo?(ajones)
Comment 3•9 years ago
|
||
Looks about right. :jwwang can review the GMPService changes.
Flags: needinfo?(cpearce)
Assignee | ||
Comment 4•9 years ago
|
||
:jwwang, would you be able to give me feedback on this approach? Do the changes to GMPService seem acceptable to you? I don't expect a full review just yet, I'm merely looking for initial feedback whether or not I should pursue this potential solution. Thank you!
Attachment #8580258 -
Attachment is obsolete: true
Flags: needinfo?(jwwang)
Assignee | ||
Comment 5•9 years ago
|
||
FYI: I finally got around to testing this patch and it as far as I can tell, it works exactly as advertised. The old GMP is correctly removed from disk during an update.
Comment 6•9 years ago
|
||
Comment on attachment 8580473 [details] [diff] [review] wip Review of attachment 8580473 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/gmp/GMPService.cpp @@ +649,3 @@ > mService->AddOnGMPThread(mPath); > } else { > + mService->RemoveOnGMPThread(mPath, mOperation == REMOVE ? false : true); (mPath, mOperation == REMOVE_AND_DELETE_FROM_DISK) ::: dom/media/gmp/mozIGeckoMediaPluginService.idl @@ +100,5 @@ > /** > + * Remove a directory for gecko media plugins and delete it from disk. > + * @note Main-thread API. > + */ > + void removeAndDeletePluginDirectory(in AString directory); I am fine with the naming. But it occurs to me there is apt-get on Linux which has a "purge" command.
Attachment #8580473 -
Flags: review+
Comment 7•9 years ago
|
||
Comment on attachment 8580473 [details] [diff] [review] wip Review of attachment 8580473 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/gmp/GMPService.cpp @@ +923,5 @@ > for (size_t i = 0; i < mPlugins.Length(); ++i) { > nsCOMPtr<nsIFile> pluginpath = mPlugins[i]->GetDirectory(); > bool equals; > if (NS_SUCCEEDED(directory->Equals(pluginpath, &equals)) && equals) { > mPlugins[i]->CloseActive(true); Btw, I think we also need to call AbortAsyncShutdown() to ensure the plugin is closed/shutdown immediately.
Assignee | ||
Comment 8•9 years ago
|
||
Thank you for the helpful feedback! I'm setting this back to r? to have you look over one additional change that I made to the patch (see details below). (In reply to JW Wang [:jwwang] from comment #7) > ::: dom/media/gmp/GMPService.cpp > @@ +923,5 @@ > > for (size_t i = 0; i < mPlugins.Length(); ++i) { > > nsCOMPtr<nsIFile> pluginpath = mPlugins[i]->GetDirectory(); > > bool equals; > > if (NS_SUCCEEDED(directory->Equals(pluginpath, &equals)) && equals) { > > mPlugins[i]->CloseActive(true); > > Btw, I think we also need to call AbortAsyncShutdown() to ensure the plugin > is closed/shutdown immediately. I believe you're right, but now that I'm reading this again I also believe that we need to call CloseActive(false) when we're removing the files from disk. Do my changes in this patch seem correct to you? Thanks again for your help!
Attachment #8580473 -
Attachment is obsolete: true
Flags: needinfo?(jwwang)
Attachment #8580860 -
Flags: review?(jwwang)
Assignee | ||
Comment 9•9 years ago
|
||
This simply adds a removeAndDeletePluginDirectory method to our MockGMPService in our tests to avoid JS errors saying that it isn't a function.
Attachment #8580862 -
Flags: review?(jwwang)
Comment 10•9 years ago
|
||
Comment on attachment 8580860 [details] [diff] [review] Patch Review of attachment 8580860 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/media/gmp/GMPService.cpp @@ +930,5 @@ > + mPlugins[i]->AbortAsyncShutdown(); > + pluginpath->Remove(true); > + } else { > + mPlugins[i]->CloseActive(true); > + } |aDeleteFromDisk == true| should do all things that |aDeleteFromDisk == false| would do in addition to |pluginpath->Remove(true)|, right?
Attachment #8580860 -
Flags: review?(jwwang) → review-
Updated•9 years ago
|
Attachment #8580862 -
Flags: review?(jwwang) → review+
Assignee | ||
Comment 11•9 years ago
|
||
Addressed feedback as discussed on irc.
Attachment #8580860 -
Attachment is obsolete: true
Attachment #8581391 -
Flags: review?(jwwang)
Assignee | ||
Comment 12•9 years ago
|
||
Comment on attachment 8581391 [details] [diff] [review] Patch Sorry, wrong patch :-/
Attachment #8581391 -
Flags: review?(jwwang)
Assignee | ||
Comment 13•9 years ago
|
||
Attachment #8581391 -
Attachment is obsolete: true
Attachment #8581392 -
Flags: review?(jwwang)
Updated•9 years ago
|
Attachment #8581392 -
Flags: review?(jwwang) → review+
Assignee | ||
Comment 14•9 years ago
|
||
Updated for current trunk. Carrying over r+.
Attachment #8581392 -
Attachment is obsolete: true
Attachment #8581400 -
Flags: review+
Assignee | ||
Comment 15•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/a23240479b9b https://hg.mozilla.org/integration/mozilla-inbound/rev/181e52c05fe0
Comment 16•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a23240479b9b https://hg.mozilla.org/mozilla-central/rev/181e52c05fe0
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
Assignee | ||
Comment 17•9 years ago
|
||
[Tracking Requested - why for this release]: This is part of EME, which is slated for first release in Firefox 38.
status-firefox38:
--- → affected
tracking-firefox38:
--- → ?
Assignee | ||
Updated•9 years ago
|
status-firefox37:
--- → disabled
Assignee | ||
Comment 18•9 years ago
|
||
Note: this patch requires the combined aurora patch for bug 1140263 to be applied first! Approval Request Comment [Feature/regressing bug #]: Adobe EME [User impact if declined]: When GMPs are updated, we would not delete the old files and leave them on disk. [Describe test coverage new/current, TreeHerder]: We have mochitest and xpcshell regression tests. Local testing confirms that old GMPs are properly removed from disk during updates. [Risks and why]: minimal [String/UUID change made/needed]: The UUID for mozIGeckoMediaPluginService had to be updated due to the addition of the new |removeAndDeletePluginDirectory| method.
Attachment #8581636 -
Flags: review+
Attachment #8581636 -
Flags: approval-mozilla-aurora?
Updated•9 years ago
|
Updated•9 years ago
|
Attachment #8581636 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 19•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/595d5143f8e1
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•