<!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>[168554] 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/168554">168554</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-05-09 14:24:01 -0700 (Fri, 09 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>REGRESSION (<a href="http://trac.webkit.org/projects/webkit/changeset/168518">r168518</a>): Multiple tests for workers in blobs assert
https://bugs.webkit.org/show_bug.cgi?id=132728

Reviewed by Geoffrey Garen.

Source/WebCore:
Change File serialization to include name, so that we don't have to regenerate anything
on a secondary thread after deserialization.

Files and Blobs can't be stored persistently, because URLs are transient (IndexedDB
has an explicit check, and fails if there were any blob URLs). API doesn't have the
check, but given that anyone who tried to use these to serialize a File would fail,
it seems OK to change the format.

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::write):
(WebCore::CloneDeserializer::readFile):
* fileapi/File.cpp:
(WebCore::File::File):
* fileapi/File.h:

LayoutTests:
* platform/mac/TestExpectations: Unskip the tests.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsplatformmacTestExpectations">trunk/LayoutTests/platform/mac/TestExpectations</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorebindingsjsSerializedScriptValuecpp">trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp</a></li>
<li><a href="#trunkSourceWebCorefileapiFilecpp">trunk/Source/WebCore/fileapi/File.cpp</a></li>
<li><a href="#trunkSourceWebCorefileapiFileh">trunk/Source/WebCore/fileapi/File.h</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (168553 => 168554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-05-09 21:20:08 UTC (rev 168553)
+++ trunk/LayoutTests/ChangeLog        2014-05-09 21:24:01 UTC (rev 168554)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2014-05-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        REGRESSION (r168518): Multiple tests for workers in blobs assert
+        https://bugs.webkit.org/show_bug.cgi?id=132728
+
+        Reviewed by Geoffrey Garen.
+
+        * platform/mac/TestExpectations: Unskip the tests.
+
</ins><span class="cx"> 2014-05-09  Zsolt Borbely  &lt;zsborbely.u-szeged@partner.samsung.com&gt;
</span><span class="cx"> 
</span><span class="cx">         ASSERTION FAILED: object-&gt;style()-&gt;overflowX() == object-&gt;style()-&gt;overflowY()
</span></span></pre></div>
<a id="trunkLayoutTestsplatformmacTestExpectations"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/platform/mac/TestExpectations (168553 => 168554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/platform/mac/TestExpectations        2014-05-09 21:20:08 UTC (rev 168553)
+++ trunk/LayoutTests/platform/mac/TestExpectations        2014-05-09 21:24:01 UTC (rev 168554)
</span><span class="lines">@@ -1370,10 +1370,3 @@
</span><span class="cx"> webkit.org/b/132385 compositing/repaint/repaint-on-layer-grouping-change.html [ Pass Failure ]
</span><span class="cx"> 
</span><span class="cx"> webkit.org/b/132491 [ MountainLion ] http/tests/media/hls/video-controls-live-stream.html [ WontFix ]
</span><del>-
-webkit.org/b/132728 [ Debug ] fast/files/workers/worker-apply-blob-url-to-xhr.html [ Skip ]
-webkit.org/b/132728 [ Debug ] fast/files/workers/worker-read-blob-async.html [ Skip ]
-webkit.org/b/132728 [ Debug ] fast/files/workers/worker-read-blob-sync.html [ Skip ]
-webkit.org/b/132728 [ Debug ] fast/files/workers/worker-read-file-async.html [ Skip ]
-webkit.org/b/132728 [ Debug ] fast/files/workers/worker-read-file-sync.html [ Skip ]
-webkit.org/b/132728 [ Debug ] fast/workers/worker-copy-shared-blob-url.html [ Skip ]
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168553 => 168554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-09 21:20:08 UTC (rev 168553)
+++ trunk/Source/WebCore/ChangeLog        2014-05-09 21:24:01 UTC (rev 168554)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2014-05-09  Alexey Proskuryakov  &lt;ap@apple.com&gt;
+
+        REGRESSION (r168518): Multiple tests for workers in blobs assert
+        https://bugs.webkit.org/show_bug.cgi?id=132728
+
+        Reviewed by Geoffrey Garen.
+
+        Change File serialization to include name, so that we don't have to regenerate anything
+        on a secondary thread after deserialization.
+
+        Files and Blobs can't be stored persistently, because URLs are transient (IndexedDB
+        has an explicit check, and fails if there were any blob URLs). API doesn't have the
+        check, but given that anyone who tried to use these to serialize a File would fail,
+        it seems OK to change the format.
+
+        * bindings/js/SerializedScriptValue.cpp:
+        (WebCore::CloneSerializer::write):
+        (WebCore::CloneDeserializer::readFile):
+        * fileapi/File.cpp:
+        (WebCore::File::File):
+        * fileapi/File.h:
+
</ins><span class="cx"> 2014-05-08  Mark Hahnenberg  &lt;mhahnenberg@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         JSDOMWindow should have a WatchpointSet to fire on window close
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsSerializedScriptValuecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp (168553 => 168554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2014-05-09 21:20:08 UTC (rev 168553)
+++ trunk/Source/WebCore/bindings/js/SerializedScriptValue.cpp        2014-05-09 21:24:01 UTC (rev 168554)
</span><span class="lines">@@ -316,7 +316,7 @@
</span><span class="cx">  *    FileTag FileData
</span><span class="cx">  *
</span><span class="cx">  * FileData :-
</span><del>- *    &lt;path:StringData&gt; &lt;url:StringData&gt; &lt;type:StringData&gt;
</del><ins>+ *    &lt;path:StringData&gt; &lt;url:StringData&gt; &lt;type:StringData&gt; &lt;name:StringData&gt;
</ins><span class="cx">  *
</span><span class="cx">  * FileList :-
</span><span class="cx">  *    FileListTag &lt;length:uint32_t&gt;(&lt;file:FileData&gt;){length}
</span><span class="lines">@@ -1029,6 +1029,7 @@
</span><span class="cx">         write(file-&gt;path());
</span><span class="cx">         write(file-&gt;url());
</span><span class="cx">         write(file-&gt;type());
</span><ins>+        write(file-&gt;name());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx"> #if ENABLE(SUBTLE_CRYPTO)
</span><span class="lines">@@ -1730,8 +1731,11 @@
</span><span class="cx">         CachedStringRef type;
</span><span class="cx">         if (!readStringData(type))
</span><span class="cx">             return 0;
</span><ins>+        CachedStringRef name;
+        if (!readStringData(name))
+            return 0;
</ins><span class="cx">         if (m_isDOMGlobalObject)
</span><del>-            file = File::deserialize(path-&gt;string(), URL(URL(), url-&gt;string()), type-&gt;string());
</del><ins>+            file = File::deserialize(path-&gt;string(), URL(URL(), url-&gt;string()), type-&gt;string(), name-&gt;string());
</ins><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiFilecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/File.cpp (168553 => 168554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/File.cpp        2014-05-09 21:20:08 UTC (rev 168553)
+++ trunk/Source/WebCore/fileapi/File.cpp        2014-05-09 21:24:01 UTC (rev 168554)
</span><span class="lines">@@ -57,13 +57,11 @@
</span><span class="cx">     ThreadableBlobRegistry::registerFileBlobURL(m_internalURL, path, m_type);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-File::File(DeserializationContructor, const String&amp; path, const URL&amp; url, const String&amp; type)
</del><ins>+File::File(DeserializationContructor, const String&amp; path, const URL&amp; url, const String&amp; type, const String&amp; name)
</ins><span class="cx">     : Blob(deserializationContructor, url, type, -1)
</span><span class="cx">     , m_path(path)
</span><ins>+    , m_name(name)
</ins><span class="cx"> {
</span><del>-    // FIXME: File object serialization/deserialization does not include m_name, see SerializedScriptValue.cpp.
-    // Once it does, we should take deserialized name verbatim, not compute it again.
-    computeNameAndContentType(m_path, String(), m_name, m_type);
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> double File::lastModifiedDate() const
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiFileh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/File.h (168553 => 168554)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/File.h        2014-05-09 21:20:08 UTC (rev 168553)
+++ trunk/Source/WebCore/fileapi/File.h        2014-05-09 21:24:01 UTC (rev 168554)
</span><span class="lines">@@ -41,9 +41,9 @@
</span><span class="cx">         return adoptRef(new File(path));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    static PassRefPtr&lt;File&gt; deserialize(const String&amp; path, const URL&amp; srcURL, const String&amp; type)
</del><ins>+    static PassRefPtr&lt;File&gt; deserialize(const String&amp; path, const URL&amp; srcURL, const String&amp; type, const String&amp; name)
</ins><span class="cx">     {
</span><del>-        return adoptRef(new File(deserializationContructor, path, srcURL, type));
</del><ins>+        return adoptRef(new File(deserializationContructor, path, srcURL, type, name));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Create a file with a name exposed to the author (via File.name and associated DOM properties) that differs from the one provided in the path.
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx">     explicit File(const String&amp; path);
</span><span class="cx">     File(const String&amp; path, const String&amp; nameOverride);
</span><span class="cx"> 
</span><del>-    File(DeserializationContructor, const String&amp; path, const URL&amp; srcURL, const String&amp; type);
</del><ins>+    File(DeserializationContructor, const String&amp; path, const URL&amp; srcURL, const String&amp; type, const String&amp; name);
</ins><span class="cx"> 
</span><span class="cx">     static void computeNameAndContentType(const String&amp; path, const String&amp; nameOverride, String&amp; effectiveName, String&amp; effectiveContentType);
</span><span class="cx"> #if ENABLE(FILE_REPLACEMENT)
</span></span></pre>
</div>
</div>

</body>
</html>