<!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>[194967] trunk/Source/WebCore</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/194967">194967</a></dd>
<dt>Author</dt> <dd>beidson@apple.com</dd>
<dt>Date</dt> <dd>2016-01-13 10:42:00 -0800 (Wed, 13 Jan 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Modern IDB: A few cursor tests are flaky because JS wrappers are GC'ed.
https://bugs.webkit.org/show_bug.cgi?id=153038

Reviewed by Alex Christensen.

No new tests (Couldn't write a test that was any more reliable than &quot;flaky&quot;, so fixing the existing flaky tests will do).

And IDBCursor has an associated IDBRequest that is re-used each time the IDBCursor iterates.

The normal ActiveDOMObject approach to prevent the IDBRequest's wrapper from being garbage collected was not good enough
because, while the IDBRequest may not currently be waiting on any activity, as long as its associated IDBCursor is still
reachable then the request might be reused in the future.

Fortunately there's an IDL allowance for &quot;one object keeping another alive during GC&quot; and that's JSCustomMarkFunction
combined with GenerateIsReachable.

Applying those to IDBCursor and IDBRequest fix this handily.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:

* Modules/indexeddb/IDBCursor.h:
(WebCore::IDBCursor::isModernCursor):
* Modules/indexeddb/IDBCursor.idl:

* Modules/indexeddb/IDBRequest.idl:

* Modules/indexeddb/client/IDBCursorImpl.cpp:
(WebCore::IDBClient::IDBCursor::advance):
(WebCore::IDBClient::IDBCursor::continueFunction):
(WebCore::IDBClient::IDBCursor::uncheckedIterateCursor):
(WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor): Deleted. Fixed the typo of this name.
* Modules/indexeddb/client/IDBCursorImpl.h:

* bindings/js/JSIDBCursorCustom.cpp: Added.
(WebCore::JSIDBCursor::visitAdditionalChildren):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreCMakeListstxt">trunk/Source/WebCore/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursorh">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBCursoridl">trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbIDBRequestidl">trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh">trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp">trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreCMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/CMakeLists.txt (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/CMakeLists.txt        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/CMakeLists.txt        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -1169,6 +1169,7 @@
</span><span class="cx">     bindings/js/JSHTMLTemplateElementCustom.cpp
</span><span class="cx">     bindings/js/JSHistoryCustom.cpp
</span><span class="cx">     bindings/js/JSIDBAnyCustom.cpp
</span><ins>+    bindings/js/JSIDBCursorCustom.cpp
</ins><span class="cx">     bindings/js/JSIDBDatabaseCustom.cpp
</span><span class="cx">     bindings/js/JSIDBObjectStoreCustom.cpp
</span><span class="cx">     bindings/js/JSImageConstructor.cpp
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/ChangeLog        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -1,3 +1,42 @@
</span><ins>+2016-01-13  Brady Eidson  &lt;beidson@apple.com&gt;
+
+        Modern IDB: A few cursor tests are flaky because JS wrappers are GC'ed.
+        https://bugs.webkit.org/show_bug.cgi?id=153038
+
+        Reviewed by Alex Christensen.
+
+        No new tests (Couldn't write a test that was any more reliable than &quot;flaky&quot;, so fixing the existing flaky tests will do).
+
+        And IDBCursor has an associated IDBRequest that is re-used each time the IDBCursor iterates.
+        
+        The normal ActiveDOMObject approach to prevent the IDBRequest's wrapper from being garbage collected was not good enough
+        because, while the IDBRequest may not currently be waiting on any activity, as long as its associated IDBCursor is still
+        reachable then the request might be reused in the future.
+        
+        Fortunately there's an IDL allowance for &quot;one object keeping another alive during GC&quot; and that's JSCustomMarkFunction
+        combined with GenerateIsReachable.
+        
+        Applying those to IDBCursor and IDBRequest fix this handily.
+        
+        * CMakeLists.txt:
+        * WebCore.xcodeproj/project.pbxproj:
+
+        * Modules/indexeddb/IDBCursor.h:
+        (WebCore::IDBCursor::isModernCursor):
+        * Modules/indexeddb/IDBCursor.idl:
+        
+        * Modules/indexeddb/IDBRequest.idl:
+        
+        * Modules/indexeddb/client/IDBCursorImpl.cpp:
+        (WebCore::IDBClient::IDBCursor::advance):
+        (WebCore::IDBClient::IDBCursor::continueFunction):
+        (WebCore::IDBClient::IDBCursor::uncheckedIterateCursor):
+        (WebCore::IDBClient::IDBCursor::uncheckedIteratorCursor): Deleted. Fixed the typo of this name.
+        * Modules/indexeddb/client/IDBCursorImpl.h:
+        
+        * bindings/js/JSIDBCursorCustom.cpp: Added.
+        (WebCore::JSIDBCursor::visitAdditionalChildren):
+
</ins><span class="cx"> 2016-01-13  Zalan Bujtas  &lt;zalan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Get text drawing working with display lists.
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursorh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.h        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -74,6 +74,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual bool isKeyCursor() const = 0;
</span><span class="cx"> 
</span><ins>+    virtual bool isModernCursor() const { return false; }
+
</ins><span class="cx"> protected:
</span><span class="cx">     IDBCursor();
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBCursoridl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBCursor.idl        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx">     Conditional=INDEXED_DATABASE,
</span><span class="cx">     EnabledAtRuntime=IndexedDB,
</span><span class="cx">     SkipVTableValidation,
</span><ins>+    JSCustomMarkFunction,
</ins><span class="cx"> ] interface IDBCursor {
</span><span class="cx">     readonly attribute IDBAny source;
</span><span class="cx">     readonly attribute DOMString direction;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbIDBRequestidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.idl        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -35,6 +35,7 @@
</span><span class="cx">     JSGenerateToJSObject,
</span><span class="cx">     JSGenerateToNativeObject,
</span><span class="cx">     SkipVTableValidation,
</span><ins>+    GenerateIsReachable=Impl,
</ins><span class="cx"> ] interface IDBRequest : EventTarget {
</span><span class="cx">     [GetterRaisesExceptionWithMessage] readonly attribute IDBAny result;
</span><span class="cx">     [GetterRaisesExceptionWithMessage] readonly attribute DOMError error;
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.cpp        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -201,7 +201,7 @@
</span><span class="cx"> 
</span><span class="cx">     m_gotValue = false;
</span><span class="cx"> 
</span><del>-    uncheckedIteratorCursor(IDBKeyData(), count);
</del><ins>+    uncheckedIterateCursor(IDBKeyData(), count);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void IDBCursor::continueFunction(ScriptExecutionContext* context, ExceptionCodeWithMessage&amp; ec)
</span><span class="lines">@@ -276,10 +276,10 @@
</span><span class="cx"> 
</span><span class="cx">     m_gotValue = false;
</span><span class="cx"> 
</span><del>-    uncheckedIteratorCursor(key, 0);
</del><ins>+    uncheckedIterateCursor(key, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-void IDBCursor::uncheckedIteratorCursor(const IDBKeyData&amp; key, unsigned long count)
</del><ins>+void IDBCursor::uncheckedIterateCursor(const IDBKeyData&amp; key, unsigned long count)
</ins><span class="cx"> {
</span><span class="cx">     m_request-&gt;willIterateCursor(*this);
</span><span class="cx">     transaction().iterateCursor(*this, key, count);
</span></span></pre></div>
<a id="trunkSourceWebCoreModulesindexeddbclientIDBCursorImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/Modules/indexeddb/client/IDBCursorImpl.h        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -72,6 +72,7 @@
</span><span class="cx">     void setGetResult(IDBRequest&amp;, const IDBGetResult&amp;);
</span><span class="cx"> 
</span><span class="cx">     virtual bool isKeyCursor() const override { return true; }
</span><ins>+    virtual bool isModernCursor() const override final { return true; }
</ins><span class="cx"> 
</span><span class="cx"> protected:
</span><span class="cx">     IDBCursor(IDBTransaction&amp;, IDBObjectStore&amp;, const IDBCursorInfo&amp;);
</span><span class="lines">@@ -88,7 +89,7 @@
</span><span class="cx">     IDBObjectStore&amp; effectiveObjectStore() const;
</span><span class="cx">     IDBTransaction&amp; transaction() const;
</span><span class="cx"> 
</span><del>-    void uncheckedIteratorCursor(const IDBKeyData&amp;, unsigned long count);
</del><ins>+    void uncheckedIterateCursor(const IDBKeyData&amp;, unsigned long count);
</ins><span class="cx"> 
</span><span class="cx">     bool m_gotValue { false };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (194966 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-01-13 18:19:45 UTC (rev 194966)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -1955,6 +1955,7 @@
</span><span class="cx">                 5126E6BC0A2E3B12005C29FA /* IconDatabase.h in Headers */ = {isa = PBXBuildFile; fileRef = 5126E6BA0A2E3B12005C29FA /* IconDatabase.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 512BDB4A1C456FF5006494DF /* SQLiteIDBBackingStore.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512BDB481C456FAB006494DF /* SQLiteIDBBackingStore.cpp */; };
</span><span class="cx">                 512BDB4B1C456FFA006494DF /* SQLiteIDBBackingStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 512BDB491C456FAB006494DF /* SQLiteIDBBackingStore.h */; };
</span><ins>+                512BDB4D1C46B153006494DF /* JSIDBCursorCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512BDB4C1C46B0FF006494DF /* JSIDBCursorCustom.cpp */; };
</ins><span class="cx">                 512DD8E30D91E2B4000F89EE /* SharedBufferCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512DD8E20D91E2B4000F89EE /* SharedBufferCF.cpp */; };
</span><span class="cx">                 512DD8F40D91E6AF000F89EE /* LegacyWebArchive.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 512DD8EA0D91E6AF000F89EE /* LegacyWebArchive.cpp */; };
</span><span class="cx">                 512DD8F50D91E6AF000F89EE /* LegacyWebArchive.h in Headers */ = {isa = PBXBuildFile; fileRef = 512DD8EB0D91E6AF000F89EE /* LegacyWebArchive.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="lines">@@ -9392,6 +9393,7 @@
</span><span class="cx">                 5126E6BA0A2E3B12005C29FA /* IconDatabase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IconDatabase.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512BDB481C456FAB006494DF /* SQLiteIDBBackingStore.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SQLiteIDBBackingStore.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512BDB491C456FAB006494DF /* SQLiteIDBBackingStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SQLiteIDBBackingStore.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                512BDB4C1C46B0FF006494DF /* JSIDBCursorCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSIDBCursorCustom.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 512DD8E20D91E2B4000F89EE /* SharedBufferCF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SharedBufferCF.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512DD8EA0D91E6AF000F89EE /* LegacyWebArchive.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LegacyWebArchive.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 512DD8EB0D91E6AF000F89EE /* LegacyWebArchive.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacyWebArchive.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -22147,6 +22149,7 @@
</span><span class="cx">                                 AB4CB4EA0B8BDA3D009F40B0 /* JSHTMLSelectElementCustom.h */,
</span><span class="cx">                                 D6F7960C166FFECE0076DD18 /* JSHTMLTemplateElementCustom.cpp */,
</span><span class="cx">                                 511EF2CC17F0FDF100E4FA16 /* JSIDBAnyCustom.cpp */,
</span><ins>+                                512BDB4C1C46B0FF006494DF /* JSIDBCursorCustom.cpp */,
</ins><span class="cx">                                 511EF2CD17F0FDF100E4FA16 /* JSIDBDatabaseCustom.cpp */,
</span><span class="cx">                                 511EF2CE17F0FDF100E4FA16 /* JSIDBObjectStoreCustom.cpp */,
</span><span class="cx">                                 A7D0318D0E93540300E24ACD /* JSImageDataCustom.cpp */,
</span><span class="lines">@@ -30596,6 +30599,7 @@
</span><span class="cx">                                 CD5E5B611A15F156000C609E /* PageConfiguration.cpp in Sources */,
</span><span class="cx">                                 F3820892147D35F90010BC06 /* PageConsoleAgent.cpp in Sources */,
</span><span class="cx">                                 DAED203016F2442B0070EC0F /* PageConsoleClient.cpp in Sources */,
</span><ins>+                                512BDB4D1C46B153006494DF /* JSIDBCursorCustom.cpp in Sources */,
</ins><span class="cx">                                 A5A2AF0B1829734300DE1729 /* PageDebuggable.cpp in Sources */,
</span><span class="cx">                                 F34742DC134362F000531BC2 /* PageDebuggerAgent.cpp in Sources */,
</span><span class="cx">                                 9302B0BD0D79F82900C7EE83 /* PageGroup.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSIDBCursorCustomcpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp (0 => 194967)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp                                (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSIDBCursorCustom.cpp        2016-01-13 18:42:00 UTC (rev 194967)
</span><span class="lines">@@ -0,0 +1,49 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include &quot;config.h&quot;
+#include &quot;JSIDBCursor.h&quot;
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include &quot;IDBCursorImpl.h&quot;
+
+using namespace JSC;
+
+namespace WebCore {
+
+void JSIDBCursor::visitAdditionalChildren(SlotVisitor&amp; visitor)
+{
+    if (!wrapped().isModernCursor())
+        return;
+
+    auto&amp; modernCursor = static_cast&lt;IDBClient::IDBCursor&amp;&gt;(wrapped());
+    if (auto* request = modernCursor.request())
+        visitor.addOpaqueRoot(request);
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
</ins></span></pre>
</div>
</div>

</body>
</html>