Create BlobRegistry through a strategy
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2013 21:04:14 +0000 (21:04 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Feb 2013 21:04:14 +0000 (21:04 +0000)
        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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144353 268f45cc-cd09-0410-ab3c-d52691b4dbfc

22 files changed:
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/loader/LoaderStrategy.cpp
Source/WebCore/loader/LoaderStrategy.h
Source/WebCore/platform/network/BlobData.h
Source/WebCore/platform/network/BlobRegistry.cpp [new file with mode: 0644]
Source/WebCore/platform/network/BlobRegistry.h
Source/WebCore/platform/network/BlobRegistryImpl.cpp
Source/WebCore/platform/network/BlobRegistryImpl.h
Source/WebCore/platform/network/BlobStorageData.h
Source/WebCore/platform/network/FormData.cpp
Source/WebCore/platform/network/ResourceHandle.cpp
Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp
Source/WebCore/platform/network/mac/ResourceHandleMac.mm

index 652e846..c0d7dc8 100644 (file)
@@ -2053,6 +2053,7 @@ set(WebCore_SOURCES
 
     platform/network/AuthenticationChallengeBase.cpp
     platform/network/BlobData.cpp
+    platform/network/BlobRegistry.cpp
     platform/network/BlobRegistryImpl.cpp
     platform/network/BlobResourceHandle.cpp
     platform/network/Credential.cpp
index 37e735b..3a722db 100644 (file)
@@ -1,3 +1,49 @@
+2013-02-28  Alexey Proskuryakov  <ap@apple.com>
+
+        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  <tkent@chromium.org>
 
         REGRESSION: INPUT_MULTIPLE_FIELDS_UI: Changing CSS display property on input[type=date] unexpectedly makes another line for ::-webkit-calendar-picker-indicator
index de35dc1..24df892 100644 (file)
@@ -5836,6 +5836,7 @@ webcore_platform_sources += \
        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 \
index de4247e..fe441a0 100644 (file)
@@ -1086,6 +1086,7 @@ SOURCES += \
     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 \
index 7cf4e34..f6f2304 100644 (file)
@@ -311,6 +311,7 @@ __ZN7WebCore14FrameSelection5clearEv
 __ZN7WebCore14FrameSelection6modifyENS0_11EAlterationENS_18SelectionDirectionENS_15TextGranularityENS_14EUserTriggeredE
 __ZN7WebCore14FrameSelection9selectAllEv
 __ZN7WebCore14FrameSelectionC1EPNS_5FrameE
+__ZN7WebCore14LoaderStrategy18createBlobRegistryEv
 __ZN7WebCore14LoaderStrategy21resourceLoadSchedulerEv
 __ZN7WebCore14LoaderStrategy25loadResourceSynchronouslyEPNS_17NetworkingContextEmRKNS_15ResourceRequestENS_17StoredCredentialsERNS_13ResourceErrorERNS_16ResourceResponseERN3WTF6VectorIcLm0EEE
 __ZN7WebCore14PluginDocument10pluginNodeEv
index 08db81a..55043bb 100644 (file)
             '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',
index 74a19d6..4d2bd2a 100755 (executable)
                                        >
                                </File>
                                <File
+                                       RelativePath="..\platform\network\BlobRegistry.cpp"
+                                       >
+                               </File>
+                               <File
                                        RelativePath="..\platform\network\BlobRegistryImpl.cpp"
                                        >
                                </File>
index 6f6cc29..7c0102d 100644 (file)
     <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" />
index 29e5e16..339bcc0 100644 (file)
     <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>
index d816496..6767d41 100644 (file)
                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, ); }; };
                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>"; };
                                2EDEF1ED121B0EFC00726DB2 /* BlobData.cpp */,
                                2EDEF1EE121B0EFC00726DB2 /* BlobData.h */,
                                2EDEF1EF121B0EFC00726DB2 /* BlobRegistry.h */,
+                               E14A94D616DFDF950068DE82 /* BlobRegistry.cpp */,
                                2EDEF1F0121B0EFC00726DB2 /* BlobRegistryImpl.cpp */,
                                2EDEF1F1121B0EFC00726DB2 /* BlobRegistryImpl.h */,
                                2EB4BCD0121F03E300EC4885 /* BlobResourceHandle.cpp */,
                                FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
                                41B8CD4516D04591000E8CC0 /* SelectorCheckerFastPath.cpp in Sources */,
                                49140256168E02E8002D6C6A /* TimelineTraceEventProcessor.cpp in Sources */,
+                               E14A94D716DFDF950068DE82 /* BlobRegistry.cpp in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index b0ec02e..fd02c17 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "LoaderStrategy.h"
 
+#include "BlobRegistryImpl.h"
 #include "ResourceHandle.h"
 #include "ResourceLoadScheduler.h"
 
@@ -43,6 +44,14 @@ void LoaderStrategy::loadResourceSynchronously(NetworkingContext* context, unsig
     ResourceHandle::loadResourceSynchronously(context, request, storedCredentials, error, response, data);
 }
 
+#if ENABLE(BLOB)
+BlobRegistry* LoaderStrategy::createBlobRegistry()
+{
+    return new BlobRegistryImpl;
+}
+#endif
+
+
 } // namespace WebCore
 
 #endif // USE(PLATFORM_STRATEGIES)
index 2a81200..2089177 100644 (file)
@@ -33,6 +33,7 @@
 
 namespace WebCore {
 
+class BlobRegistry;
 class NetworkingContext;
 class ResourceError;
 class ResourceLoadScheduler;
@@ -45,6 +46,10 @@ public:
 
     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()
     {
index fd15c38..2693a5f 100644 (file)
@@ -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 @@ private:
 
 } // namespace WebCore
 
+#endif // ENABLE(BLOB)
+
 #endif // BlobData_h
diff --git a/Source/WebCore/platform/network/BlobRegistry.cpp b/Source/WebCore/platform/network/BlobRegistry.cpp
new file mode 100644 (file)
index 0000000..d57406a
--- /dev/null
@@ -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
index 83b157e..e78be23 100644 (file)
 #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 @@ public:
     // 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
index 33c3c33..0912528 100644 (file)
  */
 
 #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>
 
 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);
index 9a25025..96a8478 100644 (file)
 #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 void registerBlobURL(const KURL&, PassOwnPtr<BlobData>);
-    virtual void registerBlobURL(const KURL&, const KURL& srcURL);
-    virtual void unregisterBlobURL(const KURL&);
+    virtual ~BlobRegistryImpl();
 
     PassRefPtr<BlobStorageData> getBlobDataFromURL(const KURL&) const;
 
@@ -66,9 +60,16 @@ private:
     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
index 6535e62..4fe7d73 100644 (file)
@@ -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 @@ private:
 
 } // namespace WebCore
 
+#endif
+
 #endif // BlobStorageData_h
index 173179f..065b90a 100644 (file)
@@ -322,9 +322,15 @@ String FormData::flattenToString() const
 #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();
index 84ceffa..d610f7d 100644 (file)
@@ -27,7 +27,6 @@
 #include "ResourceHandle.h"
 #include "ResourceHandleInternal.h"
 
-#include "BlobRegistry.h"
 #include "Logging.h"
 #include "NetworkingContext.h"
 #include "ResourceHandleClient.h"
index c3a9b0e..83447b0 100644 (file)
@@ -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"
index 64bcbe6..40a2925 100644 (file)
@@ -30,7 +30,6 @@
 
 #import "AuthenticationChallenge.h"
 #import "AuthenticationMac.h"
-#import "BlobRegistry.h"
 #import "BlockExceptions.h"
 #import "CookieStorage.h"
 #import "CredentialStorage.h"