Closed Bug 1342754 Opened 3 years ago Closed 3 years ago

ImageKey id allocation conflict by Bug 1342246

Categories

(Core :: Graphics: WebRender, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox54 --- fixed

People

(Reporter: sotaro, Assigned: sotaro)

References

Details

Attachments

(1 file, 2 obsolete files)

Since Bug 1342246 fix, ImageKey allocation causes conflicts. 

WebRenderBridgeChild::mIdNamespace is not unique, since root WebRenderBridgeParent and another WebRenderBridgeParents share same wr::WebRenderAPI. And get IdNamespace by WebRenderAPI::GetNamespace().
Blocks: 1342246
Assignee: nobody → sotaro.ikeda.g
The following constructor also has a problem, since, sync ipc happens after the constructor.
 > WebRenderBridgeChild::WebRenderBridgeChild(const wr::PipelineId& aPipelineId, uint32_t aIdNamespace)
Blocks: webrender
Attachment #8841323 - Attachment is obsolete: true
Summary: ImageKey allocation conflict by Bug 1342246 → ImageKey id allocation conflict by Bug 1342246
Attachment #8841324 - Flags: review?(jmuizelaar)
Attachment #8841324 - Flags: review?(bugmail)
Can't we just use the process id of the child for this?
(In reply to Lee Salzman [:lsalzman] from comment #4)
> Can't we just use the process id of the child for this?

Is there a possibility of id conflict when child processs are created/deleted repeatedly?
(In reply to Sotaro Ikeda [:sotaro] from comment #5)
> (In reply to Lee Salzman [:lsalzman] from comment #4)
> > Can't we just use the process id of the child for this?
> 
> Is there a possibility of id conflict when child processs are
> created/deleted repeatedly?

Linux, at least, works through the entire process id space before reusing them. And also, aren't the resources created by the children here essentially only going to live as long as the children anyway, so that this becomes moot?
Attachment #8841324 - Flags: review?(jmuizelaar) → review+
Attachment #8841324 - Flags: review?(bugmail)
(In reply to Lee Salzman [:lsalzman] from comment #6)
> > 
> > Is there a possibility of id conflict when child processs are
> > created/deleted repeatedly?
> 
> Linux, at least, works through the entire process id space before reusing
> them. And also, aren't the resources created by the children here
> essentially only going to live as long as the children anyway, so that this
> becomes moot?

how to allocate process is platform dependent thing and cleaning children on parent side could happen asynchronously. The order of the tasks could be inverted. Then current approach seems safer than using process id.
Rebased.
Attachment #8841324 - Attachment is obsolete: true
Attachment #8841410 - Flags: review+
Pushed by sikeda@mozilla.com:
https://hg.mozilla.org/projects/graphics/rev/709f9115cd70
Make WebRenderBridgeChild::mIdNamespace unique r=jrmuizel
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.