Bug 101620 - WebIDL: Incorrect type conversion for interface types
Summary: WebIDL: Incorrect type conversion for interface types
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL: http://www.w3.org/TR/WebIDL/#es-inter...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-08 10:09 PST by Erik Arvidsson
Modified: 2014-09-30 08:29 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2012-11-08 10:09:51 PST
If the operation argument is of type T, where T is an interface type (ie Node) we should throw a TypeError if the value is not a T. Currently we always convert this to null leading us to pass null into the webcore function.

DOM spec:

Node insertBefore(Node node, Node? child);

WebKit IDL:

If we call insertBefore(someNode, 42) we fail to convert 42 to a Node so we treat it as null which is not correct.