Backed out 16 changesets (bug 1525245) for perma failing test_document_cookie.html CLOSED TREE
Backed out changeset 3fd27215698f (bug 1525245) Backed out changeset d9a9e8e77873 (bug 1525245) Backed out changeset 0e6f7be92e3f (bug 1525245) Backed out changeset 6790802e2fa5 (bug 1525245) Backed out changeset a5a9e01116ed (bug 1525245) Backed out changeset 66e19a0c38dd (bug 1525245) Backed out changeset fb90d51ba853 (bug 1525245) Backed out changeset 4772db3625b3 (bug 1525245) Backed out changeset 9affaf0cb998 (bug 1525245) Backed out changeset a91b7ebe8bdd (bug 1525245) Backed out changeset c2a13a7480e1 (bug 1525245) Backed out changeset abe4482fa137 (bug 1525245) Backed out changeset b3920c0bcf84 (bug 1525245) Backed out changeset 0821b81f2724 (bug 1525245) Backed out changeset 70bed2ad7899 (bug 1525245) Backed out changeset 5f72ba232cc8 (bug 1525245)
This commit is contained in:
@@ -82,8 +82,7 @@ class EventSourceImpl final : public nsIObserver,
|
||||
NS_DECL_NSIEVENTTARGET_FULL
|
||||
NS_DECL_NSITHREADRETARGETABLESTREAMLISTENER
|
||||
|
||||
EventSourceImpl(EventSource* aEventSource,
|
||||
nsICookieSettings* aCookieSettings);
|
||||
explicit EventSourceImpl(EventSource* aEventSource);
|
||||
|
||||
enum { CONNECTING = 0U, OPEN = 1U, CLOSED = 2U };
|
||||
|
||||
@@ -292,8 +291,6 @@ class EventSourceImpl final : public nsIObserver,
|
||||
uint64_t mInnerWindowID;
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsICookieSettings> mCookieSettings;
|
||||
|
||||
// Pointer to the target thread for checking whether we are
|
||||
// on the target thread. This is intentionally a non-owning
|
||||
// pointer in order not to affect the thread destruction
|
||||
@@ -319,8 +316,7 @@ NS_IMPL_ISUPPORTS(EventSourceImpl, nsIObserver, nsIStreamListener,
|
||||
nsIInterfaceRequestor, nsISupportsWeakReference,
|
||||
nsIEventTarget, nsIThreadRetargetableStreamListener)
|
||||
|
||||
EventSourceImpl::EventSourceImpl(EventSource* aEventSource,
|
||||
nsICookieSettings* aCookieSettings)
|
||||
EventSourceImpl::EventSourceImpl(EventSource* aEventSource)
|
||||
: mEventSource(aEventSource),
|
||||
mReconnectionTime(0),
|
||||
mStatus(PARSE_STATE_OFF),
|
||||
@@ -332,7 +328,6 @@ EventSourceImpl::EventSourceImpl(EventSource* aEventSource,
|
||||
mScriptLine(0),
|
||||
mScriptColumn(0),
|
||||
mInnerWindowID(0),
|
||||
mCookieSettings(aCookieSettings),
|
||||
mTargetThread(NS_GetCurrentThread()) {
|
||||
MOZ_ASSERT(mEventSource);
|
||||
if (!mIsMainThread) {
|
||||
@@ -976,8 +971,6 @@ nsresult EventSourceImpl::InitChannelAndRequestEventSource() {
|
||||
nsCOMPtr<nsIChannel> channel;
|
||||
// If we have the document, use it
|
||||
if (doc) {
|
||||
MOZ_ASSERT(mCookieSettings == doc->CookieSettings());
|
||||
|
||||
nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
|
||||
rv = NS_NewChannel(getter_AddRefs(channel), mSrc, doc, securityFlags,
|
||||
nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE,
|
||||
@@ -989,7 +982,6 @@ nsresult EventSourceImpl::InitChannelAndRequestEventSource() {
|
||||
// otherwise use the principal
|
||||
rv = NS_NewChannel(getter_AddRefs(channel), mSrc, mPrincipal, securityFlags,
|
||||
nsIContentPolicy::TYPE_INTERNAL_EVENTSOURCE,
|
||||
mCookieSettings,
|
||||
nullptr, // aPerformanceStorage
|
||||
nullptr, // loadGroup
|
||||
nullptr, // aCallbacks
|
||||
@@ -1785,14 +1777,12 @@ EventSourceImpl::CheckListenerChain() {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
EventSource::EventSource(nsPIDOMWindowInner* aOwnerWindow,
|
||||
nsICookieSettings* aCookieSettings,
|
||||
bool aWithCredentials)
|
||||
: DOMEventTargetHelper(aOwnerWindow),
|
||||
mWithCredentials(aWithCredentials),
|
||||
mIsMainThread(true),
|
||||
mKeepingAlive(false) {
|
||||
MOZ_ASSERT(aCookieSettings);
|
||||
mImpl = new EventSourceImpl(this, aCookieSettings);
|
||||
mImpl = new EventSourceImpl(this);
|
||||
}
|
||||
|
||||
EventSource::~EventSource() {}
|
||||
@@ -1816,24 +1806,8 @@ already_AddRefed<EventSource> EventSource::Constructor(
|
||||
|
||||
MOZ_ASSERT(!NS_IsMainThread() || ownerWindow);
|
||||
|
||||
nsCOMPtr<nsICookieSettings> cookieSettings;
|
||||
if (ownerWindow) {
|
||||
Document* doc = ownerWindow->GetExtantDoc();
|
||||
if (NS_WARN_IF(!doc)) {
|
||||
aRv.Throw(NS_ERROR_FAILURE);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cookieSettings = doc->CookieSettings();
|
||||
} else {
|
||||
// Worker side.
|
||||
WorkerPrivate* workerPrivate = GetCurrentThreadWorkerPrivate();
|
||||
MOZ_ASSERT(workerPrivate);
|
||||
cookieSettings = workerPrivate->CookieSettings();
|
||||
}
|
||||
|
||||
RefPtr<EventSource> eventSource = new EventSource(
|
||||
ownerWindow, cookieSettings, aEventSourceInitDict.mWithCredentials);
|
||||
RefPtr<EventSource> eventSource =
|
||||
new EventSource(ownerWindow, aEventSourceInitDict.mWithCredentials);
|
||||
RefPtr<EventSourceImpl> eventSourceImp = eventSource->mImpl;
|
||||
|
||||
if (NS_IsMainThread()) {
|
||||
|
||||
Reference in New Issue
Block a user