Stop including SecurityOrigin.h where unnecessary
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2013 11:12:41 +0000 (11:12 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 May 2013 11:12:41 +0000 (11:12 +0000)
https://bugs.webkit.org/show_bug.cgi?id=115897

Reviewed by Antti Koivisto.

Move rarely called functions out of line so headers don't have to include SecurityOrigin.h

* Modules/indexeddb/IDBFactoryBackendImpl.h:
* Modules/webdatabase/DatabaseBackendBase.cpp:
(WebCore::DatabaseBackendBase::databaseDebugName):
* Modules/webdatabase/DatabaseBackendBase.h:
(DatabaseBackendBase):
* Modules/webdatabase/DatabaseSync.h:
* bindings/js/JSDOMWindowCustom.h:
* html/parser/XSSAuditor.cpp:
* loader/ThreadableLoader.cpp:
(WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
(WebCore::ThreadableLoaderOptions::~ThreadableLoaderOptions):
(WebCore::ThreadableLoader::create):
* loader/ThreadableLoader.h:
(ThreadableLoaderOptions):
* loader/WorkerThreadableLoader.cpp:
* workers/DedicatedWorkerContext.cpp:
* workers/DedicatedWorkerThread.cpp:
* workers/SharedWorkerContext.cpp:
* workers/WorkerThread.cpp:
* workers/WorkerThread.h:

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

15 files changed:
Source/WebCore/ChangeLog
Source/WebCore/Modules/indexeddb/IDBFactoryBackendImpl.h
Source/WebCore/Modules/webdatabase/DatabaseBackendBase.cpp
Source/WebCore/Modules/webdatabase/DatabaseBackendBase.h
Source/WebCore/Modules/webdatabase/DatabaseSync.h
Source/WebCore/bindings/js/JSDOMWindowCustom.h
Source/WebCore/html/parser/XSSAuditor.cpp
Source/WebCore/loader/ThreadableLoader.cpp
Source/WebCore/loader/ThreadableLoader.h
Source/WebCore/loader/WorkerThreadableLoader.cpp
Source/WebCore/workers/DedicatedWorkerContext.cpp
Source/WebCore/workers/DedicatedWorkerThread.cpp
Source/WebCore/workers/SharedWorkerContext.cpp
Source/WebCore/workers/WorkerThread.cpp
Source/WebCore/workers/WorkerThread.h

index 920db13..139cc28 100644 (file)
@@ -1,3 +1,33 @@
+2013-05-10  Anders Carlsson  <andersca@apple.com>
+
+        Stop including SecurityOrigin.h where unnecessary
+        https://bugs.webkit.org/show_bug.cgi?id=115897
+
+        Reviewed by Antti Koivisto.
+
+        Move rarely called functions out of line so headers don't have to include SecurityOrigin.h
+
+        * Modules/indexeddb/IDBFactoryBackendImpl.h:
+        * Modules/webdatabase/DatabaseBackendBase.cpp:
+        (WebCore::DatabaseBackendBase::databaseDebugName):
+        * Modules/webdatabase/DatabaseBackendBase.h:
+        (DatabaseBackendBase):
+        * Modules/webdatabase/DatabaseSync.h:
+        * bindings/js/JSDOMWindowCustom.h:
+        * html/parser/XSSAuditor.cpp:
+        * loader/ThreadableLoader.cpp:
+        (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions):
+        (WebCore::ThreadableLoaderOptions::~ThreadableLoaderOptions):
+        (WebCore::ThreadableLoader::create):
+        * loader/ThreadableLoader.h:
+        (ThreadableLoaderOptions):
+        * loader/WorkerThreadableLoader.cpp:
+        * workers/DedicatedWorkerContext.cpp:
+        * workers/DedicatedWorkerThread.cpp:
+        * workers/SharedWorkerContext.cpp:
+        * workers/WorkerThread.cpp:
+        * workers/WorkerThread.h:
+
 2013-05-10  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK+ build after r149839.
index 6be174f..b9a6820 100644 (file)
@@ -28,6 +28,8 @@
 #ifndef IDBFactoryBackendImpl_h
 #define IDBFactoryBackendImpl_h
 
+#if ENABLE(INDEXED_DATABASE)
+
 #include "IDBCallbacks.h"
 #include "IDBDatabaseCallbacks.h"
 #include "IDBFactoryBackendInterface.h"
@@ -38,8 +40,6 @@
 #include <wtf/WeakPtr.h>
 #include <wtf/text/StringHash.h>
 
-#if ENABLE(INDEXED_DATABASE)
-
 namespace WebCore {
 
 class DOMStringList;
index 838c87b..b5abe10 100644 (file)
@@ -201,6 +201,13 @@ const char* DatabaseBackendBase::databaseInfoTableName()
     return infoTableName;
 }
 
+#if !LOG_DISABLED || !ERROR_DISABLED
+String DatabaseBackendBase::databaseDebugName() const
+{
+    return m_contextThreadSecurityOrigin->toString() + "::" + m_name;
+}
+#endif
+
 DatabaseBackendBase::DatabaseBackendBase(PassRefPtr<DatabaseBackendContext> databaseContext, const String& name,
     const String& expectedVersion, const String& displayName, unsigned long estimatedSize, DatabaseType databaseType)
     : m_databaseContext(databaseContext)
index 0802f78..113737c 100644 (file)
 #include <wtf/ThreadSafeRefCounted.h>
 #include <wtf/text/WTFString.h>
 
-#if !LOG_DISABLED || !ERROR_DISABLED
-#include "SecurityOrigin.h"
-#endif
-
 namespace WebCore {
 
 class DatabaseAuthorizer;
@@ -116,6 +112,10 @@ protected:
 
     static const char* databaseInfoTableName();
 
+#if !LOG_DISABLED || !ERROR_DISABLED
+    String databaseDebugName() const;
+#endif
+
     RefPtr<SecurityOrigin> m_contextThreadSecurityOrigin;
     RefPtr<DatabaseBackendContext> m_databaseContext; // Associated with m_scriptExecutionContext.
 
@@ -127,10 +127,6 @@ protected:
 
     DatabaseBase* m_frontend;
 
-#if !LOG_DISABLED || !ERROR_DISABLED
-    String databaseDebugName() const { return m_contextThreadSecurityOrigin->toString() + "::" + m_name; }
-#endif
-
 private:
     DatabaseGuid m_guid;
     bool m_opened;
index f0e3593..4119b5b 100644 (file)
 #include <wtf/Forward.h>
 #include <wtf/text/WTFString.h>
 
-#ifndef NDEBUG
-#include "SecurityOrigin.h"
-#endif
-
 namespace WebCore {
 
 class DatabaseCallback;
 class SQLTransactionSync;
 class SQLTransactionSyncCallback;
-class SecurityOrigin;
 
 // Instances of this class should be created and used only on the worker's context thread.
 class DatabaseSync : public DatabaseBase, public DatabaseBackendSync {
index ce82550..b72ff0d 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "JSDOMWindow.h"
 #include "JSDOMWindowShell.h"
-#include "SecurityOrigin.h"
 
 namespace WebCore {
 
index 57e7e48..4c26797 100644 (file)
@@ -46,7 +46,6 @@
 #include "InspectorValues.h"
 #include "KURL.h"
 #include "PingLoader.h"
-#include "SecurityOrigin.h"
 #include "Settings.h"
 #include "TextEncoding.h"
 #include "TextResourceDecoder.h"
index bfc7f3a..4a2cf7b 100644 (file)
 #include "config.h"
 #include "ThreadableLoader.h"
 
-#include "ScriptExecutionContext.h"
 #include "Document.h"
 #include "DocumentThreadableLoader.h"
+#include "ScriptExecutionContext.h"
+#include "SecurityOrigin.h"
 #include "WorkerContext.h"
 #include "WorkerRunLoop.h"
 #include "WorkerThreadableLoader.h"
 
 namespace WebCore {
 
-PassRefPtr<ThreadableLoader> ThreadableLoader::create(ScriptExecutionContext* context, ThreadableLoaderClient* client, const ResourceRequest& request, const ThreadableLoaderOptions& options) 
+ThreadableLoaderOptions::ThreadableLoaderOptions()
+    : preflightPolicy(ConsiderPreflight)
+    , crossOriginRequestPolicy(DenyCrossOriginRequests)
+{
+}
+
+ThreadableLoaderOptions::~ThreadableLoaderOptions()
+{
+}
+
+PassRefPtr<ThreadableLoader> ThreadableLoader::create(ScriptExecutionContext* context, ThreadableLoaderClient* client, const ResourceRequest& request, const ThreadableLoaderOptions& options)
 {
     ASSERT(client);
     ASSERT(context);
index bfb43c1..46ecadd 100644 (file)
@@ -32,7 +32,6 @@
 #define ThreadableLoader_h
 
 #include "ResourceLoaderOptions.h"
-#include "SecurityOrigin.h"
 #include <wtf/Noncopyable.h>
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefPtr.h>
@@ -44,6 +43,7 @@ namespace WebCore {
     class ResourceRequest;
     class ResourceResponse;
     class ScriptExecutionContext;
+    class SecurityOrigin;
     class ThreadableLoaderClient;
     
     enum CrossOriginRequestPolicy {
@@ -59,7 +59,9 @@ namespace WebCore {
     };
 
     struct ThreadableLoaderOptions : public ResourceLoaderOptions {
-        ThreadableLoaderOptions() : preflightPolicy(ConsiderPreflight), crossOriginRequestPolicy(DenyCrossOriginRequests) { }
+        ThreadableLoaderOptions();
+        ~ThreadableLoaderOptions();
+
         PreflightPolicy preflightPolicy; // If AccessControl is used, how to determine if a preflight is needed.
         CrossOriginRequestPolicy crossOriginRequestPolicy;
         RefPtr<SecurityOrigin> securityOrigin;
index 4a244f7..c3e6185 100644 (file)
@@ -40,6 +40,7 @@
 #include "ResourceError.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
+#include "SecurityOrigin.h"
 #include "ThreadableLoader.h"
 #include "WorkerContext.h"
 #include "WorkerLoaderProxy.h"
index 225915b..096034f 100644 (file)
@@ -37,6 +37,7 @@
 #include "DedicatedWorkerThread.h"
 #include "DOMWindow.h"
 #include "MessageEvent.h"
+#include "SecurityOrigin.h"
 #include "WorkerObjectProxy.h"
 
 namespace WebCore {
index 738d2c0..72ec982 100644 (file)
@@ -35,6 +35,7 @@
 #include "DedicatedWorkerThread.h"
 
 #include "DedicatedWorkerContext.h"
+#include "SecurityOrigin.h"
 #include "WorkerObjectProxy.h"
 
 namespace WebCore {
index 6ed0029..0b2c371 100644 (file)
@@ -39,6 +39,7 @@
 #include "MessageEvent.h"
 #include "NotImplemented.h"
 #include "ScriptCallStack.h"
+#include "SecurityOrigin.h"
 #include "SharedWorkerThread.h"
 
 namespace WebCore {
index ce69f5f..e1a0d66 100644 (file)
@@ -35,8 +35,8 @@
 #include "KURL.h"
 #include "ScriptSourceCode.h"
 #include "ScriptValue.h"
+#include "SecurityOrigin.h"
 #include "ThreadGlobalData.h"
-
 #include <utility>
 #include <wtf/Noncopyable.h>
 #include <wtf/text/WTFString.h>
index 2d83899..7b276b0 100644 (file)
@@ -31,7 +31,6 @@
 
 #include "ContentSecurityPolicy.h"
 #include "GroupSettings.h"
-#include "SecurityOrigin.h"
 #include "WorkerRunLoop.h"
 #include <wtf/Forward.h>
 #include <wtf/OwnPtr.h>
@@ -42,6 +41,7 @@ namespace WebCore {
 
     class KURL;
     class NotificationClient;
+    class SecurityOrigin;
     class WorkerContext;
     class WorkerLoaderProxy;
     class WorkerReportingProxy;