[Webkit-unassigned] [Bug 142562] New: optional sequence values not handled correctly by binding generator

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Mar 10 20:34:23 PDT 2015


            Bug ID: 142562
           Summary: optional sequence values not handled correctly by
                    binding generator
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Bindings
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: bzbarsky at mit.edu

STEPS TO REPRODUCE: Load this testcase:

    try {
      postMessage(5, "*", null);
      alert("FAIL: null is not a valid value for optional sequence");
    } catch (e) {
      alert("PASS: " + e);

EXPECTED RESULT: An alert saying "PASS" followed by an exception that indicates that the null argument is not a valid third argument for postMessage on Window.

ACTUAL RESULT: An alert saying "FAIL".

ADDITIONAL INFORMATION: The IDL in the spec for Window is:

  void postMessage(any message, DOMString targetOrigin, 
                   optional sequence<Transferable> transfer);

Per http://heycam.github.io/webidl/#es-sequence only objects can represent a sequence.  The optional annotation means that undefined is also allowed.  But null is not undefined and not an object, so can't be converted to an argument of type "optional sequence<Transferable>".

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150311/7ce66b37/attachment-0002.html>

More information about the webkit-unassigned mailing list