<!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>[168478] trunk/Source</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/168478">168478</a></dd>
<dt>Author</dt> <dd>ap@apple.com</dd>
<dt>Date</dt> <dd>2014-05-08 11:33:18 -0700 (Thu, 08 May 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>Make BlobDataFileReference manage its sandbox extension
https://bugs.webkit.org/show_bug.cgi?id=132689
Reviewed by Anders Carlsson.
Source/WebCore:
* WebCore.exp.in: Export symbols that are now needed in WebKit2 to subclass BlobDataFileReference.
* fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
* platform/network/BlobData.cpp: (WebCore::BlobData::appendFile):
* platform/network/BlobData.h: (WebCore::BlobDataItem::BlobDataItem):
* platform/network/BlobRegistry.h:
* platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerFileBlobURL):
* platform/network/BlobRegistryImpl.h:
BlobRegistry now takes a BlobDataFileReference and not a path, so that WebKit2
could pass objects that include sandbox extensions.
* platform/network/BlobDataFileReference.h:
* platform/network/BlobDataFileReference.cpp:
(WebCore::BlobDataFileReference::~BlobDataFileReference): Added a virtual destructor.
(WebCore::BlobDataFileReference::size): We now record the size and modification time right away, no need to lazily calculate them.
(WebCore::BlobDataFileReference::expectedModificationTime): Ditto.
(WebCore::BlobDataFileReference::startTrackingModifications): Record time and size
(since it's a single call). However, size calculation will become complicated again soon.
(WebCore::BlobDataFileReference::prepareForFileAccess): A hook for subclasses.
(WebCore::BlobDataFileReference::revokeFileAccess): Ditto.
(WebCore::BlobDataFileReference::computeFileSystemData): Deleted.
Source/WebKit2:
* CMakeLists.txt:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
Added BlobDataFileReferenceWithSandboxExtension.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerFileBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::unregisterBlobURL):
(WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
(WebKit::NetworkBlobRegistry::filesInBlob):
(WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
We no longer track sandbox extensions here. Instead, provide a way to get files
for a blob, which contain extensions and can allow access to themselves.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
* NetworkProcess/NetworkResourceLoader.h:
Allow/revoke access to files in blob, just like we do for explicitly passed extensions.
* Shared/BlobDataFileReferenceWithSandboxExtension.cpp: Added.
(WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
(WebKit::BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension):
(WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
(WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
* Shared/BlobDataFileReferenceWithSandboxExtension.h: Added.
(WebKit::BlobDataFileReferenceWithSandboxExtension::create):
A subclass of BlobDataFileReference that also contains a sandbox extension. NetworkProcess
always uses it in BlobRegistryImpl.
* WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:
Updated for BlobRegistry interface changes. BlobRegistryProxy doesn't really need
a BlobDataFileReference here, as it only uses a path, but it needs to implement the same interface
as BlobRegistryImpl.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCorefileapiThreadableBlobRegistrycpp">trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobDatacpp">trunk/Source/WebCore/platform/network/BlobData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobDatah">trunk/Source/WebCore/platform/network/BlobData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobDataFileReferencecpp">trunk/Source/WebCore/platform/network/BlobDataFileReference.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobDataFileReferenceh">trunk/Source/WebCore/platform/network/BlobDataFileReference.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistryh">trunk/Source/WebCore/platform/network/BlobRegistry.h</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistryImplcpp">trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformnetworkBlobRegistryImplh">trunk/Source/WebCore/platform/network/BlobRegistryImpl.h</a></li>
<li><a href="#trunkSourceWebKit2CMakeListstxt">trunk/Source/WebKit2/CMakeLists.txt</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistrycpp">trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistryh">trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp</a></li>
<li><a href="#trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh">trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h</a></li>
<li><a href="#trunkSourceWebKit2PlatformGTKcmake">trunk/Source/WebKit2/PlatformGTK.cmake</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxycpp">trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxyh">trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2SharedBlobDataFileReferenceWithSandboxExtensioncpp">trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedBlobDataFileReferenceWithSandboxExtensionh">trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/ChangeLog        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -1,3 +1,32 @@
</span><ins>+2014-05-08 Alexey Proskuryakov <ap@apple.com>
+
+ Make BlobDataFileReference manage its sandbox extension
+ https://bugs.webkit.org/show_bug.cgi?id=132689
+
+ Reviewed by Anders Carlsson.
+
+ * WebCore.exp.in: Export symbols that are now needed in WebKit2 to subclass BlobDataFileReference.
+
+ * fileapi/ThreadableBlobRegistry.cpp: (WebCore::ThreadableBlobRegistry::registerFileBlobURL):
+ * platform/network/BlobData.cpp: (WebCore::BlobData::appendFile):
+ * platform/network/BlobData.h: (WebCore::BlobDataItem::BlobDataItem):
+ * platform/network/BlobRegistry.h:
+ * platform/network/BlobRegistryImpl.cpp: (WebCore::BlobRegistryImpl::registerFileBlobURL):
+ * platform/network/BlobRegistryImpl.h:
+ BlobRegistry now takes a BlobDataFileReference and not a path, so that WebKit2
+ could pass objects that include sandbox extensions.
+
+ * platform/network/BlobDataFileReference.h:
+ * platform/network/BlobDataFileReference.cpp:
+ (WebCore::BlobDataFileReference::~BlobDataFileReference): Added a virtual destructor.
+ (WebCore::BlobDataFileReference::size): We now record the size and modification time right away, no need to lazily calculate them.
+ (WebCore::BlobDataFileReference::expectedModificationTime): Ditto.
+ (WebCore::BlobDataFileReference::startTrackingModifications): Record time and size
+ (since it's a single call). However, size calculation will become complicated again soon.
+ (WebCore::BlobDataFileReference::prepareForFileAccess): A hook for subclasses.
+ (WebCore::BlobDataFileReference::revokeFileAccess): Ditto.
+ (WebCore::BlobDataFileReference::computeFileSystemData): Deleted.
+
</ins><span class="cx"> 2014-05-08 Rik Cabanier <cabanier@adobe.com>
</span><span class="cx">
</span><span class="cx"> Add support for drawFocusIfNeeded
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -866,6 +866,7 @@
</span><span class="cx"> __ZN7WebCore21BackForwardController11itemAtIndexEi
</span><span class="cx"> __ZN7WebCore21BackForwardController6goBackEv
</span><span class="cx"> __ZN7WebCore21BackForwardController9goForwardEv
</span><ins>+__ZN7WebCore21BlobDataFileReferenceD2Ev
</ins><span class="cx"> __ZN7WebCore21CrossThreadCopierBaseILb0ELb0EN3WTF6StringEE4copyERKS2_
</span><span class="cx"> __ZN7WebCore21CrossThreadCopierBaseILb0ELb0ENS_19IDBDatabaseMetadataEE4copyERKS1_
</span><span class="cx"> __ZN7WebCore21MemoryPressureHandler7installEv
</span><span class="lines">@@ -1691,6 +1692,7 @@
</span><span class="cx"> __ZNK7WebCore15VisiblePosition45lineDirectionPointForBlockDirectionNavigationEv
</span><span class="cx"> __ZNK7WebCore15VisiblePosition4nextENS_27EditingBoundaryCrossingRuleE
</span><span class="cx"> __ZNK7WebCore15VisiblePosition8previousENS_27EditingBoundaryCrossingRuleE
</span><ins>+__ZNK7WebCore16BlobRegistryImpl18getBlobDataFromURLERKNS_3URLE
</ins><span class="cx"> __ZNK7WebCore16EventListenerMap8containsERKN3WTF12AtomicStringE
</span><span class="cx"> __ZNK7WebCore16HTMLInputElement10isURLFieldEv
</span><span class="cx"> __ZNK7WebCore16HTMLInputElement11isDateFieldEv
</span><span class="lines">@@ -1976,6 +1978,7 @@
</span><span class="cx"> __ZTVN7WebCore16IconDatabaseBaseE
</span><span class="cx"> __ZTVN7WebCore17FrameLoaderClientE
</span><span class="cx"> __ZTVN7WebCore19BlurFilterOperationE
</span><ins>+__ZTVN7WebCore21BlobDataFileReferenceE
</ins><span class="cx"> __ZTVN7WebCore22DefaultFilterOperationE
</span><span class="cx"> __ZTVN7WebCore25DropShadowFilterOperationE
</span><span class="cx"> __ZTVN7WebCore28InspectorFrontendClientLocal8SettingsE
</span></span></pre></div>
<a id="trunkSourceWebCorefileapiThreadableBlobRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/fileapi/ThreadableBlobRegistry.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -31,6 +31,7 @@
</span><span class="cx"> #include "config.h"
</span><span class="cx"> #include "ThreadableBlobRegistry.h"
</span><span class="cx">
</span><ins>+#include "BlobDataFileReference.h"
</ins><span class="cx"> #include "BlobPart.h"
</span><span class="cx"> #include "BlobRegistry.h"
</span><span class="cx"> #include "BlobURL.h"
</span><span class="lines">@@ -102,13 +103,13 @@
</span><span class="cx"> void ThreadableBlobRegistry::registerFileBlobURL(const URL& url, const String& path, const String& contentType)
</span><span class="cx"> {
</span><span class="cx"> if (isMainThread())
</span><del>- blobRegistry().registerFileBlobURL(url, path, contentType);
</del><ins>+ blobRegistry().registerFileBlobURL(url, BlobDataFileReference::create(path), contentType);
</ins><span class="cx"> else {
</span><span class="cx"> // BlobRegistryContext performs an isolated copy of data.
</span><span class="cx"> BlobRegistryContext* context = new BlobRegistryContext(url, path, contentType);
</span><span class="cx"> callOnMainThread([context] {
</span><span class="cx"> std::unique_ptr<BlobRegistryContext> blobRegistryContext(context);
</span><del>- blobRegistry().registerFileBlobURL(blobRegistryContext->url, blobRegistryContext->path, blobRegistryContext->contentType);
</del><ins>+ blobRegistry().registerFileBlobURL(blobRegistryContext->url, BlobDataFileReference::create(blobRegistryContext->path), blobRegistryContext->contentType);
</ins><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobData.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobData.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobData.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -78,9 +78,10 @@
</span><span class="cx"> m_items.append(BlobDataItem(data, offset, length));
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BlobData::appendFile(const String& path)
</del><ins>+void BlobData::appendFile(PassRefPtr<BlobDataFileReference> file)
</ins><span class="cx"> {
</span><del>- m_items.append(BlobDataItem(path));
</del><ins>+ file->startTrackingModifications();
+ m_items.append(BlobDataItem(file));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void BlobData::appendFile(BlobDataFileReference* file, long long offset, long long length)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobData.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobData.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobData.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -86,9 +86,9 @@
</span><span class="cx"> private:
</span><span class="cx"> friend class BlobData;
</span><span class="cx">
</span><del>- explicit BlobDataItem(const String& path)
</del><ins>+ explicit BlobDataItem(PassRefPtr<BlobDataFileReference> file)
</ins><span class="cx"> : type(File)
</span><del>- , file(BlobDataFileReference::create(path))
</del><ins>+ , file(file)
</ins><span class="cx"> , m_offset(0)
</span><span class="cx"> , m_length(toEndOfFile)
</span><span class="cx"> {
</span><span class="lines">@@ -130,7 +130,7 @@
</span><span class="cx"> void swapItems(BlobDataItemList&);
</span><span class="cx">
</span><span class="cx"> void appendData(PassRefPtr<RawData>);
</span><del>- void appendFile(const String& path);
</del><ins>+ void appendFile(PassRefPtr<BlobDataFileReference>);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> friend class BlobRegistryImpl;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobDataFileReferencecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobDataFileReference.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobDataFileReference.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobDataFileReference.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -30,26 +30,25 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+BlobDataFileReference::~BlobDataFileReference()
+{
+}
+
</ins><span class="cx"> unsigned long long BlobDataFileReference::size() const
</span><span class="cx"> {
</span><del>- if (!m_fileSystemDataComputed)
- computeFileSystemData();
-
</del><span class="cx"> return m_size;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double BlobDataFileReference::expectedModificationTime() const
</span><span class="cx"> {
</span><del>- if (!m_fileSystemDataComputed)
- computeFileSystemData();
-
</del><span class="cx"> return m_expectedModificationTime;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BlobDataFileReference::computeFileSystemData() const
</del><ins>+void BlobDataFileReference::startTrackingModifications()
</ins><span class="cx"> {
</span><del>- m_fileSystemDataComputed = true;
-
</del><ins>+ // This is not done automatically by the constructor, because BlobDataFileReference is
+ // also used to pass paths around before registration. Only registered blobs need to pay
+ // the cost of tracking file modifications.
</ins><span class="cx"> FileMetadata metadata;
</span><span class="cx"> if (!getFileMetadata(m_path, metadata))
</span><span class="cx"> return;
</span><span class="lines">@@ -58,4 +57,12 @@
</span><span class="cx"> m_expectedModificationTime = metadata.modificationTime;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void BlobDataFileReference::prepareForFileAccess()
+{
</ins><span class="cx"> }
</span><ins>+
+void BlobDataFileReference::revokeFileAccess()
+{
+}
+
+}
</ins></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobDataFileReferenceh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobDataFileReference.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobDataFileReference.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobDataFileReference.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -39,27 +39,29 @@
</span><span class="cx"> return adoptRef(new BlobDataFileReference(path));
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+ virtual ~BlobDataFileReference();
+
+ void startTrackingModifications();
+
</ins><span class="cx"> const String& path() const { return m_path; }
</span><span class="cx"> unsigned long long size() const;
</span><span class="cx"> double expectedModificationTime() const;
</span><span class="cx">
</span><del>-private:
</del><ins>+ virtual void prepareForFileAccess();
+ virtual void revokeFileAccess();
+
+protected:
</ins><span class="cx"> BlobDataFileReference(const String& path)
</span><span class="cx"> : m_path(path)
</span><del>- , m_fileSystemDataComputed(false)
</del><span class="cx"> , m_size(0)
</span><span class="cx"> , m_expectedModificationTime(invalidFileTime())
</span><span class="cx"> {
</span><del>- // FIXME: Per the spec, a File object should start watching for changes as soon as it's created, so we should record m_expectedModificationTime right away.
- // FIXME: Some platforms provide better ways to listen for file system object changes, consider using these.
</del><span class="cx"> }
</span><span class="cx">
</span><del>- void computeFileSystemData() const;
-
</del><ins>+private:
</ins><span class="cx"> String m_path;
</span><del>- mutable bool m_fileSystemDataComputed;
- mutable unsigned long long m_size;
- mutable double m_expectedModificationTime;
</del><ins>+ unsigned long long m_size;
+ double m_expectedModificationTime;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistry.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistry.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobRegistry.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><span class="cx">
</span><ins>+class BlobDataFileReference;
</ins><span class="cx"> class BlobPart;
</span><span class="cx"> class BlobRegistry;
</span><span class="cx"> class URL;
</span><span class="lines">@@ -47,7 +48,7 @@
</span><span class="cx"> public:
</span><span class="cx">
</span><span class="cx"> // Registers a blob URL referring to the specified file.
</span><del>- virtual void registerFileBlobURL(const URL&, const String& path, const String& contentType) = 0;
</del><ins>+ virtual void registerFileBlobURL(const URL&, PassRefPtr<BlobDataFileReference>, const String& contentType) = 0;
</ins><span class="cx">
</span><span class="cx"> // Registers a blob URL referring to the specified blob data.
</span><span class="cx"> virtual void registerBlobURL(const URL&, Vector<BlobPart>, const String& contentType) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistryImplcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -116,7 +116,7 @@
</span><span class="cx"> ASSERT(!length);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void BlobRegistryImpl::registerFileBlobURL(const URL& url, const String& path, const String& contentType)
</del><ins>+void BlobRegistryImpl::registerFileBlobURL(const URL& url, PassRefPtr<BlobDataFileReference> file, const String& contentType)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(isMainThread());
</span><span class="cx"> registerBlobResourceHandleConstructor();
</span><span class="lines">@@ -124,7 +124,7 @@
</span><span class="cx"> RefPtr<BlobData> blobData = BlobData::create();
</span><span class="cx"> blobData->setContentType(contentType);
</span><span class="cx">
</span><del>- blobData->appendFile(path);
</del><ins>+ blobData->appendFile(file);
</ins><span class="cx"> m_blobs.set(url.string(), blobData.release());
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformnetworkBlobRegistryImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> private:
</span><span class="cx"> void appendStorageItems(BlobData*, const BlobDataItemList&, long long offset, long long length);
</span><span class="cx">
</span><del>- virtual void registerFileBlobURL(const WebCore::URL&, const String& path, const String& contentType) override;
</del><ins>+ virtual void registerFileBlobURL(const WebCore::URL&, PassRefPtr<BlobDataFileReference>, const String& contentType) override;
</ins><span class="cx"> virtual void registerBlobURL(const URL&, Vector<BlobPart>, const String& contentType) override;
</span><span class="cx"> virtual void registerBlobURL(const URL&, const URL& srcURL) override;
</span><span class="cx"> virtual void registerBlobURLForSlice(const URL&, const URL& srcURL, long long start, long long end) override;
</span></span></pre></div>
<a id="trunkSourceWebKit2CMakeListstxt"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/CMakeLists.txt (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/CMakeLists.txt        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/CMakeLists.txt        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -185,6 +185,7 @@
</span><span class="cx"> Shared/APIURLRequest.cpp
</span><span class="cx"> Shared/APIURLResponse.cpp
</span><span class="cx"> Shared/ActivityAssertion.cpp
</span><ins>+ Shared/BlobDataFileReferenceWithSandboxExtension.cpp
</ins><span class="cx"> Shared/CacheModel.cpp
</span><span class="cx"> Shared/ChildProcess.cpp
</span><span class="cx"> Shared/ChildProcessProxy.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/ChangeLog        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2014-05-08 Alexey Proskuryakov <ap@apple.com>
+
+ Make BlobDataFileReference manage its sandbox extension
+ https://bugs.webkit.org/show_bug.cgi?id=132689
+
+ Reviewed by Anders Carlsson.
+
+ * CMakeLists.txt:
+ * PlatformGTK.cmake:
+ * WebKit2.xcodeproj/project.pbxproj:
+ Added BlobDataFileReferenceWithSandboxExtension.
+
+ * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
+ (WebKit::NetworkBlobRegistry::registerFileBlobURL):
+ (WebKit::NetworkBlobRegistry::registerBlobURL):
+ (WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
+ (WebKit::NetworkBlobRegistry::unregisterBlobURL):
+ (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
+ (WebKit::NetworkBlobRegistry::filesInBlob):
+ (WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
+ * NetworkProcess/FileAPI/NetworkBlobRegistry.h:
+ We no longer track sandbox extensions here. Instead, provide a way to get files
+ for a blob, which contain extensions and can allow access to themselves.
+
+ * NetworkProcess/NetworkResourceLoader.cpp:
+ (WebKit::NetworkResourceLoader::NetworkResourceLoader):
+ (WebKit::NetworkResourceLoader::consumeSandboxExtensions):
+ (WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
+ * NetworkProcess/NetworkResourceLoader.h:
+ Allow/revoke access to files in blob, just like we do for explicitly passed extensions.
+
+ * Shared/BlobDataFileReferenceWithSandboxExtension.cpp: Added.
+ (WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
+ (WebKit::BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension):
+ (WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
+ (WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
+ * Shared/BlobDataFileReferenceWithSandboxExtension.h: Added.
+ (WebKit::BlobDataFileReferenceWithSandboxExtension::create):
+ A subclass of BlobDataFileReference that also contains a sandbox extension. NetworkProcess
+ always uses it in BlobRegistryImpl.
+
+ * WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL):
+ * WebProcess/FileAPI/BlobRegistryProxy.h:
+ Updated for BlobRegistry interface changes. BlobRegistryProxy doesn't really need
+ a BlobDataFileReference here, as it only uses a path, but it needs to implement the same interface
+ as BlobRegistryImpl.
+
</ins><span class="cx"> 2014-05-08 Brady Eidson <beidson@apple.com>
</span><span class="cx">
</span><span class="cx"> "shouldKeepCurrentBackForwardListItemInList" API should pass clientInfo to the callback
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistrycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -28,6 +28,7 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(BLOB) && ENABLE(NETWORK_PROCESS)
</span><span class="cx">
</span><ins>+#include "BlobDataFileReferenceWithSandboxExtension.h"
</ins><span class="cx"> #include "SandboxExtension.h"
</span><span class="cx"> #include <WebCore/BlobPart.h>
</span><span class="cx"> #include <WebCore/BlobRegistryImpl.h>
</span><span class="lines">@@ -51,16 +52,8 @@
</span><span class="cx">
</span><span class="cx"> void NetworkBlobRegistry::registerFileBlobURL(NetworkConnectionToWebProcess* connection, const URL& url, const String& path, PassRefPtr<SandboxExtension> sandboxExtension, const String& contentType)
</span><span class="cx"> {
</span><del>- ASSERT(!m_sandboxExtensions.contains(url.string()));
</del><ins>+ blobRegistry().registerFileBlobURL(url, BlobDataFileReferenceWithSandboxExtension::create(path, sandboxExtension), contentType);
</ins><span class="cx">
</span><del>- blobRegistry().registerFileBlobURL(url, path, contentType);
-
- if (sandboxExtension) {
- Vector<RefPtr<SandboxExtension>> extensionsVector;
- extensionsVector.append(sandboxExtension);
- m_sandboxExtensions.add(url.string(), std::move(extensionsVector));
- }
-
</del><span class="cx"> ASSERT(!m_blobsForConnection.get(connection).contains(url));
</span><span class="cx"> BlobForConnectionMap::iterator mapIterator = m_blobsForConnection.find(connection);
</span><span class="cx"> if (mapIterator == m_blobsForConnection.end())
</span><span class="lines">@@ -70,20 +63,8 @@
</span><span class="cx">
</span><span class="cx"> void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connection, const URL& url, Vector<WebCore::BlobPart> blobParts, const String& contentType)
</span><span class="cx"> {
</span><del>- ASSERT(!m_sandboxExtensions.contains(url.string()));
-
- // Combine existing extensions for inner Blob items.
- Vector<RefPtr<SandboxExtension>> sandboxExtensions;
- for (const BlobPart& part : blobParts) {
- if (part.type() == BlobPart::Blob)
- sandboxExtensions.appendVector(m_sandboxExtensions.get(part.url().string()));
- }
-
</del><span class="cx"> blobRegistry().registerBlobURL(url, std::move(blobParts), contentType);
</span><span class="cx">
</span><del>- if (!sandboxExtensions.isEmpty())
- m_sandboxExtensions.add(url.string(), std::move(sandboxExtensions));
-
</del><span class="cx"> ASSERT(!m_blobsForConnection.get(connection).contains(url));
</span><span class="cx"> BlobForConnectionMap::iterator mapIterator = m_blobsForConnection.find(connection);
</span><span class="cx"> if (mapIterator == m_blobsForConnection.end())
</span><span class="lines">@@ -94,9 +75,6 @@
</span><span class="cx"> void NetworkBlobRegistry::registerBlobURL(NetworkConnectionToWebProcess* connection, const WebCore::URL& url, const WebCore::URL& srcURL)
</span><span class="cx"> {
</span><span class="cx"> blobRegistry().registerBlobURL(url, srcURL);
</span><del>- SandboxExtensionMap::iterator iter = m_sandboxExtensions.find(srcURL.string());
- if (iter != m_sandboxExtensions.end())
- m_sandboxExtensions.add(url.string(), iter->value);
</del><span class="cx">
</span><span class="cx"> ASSERT(m_blobsForConnection.contains(connection));
</span><span class="cx"> ASSERT(m_blobsForConnection.find(connection)->value.contains(srcURL));
</span><span class="lines">@@ -107,11 +85,6 @@
</span><span class="cx"> {
</span><span class="cx"> blobRegistry().registerBlobURLForSlice(url, srcURL, start, end);
</span><span class="cx">
</span><del>- // FIXME: Only store extensions for files that the slice actually contains, not for all the files in original blob.
- SandboxExtensionMap::iterator iter = m_sandboxExtensions.find(srcURL.string());
- if (iter != m_sandboxExtensions.end())
- m_sandboxExtensions.add(url.string(), iter->value);
-
</del><span class="cx"> ASSERT(m_blobsForConnection.contains(connection));
</span><span class="cx"> ASSERT(m_blobsForConnection.find(connection)->value.contains(srcURL));
</span><span class="cx"> m_blobsForConnection.find(connection)->value.add(url);
</span><span class="lines">@@ -120,7 +93,6 @@
</span><span class="cx"> void NetworkBlobRegistry::unregisterBlobURL(NetworkConnectionToWebProcess* connection, const WebCore::URL& url)
</span><span class="cx"> {
</span><span class="cx"> blobRegistry().unregisterBlobURL(url);
</span><del>- m_sandboxExtensions.remove(url.string());
</del><span class="cx">
</span><span class="cx"> ASSERT(m_blobsForConnection.contains(connection));
</span><span class="cx"> ASSERT(m_blobsForConnection.find(connection)->value.contains(url));
</span><span class="lines">@@ -141,17 +113,29 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> HashSet<URL>& blobsForConnection = m_blobsForConnection.find(connection)->value;
</span><del>- for (HashSet<URL>::iterator iter = blobsForConnection.begin(), end = blobsForConnection.end(); iter != end; ++iter) {
</del><ins>+ for (HashSet<URL>::iterator iter = blobsForConnection.begin(), end = blobsForConnection.end(); iter != end; ++iter)
</ins><span class="cx"> blobRegistry().unregisterBlobURL(*iter);
</span><del>- m_sandboxExtensions.remove(*iter);
- }
</del><span class="cx">
</span><span class="cx"> m_blobsForConnection.remove(connection);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-const Vector<RefPtr<SandboxExtension>> NetworkBlobRegistry::sandboxExtensions(const WebCore::URL& url)
</del><ins>+Vector<RefPtr<BlobDataFileReference>> NetworkBlobRegistry::filesInBlob(NetworkConnectionToWebProcess* connection, const WebCore::URL& url)
</ins><span class="cx"> {
</span><del>- return m_sandboxExtensions.get(url.string());
</del><ins>+ if (!m_blobsForConnection.contains(connection) || !m_blobsForConnection.find(connection)->value.contains(url))
+ return Vector<RefPtr<BlobDataFileReference>>();
+
+ ASSERT(blobRegistry().isBlobRegistryImpl());
+ BlobData* blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(url);
+ if (!blobData)
+ return Vector<RefPtr<BlobDataFileReference>>();
+
+ Vector<RefPtr<BlobDataFileReference>> result;
+ for (const BlobDataItem& item : blobData->items()) {
+ if (item.type == BlobDataItem::File)
+ result.append(item.file);
+ }
+
+ return result;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessFileAPINetworkBlobRegistryh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/NetworkProcess/FileAPI/NetworkBlobRegistry.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -33,6 +33,7 @@
</span><span class="cx"> #include <wtf/HashSet.h>
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><ins>+class BlobDataFileReference;
</ins><span class="cx"> class BlobPart;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -56,14 +57,11 @@
</span><span class="cx">
</span><span class="cx"> void connectionToWebProcessDidClose(NetworkConnectionToWebProcess*);
</span><span class="cx">
</span><del>- const Vector<RefPtr<SandboxExtension>> sandboxExtensions(const WebCore::URL&);
</del><ins>+ Vector<RefPtr<WebCore::BlobDataFileReference>> filesInBlob(NetworkConnectionToWebProcess*, const WebCore::URL&);
</ins><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> ~NetworkBlobRegistry();
</span><span class="cx">
</span><del>- typedef HashMap<String, Vector<RefPtr<SandboxExtension>>> SandboxExtensionMap;
- SandboxExtensionMap m_sandboxExtensions;
-
</del><span class="cx"> typedef HashMap<NetworkConnectionToWebProcess*, HashSet<WebCore::URL>> BlobForConnectionMap;
</span><span class="cx"> BlobForConnectionMap m_blobsForConnection;
</span><span class="cx"> };
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -44,6 +44,7 @@
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebErrors.h"
</span><span class="cx"> #include "WebResourceLoaderMessages.h"
</span><ins>+#include <WebCore/BlobDataFileReference.h>
</ins><span class="cx"> #include <WebCore/NotImplemented.h>
</span><span class="cx"> #include <WebCore/ResourceBuffer.h>
</span><span class="cx"> #include <WebCore/ResourceHandle.h>
</span><span class="lines">@@ -83,18 +84,15 @@
</span><span class="cx">
</span><span class="cx"> #if ENABLE(BLOB)
</span><span class="cx"> if (m_request.httpBody()) {
</span><del>- const Vector<FormDataElement>& elements = m_request.httpBody()->elements();
- for (size_t i = 0, count = elements.size(); i < count; ++i) {
- if (elements[i].m_type == FormDataElement::Type::EncodedBlob) {
- Vector<RefPtr<SandboxExtension>> blobElementExtensions = NetworkBlobRegistry::shared().sandboxExtensions(elements[i].m_url);
- m_requestBodySandboxExtensions.appendVector(blobElementExtensions);
- }
</del><ins>+ for (const FormDataElement& element : m_request.httpBody()->elements()) {
+ if (element.m_type == FormDataElement::Type::EncodedBlob)
+ m_fileReferences.appendVector(NetworkBlobRegistry::shared().filesInBlob(connection, element.m_url));
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> if (m_request.url().protocolIs("blob")) {
</span><span class="cx"> ASSERT(!SandboxExtension::create(parameters.resourceSandboxExtension));
</span><del>- m_resourceSandboxExtensions = NetworkBlobRegistry::shared().sandboxExtensions(m_request.url());
</del><ins>+ m_fileReferences.appendVector(NetworkBlobRegistry::shared().filesInBlob(connection, m_request.url()));
</ins><span class="cx"> } else
</span><span class="cx"> #endif
</span><span class="cx"> if (RefPtr<SandboxExtension> resourceSandboxExtension = SandboxExtension::create(parameters.resourceSandboxExtension))
</span><span class="lines">@@ -355,26 +353,32 @@
</span><span class="cx">
</span><span class="cx"> void NetworkResourceLoader::consumeSandboxExtensions()
</span><span class="cx"> {
</span><del>- for (size_t i = 0, count = m_requestBodySandboxExtensions.size(); i < count; ++i)
- m_requestBodySandboxExtensions[i]->consume();
</del><ins>+ for (RefPtr<SandboxExtension>& extension : m_requestBodySandboxExtensions)
+ extension->consume();
</ins><span class="cx">
</span><del>- for (size_t i = 0, count = m_resourceSandboxExtensions.size(); i < count; ++i)
- m_resourceSandboxExtensions[i]->consume();
</del><ins>+ for (RefPtr<SandboxExtension>& extension : m_resourceSandboxExtensions)
+ extension->consume();
</ins><span class="cx">
</span><ins>+ for (RefPtr<BlobDataFileReference>& fileReference : m_fileReferences)
+ fileReference->prepareForFileAccess();
+
</ins><span class="cx"> m_sandboxExtensionsAreConsumed = true;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void NetworkResourceLoader::invalidateSandboxExtensions()
</span><span class="cx"> {
</span><span class="cx"> if (m_sandboxExtensionsAreConsumed) {
</span><del>- for (size_t i = 0, count = m_requestBodySandboxExtensions.size(); i < count; ++i)
- m_requestBodySandboxExtensions[i]->revoke();
- for (size_t i = 0, count = m_resourceSandboxExtensions.size(); i < count; ++i)
- m_resourceSandboxExtensions[i]->revoke();
</del><ins>+ for (RefPtr<SandboxExtension>& extension : m_requestBodySandboxExtensions)
+ extension->revoke();
+ for (RefPtr<SandboxExtension>& extension : m_resourceSandboxExtensions)
+ extension->revoke();
+ for (RefPtr<BlobDataFileReference>& fileReference : m_fileReferences)
+ fileReference->revokeFileAccess();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> m_requestBodySandboxExtensions.clear();
</span><span class="cx"> m_resourceSandboxExtensions.clear();
</span><ins>+ m_fileReferences.clear();
</ins><span class="cx">
</span><span class="cx"> m_sandboxExtensionsAreConsumed = false;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2NetworkProcessNetworkResourceLoaderh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/NetworkProcess/NetworkResourceLoader.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -42,6 +42,7 @@
</span><span class="cx"> typedef const struct _CFCachedURLResponse* CFCachedURLResponseRef;
</span><span class="cx">
</span><span class="cx"> namespace WebCore {
</span><ins>+class BlobDataFileReference;
</ins><span class="cx"> class ResourceBuffer;
</span><span class="cx"> class ResourceHandle;
</span><span class="cx"> class ResourceRequest;
</span><span class="lines">@@ -189,6 +190,7 @@
</span><span class="cx">
</span><span class="cx"> Vector<RefPtr<SandboxExtension>> m_requestBodySandboxExtensions;
</span><span class="cx"> Vector<RefPtr<SandboxExtension>> m_resourceSandboxExtensions;
</span><ins>+ Vector<RefPtr<WebCore::BlobDataFileReference>> m_fileReferences;
</ins><span class="cx"> bool m_sandboxExtensionsAreConsumed;
</span><span class="cx">
</span><span class="cx"> RefPtr<NetworkConnectionToWebProcess> m_connection;
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformGTKcmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/PlatformGTK.cmake (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/PlatformGTK.cmake        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/PlatformGTK.cmake        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -563,6 +563,7 @@
</span><span class="cx"> PluginProcess/unix/PluginProcessUnix.cpp
</span><span class="cx">
</span><span class="cx"> Shared/ActivityAssertion.cpp
</span><ins>+ Shared/BlobDataFileReferenceWithSandboxExtension.cpp
</ins><span class="cx"> Shared/ChildProcess.cpp
</span><span class="cx"> Shared/ChildProcessProxy.cpp
</span><span class="cx"> Shared/ConnectionStack.cpp
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedBlobDataFileReferenceWithSandboxExtensioncpp"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.cpp (0 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.cpp         (rev 0)
+++ trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+/*
+ * Copyright (C) 2014 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 "config.h"
+#include "BlobDataFileReferenceWithSandboxExtension.h"
+
+#include "SandboxExtension.h"
+
+namespace WebKit {
+
+BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension(const String& path, PassRefPtr<SandboxExtension> sandboxExtension)
+ : BlobDataFileReference(path)
+ , m_sandboxExtension(sandboxExtension)
+{
+}
+
+BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension()
+{
+}
+
+void BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess()
+{
+ m_sandboxExtension->consume();
+}
+
+void BlobDataFileReferenceWithSandboxExtension::revokeFileAccess()
+{
+ m_sandboxExtension->revoke();
+}
+
+}
</ins><span class="cx">Property changes on: trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.cpp
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebKit2SharedBlobDataFileReferenceWithSandboxExtensionh"></a>
<div class="addfile"><h4>Added: trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.h (0 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.h         (rev 0)
+++ trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -0,0 +1,54 @@
</span><ins>+/*
+ * Copyright (C) 2014 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.
+ */
+
+#ifndef BlobDataFileReferenceWithSandboxExtension_h
+#define BlobDataFileReferenceWithSandboxExtension_h
+
+#include <WebCore/BlobDataFileReference.h>
+
+namespace WebKit {
+
+class SandboxExtension;
+
+class BlobDataFileReferenceWithSandboxExtension : public WebCore::BlobDataFileReference {
+public:
+ static PassRefPtr<BlobDataFileReference> create(const String& path, PassRefPtr<SandboxExtension> sandboxExtension)
+ {
+ return adoptRef(new BlobDataFileReferenceWithSandboxExtension(path, sandboxExtension));
+ }
+
+private:
+ BlobDataFileReferenceWithSandboxExtension(const String& path, PassRefPtr<SandboxExtension>);
+ virtual ~BlobDataFileReferenceWithSandboxExtension();
+
+ virtual void prepareForFileAccess() override;
+ virtual void revokeFileAccess() override;
+
+ RefPtr<SandboxExtension> m_sandboxExtension;
+};
+
+}
+
+#endif // BlobDataFileReferenceWithSandboxExtension_h
</ins><span class="cx">Property changes on: trunk/Source/WebKit2/Shared/BlobDataFileReferenceWithSandboxExtension.h
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -1528,6 +1528,8 @@
</span><span class="cx">                 E1513C67166EABB200149FCB /* ChildProcessProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E1513C65166EABB200149FCB /* ChildProcessProxy.h */; };
</span><span class="cx">                 E152551A17011819003D7ADB /* NetworkResourceLoaderMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E152551817011819003D7ADB /* NetworkResourceLoaderMessageReceiver.cpp */; };
</span><span class="cx">                 E152551B17011819003D7ADB /* NetworkResourceLoaderMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = E152551917011819003D7ADB /* NetworkResourceLoaderMessages.h */; };
</span><ins>+                E164A2F1191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E164A2EF191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp */; };
+                E164A2F2191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h in Headers */ = {isa = PBXBuildFile; fileRef = E164A2F0191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h */; };
</ins><span class="cx">                 E170876B16D6CA6900F99226 /* BlobRegistryProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E170876916D6CA6900F99226 /* BlobRegistryProxy.cpp */; };
</span><span class="cx">                 E170876C16D6CA6900F99226 /* BlobRegistryProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = E170876A16D6CA6900F99226 /* BlobRegistryProxy.h */; };
</span><span class="cx">                 E179088D169BAA62006904C7 /* SecItemShim.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E18E6947169B77C8009B6670 /* SecItemShim.cpp */; };
</span><span class="lines">@@ -3452,6 +3454,8 @@
</span><span class="cx">                 E1525517170109FB003D7ADB /* NetworkResourceLoader.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; name = NetworkResourceLoader.messages.in; path = NetworkProcess/NetworkResourceLoader.messages.in; sourceTree = "<group>"; };
</span><span class="cx">                 E152551817011819003D7ADB /* NetworkResourceLoaderMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NetworkResourceLoaderMessageReceiver.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E152551917011819003D7ADB /* NetworkResourceLoaderMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NetworkResourceLoaderMessages.h; sourceTree = "<group>"; };
</span><ins>+                E164A2EF191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobDataFileReferenceWithSandboxExtension.cpp; sourceTree = "<group>"; };
+                E164A2F0191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BlobDataFileReferenceWithSandboxExtension.h; sourceTree = "<group>"; };
</ins><span class="cx">                 E170876916D6CA6900F99226 /* BlobRegistryProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlobRegistryProxy.cpp; path = WebProcess/FileAPI/BlobRegistryProxy.cpp; sourceTree = "<group>"; };
</span><span class="cx">                 E170876A16D6CA6900F99226 /* BlobRegistryProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlobRegistryProxy.h; path = WebProcess/FileAPI/BlobRegistryProxy.h; sourceTree = "<group>"; };
</span><span class="cx">                 E1798C7716E6818800240139 /* NetworkBlobRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NetworkBlobRegistry.cpp; path = NetworkProcess/FileAPI/NetworkBlobRegistry.cpp; sourceTree = "<group>"; };
</span><span class="lines">@@ -4104,6 +4108,8 @@
</span><span class="cx">                                 515E7725183DD6F60007203F /* AsyncRequest.cpp */,
</span><span class="cx">                                 515E7726183DD6F60007203F /* AsyncRequest.h */,
</span><span class="cx">                                 51BA24431858EE3000EA2811 /* AsyncTask.h */,
</span><ins>+                                E164A2EF191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp */,
+                                E164A2F0191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h */,
</ins><span class="cx">                                 4F601430155C5A32001FBDE0 /* BlockingResponseMap.h */,
</span><span class="cx">                                 BCF18637167D071E00A1A85A /* CacheModel.cpp */,
</span><span class="cx">                                 BC3065F91259344E00E71278 /* CacheModel.h */,
</span><span class="lines">@@ -6789,6 +6795,7 @@
</span><span class="cx">                                 1ADCB86B189831B30022EE5A /* NavigationActionData.h in Headers */,
</span><span class="cx">                                 935EEBA2127761D0003322B8 /* InjectedBundleBackForwardList.h in Headers */,
</span><span class="cx">                                 935EEBA4127761D6003322B8 /* InjectedBundleBackForwardListItem.h in Headers */,
</span><ins>+                                E164A2F2191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.h in Headers */,
</ins><span class="cx">                                 1A6637D718B2831F00C0BCF3 /* APIHistoryClient.h in Headers */,
</span><span class="cx">                                 BCEE7DC5128B645D009827DA /* InjectedBundleClient.h in Headers */,
</span><span class="cx">                                 BC498618124D10E200D834E1 /* InjectedBundleHitTestResult.h in Headers */,
</span><span class="lines">@@ -8582,6 +8589,7 @@
</span><span class="cx">                                 33D3A3C81339617900709BE4 /* WebMediaCacheManagerMessageReceiver.cpp in Sources */,
</span><span class="cx">                                 33D3A3BA1339606200709BE4 /* WebMediaCacheManagerProxy.cpp in Sources */,
</span><span class="cx">                                 33D3A3CA1339617900709BE4 /* WebMediaCacheManagerProxyMessageReceiver.cpp in Sources */,
</span><ins>+                                E164A2F1191AF14E0010737D /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */,
</ins><span class="cx">                                 0FCB4E4D18BBE044000FCFC9 /* WKContentView.mm in Sources */,
</span><span class="cx">                                 519EF59218EF80CE0003B7F4 /* TelephoneNumberOverlayController.cpp in Sources */,
</span><span class="cx">                                 909854EC12BC4E17000AD080 /* WebMemorySampler.cpp in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxycpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.cpp        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -32,22 +32,23 @@
</span><span class="cx"> #include "NetworkProcessConnection.h"
</span><span class="cx"> #include "WebCoreArgumentCoders.h"
</span><span class="cx"> #include "WebProcess.h"
</span><ins>+#include <WebCore/BlobDataFileReference.h>
</ins><span class="cx">
</span><span class="cx"> using namespace WebCore;
</span><span class="cx">
</span><span class="cx"> namespace WebKit {
</span><span class="cx">
</span><del>-void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, const String& path, const String& contentType)
</del><ins>+void BlobRegistryProxy::registerFileBlobURL(const WebCore::URL& url, PassRefPtr<BlobDataFileReference> file, const String& contentType)
</ins><span class="cx"> {
</span><span class="cx"> ASSERT(WebProcess::shared().usesNetworkProcess());
</span><span class="cx">
</span><span class="cx"> SandboxExtension::Handle extensionHandle;
</span><span class="cx">
</span><span class="cx"> // File path can be empty when submitting a form file input without a file, see bug 111778.
</span><del>- if (!path.isEmpty())
- SandboxExtension::createHandle(path, SandboxExtension::ReadOnly, extensionHandle);
</del><ins>+ if (!file->path().isEmpty())
+ SandboxExtension::createHandle(file->path(), SandboxExtension::ReadOnly, extensionHandle);
</ins><span class="cx">
</span><del>- WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, path, extensionHandle, contentType), 0);
</del><ins>+ WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::RegisterFileBlobURL(url, file->path(), extensionHandle, contentType), 0);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void BlobRegistryProxy::registerBlobURL(const URL& url, Vector<BlobPart> blobParts, const String& contentType)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessFileAPIBlobRegistryProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h (168477 => 168478)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h        2014-05-08 18:24:04 UTC (rev 168477)
+++ trunk/Source/WebKit2/WebProcess/FileAPI/BlobRegistryProxy.h        2014-05-08 18:33:18 UTC (rev 168478)
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx">
</span><span class="cx"> class BlobRegistryProxy final : public WebCore::BlobRegistry {
</span><span class="cx"> public:
</span><del>- virtual void registerFileBlobURL(const WebCore::URL&, const String& path, const String& contentType) override;
</del><ins>+ virtual void registerFileBlobURL(const WebCore::URL&, PassRefPtr<WebCore::BlobDataFileReference>, const String& contentType) override;
</ins><span class="cx"> virtual void registerBlobURL(const WebCore::URL&, Vector<WebCore::BlobPart>, const String& contentType) override;
</span><span class="cx"> virtual void registerBlobURL(const WebCore::URL&, const WebCore::URL& srcURL) override;
</span><span class="cx"> virtual void unregisterBlobURL(const WebCore::URL&) override;
</span></span></pre>
</div>
</div>
</body>
</html>