Closed Bug 1281909 Opened 8 years ago Closed 7 years ago

Should I be able to piggyback custom properties on OffscreenCanvas objects transferred to a Worker?

Categories

(Core :: Graphics: CanvasWebGL, defect, P3)

defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox50 --- affected

People

(Reporter: jujjyl, Unassigned)

References

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file)

With the pref gfx.offscreencanvas.enabled = true in Nightly, run the attached html page.

That will print the following in console:

in main thread: canvas.id: mycustomid
inside worker: canvas.id: undefined

Is this expected behavior that the id field dies, or should it be possible to pass custom properties as part of an OffscreenCanvas object when transferring it to a Worker?
:pchang, can you answer for forward the question?
Flags: needinfo?(howareyou322)
Whiteboard: [gfx-noted]
Morris, any idea for this?
Flags: needinfo?(howareyou322) → needinfo?(mtseng)
Currently in our implementation, we don't transfer custom properties since custom properties may not transferable.
Flags: needinfo?(mtseng)
In the spec, the shallow serialization algorithms used for transferring platform objects don't serialize custom properties.  For each type of platform object that is transferable, the spec defines the necessary transfer algorithms. The "transfer steps" and transfer-receiving steps" for OffscreenCanvas are defined here: https://html.spec.whatwg.org/multipage/canvas.html#offscreencanvas Those steps do not transfer custom properties.
Thanks for confirming Justin, much appreciated!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: