Closed Bug 1036419 Opened 10 years ago Closed 10 years ago

Add lock to GrallocReporter::CollectReports()

Categories

(Core :: Graphics: Layers, defect)

32 Branch
ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 1 obsolete file)

In Bug 1034294, SharedBufferManagerParent's lock problems are fixed except GrallocReporter::CollectReports().

To fix Bug 1034294 quickly, the fix of GrallocReporter::CollectReports() was put off. This bug fixes remaining GrallocReporter::CollectReports().

See Bug 1034294 Comment 19.
Assignee: nobody → sotaro.ikeda.g
Depends on: 1034294
GrallocReporter::CollectReports() does not have a problem on b2g-v2.0. It need to be fixed only on master.
Attachment #8453076 - Flags: review?(nical.bugzilla)
Comment on attachment 8453076 [details] [diff] [review]
patch - Add lock to GrallocReporter::CollectReports()

Review of attachment 8453076 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/ipc/SharedBufferManagerParent.cpp
@@ +43,5 @@
>    NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
>                              nsISupports* aData, bool aAnonymize)
>    {
> +    if (SharedBufferManagerParent::sManagerMonitor) {
> +      MonitorAutoLock lock(*SharedBufferManagerParent::sManagerMonitor.get());

What is this doing (there is nothing in the scope of this branch to lock)?
(In reply to Nicolas Silva [:nical] from comment #5)
> Comment on attachment 8453076 [details] [diff] [review]
> patch - Add lock to GrallocReporter::CollectReports()
> 
> Review of attachment 8453076 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: gfx/layers/ipc/SharedBufferManagerParent.cpp
> @@ +43,5 @@
> >    NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
> >                              nsISupports* aData, bool aAnonymize)
> >    {
> > +    if (SharedBufferManagerParent::sManagerMonitor) {
> > +      MonitorAutoLock lock(*SharedBufferManagerParent::sManagerMonitor.get());
> 
> What is this doing (there is nothing in the scope of this branch to lock)?

Oh, I do not know why I wrote such code... I just wanted to handle the case that static was already deleted because of xpcom shutdown. I am going to update the patch.
Attachment #8453076 - Flags: review?(nical.bugzilla)
Attachment #8453990 - Flags: review?(nical.bugzilla)
Attachment #8453990 - Flags: review?(nical.bugzilla) → review+
https://hg.mozilla.org/mozilla-central/rev/25e80aa9ebd9
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
Blocks: 1037360
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: