Do not filter out platform objects when doing dictionary conversions

https://heycam.github.io/webidl/#es-overloads

In step 12, the platform object check is for substep 4, but importantly it only matters if `V` implements the matching interface. If not, it should be able to fall back to substep 10 and attempt conversion to a dictionary.
This commit is contained in:
Manish Goregaokar 2020-04-08 23:13:59 -07:00
parent 37023b24f2
commit c24481ab9c

View file

@ -429,8 +429,8 @@ class CGMethodCall(CGThing):
# Check for vanilla JS objects
# XXXbz Do we need to worry about security wrappers?
pickFirstSignature("%s.get().is_object() && !is_platform_object(%s.get().to_object(), *cx)" %
(distinguishingArg, distinguishingArg),
pickFirstSignature("%s.get().is_object()" %
distinguishingArg,
lambda s: (s[1][distinguishingIndex].type.isCallback() or
s[1][distinguishingIndex].type.isCallbackInterface() or
s[1][distinguishingIndex].type.isDictionary() or