mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 23:27:30 +09:00
Issue #1587 - Part 7: Rename FetchController to AbortController
Also renames FetchSignal to AbortSignal. Includes renaming the various controlling prefs to enable.
This commit is contained in:
parent
0c2404efa7
commit
b988c351ff
21 changed files with 142 additions and 142 deletions
|
|
@ -4,30 +4,30 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "FetchController.h"
|
#include "AbortController.h"
|
||||||
#include "FetchSignal.h"
|
#include "AbortSignal.h"
|
||||||
#include "mozilla/dom/FetchControllerBinding.h"
|
#include "mozilla/dom/AbortControllerBinding.h"
|
||||||
#include "WorkerPrivate.h"
|
#include "WorkerPrivate.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(FetchController, mGlobal, mSignal,
|
NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AbortController, mGlobal, mSignal,
|
||||||
mFollowingSignal)
|
mFollowingSignal)
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTING_ADDREF(FetchController)
|
NS_IMPL_CYCLE_COLLECTING_ADDREF(AbortController)
|
||||||
NS_IMPL_CYCLE_COLLECTING_RELEASE(FetchController)
|
NS_IMPL_CYCLE_COLLECTING_RELEASE(AbortController)
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(FetchController)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AbortController)
|
||||||
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
|
||||||
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
NS_INTERFACE_MAP_ENTRY(nsISupports)
|
||||||
NS_INTERFACE_MAP_END
|
NS_INTERFACE_MAP_END
|
||||||
|
|
||||||
/* static */ bool
|
/* static */ bool
|
||||||
FetchController::IsEnabled(JSContext* aCx, JSObject* aGlobal)
|
AbortController::IsEnabled(JSContext* aCx, JSObject* aGlobal)
|
||||||
{
|
{
|
||||||
if (NS_IsMainThread()) {
|
if (NS_IsMainThread()) {
|
||||||
return Preferences::GetBool("dom.fetchController.enabled", false);
|
return Preferences::GetBool("dom.abortController.enabled", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace workers;
|
using namespace workers;
|
||||||
|
|
@ -38,11 +38,11 @@ FetchController::IsEnabled(JSContext* aCx, JSObject* aGlobal)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return workerPrivate->FetchControllerEnabled();
|
return workerPrivate->AbortControllerEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ already_AddRefed<FetchController>
|
/* static */ already_AddRefed<AbortController>
|
||||||
FetchController::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
|
AbortController::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
|
||||||
{
|
{
|
||||||
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
|
nsCOMPtr<nsIGlobalObject> global = do_QueryInterface(aGlobal.GetAsSupports());
|
||||||
if (!global) {
|
if (!global) {
|
||||||
|
|
@ -50,39 +50,39 @@ FetchController::Constructor(const GlobalObject& aGlobal, ErrorResult& aRv)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<FetchController> fetchController = new FetchController(global);
|
RefPtr<AbortController> abortController = new AbortController(global);
|
||||||
return fetchController.forget();
|
return abortController.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchController::FetchController(nsIGlobalObject* aGlobal)
|
AbortController::AbortController(nsIGlobalObject* aGlobal)
|
||||||
: mGlobal(aGlobal)
|
: mGlobal(aGlobal)
|
||||||
, mAborted(false)
|
, mAborted(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
FetchController::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
AbortController::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
{
|
{
|
||||||
return FetchControllerBinding::Wrap(aCx, this, aGivenProto);
|
return AbortControllerBinding::Wrap(aCx, this, aGivenProto);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIGlobalObject*
|
nsIGlobalObject*
|
||||||
FetchController::GetParentObject() const
|
AbortController::GetParentObject() const
|
||||||
{
|
{
|
||||||
return mGlobal;
|
return mGlobal;
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchSignal*
|
AbortSignal*
|
||||||
FetchController::Signal()
|
AbortController::Signal()
|
||||||
{
|
{
|
||||||
if (!mSignal) {
|
if (!mSignal) {
|
||||||
mSignal = new FetchSignal(this, mAborted);
|
mSignal = new AbortSignal(this, mAborted);
|
||||||
}
|
}
|
||||||
|
|
||||||
return mSignal;
|
return mSignal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchController::Abort()
|
AbortController::Abort()
|
||||||
{
|
{
|
||||||
if (mAborted) {
|
if (mAborted) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -96,29 +96,29 @@ FetchController::Abort()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchController::Follow(FetchSignal& aSignal)
|
AbortController::Follow(AbortSignal& aSignal)
|
||||||
{
|
{
|
||||||
FetchSignal::Follower::Follow(&aSignal);
|
AbortSignal::Follower::Follow(&aSignal);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchController::Unfollow(FetchSignal& aSignal)
|
AbortController::Unfollow(AbortSignal& aSignal)
|
||||||
{
|
{
|
||||||
if (mFollowingSignal != &aSignal) {
|
if (mFollowingSignal != &aSignal) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchSignal::Follower::Unfollow();
|
AbortSignal::Follower::Unfollow();
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchSignal*
|
AbortSignal*
|
||||||
FetchController::Following() const
|
AbortController::Following() const
|
||||||
{
|
{
|
||||||
return mFollowingSignal;
|
return mFollowingSignal;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchController::Aborted()
|
AbortController::Aborted()
|
||||||
{
|
{
|
||||||
Abort();
|
Abort();
|
||||||
}
|
}
|
||||||
|
|
@ -4,11 +4,11 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef mozilla_dom_FetchController_h
|
#ifndef mozilla_dom_AbortController_h
|
||||||
#define mozilla_dom_FetchController_h
|
#define mozilla_dom_AbortController_h
|
||||||
|
|
||||||
#include "mozilla/dom/BindingDeclarations.h"
|
#include "mozilla/dom/BindingDeclarations.h"
|
||||||
#include "mozilla/dom/FetchSignal.h"
|
#include "mozilla/dom/AbortSignal.h"
|
||||||
#include "nsCycleCollectionParticipant.h"
|
#include "nsCycleCollectionParticipant.h"
|
||||||
#include "nsWrapperCache.h"
|
#include "nsWrapperCache.h"
|
||||||
#include "mozilla/ErrorResult.h"
|
#include "mozilla/ErrorResult.h"
|
||||||
|
|
@ -17,21 +17,21 @@
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class FetchController final : public nsISupports
|
class AbortController final : public nsISupports
|
||||||
, public nsWrapperCache
|
, public nsWrapperCache
|
||||||
, public FetchSignal::Follower
|
, public AbortSignal::Follower
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
|
||||||
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(FetchController)
|
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AbortController)
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
IsEnabled(JSContext* aCx, JSObject* aGlobal);
|
IsEnabled(JSContext* aCx, JSObject* aGlobal);
|
||||||
|
|
||||||
static already_AddRefed<FetchController>
|
static already_AddRefed<AbortController>
|
||||||
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
|
Constructor(const GlobalObject& aGlobal, ErrorResult& aRv);
|
||||||
|
|
||||||
explicit FetchController(nsIGlobalObject* aGlobal);
|
explicit AbortController(nsIGlobalObject* aGlobal);
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||||
|
|
@ -39,30 +39,30 @@ public:
|
||||||
nsIGlobalObject*
|
nsIGlobalObject*
|
||||||
GetParentObject() const;
|
GetParentObject() const;
|
||||||
|
|
||||||
FetchSignal*
|
AbortSignal*
|
||||||
Signal();
|
Signal();
|
||||||
|
|
||||||
void
|
void
|
||||||
Abort();
|
Abort();
|
||||||
|
|
||||||
void
|
void
|
||||||
Follow(FetchSignal& aSignal);
|
Follow(AbortSignal& aSignal);
|
||||||
|
|
||||||
void
|
void
|
||||||
Unfollow(FetchSignal& aSignal);
|
Unfollow(AbortSignal& aSignal);
|
||||||
|
|
||||||
FetchSignal*
|
AbortSignal*
|
||||||
Following() const;
|
Following() const;
|
||||||
|
|
||||||
// FetchSignal::Follower
|
// AbortSignal::Follower
|
||||||
|
|
||||||
void Aborted() override;
|
void Aborted() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~FetchController() = default;
|
~AbortController() = default;
|
||||||
|
|
||||||
nsCOMPtr<nsIGlobalObject> mGlobal;
|
nsCOMPtr<nsIGlobalObject> mGlobal;
|
||||||
RefPtr<FetchSignal> mSignal;
|
RefPtr<AbortSignal> mSignal;
|
||||||
|
|
||||||
bool mAborted;
|
bool mAborted;
|
||||||
};
|
};
|
||||||
|
|
@ -70,4 +70,4 @@ private:
|
||||||
} // dom namespace
|
} // dom namespace
|
||||||
} // mozilla namespace
|
} // mozilla namespace
|
||||||
|
|
||||||
#endif // mozilla_dom_FetchController_h
|
#endif // mozilla_dom_AbortController_h
|
||||||
|
|
@ -4,57 +4,57 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#include "FetchSignal.h"
|
#include "AbortSignal.h"
|
||||||
#include "FetchController.h"
|
#include "AbortController.h"
|
||||||
#include "mozilla/dom/Event.h"
|
#include "mozilla/dom/Event.h"
|
||||||
#include "mozilla/dom/FetchSignalBinding.h"
|
#include "mozilla/dom/AbortSignalBinding.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_CLASS(FetchSignal)
|
NS_IMPL_CYCLE_COLLECTION_CLASS(AbortSignal)
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(FetchSignal,
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(AbortSignal,
|
||||||
DOMEventTargetHelper)
|
DOMEventTargetHelper)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mController)
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mController)
|
||||||
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
|
||||||
|
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(FetchSignal,
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(AbortSignal,
|
||||||
DOMEventTargetHelper)
|
DOMEventTargetHelper)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK(mController)
|
NS_IMPL_CYCLE_COLLECTION_UNLINK(mController)
|
||||||
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
|
||||||
|
|
||||||
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(FetchSignal)
|
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(AbortSignal)
|
||||||
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
|
NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
|
||||||
|
|
||||||
NS_IMPL_ADDREF_INHERITED(FetchSignal, DOMEventTargetHelper)
|
NS_IMPL_ADDREF_INHERITED(AbortSignal, DOMEventTargetHelper)
|
||||||
NS_IMPL_RELEASE_INHERITED(FetchSignal, DOMEventTargetHelper)
|
NS_IMPL_RELEASE_INHERITED(AbortSignal, DOMEventTargetHelper)
|
||||||
|
|
||||||
FetchSignal::FetchSignal(FetchController* aController,
|
AbortSignal::AbortSignal(AbortController* aController,
|
||||||
bool aAborted)
|
bool aAborted)
|
||||||
: DOMEventTargetHelper(aController->GetParentObject())
|
: DOMEventTargetHelper(aController->GetParentObject())
|
||||||
, mController(aController)
|
, mController(aController)
|
||||||
, mAborted(aAborted)
|
, mAborted(aAborted)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
FetchSignal::FetchSignal(bool aAborted)
|
AbortSignal::AbortSignal(bool aAborted)
|
||||||
: mAborted(aAborted)
|
: mAborted(aAborted)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
FetchSignal::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
AbortSignal::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
|
||||||
{
|
{
|
||||||
return FetchSignalBinding::Wrap(aCx, this, aGivenProto);
|
return AbortSignalBinding::Wrap(aCx, this, aGivenProto);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
FetchSignal::Aborted() const
|
AbortSignal::Aborted() const
|
||||||
{
|
{
|
||||||
return mAborted;
|
return mAborted;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchSignal::Abort()
|
AbortSignal::Abort()
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(!mAborted);
|
MOZ_ASSERT(!mAborted);
|
||||||
mAborted = true;
|
mAborted = true;
|
||||||
|
|
@ -79,7 +79,7 @@ FetchSignal::Abort()
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchSignal::AddFollower(FetchSignal::Follower* aFollower)
|
AbortSignal::AddFollower(AbortSignal::Follower* aFollower)
|
||||||
{
|
{
|
||||||
MOZ_DIAGNOSTIC_ASSERT(aFollower);
|
MOZ_DIAGNOSTIC_ASSERT(aFollower);
|
||||||
if (!mFollowers.Contains(aFollower)) {
|
if (!mFollowers.Contains(aFollower)) {
|
||||||
|
|
@ -88,14 +88,14 @@ FetchSignal::AddFollower(FetchSignal::Follower* aFollower)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchSignal::RemoveFollower(FetchSignal::Follower* aFollower)
|
AbortSignal::RemoveFollower(AbortSignal::Follower* aFollower)
|
||||||
{
|
{
|
||||||
MOZ_DIAGNOSTIC_ASSERT(aFollower);
|
MOZ_DIAGNOSTIC_ASSERT(aFollower);
|
||||||
mFollowers.RemoveElement(aFollower);
|
mFollowers.RemoveElement(aFollower);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
FetchSignal::CanAcceptFollower(FetchSignal::Follower* aFollower) const
|
AbortSignal::CanAcceptFollower(AbortSignal::Follower* aFollower) const
|
||||||
{
|
{
|
||||||
MOZ_DIAGNOSTIC_ASSERT(aFollower);
|
MOZ_DIAGNOSTIC_ASSERT(aFollower);
|
||||||
|
|
||||||
|
|
@ -107,7 +107,7 @@ FetchSignal::CanAcceptFollower(FetchSignal::Follower* aFollower) const
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchSignal* following = mController->Following();
|
AbortSignal* following = mController->Following();
|
||||||
if (!following) {
|
if (!following) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -115,16 +115,16 @@ FetchSignal::CanAcceptFollower(FetchSignal::Follower* aFollower) const
|
||||||
return following->CanAcceptFollower(aFollower);
|
return following->CanAcceptFollower(aFollower);
|
||||||
}
|
}
|
||||||
|
|
||||||
// FetchSignal::Follower
|
// AbortSignal::Follower
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
FetchSignal::Follower::~Follower()
|
AbortSignal::Follower::~Follower()
|
||||||
{
|
{
|
||||||
Unfollow();
|
Unfollow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchSignal::Follower::Follow(FetchSignal* aSignal)
|
AbortSignal::Follower::Follow(AbortSignal* aSignal)
|
||||||
{
|
{
|
||||||
MOZ_DIAGNOSTIC_ASSERT(aSignal);
|
MOZ_DIAGNOSTIC_ASSERT(aSignal);
|
||||||
|
|
||||||
|
|
@ -139,7 +139,7 @@ FetchSignal::Follower::Follow(FetchSignal* aSignal)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
FetchSignal::Follower::Unfollow()
|
AbortSignal::Follower::Unfollow()
|
||||||
{
|
{
|
||||||
if (mFollowingSignal) {
|
if (mFollowingSignal) {
|
||||||
mFollowingSignal->RemoveFollower(this);
|
mFollowingSignal->RemoveFollower(this);
|
||||||
|
|
@ -4,21 +4,21 @@
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
#ifndef mozilla_dom_FetchSignal_h
|
#ifndef mozilla_dom_AbortSignal_h
|
||||||
#define mozilla_dom_FetchSignal_h
|
#define mozilla_dom_AbortSignal_h
|
||||||
|
|
||||||
#include "mozilla/DOMEventTargetHelper.h"
|
#include "mozilla/DOMEventTargetHelper.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class FetchController;
|
class AbortController;
|
||||||
class FetchSignal;
|
class AbortSignal;
|
||||||
|
|
||||||
class FetchSignal final : public DOMEventTargetHelper
|
class AbortSignal final : public DOMEventTargetHelper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// This class must be implemented by objects who want to follow a FetchSignal.
|
// This class must be implemented by objects who want to follow a AbortSignal.
|
||||||
class Follower
|
class Follower
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -28,19 +28,19 @@ public:
|
||||||
virtual ~Follower();
|
virtual ~Follower();
|
||||||
|
|
||||||
void
|
void
|
||||||
Follow(FetchSignal* aSignal);
|
Follow(AbortSignal* aSignal);
|
||||||
|
|
||||||
void
|
void
|
||||||
Unfollow();
|
Unfollow();
|
||||||
|
|
||||||
RefPtr<FetchSignal> mFollowingSignal;
|
RefPtr<AbortSignal> mFollowingSignal;
|
||||||
};
|
};
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(FetchSignal, DOMEventTargetHelper)
|
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(AbortSignal, DOMEventTargetHelper)
|
||||||
|
|
||||||
FetchSignal(FetchController* aController, bool aAborted);
|
AbortSignal(AbortController* aController, bool aAborted);
|
||||||
explicit FetchSignal(bool aAborted);
|
explicit AbortSignal(bool aAborted);
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||||
|
|
@ -63,9 +63,9 @@ public:
|
||||||
CanAcceptFollower(Follower* aFollower) const;
|
CanAcceptFollower(Follower* aFollower) const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~FetchSignal() = default;
|
~AbortSignal() = default;
|
||||||
|
|
||||||
RefPtr<FetchController> mController;
|
RefPtr<AbortController> mController;
|
||||||
|
|
||||||
// Raw pointers. Follower unregisters itself in the DTOR.
|
// Raw pointers. Follower unregisters itself in the DTOR.
|
||||||
nsTArray<Follower*> mFollowers;
|
nsTArray<Follower*> mFollowers;
|
||||||
|
|
@ -76,4 +76,4 @@ private:
|
||||||
} // dom namespace
|
} // dom namespace
|
||||||
} // mozilla namespace
|
} // mozilla namespace
|
||||||
|
|
||||||
#endif // mozilla_dom_FetchSignal_h
|
#endif // mozilla_dom_AbortSignal_h
|
||||||
|
|
@ -10,13 +10,13 @@ with Files("**"):
|
||||||
TEST_DIRS += ['tests']
|
TEST_DIRS += ['tests']
|
||||||
|
|
||||||
EXPORTS.mozilla.dom += [
|
EXPORTS.mozilla.dom += [
|
||||||
'FetchController.h',
|
'AbortController.h',
|
||||||
'FetchSignal.h',
|
'AbortSignal.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
UNIFIED_SOURCES += [
|
UNIFIED_SOURCES += [
|
||||||
'FetchController.cpp',
|
'AbortController.cpp',
|
||||||
'FetchSignal.cpp',
|
'AbortSignal.cpp',
|
||||||
]
|
]
|
||||||
|
|
||||||
LOCAL_INCLUDES += [
|
LOCAL_INCLUDES += [
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
support-files =
|
support-files =
|
||||||
file_fetch_controller.html
|
file_abort_controller.html
|
||||||
worker_fetch_controller.js
|
worker_fetch_controller.js
|
||||||
|
|
||||||
[test_fetch_controller.html]
|
[test_abort_controller.html]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
function testWorkerAbortedFetch() {
|
function testWorkerAbortedFetch() {
|
||||||
var fc = new FetchController();
|
var fc = new AbortController();
|
||||||
fc.abort();
|
fc.abort();
|
||||||
|
|
||||||
fetch('slow.sjs', { signal: fc.signal }).then(() => {
|
fetch('slow.sjs', { signal: fc.signal }).then(() => {
|
||||||
|
|
@ -10,7 +10,7 @@ function testWorkerAbortedFetch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testWorkerFetchAndAbort() {
|
function testWorkerFetchAndAbort() {
|
||||||
var fc = new FetchController();
|
var fc = new AbortController();
|
||||||
|
|
||||||
var p = fetch('slow.sjs', { signal: fc.signal });
|
var p = fetch('slow.sjs', { signal: fc.signal });
|
||||||
fc.abort();
|
fc.abort();
|
||||||
|
|
@ -53,24 +53,24 @@ namespace dom {
|
||||||
|
|
||||||
using namespace workers;
|
using namespace workers;
|
||||||
|
|
||||||
// This class helps the proxying of FetchSignal changes cross threads.
|
// This class helps the proxying of AbortSignal changes cross threads.
|
||||||
class FetchSignalProxy final : public FetchSignal::Follower
|
class AbortSignalProxy final : public AbortSignal::Follower
|
||||||
{
|
{
|
||||||
// This is created and released on the main-thread.
|
// This is created and released on the main-thread.
|
||||||
RefPtr<FetchSignal> mSignalMainThread;
|
RefPtr<AbortSignal> mSignalMainThread;
|
||||||
|
|
||||||
// This value is used only for the creation of FetchSignal on the
|
// This value is used only for the creation of AbortSignal on the
|
||||||
// main-thread. They are not updated.
|
// main-thread. They are not updated.
|
||||||
const bool mAborted;
|
const bool mAborted;
|
||||||
|
|
||||||
// This runnable propagates changes from the FetchSignal on workers to the
|
// This runnable propagates changes from the AbortSignal on workers to the
|
||||||
// FetchSignal on main-thread.
|
// AbortSignal on main-thread.
|
||||||
class FetchSignalProxyRunnable final : public Runnable
|
class AbortSignalProxyRunnable final : public Runnable
|
||||||
{
|
{
|
||||||
RefPtr<FetchSignalProxy> mProxy;
|
RefPtr<AbortSignalProxy> mProxy;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit FetchSignalProxyRunnable(FetchSignalProxy* aProxy)
|
explicit AbortSignalProxyRunnable(AbortSignalProxy* aProxy)
|
||||||
: mProxy(aProxy)
|
: mProxy(aProxy)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -78,16 +78,16 @@ class FetchSignalProxy final : public FetchSignal::Follower
|
||||||
Run() override
|
Run() override
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
FetchSignal* signal = mProxy->GetOrCreateSignalForMainThread();
|
AbortSignal* signal = mProxy->GetOrCreateSignalForMainThread();
|
||||||
signal->Abort();
|
signal->Abort();
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FetchSignalProxy)
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(AbortSignalProxy)
|
||||||
|
|
||||||
explicit FetchSignalProxy(FetchSignal* aSignal)
|
explicit AbortSignalProxy(AbortSignal* aSignal)
|
||||||
: mAborted(aSignal->Aborted())
|
: mAborted(aSignal->Aborted())
|
||||||
{
|
{
|
||||||
Follow(aSignal);
|
Follow(aSignal);
|
||||||
|
|
@ -96,17 +96,17 @@ public:
|
||||||
void
|
void
|
||||||
Aborted() override
|
Aborted() override
|
||||||
{
|
{
|
||||||
RefPtr<FetchSignalProxyRunnable> runnable =
|
RefPtr<AbortSignalProxyRunnable> runnable =
|
||||||
new FetchSignalProxyRunnable(this);
|
new AbortSignalProxyRunnable(this);
|
||||||
NS_DispatchToMainThread(runnable);
|
NS_DispatchToMainThread(runnable);
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchSignal*
|
AbortSignal*
|
||||||
GetOrCreateSignalForMainThread()
|
GetOrCreateSignalForMainThread()
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
if (!mSignalMainThread) {
|
if (!mSignalMainThread) {
|
||||||
mSignalMainThread = new FetchSignal(mAborted);
|
mSignalMainThread = new AbortSignal(mAborted);
|
||||||
}
|
}
|
||||||
return mSignalMainThread;
|
return mSignalMainThread;
|
||||||
}
|
}
|
||||||
|
|
@ -118,7 +118,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~FetchSignalProxy()
|
~AbortSignalProxy()
|
||||||
{
|
{
|
||||||
NS_ReleaseOnMainThread(mSignalMainThread.forget());
|
NS_ReleaseOnMainThread(mSignalMainThread.forget());
|
||||||
}
|
}
|
||||||
|
|
@ -133,14 +133,14 @@ class WorkerFetchResolver final : public FetchDriverObserver
|
||||||
friend class WorkerFetchResponseRunnable;
|
friend class WorkerFetchResponseRunnable;
|
||||||
|
|
||||||
RefPtr<PromiseWorkerProxy> mPromiseProxy;
|
RefPtr<PromiseWorkerProxy> mPromiseProxy;
|
||||||
RefPtr<FetchSignalProxy> mSignalProxy;
|
RefPtr<AbortSignalProxy> mSignalProxy;
|
||||||
RefPtr<FetchObserver> mFetchObserver;
|
RefPtr<FetchObserver> mFetchObserver;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Returns null if worker is shutting down.
|
// Returns null if worker is shutting down.
|
||||||
static already_AddRefed<WorkerFetchResolver>
|
static already_AddRefed<WorkerFetchResolver>
|
||||||
Create(workers::WorkerPrivate* aWorkerPrivate, Promise* aPromise,
|
Create(workers::WorkerPrivate* aWorkerPrivate, Promise* aPromise,
|
||||||
FetchSignal* aSignal, FetchObserver* aObserver)
|
AbortSignal* aSignal, FetchObserver* aObserver)
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aWorkerPrivate);
|
MOZ_ASSERT(aWorkerPrivate);
|
||||||
aWorkerPrivate->AssertIsOnWorkerThread();
|
aWorkerPrivate->AssertIsOnWorkerThread();
|
||||||
|
|
@ -150,9 +150,9 @@ public:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<FetchSignalProxy> signalProxy;
|
RefPtr<AbortSignalProxy> signalProxy;
|
||||||
if (aSignal) {
|
if (aSignal) {
|
||||||
signalProxy = new FetchSignalProxy(aSignal);
|
signalProxy = new AbortSignalProxy(aSignal);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<WorkerFetchResolver> r =
|
RefPtr<WorkerFetchResolver> r =
|
||||||
|
|
@ -160,8 +160,8 @@ public:
|
||||||
return r.forget();
|
return r.forget();
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchSignal*
|
AbortSignal*
|
||||||
GetFetchSignal()
|
GetAbortSignal()
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(NS_IsMainThread());
|
MOZ_ASSERT(NS_IsMainThread());
|
||||||
|
|
||||||
|
|
@ -183,7 +183,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WorkerFetchResolver(PromiseWorkerProxy* aProxy,
|
WorkerFetchResolver(PromiseWorkerProxy* aProxy,
|
||||||
FetchSignalProxy* aSignalProxy,
|
AbortSignalProxy* aSignalProxy,
|
||||||
FetchObserver* aObserver)
|
FetchObserver* aObserver)
|
||||||
: mPromiseProxy(aProxy)
|
: mPromiseProxy(aProxy)
|
||||||
, mSignalProxy(aSignalProxy)
|
, mSignalProxy(aSignalProxy)
|
||||||
|
|
@ -287,7 +287,7 @@ public:
|
||||||
fetch->SetWorkerScript(spec);
|
fetch->SetWorkerScript(spec);
|
||||||
}
|
}
|
||||||
|
|
||||||
RefPtr<FetchSignal> signal = mResolver->GetFetchSignal();
|
RefPtr<AbortSignal> signal = mResolver->GetAbortSignal();
|
||||||
|
|
||||||
// ...but release it before calling Fetch, because mResolver's callback can
|
// ...but release it before calling Fetch, because mResolver's callback can
|
||||||
// be called synchronously and they want the mutex, too.
|
// be called synchronously and they want the mutex, too.
|
||||||
|
|
@ -329,7 +329,7 @@ FetchRequest(nsIGlobalObject* aGlobal, const RequestOrUSVString& aInput,
|
||||||
|
|
||||||
RefPtr<InternalRequest> r = request->GetInternalRequest();
|
RefPtr<InternalRequest> r = request->GetInternalRequest();
|
||||||
|
|
||||||
RefPtr<FetchSignal> signal;
|
RefPtr<AbortSignal> signal;
|
||||||
if (aInit.mSignal.WasPassed()) {
|
if (aInit.mSignal.WasPassed()) {
|
||||||
signal = &aInit.mSignal.Value();
|
signal = &aInit.mSignal.Value();
|
||||||
// Let's FetchDriver to deal with an already aborted signal.
|
// Let's FetchDriver to deal with an already aborted signal.
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ FetchDriver::~FetchDriver()
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
FetchDriver::Fetch(FetchSignal* aSignal, FetchDriverObserver* aObserver)
|
FetchDriver::Fetch(AbortSignal* aSignal, FetchDriverObserver* aObserver)
|
||||||
{
|
{
|
||||||
workers::AssertIsOnMainThread();
|
workers::AssertIsOnMainThread();
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include "nsIStreamListener.h"
|
#include "nsIStreamListener.h"
|
||||||
#include "nsIThreadRetargetableStreamListener.h"
|
#include "nsIThreadRetargetableStreamListener.h"
|
||||||
#include "mozilla/ConsoleReportCollector.h"
|
#include "mozilla/ConsoleReportCollector.h"
|
||||||
#include "mozilla/dom/FetchSignal.h"
|
#include "mozilla/dom/AbortSignal.h"
|
||||||
#include "mozilla/dom/SRIMetadata.h"
|
#include "mozilla/dom/SRIMetadata.h"
|
||||||
#include "mozilla/RefPtr.h"
|
#include "mozilla/RefPtr.h"
|
||||||
|
|
||||||
|
|
@ -84,7 +84,7 @@ class FetchDriver final : public nsIStreamListener,
|
||||||
public nsIChannelEventSink,
|
public nsIChannelEventSink,
|
||||||
public nsIInterfaceRequestor,
|
public nsIInterfaceRequestor,
|
||||||
public nsIThreadRetargetableStreamListener,
|
public nsIThreadRetargetableStreamListener,
|
||||||
public FetchSignal::Follower
|
public AbortSignal::Follower
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
@ -98,7 +98,7 @@ public:
|
||||||
nsIPrincipal* aPrincipal,
|
nsIPrincipal* aPrincipal,
|
||||||
nsILoadGroup* aLoadGroup);
|
nsILoadGroup* aLoadGroup);
|
||||||
|
|
||||||
nsresult Fetch(FetchSignal* aSignal,
|
nsresult Fetch(AbortSignal* aSignal,
|
||||||
FetchDriverObserver* aObserver);
|
FetchDriverObserver* aObserver);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -111,7 +111,7 @@ public:
|
||||||
mWorkerScript = aWorkerScirpt;
|
mWorkerScript = aWorkerScirpt;
|
||||||
}
|
}
|
||||||
|
|
||||||
// FetchSignal::Follower
|
// AbortSignal::Follower
|
||||||
|
|
||||||
void
|
void
|
||||||
Aborted() override;
|
Aborted() override;
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ FetchObserver::IsEnabled(JSContext* aCx, JSObject* aGlobal)
|
||||||
}
|
}
|
||||||
|
|
||||||
FetchObserver::FetchObserver(nsIGlobalObject* aGlobal,
|
FetchObserver::FetchObserver(nsIGlobalObject* aGlobal,
|
||||||
FetchSignal* aSignal)
|
AbortSignal* aSignal)
|
||||||
: DOMEventTargetHelper(aGlobal)
|
: DOMEventTargetHelper(aGlobal)
|
||||||
, mState(FetchState::Requesting)
|
, mState(FetchState::Requesting)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,13 +9,13 @@
|
||||||
|
|
||||||
#include "mozilla/DOMEventTargetHelper.h"
|
#include "mozilla/DOMEventTargetHelper.h"
|
||||||
#include "mozilla/dom/FetchObserverBinding.h"
|
#include "mozilla/dom/FetchObserverBinding.h"
|
||||||
#include "mozilla/dom/FetchSignal.h"
|
#include "mozilla/dom/AbortSignal.h"
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class FetchObserver final : public DOMEventTargetHelper
|
class FetchObserver final : public DOMEventTargetHelper
|
||||||
, public FetchSignal::Follower
|
, public AbortSignal::Follower
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS_INHERITED
|
NS_DECL_ISUPPORTS_INHERITED
|
||||||
|
|
@ -24,7 +24,7 @@ public:
|
||||||
static bool
|
static bool
|
||||||
IsEnabled(JSContext* aCx, JSObject* aGlobal);
|
IsEnabled(JSContext* aCx, JSObject* aGlobal);
|
||||||
|
|
||||||
FetchObserver(nsIGlobalObject* aGlobal, FetchSignal* aSignal);
|
FetchObserver(nsIGlobalObject* aGlobal, AbortSignal* aSignal);
|
||||||
|
|
||||||
JSObject*
|
JSObject*
|
||||||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include "nsWrapperCache.h"
|
#include "nsWrapperCache.h"
|
||||||
|
|
||||||
#include "mozilla/dom/Fetch.h"
|
#include "mozilla/dom/Fetch.h"
|
||||||
#include "mozilla/dom/FetchSignal.h"
|
#include "mozilla/dom/AbortSignal.h"
|
||||||
#include "mozilla/dom/InternalRequest.h"
|
#include "mozilla/dom/InternalRequest.h"
|
||||||
// Required here due to certain WebIDL enums/classes being declared in both
|
// Required here due to certain WebIDL enums/classes being declared in both
|
||||||
// files.
|
// files.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ function testObserver() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testObserveAbort() {
|
function testObserveAbort() {
|
||||||
var fc = new FetchController();
|
var fc = new AbortController();
|
||||||
|
|
||||||
fetch('http://mochi.test:8888/tests/dom/tests/mochitest/fetch/slow.sjs', {
|
fetch('http://mochi.test:8888/tests/dom/tests/mochitest/fetch/slow.sjs', {
|
||||||
signal: fc.signal,
|
signal: fc.signal,
|
||||||
|
|
@ -37,7 +37,7 @@ function testObserveAbort() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testObserveComplete() {
|
function testObserveComplete() {
|
||||||
var fc = new FetchController();
|
var fc = new AbortController();
|
||||||
|
|
||||||
fetch('http://mochi.test:8888/tests/dom/tests/mochitest/fetch/slow.sjs', {
|
fetch('http://mochi.test:8888/tests/dom/tests/mochitest/fetch/slow.sjs', {
|
||||||
signal: fc.signal,
|
signal: fc.signal,
|
||||||
|
|
@ -54,7 +54,7 @@ function testObserveComplete() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testObserveErrored() {
|
function testObserveErrored() {
|
||||||
var fc = new FetchController();
|
var fc = new AbortController();
|
||||||
|
|
||||||
fetch('foo: bar', {
|
fetch('foo: bar', {
|
||||||
signal: fc.signal,
|
signal: fc.signal,
|
||||||
|
|
@ -71,7 +71,7 @@ function testObserveErrored() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function testObserveResponding() {
|
function testObserveResponding() {
|
||||||
var fc = new FetchController();
|
var fc = new AbortController();
|
||||||
|
|
||||||
fetch('http://mochi.test:8888/tests/dom/tests/mochitest/fetch/slow.sjs', {
|
fetch('http://mochi.test:8888/tests/dom/tests/mochitest/fetch/slow.sjs', {
|
||||||
signal: fc.signal,
|
signal: fc.signal,
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Constructor(), Exposed=(Window,Worker),
|
[Constructor(), Exposed=(Window,Worker),
|
||||||
Func="FetchController::IsEnabled"]
|
Func="AbortController::IsEnabled"]
|
||||||
interface FetchController {
|
interface AbortController {
|
||||||
readonly attribute FetchSignal signal;
|
readonly attribute AbortSignal signal;
|
||||||
|
|
||||||
void abort();
|
void abort();
|
||||||
void follow(FetchSignal signal);
|
void follow(AbortSignal signal);
|
||||||
void unfollow(FetchSignal signal);
|
void unfollow(AbortSignal signal);
|
||||||
};
|
};
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
[Exposed=(Window,Worker),
|
[Exposed=(Window,Worker),
|
||||||
Func="FetchController::IsEnabled"]
|
Func="AbortController::IsEnabled"]
|
||||||
interface FetchSignal : EventTarget {
|
interface AbortSignal : EventTarget {
|
||||||
readonly attribute boolean aborted;
|
readonly attribute boolean aborted;
|
||||||
|
|
||||||
attribute EventHandler onabort;
|
attribute EventHandler onabort;
|
||||||
|
|
@ -48,8 +48,8 @@ dictionary RequestInit {
|
||||||
RequestRedirect redirect;
|
RequestRedirect redirect;
|
||||||
DOMString integrity;
|
DOMString integrity;
|
||||||
|
|
||||||
[Func="FetchController::IsEnabled"]
|
[Func="AbortController::IsEnabled"]
|
||||||
FetchSignal signal;
|
AbortSignal signal;
|
||||||
|
|
||||||
[Func="FetchObserver::IsEnabled"]
|
[Func="FetchObserver::IsEnabled"]
|
||||||
ObserverCallback observe;
|
ObserverCallback observe;
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ PREPROCESSED_WEBIDL_FILES = [
|
||||||
]
|
]
|
||||||
|
|
||||||
WEBIDL_FILES = [
|
WEBIDL_FILES = [
|
||||||
|
'AbortController.webidl',
|
||||||
|
'AbortSignal.webidl',
|
||||||
'AbstractWorker.webidl',
|
'AbstractWorker.webidl',
|
||||||
'AnalyserNode.webidl',
|
'AnalyserNode.webidl',
|
||||||
'Animatable.webidl',
|
'Animatable.webidl',
|
||||||
|
|
@ -141,10 +143,8 @@ WEBIDL_FILES = [
|
||||||
'ExtendableMessageEvent.webidl',
|
'ExtendableMessageEvent.webidl',
|
||||||
'FakePluginTagInit.webidl',
|
'FakePluginTagInit.webidl',
|
||||||
'Fetch.webidl',
|
'Fetch.webidl',
|
||||||
'FetchController.webidl',
|
|
||||||
'FetchEvent.webidl',
|
'FetchEvent.webidl',
|
||||||
'FetchObserver.webidl',
|
'FetchObserver.webidl',
|
||||||
'FetchSignal.webidl',
|
|
||||||
'File.webidl',
|
'File.webidl',
|
||||||
'FileList.webidl',
|
'FileList.webidl',
|
||||||
'FileMode.webidl',
|
'FileMode.webidl',
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ WORKER_SIMPLE_PREF("dom.push.enabled", PushEnabled, PUSH_ENABLED)
|
||||||
WORKER_SIMPLE_PREF("dom.requestcontext.enabled", RequestContextEnabled, REQUESTCONTEXT_ENABLED)
|
WORKER_SIMPLE_PREF("dom.requestcontext.enabled", RequestContextEnabled, REQUESTCONTEXT_ENABLED)
|
||||||
WORKER_SIMPLE_PREF("gfx.offscreencanvas.enabled", OffscreenCanvasEnabled, OFFSCREENCANVAS_ENABLED)
|
WORKER_SIMPLE_PREF("gfx.offscreencanvas.enabled", OffscreenCanvasEnabled, OFFSCREENCANVAS_ENABLED)
|
||||||
WORKER_SIMPLE_PREF("dom.webkitBlink.dirPicker.enabled", WebkitBlinkDirectoryPickerEnabled, DOM_WEBKITBLINK_DIRPICKER_WEBKITBLINK)
|
WORKER_SIMPLE_PREF("dom.webkitBlink.dirPicker.enabled", WebkitBlinkDirectoryPickerEnabled, DOM_WEBKITBLINK_DIRPICKER_WEBKITBLINK)
|
||||||
WORKER_SIMPLE_PREF("dom.fetchController.enabled", FetchControllerEnabled, FETCHCONTROLLER_ENABLED)
|
WORKER_SIMPLE_PREF("dom.abortController.enabled", AbortControllerEnabled, ABORTCONTROLLER_ENABLED)
|
||||||
WORKER_SIMPLE_PREF("dom.fetchObserver.enabled", FetchObserverEnabled, FETCHOBSERVER_ENABLED)
|
WORKER_SIMPLE_PREF("dom.fetchObserver.enabled", FetchObserverEnabled, FETCHOBSERVER_ENABLED)
|
||||||
WORKER_PREF("dom.workers.latestJSVersion", JSVersionChanged)
|
WORKER_PREF("dom.workers.latestJSVersion", JSVersionChanged)
|
||||||
WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
|
WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue