<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[199970] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/199970">199970</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-04-24 17:27:30 -0700 (Sun, 24 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Autogenerated IDBFactory.open() does the wrong thing if you pass an explicit 'undefined' as the second argument
https://bugs.webkit.org/show_bug.cgi?id=156939

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Re-sync tests from upstream b1818929.

* IndexedDB-private-browsing/idbfactory_open9-expected.txt:
* IndexedDB-private-browsing/idbfactory_open9.html:
* web-platform-tests/IndexedDB/idbfactory_open9-expected.txt:
* web-platform-tests/IndexedDB/idbfactory_open9.htm:

Source/WebCore:

As per WebIDL, if undefined is passed by JS for an optional parameter then
we should use its default value if it has one, or use the special value
&quot;missing&quot;:
http://heycam.github.io/webidl/#es-overloads (step 10.4)

Our bindings generator was already mapping undefined to the parameter's
default value when present. However, it was missing the notion of
&quot;missing&quot; value when there no default value. This patch adds supports
for its by passing Optional&lt;&gt;(Nullopt) to the implementation in such
case. This means that the implementation will need to use WTF::Optional&lt;&gt;
type for parameters that do not have a default value. Thankfully though,
in most cases, we will be able to specify a default value in the IDL
so cases where we will need to use WTF::Optional&lt;&gt; will actually be
rare.

To avoid having to do too much refactoring in this patch, the support
for WTF::Optional is currently blacklisted for most IDL types. I will
gradually stop blacklisting each type in follow-up patches, as I either:
- Add default parameter values in our IDL (preferred)
- Use WTF::Optional&lt;&gt; in our implementation (when we cannot specify a
  default value).

This patch fixes a bug with IDBFactory.open()'s second parameter (version)
for which undefined should not throw and indicate that the version
should not be changed. We now use WTF::Optional in the implementation to
distinguish this case and not throw.

No new tests, existing tests were updated / rebaselined.

* Modules/indexeddb/IDBFactory.cpp:
(WebCore::IDBFactory::open):
(WebCore::IDBFactory::openInternal): Deleted.
* Modules/indexeddb/IDBFactory.h:
* bindings/scripts/CodeGeneratorJS.pm:
(ShouldUseWTFOptionalForParameterType):
(GenerateParametersCheck):
* fileapi/Blob.idl:
* inspector/InspectorIndexedDBAgent.cpp:

LayoutTests:

Update / rebaseline existing test now that passing undefined as second parameter to
IDBFactory.open() no longer throws.

* storage/indexeddb/intversion-bad-parameters-expected.txt:
* storage/indexeddb/intversion-bad-parameters-private-expected.txt:
* storage/indexeddb/resources/intversion-bad-parameters.js:
(deleteSuccess):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cChangeLog">trunk/LayoutTests/imported/w3c/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbfactory_open9expectedtxt">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbfactory_open9html">trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9.html</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_open9expectedtxt">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt</a></li>
<li><a href="#trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_open9htm">trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9.htm</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbintversionbadparametersexpectedtxt">trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbintversionbadparametersprivateexpectedtxt">trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-private-expected.txt</a></li>
<li><a href="#trunkLayoutTestsstorageindexeddbresourcesintversionbadparametersjs">trunk/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactorycpp">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBFactoryh">trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm">trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp">trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm">trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestObjidl">trunk/Source/WebCore/bindings/scripts/test/TestObj.idl</a></li>
<li><a href="#trunkSourceWebCorebindingsscriptstestTestTypedefsidl">trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl</a></li>
<li><a href="#trunkSourceWebCorefileapiBlobidl">trunk/Source/WebCore/fileapi/Blob.idl</a></li>
<li><a href="#trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp">trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/ChangeLog        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2016-04-24  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Autogenerated IDBFactory.open() does the wrong thing if you pass an explicit 'undefined' as the second argument
+        https://bugs.webkit.org/show_bug.cgi?id=156939
+
+        Reviewed by Darin Adler.
+
+        Update / rebaseline existing test now that passing undefined as second parameter to
+        IDBFactory.open() no longer throws.
+
+        * storage/indexeddb/intversion-bad-parameters-expected.txt:
+        * storage/indexeddb/intversion-bad-parameters-private-expected.txt:
+        * storage/indexeddb/resources/intversion-bad-parameters.js:
+        (deleteSuccess):
+
</ins><span class="cx"> 2016-04-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebIDL] Drop [Default] WebKit-IDL extended attribute
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/ChangeLog (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/ChangeLog        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/imported/w3c/ChangeLog        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-04-24  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Autogenerated IDBFactory.open() does the wrong thing if you pass an explicit 'undefined' as the second argument
+        https://bugs.webkit.org/show_bug.cgi?id=156939
+
+        Reviewed by Darin Adler.
+
+        Re-sync tests from upstream b1818929.
+
+        * IndexedDB-private-browsing/idbfactory_open9-expected.txt:
+        * IndexedDB-private-browsing/idbfactory_open9.html:
+        * web-platform-tests/IndexedDB/idbfactory_open9-expected.txt:
+        * web-platform-tests/IndexedDB/idbfactory_open9.htm:
+
</ins><span class="cx"> 2016-04-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebIDL] Drop [Default] WebKit-IDL extended attribute
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbfactory_open9expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9-expected.txt (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9-expected.txt        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9-expected.txt        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -9,7 +9,6 @@
</span><span class="cx"> PASS Calling open() with version argument Infinity should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument -Infinity should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument &quot;foo&quot; should throw TypeError. 
</span><del>-PASS Calling open() with version argument undefined should throw TypeError. 
</del><span class="cx"> PASS Calling open() with version argument null should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument false should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument object should throw TypeError. 
</span><span class="lines">@@ -17,4 +16,5 @@
</span><span class="cx"> PASS Calling open() with version argument object (third) should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument 1.5 should not throw. 
</span><span class="cx"> PASS Calling open() with version argument 9007199254740991 should not throw. 
</span><ins>+PASS Calling open() with version argument undefined should not throw. 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cIndexedDBprivatebrowsingidbfactory_open9html"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9.html (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9.html        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/imported/w3c/IndexedDB-private-browsing/idbfactory_open9.html        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -2,7 +2,6 @@
</span><span class="cx"> &lt;title&gt;IDBFactory.open() - errors in version argument&lt;/title&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> &lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
</span><del>-&lt;script src=support.js&gt;&lt;/script&gt;
</del><span class="cx"> 
</span><span class="cx"> &lt;script&gt;
</span><span class="cx"> function should_throw(val, name) {
</span><span class="lines">@@ -26,7 +25,6 @@
</span><span class="cx"> should_throw(Infinity)
</span><span class="cx"> should_throw(-Infinity)
</span><span class="cx"> should_throw(&quot;foo&quot;)
</span><del>-should_throw(undefined)
</del><span class="cx"> should_throw(null)
</span><span class="cx"> should_throw(false)
</span><span class="cx"> 
</span><span class="lines">@@ -46,17 +44,27 @@
</span><span class="cx"> 
</span><span class="cx"> /* Valid */
</span><span class="cx"> 
</span><del>-function should_work(val) {
</del><ins>+function should_work(val, expected_version) {
</ins><span class="cx">     var name = format_value(val);
</span><del>-    var t = async_test(&quot;Calling open() with version argument &quot; + name + &quot; should not throw.&quot;)
-    var rq = createdb(t, val)
-    rq.onupgradeneeded = function() {
-        t.done()
-    }
</del><ins>+    var dbname = 'test-db-does-not-exist';
+    async_test(function(t) {
+        window.indexedDB.deleteDatabase(dbname);
+        var rq = window.indexedDB.open(dbname, val);
+        rq.onupgradeneeded = t.step_func(function() {
+            var db = rq.result;
+            assert_equals(db.version, expected_version, 'version');
+            rq.transaction.abort();
+        });
+        rq.onsuccess = t.unreached_func(&quot;open should fail&quot;);
+        rq.onerror = t.step_func(function() {
+            t.done()
+        });
+    }, &quot;Calling open() with version argument &quot; + name + &quot; should not throw.&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-should_work(1.5)
-should_work(Number.MAX_SAFE_INTEGER)  // 0x20000000000000 - 1
</del><ins>+should_work(1.5, 1)
+should_work(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)  // 0x20000000000000 - 1
+should_work(undefined, 1)
</ins><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_open9expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9-expected.txt        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -9,7 +9,6 @@
</span><span class="cx"> PASS Calling open() with version argument Infinity should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument -Infinity should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument &quot;foo&quot; should throw TypeError. 
</span><del>-PASS Calling open() with version argument undefined should throw TypeError. 
</del><span class="cx"> PASS Calling open() with version argument null should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument false should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument object should throw TypeError. 
</span><span class="lines">@@ -17,4 +16,5 @@
</span><span class="cx"> PASS Calling open() with version argument object (third) should throw TypeError. 
</span><span class="cx"> PASS Calling open() with version argument 1.5 should not throw. 
</span><span class="cx"> PASS Calling open() with version argument 9007199254740991 should not throw. 
</span><ins>+PASS Calling open() with version argument undefined should not throw. 
</ins><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsimportedw3cwebplatformtestsIndexedDBidbfactory_open9htm"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9.htm (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9.htm        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/IndexedDB/idbfactory_open9.htm        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -1,18 +1,16 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;title&gt;IDBFactory.open() - errors in version argument&lt;/title&gt;
</span><del>-&lt;script src=&quot;../../../resources/testharness.js&quot;&gt;&lt;/script&gt;
-&lt;script src=&quot;../../../resources/testharnessreport.js&quot;&gt;&lt;/script&gt;
-&lt;script src=support.js&gt;&lt;/script&gt;
</del><ins>+&lt;script src=/resources/testharness.js&gt;&lt;/script&gt;
+&lt;script src=/resources/testharnessreport.js&gt;&lt;/script&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;script&gt;
</span><del>-var date = Date();
</del><span class="cx"> function should_throw(val, name) {
</span><span class="cx">     if (!name) {
</span><span class="cx">         name = ((typeof val == &quot;object&quot; &amp;&amp; val) ? &quot;object&quot; : format_value(val))
</span><span class="cx">     }
</span><span class="cx">     test(function() {
</span><span class="cx">       assert_throws(new TypeError(), function() {
</span><del>-        window.indexedDB.open('test' + date, val);
</del><ins>+        window.indexedDB.open('test', val);
</ins><span class="cx">       });
</span><span class="cx">     }, &quot;Calling open() with version argument &quot; + name + &quot; should throw TypeError.&quot;)
</span><span class="cx"> }
</span><span class="lines">@@ -27,7 +25,6 @@
</span><span class="cx"> should_throw(Infinity)
</span><span class="cx"> should_throw(-Infinity)
</span><span class="cx"> should_throw(&quot;foo&quot;)
</span><del>-should_throw(undefined)
</del><span class="cx"> should_throw(null)
</span><span class="cx"> should_throw(false)
</span><span class="cx"> 
</span><span class="lines">@@ -47,18 +44,27 @@
</span><span class="cx"> 
</span><span class="cx"> /* Valid */
</span><span class="cx"> 
</span><del>-function should_work(val) {
-    
</del><ins>+function should_work(val, expected_version) {
</ins><span class="cx">     var name = format_value(val);
</span><del>-    var t = async_test(&quot;Calling open() with version argument &quot; + name + &quot; should not throw.&quot;)
-    var rq = createdb(t, val + date)
-    rq.onupgradeneeded = function() {
-        t.done()
-    }
</del><ins>+    var dbname = 'test-db-does-not-exist';
+    async_test(function(t) {
+        window.indexedDB.deleteDatabase(dbname);
+        var rq = window.indexedDB.open(dbname, val);
+        rq.onupgradeneeded = t.step_func(function() {
+            var db = rq.result;
+            assert_equals(db.version, expected_version, 'version');
+            rq.transaction.abort();
+        });
+        rq.onsuccess = t.unreached_func(&quot;open should fail&quot;);
+        rq.onerror = t.step_func(function() {
+            t.done()
+        });
+    }, &quot;Calling open() with version argument &quot; + name + &quot; should not throw.&quot;)
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-should_work(1.5)
-should_work(Number.MAX_SAFE_INTEGER)  // 0x20000000000000 - 1
</del><ins>+should_work(1.5, 1)
+should_work(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER)  // 0x20000000000000 - 1
+should_work(undefined, 1)
</ins><span class="cx"> 
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbintversionbadparametersexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-expected.txt        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -35,9 +35,7 @@
</span><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, null)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS indexedDB.open(dbname, null) threw TypeError: IDBFactory.open() called with a version of 0
</span><del>-Expecting TypeError exception from indexedDB.open(dbname, undefined)
-PASS Exception was thrown.
-PASS indexedDB.open(dbname, undefined) threw TypeError: Value NaN is outside the range [0, 9007199254740991]
</del><ins>+PASS indexedDB.open(dbname, undefined) did not throw exception.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbintversionbadparametersprivateexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-private-expected.txt (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-private-expected.txt        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/storage/indexeddb/intversion-bad-parameters-private-expected.txt        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -35,9 +35,7 @@
</span><span class="cx"> Expecting TypeError exception from indexedDB.open(dbname, null)
</span><span class="cx"> PASS Exception was thrown.
</span><span class="cx"> PASS indexedDB.open(dbname, null) threw TypeError: IDBFactory.open() called with a version of 0
</span><del>-Expecting TypeError exception from indexedDB.open(dbname, undefined)
-PASS Exception was thrown.
-PASS indexedDB.open(dbname, undefined) threw TypeError: Value NaN is outside the range [0, 9007199254740991]
</del><ins>+PASS indexedDB.open(dbname, undefined) did not throw exception.
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsstorageindexeddbresourcesintversionbadparametersjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/LayoutTests/storage/indexeddb/resources/intversion-bad-parameters.js        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -26,7 +26,7 @@
</span><span class="cx">     evalAndExpectExceptionClass(&quot;indexedDB.open(dbname, -1)&quot;, &quot;TypeError&quot;);
</span><span class="cx">     evalAndExpectExceptionClass(&quot;indexedDB.open(dbname, 0x20000000000000)&quot;, &quot;TypeError&quot;);
</span><span class="cx">     evalAndExpectExceptionClass(&quot;indexedDB.open(dbname, null)&quot;, &quot;TypeError&quot;);
</span><del>-    evalAndExpectExceptionClass(&quot;indexedDB.open(dbname, undefined)&quot;, &quot;TypeError&quot;);
</del><ins>+    shouldNotThrow(&quot;indexedDB.open(dbname, undefined)&quot;);
</ins><span class="cx">     finishJSTest();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/ChangeLog        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2016-04-24  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Autogenerated IDBFactory.open() does the wrong thing if you pass an explicit 'undefined' as the second argument
+        https://bugs.webkit.org/show_bug.cgi?id=156939
+
+        Reviewed by Darin Adler.
+
+        As per WebIDL, if undefined is passed by JS for an optional parameter then
+        we should use its default value if it has one, or use the special value
+        &quot;missing&quot;:
+        http://heycam.github.io/webidl/#es-overloads (step 10.4)
+
+        Our bindings generator was already mapping undefined to the parameter's
+        default value when present. However, it was missing the notion of
+        &quot;missing&quot; value when there no default value. This patch adds supports
+        for its by passing Optional&lt;&gt;(Nullopt) to the implementation in such
+        case. This means that the implementation will need to use WTF::Optional&lt;&gt;
+        type for parameters that do not have a default value. Thankfully though,
+        in most cases, we will be able to specify a default value in the IDL
+        so cases where we will need to use WTF::Optional&lt;&gt; will actually be
+        rare.
+
+        To avoid having to do too much refactoring in this patch, the support
+        for WTF::Optional is currently blacklisted for most IDL types. I will
+        gradually stop blacklisting each type in follow-up patches, as I either:
+        - Add default parameter values in our IDL (preferred)
+        - Use WTF::Optional&lt;&gt; in our implementation (when we cannot specify a
+          default value).
+
+        This patch fixes a bug with IDBFactory.open()'s second parameter (version)
+        for which undefined should not throw and indicate that the version
+        should not be changed. We now use WTF::Optional in the implementation to
+        distinguish this case and not throw.
+
+        No new tests, existing tests were updated / rebaselined.
+
+        * Modules/indexeddb/IDBFactory.cpp:
+        (WebCore::IDBFactory::open):
+        (WebCore::IDBFactory::openInternal): Deleted.
+        * Modules/indexeddb/IDBFactory.h:
+        * bindings/scripts/CodeGeneratorJS.pm:
+        (ShouldUseWTFOptionalForParameterType):
+        (GenerateParametersCheck):
+        * fileapi/Blob.idl:
+        * inspector/InspectorIndexedDBAgent.cpp:
+
</ins><span class="cx"> 2016-04-23  Chris Dumez  &lt;cdumez@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [WebIDL] Drop [Default] WebKit-IDL extended attribute
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactorycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.cpp        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -76,24 +76,17 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, ExceptionCodeWithMessage&amp; ec)
</del><ins>+RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, Optional&lt;unsigned long long&gt; version, ExceptionCodeWithMessage&amp; ec)
</ins><span class="cx"> {
</span><span class="cx">     LOG(IndexedDB, &quot;IDBFactory::open&quot;);
</span><span class="cx">     
</span><del>-    return openInternal(context, name, 0, ec);
-}
-
-RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::open(ScriptExecutionContext&amp; context, const String&amp; name, unsigned long long version, ExceptionCodeWithMessage&amp; ec)
-{
-    LOG(IndexedDB, &quot;IDBFactory::open&quot;);
-    
-    if (!version) {
</del><ins>+    if (version &amp;&amp; !version.value()) {
</ins><span class="cx">         ec.code = TypeError;
</span><span class="cx">         ec.message = ASCIILiteral(&quot;IDBFactory.open() called with a version of 0&quot;);
</span><span class="cx">         return nullptr;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    return openInternal(context, name, version, ec);
</del><ins>+    return openInternal(context, name, version.valueOr(0), ec);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RefPtr&lt;IDBOpenDBRequest&gt; IDBFactory::openInternal(ScriptExecutionContext&amp; context, const String&amp; name, unsigned long long version, ExceptionCodeWithMessage&amp; ec)
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBFactoryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBFactory.h        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -53,8 +53,7 @@
</span><span class="cx">     static Ref&lt;IDBFactory&gt; create(IDBClient::IDBConnectionProxy&amp;);
</span><span class="cx">     ~IDBFactory();
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCodeWithMessage&amp;);
-    RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, unsigned long long version, ExceptionCodeWithMessage&amp;);
</del><ins>+    RefPtr&lt;IDBOpenDBRequest&gt; open(ScriptExecutionContext&amp;, const String&amp; name, Optional&lt;unsigned long long&gt; version, ExceptionCodeWithMessage&amp;);
</ins><span class="cx">     RefPtr&lt;IDBOpenDBRequest&gt; deleteDatabase(ScriptExecutionContext&amp;, const String&amp; name, ExceptionCodeWithMessage&amp;);
</span><span class="cx"> 
</span><span class="cx">     short cmp(ScriptExecutionContext&amp;, JSC::JSValue first, JSC::JSValue second, ExceptionCodeWithMessage&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptsCodeGeneratorJSpm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -3370,6 +3370,29 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+sub CanUseWTFOptionalForParameterType
+{
+    my $type  = shift;
+
+    # FIXME: We should progressively stop blacklisting each type below
+    # and eventually get rid of this function entirely.
+    return 0 if $codeGenerator-&gt;IsEnumType($type);
+    return 0 if $codeGenerator-&gt;IsTypedArrayType($type);
+    return 0 if $codeGenerator-&gt;IsWrapperType($type);
+    return 0 if $type eq &quot;DOMString&quot;;
+    return 0 if $type eq &quot;Dictionary&quot;;
+    return 0 if $type eq &quot;any&quot;;
+    return 0 if $type eq &quot;boolean&quot;;
+    return 0 if $type eq &quot;float&quot;;
+    return 0 if $type eq &quot;long&quot;;
+    return 0 if $type eq &quot;unrestricted float&quot;;
+    return 0 if $type eq &quot;unrestricted double&quot;;
+    return 0 if $type eq &quot;unsigned long&quot;;
+    return 0 if $type eq &quot;unsigned short&quot;;
+
+    return 1;
+}
+
</ins><span class="cx"> sub GenerateParametersCheck
</span><span class="cx"> {
</span><span class="cx">     my $outputArray = shift;
</span><span class="lines">@@ -3419,7 +3442,7 @@
</span><span class="cx">         # Optional arguments with [Optional=...] should not generate the early call.
</span><span class="cx">         # Optional Dictionary arguments always considered to have default of empty dictionary.
</span><span class="cx">         my $optional = $parameter-&gt;isOptional;
</span><del>-        if ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; $argType ne &quot;Dictionary&quot; &amp;&amp; !$codeGenerator-&gt;IsCallbackInterface($argType)) {
</del><ins>+        if ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; !CanUseWTFOptionalForParameterType($parameter-&gt;type) &amp;&amp; $argType ne &quot;Dictionary&quot; &amp;&amp; !$codeGenerator-&gt;IsCallbackInterface($argType)) {
</ins><span class="cx">             # Generate early call if there are enough parameters.
</span><span class="cx">             if (!$hasOptionalArguments) {
</span><span class="cx">                 push(@$outputArray, &quot;\n    size_t argsCount = state-&gt;argumentCount();\n&quot;);
</span><span class="lines">@@ -3576,6 +3599,8 @@
</span><span class="cx">             } else {
</span><span class="cx">                 my $outer;
</span><span class="cx">                 my $inner;
</span><ins>+                my $nativeType = GetNativeTypeFromSignature($parameter);
+
</ins><span class="cx">                 if ($optional &amp;&amp; defined($parameter-&gt;default)) {
</span><span class="cx">                     my $defaultValue = $parameter-&gt;default;
</span><span class="cx"> 
</span><span class="lines">@@ -3592,16 +3617,23 @@
</span><span class="cx">                     } else {
</span><span class="cx">                         $defaultValue = &quot;nullptr&quot; if $defaultValue eq &quot;null&quot;;
</span><span class="cx">                         $defaultValue = &quot;PNaN&quot; if $defaultValue eq &quot;NaN&quot;;
</span><del>-                        $defaultValue = GetNativeTypeFromSignature($parameter) . &quot;()&quot; if $defaultValue eq &quot;[]&quot;;
</del><ins>+                        $defaultValue = &quot;$nativeType()&quot; if $defaultValue eq &quot;[]&quot;;
</ins><span class="cx">                     }
</span><span class="cx"> 
</span><span class="cx">                     $outer = &quot;state-&gt;argument($argsIndex).isUndefined() ? $defaultValue : &quot;;
</span><span class="cx">                     $inner = &quot;state-&gt;uncheckedArgument($argsIndex)&quot;;
</span><ins>+                } elsif ($optional &amp;&amp; !defined($parameter-&gt;default) &amp;&amp; CanUseWTFOptionalForParameterType($parameter-&gt;type)) {
+                    # Use WTF::Optional&lt;&gt;() for optional parameters that are missing or undefined and that do not have
+                    # a default value in the IDL.
+                    my $defaultValue = &quot;Optional&lt;$nativeType&gt;()&quot;;
+                    $nativeType = &quot;Optional&lt;$nativeType&gt;&quot;;
+                    $outer = &quot;state-&gt;argument($argsIndex).isUndefined() ? $defaultValue : &quot;;
+                    $inner = &quot;state-&gt;uncheckedArgument($argsIndex)&quot;;
</ins><span class="cx">                 } else {
</span><span class="cx">                     $outer = &quot;&quot;;
</span><span class="cx">                     $inner = &quot;state-&gt;argument($argsIndex)&quot;;
</span><span class="cx">                 }
</span><del>-                push(@$outputArray, &quot;    &quot; . GetNativeTypeFromSignature($parameter) . &quot; $name = $outer&quot; . JSValueToNative($parameter, $inner, $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;}) . &quot;;\n&quot;);
</del><ins>+                push(@$outputArray, &quot;    $nativeType $name = $outer&quot; . JSValueToNative($parameter, $inner, $function-&gt;signature-&gt;extendedAttributes-&gt;{&quot;Conditional&quot;}) . &quot;;\n&quot;);
</ins><span class="cx">             }
</span><span class="cx"> 
</span><span class="cx">             # Check if the type conversion succeeded.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.cpp        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -1648,6 +1648,58 @@
</span><span class="cx">     item-&gt;methodWithOptionalFloatIsNaN(number);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void webkit_dom_test_obj_method_with_optional_long_long(WebKitDOMTestObj* self, gint64 number)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    WebCore::TestObj* item = WebKit::core(self);
+    item-&gt;methodWithOptionalLongLong(number);
+}
+
+void webkit_dom_test_obj_method_with_optional_long_long_is_zero(WebKitDOMTestObj* self, gint64 number)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    WebCore::TestObj* item = WebKit::core(self);
+    item-&gt;methodWithOptionalLongLongIsZero(number);
+}
+
+void webkit_dom_test_obj_method_with_optional_unsigned_long_long(WebKitDOMTestObj* self, guint64 number)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    WebCore::TestObj* item = WebKit::core(self);
+    item-&gt;methodWithOptionalUnsignedLongLong(number);
+}
+
+void webkit_dom_test_obj_method_with_optional_unsigned_long_long_is_zero(WebKitDOMTestObj* self, guint64 number)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    WebCore::TestObj* item = WebKit::core(self);
+    item-&gt;methodWithOptionalUnsignedLongLongIsZero(number);
+}
+
+void webkit_dom_test_obj_method_with_optional_array(WebKitDOMTestObj* self, const gchar* array)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(WEBKIT_DOM_IS_DOM_STRING[](array));
+    WebCore::TestObj* item = WebKit::core(self);
+    WebCore::DOMString[]* convertedArray = WebKit::core(array);
+    item-&gt;methodWithOptionalArray(convertedArray);
+}
+
+void webkit_dom_test_obj_method_with_optional_array_is_empty(WebKitDOMTestObj* self, const gchar* array)
+{
+    WebCore::JSMainThreadNullState state;
+    g_return_if_fail(WEBKIT_DOM_IS_TEST_OBJ(self));
+    g_return_if_fail(WEBKIT_DOM_IS_DOM_STRING[](array));
+    WebCore::TestObj* item = WebKit::core(self);
+    WebCore::DOMString[]* convertedArray = WebKit::core(array);
+    item-&gt;methodWithOptionalArrayIsEmpty(convertedArray);
+}
+
</ins><span class="cx"> gchar* webkit_dom_test_obj_conditional_method1(WebKitDOMTestObj* self)
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(Condition1)
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestGObjectWebKitDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/GObject/WebKitDOMTestObj.h        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -609,6 +609,66 @@
</span><span class="cx"> webkit_dom_test_obj_method_with_optional_float_is_na_n(WebKitDOMTestObj* self, gfloat number);
</span><span class="cx"> 
</span><span class="cx"> /**
</span><ins>+ * webkit_dom_test_obj_method_with_optional_long_long:
+ * @self: A #WebKitDOMTestObj
+ * @number: A #gint64
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_long_long(WebKitDOMTestObj* self, gint64 number);
+
+/**
+ * webkit_dom_test_obj_method_with_optional_long_long_is_zero:
+ * @self: A #WebKitDOMTestObj
+ * @number: A #gint64
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_long_long_is_zero(WebKitDOMTestObj* self, gint64 number);
+
+/**
+ * webkit_dom_test_obj_method_with_optional_unsigned_long_long:
+ * @self: A #WebKitDOMTestObj
+ * @number: A #guint64
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_unsigned_long_long(WebKitDOMTestObj* self, guint64 number);
+
+/**
+ * webkit_dom_test_obj_method_with_optional_unsigned_long_long_is_zero:
+ * @self: A #WebKitDOMTestObj
+ * @number: A #guint64
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_unsigned_long_long_is_zero(WebKitDOMTestObj* self, guint64 number);
+
+/**
+ * webkit_dom_test_obj_method_with_optional_array:
+ * @self: A #WebKitDOMTestObj
+ * @array: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_array(WebKitDOMTestObj* self, const gchar* array);
+
+/**
+ * webkit_dom_test_obj_method_with_optional_array_is_empty:
+ * @self: A #WebKitDOMTestObj
+ * @array: A #gchar
+ *
+ * Stability: Unstable
+**/
+WEBKIT_API void
+webkit_dom_test_obj_method_with_optional_array_is_empty(WebKitDOMTestObj* self, const gchar* array);
+
+/**
</ins><span class="cx">  * webkit_dom_test_obj_conditional_method1:
</span><span class="cx">  * @self: A #WebKitDOMTestObj
</span><span class="cx">  *
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestObjcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -148,6 +148,12 @@
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalSequence(JSC::ExecState*);
</span><ins>+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLong(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArray(JSC::ExecState*);
+JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArrayIsEmpty(JSC::ExecState*);
</ins><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg(JSC::ExecState*);
</span><span class="cx"> JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg(JSC::ExecState*);
</span><span class="lines">@@ -707,6 +713,12 @@
</span><span class="cx">     { &quot;methodWithOptionalDoubleIsNaN&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalDoubleIsNaN), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalFloatIsNaN&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalFloatIsNaN), (intptr_t) (0) } },
</span><span class="cx">     { &quot;methodWithOptionalSequence&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalSequence), (intptr_t) (0) } },
</span><ins>+    { &quot;methodWithOptionalLongLong&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalLongLong), (intptr_t) (0) } },
+    { &quot;methodWithOptionalLongLongIsZero&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero), (intptr_t) (0) } },
+    { &quot;methodWithOptionalUnsignedLongLong&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong), (intptr_t) (0) } },
+    { &quot;methodWithOptionalUnsignedLongLongIsZero&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero), (intptr_t) (0) } },
+    { &quot;methodWithOptionalArray&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalArray), (intptr_t) (0) } },
+    { &quot;methodWithOptionalArrayIsEmpty&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithOptionalArrayIsEmpty), (intptr_t) (0) } },
</ins><span class="cx">     { &quot;methodWithCallbackArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackArg), (intptr_t) (1) } },
</span><span class="cx">     { &quot;methodWithNonCallbackArgAndCallbackArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithNonCallbackArgAndCallbackArg), (intptr_t) (2) } },
</span><span class="cx">     { &quot;methodWithCallbackAndOptionalArg&quot;, JSC::Function, NoIntrinsic, { (intptr_t)static_cast&lt;NativeFunction&gt;(jsTestObjPrototypeFunctionMethodWithCallbackAndOptionalArg), (intptr_t) (0) } },
</span><span class="lines">@@ -4241,6 +4253,96 @@
</span><span class="cx">     return JSValue::encode(jsUndefined());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLong(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalLongLong&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    Optional&lt;long long&gt; number = state-&gt;argument(0).isUndefined() ? Optional&lt;long long&gt;() : toInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalLongLong(number);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalLongLongIsZero(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalLongLongIsZero&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    long long number = state-&gt;argument(0).isUndefined() ? 0 : toInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalLongLongIsZero(number);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLong(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalUnsignedLongLong&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    Optional&lt;unsigned long long&gt; number = state-&gt;argument(0).isUndefined() ? Optional&lt;unsigned long long&gt;() : toUInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalUnsignedLongLong(number);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalUnsignedLongLongIsZero(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalUnsignedLongLongIsZero&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    unsigned long long number = state-&gt;argument(0).isUndefined() ? 0 : toUInt64(state, state-&gt;uncheckedArgument(0), NormalConversion);
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalUnsignedLongLongIsZero(number);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArray(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalArray&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    Optional&lt;Vector&lt;String&gt;&gt; array = state-&gt;argument(0).isUndefined() ? Optional&lt;Vector&lt;String&gt;&gt;() : toNativeArray&lt;String&gt;(state, state-&gt;uncheckedArgument(0));
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalArray(array);
+    return JSValue::encode(jsUndefined());
+}
+
+EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalArrayIsEmpty(ExecState* state)
+{
+    JSValue thisValue = state-&gt;thisValue();
+    auto castedThis = jsDynamicCast&lt;JSTestObj*&gt;(thisValue);
+    if (UNLIKELY(!castedThis))
+        return throwThisTypeError(*state, &quot;TestObj&quot;, &quot;methodWithOptionalArrayIsEmpty&quot;);
+    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
+    auto&amp; impl = castedThis-&gt;wrapped();
+    Vector&lt;String&gt; array = state-&gt;argument(0).isUndefined() ? Vector&lt;String&gt;() : toNativeArray&lt;String&gt;(state, state-&gt;uncheckedArgument(0));
+    if (UNLIKELY(state-&gt;hadException()))
+        return JSValue::encode(jsUndefined());
+    impl.methodWithOptionalArrayIsEmpty(array);
+    return JSValue::encode(jsUndefined());
+}
+
</ins><span class="cx"> EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithCallbackArg(ExecState* state)
</span><span class="cx"> {
</span><span class="cx">     JSValue thisValue = state-&gt;thisValue();
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestJSJSTestTypedefscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -463,14 +463,7 @@
</span><span class="cx">         return throwThisTypeError(*state, &quot;TestTypedefs&quot;, &quot;func&quot;);
</span><span class="cx">     ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
</span><span class="cx">     auto&amp; impl = castedThis-&gt;wrapped();
</span><del>-
-    size_t argsCount = state-&gt;argumentCount();
-    if (argsCount &lt;= 0) {
-        impl.func();
-        return JSValue::encode(jsUndefined());
-    }
-
-    Vector&lt;int&gt; x = toNativeArray&lt;int&gt;(state, state-&gt;argument(0));
</del><ins>+    Vector&lt;int&gt; x = state-&gt;argument(0).isUndefined() ? Vector&lt;int&gt;() : toNativeArray&lt;int&gt;(state, state-&gt;uncheckedArgument(0));
</ins><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span><span class="cx">         return JSValue::encode(jsUndefined());
</span><span class="cx">     impl.func(x);
</span><span class="lines">@@ -570,13 +563,6 @@
</span><span class="cx">     if (!std::isnan(arg1NativeValue))
</span><span class="cx">         arg1 = clampTo&lt;unsigned long long&gt;(arg1NativeValue);
</span><span class="cx"> 
</span><del>-
-    size_t argsCount = state-&gt;argumentCount();
-    if (argsCount &lt;= 1) {
-        impl.funcWithClamp(arg1);
-        return JSValue::encode(jsUndefined());
-    }
-
</del><span class="cx">     unsigned long long arg2 = 0;
</span><span class="cx">     double arg2NativeValue = state-&gt;argument(1).toNumber(state);
</span><span class="cx">     if (UNLIKELY(state-&gt;hadException()))
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.h        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -184,6 +184,10 @@
</span><span class="cx"> - (void)methodWithOptionalAtomicStringIsEmptyString:(NSString *)str;
</span><span class="cx"> - (void)methodWithOptionalDoubleIsNaN:(double)number;
</span><span class="cx"> - (void)methodWithOptionalFloatIsNaN:(float)number;
</span><ins>+- (void)methodWithOptionalLongLong:(long long)number;
+- (void)methodWithOptionalLongLongIsZero:(long long)number;
+- (void)methodWithOptionalUnsignedLongLong:(unsigned long long)number;
+- (void)methodWithOptionalUnsignedLongLongIsZero:(unsigned long long)number;
</ins><span class="cx"> - (void)classMethod;
</span><span class="cx"> - (int)classMethodWithOptional:(int)arg;
</span><span class="cx"> - (void)classMethod2:(int)arg;
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestObjCDOMTestObjmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/ObjC/DOMTestObj.mm        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -1316,7 +1316,31 @@
</span><span class="cx">     IMPL-&gt;methodWithOptionalFloatIsNaN(number);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)methodWithOptionalLongLong:(long long)number
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalLongLong(number);
+}
</ins><span class="cx"> 
</span><ins>+- (void)methodWithOptionalLongLongIsZero:(long long)number
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalLongLongIsZero(number);
+}
+
+- (void)methodWithOptionalUnsignedLongLong:(unsigned long long)number
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalUnsignedLongLong(number);
+}
+
+- (void)methodWithOptionalUnsignedLongLongIsZero:(unsigned long long)number
+{
+    WebCore::JSMainThreadNullState state;
+    IMPL-&gt;methodWithOptionalUnsignedLongLongIsZero(number);
+}
+
+
</ins><span class="cx"> #if ENABLE(Condition1)
</span><span class="cx"> - (NSString *)conditionalMethod1
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestObjidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestObj.idl (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/TestObj.idl        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -189,6 +189,12 @@
</span><span class="cx">     void    methodWithOptionalDoubleIsNaN(optional unrestricted double number = NaN);
</span><span class="cx">     void    methodWithOptionalFloatIsNaN(optional unrestricted float number = NaN);
</span><span class="cx">     void    methodWithOptionalSequence(optional sequence&lt;DOMString&gt; sequence = []);
</span><ins>+    void    methodWithOptionalLongLong(optional long long number);
+    void    methodWithOptionalLongLongIsZero(optional long long number = 0);
+    void    methodWithOptionalUnsignedLongLong(optional unsigned long long number);
+    void    methodWithOptionalUnsignedLongLongIsZero(optional unsigned long long number = 0);
+    void    methodWithOptionalArray(optional DOMString[] array);
+    void    methodWithOptionalArrayIsEmpty(optional DOMString[] array = []);
</ins><span class="cx"> 
</span><span class="cx"> #if defined(TESTING_JS)
</span><span class="cx">     // Callback interface parameters.
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsscriptstestTestTypedefsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/bindings/scripts/test/TestTypedefs.idl        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -40,7 +40,7 @@
</span><span class="cx">     
</span><span class="cx">     static readonly attribute T TestSubObj;
</span><span class="cx"> 
</span><del>-    [StrictTypeChecking] void func(optional ARRAY_OF_LONGS x);
</del><ins>+    [StrictTypeChecking] void func(optional ARRAY_OF_LONGS x = []);
</ins><span class="cx"> 
</span><span class="cx">     void setShadow(DOUBLE width, DOUBLE height, unrestricted float blur, [StrictTypeChecking] optional STRING color, optional DOUBLE alpha);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiBlobidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/Blob.idl (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/Blob.idl        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/fileapi/Blob.idl        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -39,7 +39,7 @@
</span><span class="cx">     readonly attribute DOMString type;
</span><span class="cx"> 
</span><span class="cx"> #if !defined(LANGUAGE_OBJECTIVE_C)
</span><del>-    Blob slice(optional long long start, optional long long end, optional DOMString? contentType);
</del><ins>+    Blob slice(optional long long start = 0, optional long long end = 0x7FFFFFFFFFFFFFFF, optional DOMString? contentType = null);
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreinspectorInspectorIndexedDBAgentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp (199969 => 199970)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-04-24 17:23:41 UTC (rev 199969)
+++ trunk/Source/WebCore/inspector/InspectorIndexedDBAgent.cpp        2016-04-25 00:27:30 UTC (rev 199970)
</span><span class="lines">@@ -213,7 +213,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    RefPtr&lt;IDBOpenDBRequest&gt; idbOpenDBRequest = idbFactory-&gt;open(*context(), databaseName, ec);
</del><ins>+    RefPtr&lt;IDBOpenDBRequest&gt; idbOpenDBRequest = idbFactory-&gt;open(*context(), databaseName, Nullopt, ec);
</ins><span class="cx">     if (ec.code) {
</span><span class="cx">         requestCallback().sendFailure(&quot;Could not open database.&quot;);
</span><span class="cx">         return;
</span></span></pre>
</div>
</div>

</body>
</html>