Issue #80 - De-unify dom/fetch

Running into the same problem as with dom/canvas: derived template
classes not being happy about being non-unified. Kept unified for now
to prevent linking errors.
This commit is contained in:
wolfbeast 2020-04-19 16:45:01 +02:00 committed by Roy Tam
commit c7d6ca06da
8 changed files with 20 additions and 5 deletions

View file

@ -8,11 +8,13 @@
#define mozilla_dom_FetchConsumer_h
#include "Fetch.h"
#include "nsIInputStream.h"
#include "nsIObserver.h"
#include "nsWeakReference.h"
#include "mozilla/dom/MutableBlobStorage.h"
class nsIThread;
class nsIInputStreamPump;
namespace mozilla {
namespace dom {

View file

@ -2,6 +2,7 @@
#include "nsError.h"
#include "nsIUnicodeDecoder.h"
#include "nsNetUtil.h"
#include "nsString.h"
#include "mozilla/dom/EncodingUtils.h"

View file

@ -8,6 +8,7 @@
#include "nsIContentPolicy.h"
#include "nsIDocument.h"
#include "nsIHttpChannelInternal.h"
#include "nsStreamUtils.h"
#include "mozilla/ErrorResult.h"

View file

@ -7,6 +7,7 @@
#include "InternalResponse.h"
#include "mozilla/Assertions.h"
#include "mozilla/dom/FetchTypes.h"
#include "mozilla/dom/InternalHeaders.h"
#include "mozilla/dom/cache/CacheTypes.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"

View file

@ -12,6 +12,7 @@
#include "mozilla/dom/ResponseBinding.h"
#include "mozilla/dom/ChannelInfo.h"
#include "mozilla/dom/InternalHeaders.h"
#include "mozilla/UniquePtr.h"
namespace mozilla {

View file

@ -7,6 +7,7 @@
#include "Request.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
#include "nsPIDOMWindow.h"
#include "mozilla/ErrorResult.h"
@ -15,14 +16,18 @@
#include "mozilla/dom/FetchUtil.h"
#include "mozilla/dom/Promise.h"
#include "mozilla/dom/URL.h"
#include "mozilla/dom/WorkerPrivate.h"
#include "mozilla/Unused.h"
#include "WorkerPrivate.h"
#include "WorkerRunnable.h"
#include "WorkerScope.h"
#include "Workers.h"
namespace mozilla {
namespace dom {
using namespace workers;
NS_IMPL_CYCLE_COLLECTING_ADDREF(Request)
NS_IMPL_CYCLE_COLLECTING_RELEASE(Request)
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Request, mOwner, mHeaders)
@ -237,14 +242,14 @@ GetRequestURLFromWorker(const GlobalObject& aGlobal, const nsAString& aInput,
}
}
class ReferrerSameOriginChecker final : public workers::WorkerMainThreadRunnable
class ReferrerSameOriginChecker final : public WorkerMainThreadRunnable
{
public:
ReferrerSameOriginChecker(workers::WorkerPrivate* aWorkerPrivate,
const nsAString& aReferrerURL,
nsresult& aResult)
: workers::WorkerMainThreadRunnable(aWorkerPrivate,
NS_LITERAL_CSTRING("Fetch :: Referrer same origin check")),
: WorkerMainThreadRunnable(aWorkerPrivate,
NS_LITERAL_CSTRING("Fetch :: Referrer same origin check")),
mReferrerURL(aReferrerURL),
mResult(aResult)
{

View file

@ -8,6 +8,7 @@
#include "nsISupportsImpl.h"
#include "nsIURI.h"
#include "nsNetUtil.h"
#include "nsPIDOMWindow.h"
#include "mozilla/ErrorResult.h"

View file

@ -19,9 +19,12 @@ EXPORTS.mozilla.dom += [
]
UNIFIED_SOURCES += [
'ChannelInfo.cpp',
'Fetch.cpp',
'FetchConsumer.cpp',
]
SOURCES += [
'ChannelInfo.cpp',
'FetchDriver.cpp',
'FetchUtil.cpp',
'Headers.cpp',