Diff
Modified: trunk/Source/WebCore/CMakeLists.txt (144352 => 144353)
--- trunk/Source/WebCore/CMakeLists.txt 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/CMakeLists.txt 2013-02-28 21:04:14 UTC (rev 144353)
@@ -2053,6 +2053,7 @@
platform/network/AuthenticationChallengeBase.cpp
platform/network/BlobData.cpp
+ platform/network/BlobRegistry.cpp
platform/network/BlobRegistryImpl.cpp
platform/network/BlobResourceHandle.cpp
platform/network/Credential.cpp
Modified: trunk/Source/WebCore/ChangeLog (144352 => 144353)
--- trunk/Source/WebCore/ChangeLog 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/ChangeLog 2013-02-28 21:04:14 UTC (rev 144353)
@@ -1,3 +1,49 @@
+2013-02-28 Alexey Proskuryakov <[email protected]>
+
+ Create BlobRegistry through a strategy
+ https://bugs.webkit.org/show_bug.cgi?id=111100
+
+ Reviewed by Sam Weinig.
+
+ * CMakeLists.txt:
+ * GNUmakefile.list.am:
+ * Target.pri:
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.vcxproj/WebCore.vcxproj:
+ * WebCore.vcxproj/WebCore.vcxproj.filters:
+ * WebCore.xcodeproj/project.pbxproj:
+ Added BlobRegistry.cpp.
+
+ * WebCore.exp.in:
+ * loader/LoaderStrategy.cpp:
+ (WebCore::LoaderStrategy::createBlobRegistry):
+ * loader/LoaderStrategy.h:
+ Addxed a function to create BlobRegistry, with default implementation being
+ in-process WebKit1 one.
+
+ * platform/network/BlobData.h: Added ENABLE(BLOB).
+
+ * platform/network/BlobRegistry.cpp: Added. Moved singleton to a separate file.
+ * platform/network/BlobRegistry.h: Made destructor non-inline. Cleaned up includes.
+
+ * platform/network/BlobRegistryImpl.cpp:
+ * platform/network/BlobRegistryImpl.h:
+ Cleaned up includes, made functions that are only called through base class private.
+ Added ENABLE(BLOB).
+
+ * platform/network/BlobStorageData.h: Added ENABLE(BLOB).
+
+ * platform/network/FormData.cpp:
+ (WebCore::appendBlobResolved): Check blob registry type before upcasting. It's a
+ public function, and we should not depend on high level understanding of process
+ model to prove that the cast is safe.
+
+ * platform/network/ResourceHandle.cpp:
+ * platform/network/cf/FormDataStreamCFNet.cpp:
+ * platform/network/mac/ResourceHandleMac.mm:
+ Cleaned up includes.
+
2013-02-28 Kent Tamura <[email protected]>
REGRESSION: INPUT_MULTIPLE_FIELDS_UI: Changing CSS display property on input[type=date] unexpectedly makes another line for ::-webkit-calendar-picker-indicator
Modified: trunk/Source/WebCore/GNUmakefile.list.am (144352 => 144353)
--- trunk/Source/WebCore/GNUmakefile.list.am 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/GNUmakefile.list.am 2013-02-28 21:04:14 UTC (rev 144353)
@@ -5836,6 +5836,7 @@
Source/WebCore/platform/network/BlobData.cpp \
Source/WebCore/platform/network/BlobData.h \
Source/WebCore/platform/network/BlobRegistry.h \
+ Source/WebCore/platform/network/BlobRegistry.cpp \
Source/WebCore/platform/network/BlobRegistryImpl.cpp \
Source/WebCore/platform/network/BlobRegistryImpl.h \
Source/WebCore/platform/network/BlobResourceHandle.cpp \
Modified: trunk/Source/WebCore/Target.pri (144352 => 144353)
--- trunk/Source/WebCore/Target.pri 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/Target.pri 2013-02-28 21:04:14 UTC (rev 144353)
@@ -1086,6 +1086,7 @@
platform/mock/ScrollbarThemeMock.cpp \
platform/network/AuthenticationChallengeBase.cpp \
platform/network/BlobData.cpp \
+ platform/network/BlobRegistry.cpp \
platform/network/BlobRegistryImpl.cpp \
platform/network/BlobResourceHandle.cpp \
platform/network/Credential.cpp \
Modified: trunk/Source/WebCore/WebCore.exp.in (144352 => 144353)
--- trunk/Source/WebCore/WebCore.exp.in 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/WebCore.exp.in 2013-02-28 21:04:14 UTC (rev 144353)
@@ -311,6 +311,7 @@
__ZN7WebCore14FrameSelection6modifyENS0_11EAlterationENS_18SelectionDirectionENS_15TextGranularityENS_14EUserTriggeredE
__ZN7WebCore14FrameSelection9selectAllEv
__ZN7WebCore14FrameSelectionC1EPNS_5FrameE
+__ZN7WebCore14LoaderStrategy18createBlobRegistryEv
__ZN7WebCore14LoaderStrategy21resourceLoadSchedulerEv
__ZN7WebCore14LoaderStrategy25loadResourceSynchronouslyEPNS_17NetworkingContextEmRKNS_15ResourceRequestENS_17StoredCredentialsERNS_13ResourceErrorERNS_16ResourceResponseERN3WTF6VectorIcLm0EEE
__ZN7WebCore14PluginDocument10pluginNodeEv
Modified: trunk/Source/WebCore/WebCore.gypi (144352 => 144353)
--- trunk/Source/WebCore/WebCore.gypi 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/WebCore.gypi 2013-02-28 21:04:14 UTC (rev 144353)
@@ -4442,6 +4442,7 @@
'platform/network/BlobData.cpp',
'platform/network/BlobData.h',
'platform/network/BlobRegistry.h',
+ 'platform/network/BlobRegistry.cpp',
'platform/network/BlobRegistryImpl.cpp',
'platform/network/BlobRegistryImpl.h',
'platform/network/BlobResourceHandle.cpp',
Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (144352 => 144353)
--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj 2013-02-28 21:04:14 UTC (rev 144353)
@@ -32814,6 +32814,10 @@
>
</File>
<File
+ RelativePath="..\platform\network\BlobRegistry.cpp"
+ >
+ </File>
+ <File
RelativePath="..\platform\network\BlobRegistryImpl.cpp"
>
</File>
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (144352 => 144353)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj 2013-02-28 21:04:14 UTC (rev 144353)
@@ -3538,6 +3538,7 @@
<ClCompile Include="..\platform\graphics\avfoundation\cf\MediaPlayerPrivateAVFoundationCF.cpp" />
<ClCompile Include="..\platform\network\AuthenticationChallengeBase.cpp" />
<ClCompile Include="..\platform\network\BlobData.cpp" />
+ <ClCompile Include="..\platform\network\BlobRegistry.cpp" />
<ClCompile Include="..\platform\network\BlobRegistryImpl.cpp" />
<ClCompile Include="..\platform\network\BlobResourceHandle.cpp" />
<ClCompile Include="..\platform\network\Credential.cpp" />
Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (144352 => 144353)
--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters 2013-02-28 21:04:14 UTC (rev 144353)
@@ -3237,6 +3237,9 @@
<ClCompile Include="..\platform\network\BlobData.cpp">
<Filter>platform\network</Filter>
</ClCompile>
+ <ClCompile Include="..\platform\network\BlobRegistry.cpp">
+ <Filter>platform\network</Filter>
+ </ClCompile>
<ClCompile Include="..\platform\network\BlobRegistryImpl.cpp">
<Filter>platform\network</Filter>
</ClCompile>
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (144352 => 144353)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2013-02-28 21:04:14 UTC (rev 144353)
@@ -6193,6 +6193,7 @@
E145349716A9BB6A000F6FD2 /* DOMTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = E145349416A9BB6A000F6FD2 /* DOMTransitionEvent.h */; };
E145349816A9BB6A000F6FD2 /* DOMTransitionEvent.mm in Sources */ = {isa = PBXBuildFile; fileRef = E145349516A9BB6A000F6FD2 /* DOMTransitionEvent.mm */; };
E145349916A9BB6A000F6FD2 /* DOMTransitionEventInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = E145349616A9BB6A000F6FD2 /* DOMTransitionEventInternal.h */; };
+ E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E14A94D616DFDF950068DE82 /* BlobRegistry.cpp */; };
E14F1C4414B5DAC600EA9009 /* HTMLFormControlElementWithState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E14F1C4214B5DAC600EA9009 /* HTMLFormControlElementWithState.cpp */; };
E14F1C4514B5DAC600EA9009 /* HTMLFormControlElementWithState.h in Headers */ = {isa = PBXBuildFile; fileRef = E14F1C4314B5DAC600EA9009 /* HTMLFormControlElementWithState.h */; settings = {ATTRIBUTES = (Private, ); }; };
E1513D4F1677EA8300149FCB /* InitializeLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = E1513D4E1677EA8300149FCB /* InitializeLogging.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -13852,6 +13853,7 @@
E145349416A9BB6A000F6FD2 /* DOMTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMTransitionEvent.h; sourceTree = "<group>"; };
E145349516A9BB6A000F6FD2 /* DOMTransitionEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMTransitionEvent.mm; sourceTree = "<group>"; };
E145349616A9BB6A000F6FD2 /* DOMTransitionEventInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMTransitionEventInternal.h; sourceTree = "<group>"; };
+ E14A94D616DFDF950068DE82 /* BlobRegistry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BlobRegistry.cpp; sourceTree = "<group>"; };
E14F1C4214B5DAC600EA9009 /* HTMLFormControlElementWithState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLFormControlElementWithState.cpp; sourceTree = "<group>"; };
E14F1C4314B5DAC600EA9009 /* HTMLFormControlElementWithState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLFormControlElementWithState.h; sourceTree = "<group>"; };
E1513D4E1677EA8300149FCB /* InitializeLogging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitializeLogging.h; sourceTree = "<group>"; };
@@ -16160,6 +16162,7 @@
2EDEF1ED121B0EFC00726DB2 /* BlobData.cpp */,
2EDEF1EE121B0EFC00726DB2 /* BlobData.h */,
2EDEF1EF121B0EFC00726DB2 /* BlobRegistry.h */,
+ E14A94D616DFDF950068DE82 /* BlobRegistry.cpp */,
2EDEF1F0121B0EFC00726DB2 /* BlobRegistryImpl.cpp */,
2EDEF1F1121B0EFC00726DB2 /* BlobRegistryImpl.h */,
2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */,
@@ -29817,6 +29820,7 @@
FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
41B8CD4516D04591000E8CC0 /* SelectorCheckerFastPath.cpp in Sources */,
49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */,
+ E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Modified: trunk/Source/WebCore/loader/LoaderStrategy.cpp (144352 => 144353)
--- trunk/Source/WebCore/loader/LoaderStrategy.cpp 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/loader/LoaderStrategy.cpp 2013-02-28 21:04:14 UTC (rev 144353)
@@ -26,6 +26,7 @@
#include "config.h"
#include "LoaderStrategy.h"
+#include "BlobRegistryImpl.h"
#include "ResourceHandle.h"
#include "ResourceLoadScheduler.h"
@@ -43,6 +44,14 @@
ResourceHandle::loadResourceSynchronously(context, request, storedCredentials, error, response, data);
}
+#if ENABLE(BLOB)
+BlobRegistry* LoaderStrategy::createBlobRegistry()
+{
+ return new BlobRegistryImpl;
+}
+#endif
+
+
} // namespace WebCore
#endif // USE(PLATFORM_STRATEGIES)
Modified: trunk/Source/WebCore/loader/LoaderStrategy.h (144352 => 144353)
--- trunk/Source/WebCore/loader/LoaderStrategy.h 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/loader/LoaderStrategy.h 2013-02-28 21:04:14 UTC (rev 144353)
@@ -33,6 +33,7 @@
namespace WebCore {
+class BlobRegistry;
class NetworkingContext;
class ResourceError;
class ResourceLoadScheduler;
@@ -45,6 +46,10 @@
virtual void loadResourceSynchronously(NetworkingContext*, unsigned long identifier, const ResourceRequest&, StoredCredentials, ResourceError&, ResourceResponse&, Vector<char>& data);
+#if ENABLE(BLOB)
+ virtual BlobRegistry* createBlobRegistry();
+#endif
+
protected:
virtual ~LoaderStrategy()
{
Modified: trunk/Source/WebCore/platform/network/BlobData.h (144352 => 144353)
--- trunk/Source/WebCore/platform/network/BlobData.h 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/BlobData.h 2013-02-28 21:04:14 UTC (rev 144353)
@@ -31,6 +31,8 @@
#ifndef BlobData_h
#define BlobData_h
+#if ENABLE(BLOB)
+
#include "FileSystem.h"
#include "KURL.h"
#include <wtf/Forward.h>
@@ -204,4 +206,6 @@
} // namespace WebCore
+#endif // ENABLE(BLOB)
+
#endif // BlobData_h
Added: trunk/Source/WebCore/platform/network/BlobRegistry.cpp (0 => 144353)
--- trunk/Source/WebCore/platform/network/BlobRegistry.cpp (rev 0)
+++ trunk/Source/WebCore/platform/network/BlobRegistry.cpp 2013-02-28 21:04:14 UTC (rev 144353)
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2013 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 "BlobRegistry.h"
+
+#if ENABLE(BLOB)
+
+#include "BlobRegistryImpl.h"
+#include "LoaderStrategy.h"
+#include "PlatformStrategies.h"
+#include <wtf/MainThread.h>
+
+#if !PLATFORM(CHROMIUM)
+
+namespace WebCore {
+
+BlobRegistry& blobRegistry()
+{
+ ASSERT(isMainThread());
+
+#if USE(PLATFORM_STRATEGIES)
+ static BlobRegistry& instance = *platformStrategies()->loaderStrategy()->createBlobRegistry();
+#else
+ DEFINE_STATIC_LOCAL(BlobRegistryImpl, instance, ());
+#endif
+ return instance;
+}
+
+BlobRegistry::~BlobRegistry()
+{
+}
+
+}
+
+#endif
+#endif
Property changes on: trunk/Source/WebCore/platform/network/BlobRegistry.cpp
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/platform/network/BlobRegistry.h (144352 => 144353)
--- trunk/Source/WebCore/platform/network/BlobRegistry.h 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/BlobRegistry.h 2013-02-28 21:04:14 UTC (rev 144353)
@@ -32,22 +32,15 @@
#define BlobRegistry_h
#include <wtf/PassOwnPtr.h>
-#include <wtf/PassRefPtr.h>
-#include <wtf/Vector.h>
namespace WebCore {
class BlobData;
+class BlobStorageData;
class BlobRegistry;
class KURL;
-class ResourceError;
-class ResourceHandle;
-class ResourceHandleClient;
-class ResourceRequest;
-class ResourceResponse;
-// Returns a single instance of BlobRegistry.
-BlobRegistry& blobRegistry();
+BlobRegistry& blobRegistry();
// BlobRegistry is not thread-safe. It should only be called from main thread.
class BlobRegistry {
@@ -55,13 +48,15 @@
// Registers a blob URL referring to the specified blob data.
virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>) = 0;
- // Registers a blob URL referring to the blob data identified by the specified srcURL.
+ // Registers a new blob URL referring to the blob data identified by the specified srcURL.
virtual void registerBlobURL(const KURL&, const KURL& srcURL) = 0;
virtual void unregisterBlobURL(const KURL&) = 0;
+ virtual bool isBlobRegistryImpl() const { return false; }
+
protected:
- virtual ~BlobRegistry() { }
+ virtual ~BlobRegistry();
};
} // namespace WebCore
Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp (144352 => 144353)
--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.cpp 2013-02-28 21:04:14 UTC (rev 144353)
@@ -30,15 +30,14 @@
*/
#include "config.h"
+#include "BlobRegistryImpl.h"
#if ENABLE(BLOB)
-#include "BlobRegistryImpl.h"
-
#include "BlobResourceHandle.h"
+#include "BlobStorageData.h"
#include "ResourceError.h"
#include "ResourceHandle.h"
-#include "ResourceLoader.h"
#include "ResourceRequest.h"
#include "ResourceResponse.h"
#include <wtf/MainThread.h>
@@ -46,14 +45,11 @@
namespace WebCore {
-#if !PLATFORM(CHROMIUM)
-BlobRegistry& blobRegistry()
+BlobRegistryImpl::~BlobRegistryImpl()
{
- ASSERT(isMainThread());
- DEFINE_STATIC_LOCAL(BlobRegistryImpl, instance, ());
- return instance;
}
+#if !PLATFORM(CHROMIUM)
static PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest& request, ResourceHandleClient* client)
{
return static_cast<BlobRegistryImpl&>(blobRegistry()).createResourceHandle(request, client);
Modified: trunk/Source/WebCore/platform/network/BlobRegistryImpl.h (144352 => 144353)
--- trunk/Source/WebCore/platform/network/BlobRegistryImpl.h 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/BlobRegistryImpl.h 2013-02-28 21:04:14 UTC (rev 144353)
@@ -31,33 +31,27 @@
#ifndef BlobRegistryImpl_h
#define BlobRegistryImpl_h
-#include "BlobData.h"
+#if ENABLE(BLOB)
+
#include "BlobRegistry.h"
#include "BlobStorageData.h"
#include <wtf/HashMap.h>
-#include <wtf/text/CString.h>
#include <wtf/text/StringHash.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
class KURL;
-class ResourceError;
class ResourceHandle;
class ResourceHandleClient;
class ResourceRequest;
-class ResourceResponse;
// BlobRegistryImpl is not thread-safe. It should only be called from main thread.
class BlobRegistryImpl : public BlobRegistry {
WTF_MAKE_FAST_ALLOCATED;
public:
- virtual ~BlobRegistryImpl() { }
+ virtual ~BlobRegistryImpl();
- virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>);
- virtual void registerBlobURL(const KURL&, const KURL& srcURL);
- virtual void unregisterBlobURL(const KURL&);
-
PassRefPtr<BlobStorageData> getBlobDataFromURL(const KURL&) const;
PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest&, ResourceHandleClient*);
@@ -66,9 +60,16 @@
void appendStorageItems(BlobStorageData*, const BlobDataItemList&);
void appendStorageItems(BlobStorageData*, const BlobDataItemList&, long long offset, long long length);
+ virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>) OVERRIDE;
+ virtual void registerBlobURL(const KURL&, const KURL& srcURL) OVERRIDE;
+ virtual void unregisterBlobURL(const KURL&) OVERRIDE;
+ virtual bool isBlobRegistryImpl() const OVERRIDE { return true; }
+
HashMap<String, RefPtr<BlobStorageData> > m_blobs;
};
} // namespace WebCore
+#endif // ENABLE(BLOB)
+
#endif // BlobRegistryImpl_h
Modified: trunk/Source/WebCore/platform/network/BlobStorageData.h (144352 => 144353)
--- trunk/Source/WebCore/platform/network/BlobStorageData.h 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/BlobStorageData.h 2013-02-28 21:04:14 UTC (rev 144353)
@@ -31,6 +31,8 @@
#ifndef BlobStorageData_h
#define BlobStorageData_h
+#if ENABLE(BLOB)
+
#include "BlobData.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
@@ -62,4 +64,6 @@
} // namespace WebCore
+#endif
+
#endif // BlobStorageData_h
Modified: trunk/Source/WebCore/platform/network/FormData.cpp (144352 => 144353)
--- trunk/Source/WebCore/platform/network/FormData.cpp 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/FormData.cpp 2013-02-28 21:04:14 UTC (rev 144353)
@@ -322,9 +322,15 @@
#if ENABLE(BLOB)
static void appendBlobResolved(FormData* formData, const KURL& url)
{
+ if (!blobRegistry().isBlobRegistryImpl()) {
+ LOG_ERROR("Tried to resolve a blob without a usable registry");
+ return;
+ }
RefPtr<BlobStorageData> blobData = static_cast<BlobRegistryImpl&>(blobRegistry()).getBlobDataFromURL(KURL(ParsedURLString, url));
- if (!blobData)
+ if (!blobData) {
+ LOG_ERROR("Could not get blob data from a registry");
return;
+ }
BlobDataItemList::const_iterator it = blobData->items().begin();
const BlobDataItemList::const_iterator itend = blobData->items().end();
Modified: trunk/Source/WebCore/platform/network/ResourceHandle.cpp (144352 => 144353)
--- trunk/Source/WebCore/platform/network/ResourceHandle.cpp 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/ResourceHandle.cpp 2013-02-28 21:04:14 UTC (rev 144353)
@@ -27,7 +27,6 @@
#include "ResourceHandle.h"
#include "ResourceHandleInternal.h"
-#include "BlobRegistry.h"
#include "Logging.h"
#include "NetworkingContext.h"
#include "ResourceHandleClient.h"
Modified: trunk/Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp (144352 => 144353)
--- trunk/Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp 2013-02-28 21:04:14 UTC (rev 144353)
@@ -29,7 +29,7 @@
#include "config.h"
#include "FormDataStreamCFNet.h"
-#include "BlobRegistryImpl.h"
+#include "BlobData.h"
#include "FileSystem.h"
#include "FormData.h"
#include "SchedulePair.h"
Modified: trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm (144352 => 144353)
--- trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2013-02-28 20:59:15 UTC (rev 144352)
+++ trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm 2013-02-28 21:04:14 UTC (rev 144353)
@@ -30,7 +30,6 @@
#import "AuthenticationChallenge.h"
#import "AuthenticationMac.h"
-#import "BlobRegistry.h"
#import "BlockExceptions.h"
#import "CookieStorage.h"
#import "CredentialStorage.h"