Open Bug 1832247 Opened 3 years ago Updated 3 years ago

Remove `canTransfer` hook from custom serialization mechanism (structured clone)

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

People

(Reporter: sfink, Unassigned)

References

(Blocks 1 open bug)

Details

The canTransfer hook just returns true or false. Except that it is only called for things in the transfer list, which means that returning false will always result in an error: you requested transferring something that says it cannot be transferred. I believe this is only here because of a past revision of the spec that wanted an early failure.

The current HTML spec doesn't have this hook, it says that an error should be thrown while transferring. I'm not sure if this causes any ordering bugs (yet), but the HTML spec way is definitely better and this hook should just be removed.

Severity: -- → N/A
Priority: -- → P2
You need to log in before you can comment on or make changes to this bug.