<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Autogenerated IDBFactory.open() does not allow `undefined` for the second argument"
   href="https://bugs.webkit.org/show_bug.cgi?id=156939">156939</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Autogenerated IDBFactory.open() does not allow `undefined` for the second argument
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>WebKit Nightly Build
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Bindings
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>beidson&#64;apple.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Autogenerated IDBFactory.open() does not allow `undefined` for the second argument

The IDL looks like this:
    [CallWith=ScriptExecutionContext, RaisesExceptionWithMessage] IDBOpenDBRequest open(DOMString name, [EnforceRange] optional unsigned long long version);

The generated code does the following:
1 - Checks to see if there's exactly 1 argument.
2 - If so, it calls IDBFactory::open(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCodeWithMessage&amp;);
3 - If there is more than one argument, it gets the second argument and converts it to a uint64_t with a range check.
4 - If the conversion failed, it throws an exception for the EnforceRange - &quot;NaN is outside the range 0..2^64-1&quot;

Instead, at step 3, it should allow an explicit &quot;undefined&quot; and call the first form of IDBFactory::open() from step #2</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>