Attachment #8743359: Part 2: ServiceWorkerRegistration for bug #1217544

View | Details | Raw Unified | Return to bug 1217544
Collapse All | Expand All

(-)a/dom/sync/SyncManager.cpp (-3 / +4 lines)
Line     Link Here 
 Lines 44-67   SyncManager::CreateOnMainThread(nsIGloba Link Here 
44
  }
44
  }
45
45
46
  RefPtr<SyncManager> ref = new SyncManager(aGlobal, principalInfo);
46
  RefPtr<SyncManager> ref = new SyncManager(aGlobal, principalInfo);
47
  return ref.forget();
47
  return ref.forget();
48
}
48
}
49
49
50
// static
50
// static
51
already_AddRefed<SyncManager>
51
already_AddRefed<SyncManager>
52
SyncManager::CreateOnWorker(WorkerPrivate* aWorkerPrivate)
52
SyncManager::CreateOnWorker(nsIGlobalObject* aGlobal,
53
                            WorkerPrivate* aWorkerPrivate)
53
{
54
{
54
  MOZ_ASSERT(aWorkerPrivate);
55
  MOZ_ASSERT(aWorkerPrivate);
55
  aWorkerPrivate->AssertIsOnWorkerThread();
56
  aWorkerPrivate->AssertIsOnWorkerThread();
56
57
57
  const PrincipalInfo& principalInfo = aWorkerPrivate->GetPrincipalInfo();
58
  const PrincipalInfo& principalInfo = aWorkerPrivate->GetPrincipalInfo();
58
59
59
  RefPtr<SyncManager> ref = new SyncManager(nullptr, principalInfo);
60
  RefPtr<SyncManager> ref = new SyncManager(aGlobal, principalInfo);
60
  return ref.forget();
61
  return ref.forget();
61
}
62
}
62
63
63
SyncManager::SyncManager(nsIGlobalObject* aGlobal,
64
SyncManager::SyncManager(nsIGlobalObject* aGlobal,
64
                         const PrincipalInfo& aPrincipalInfo)
65
                         const PrincipalInfo& aPrincipalInfo)
65
  : mGlobal(aGlobal)
66
  : mGlobal(aGlobal)
66
  , mPrincipalInfo(new PrincipalInfo(aPrincipalInfo))
67
  , mPrincipalInfo(new PrincipalInfo(aPrincipalInfo))
67
{}
68
{}
 Lines 82-98   bool Link Here 
82
SyncManager::PrefEnabled(JSContext* aCx, JSObject* aObj)
83
SyncManager::PrefEnabled(JSContext* aCx, JSObject* aObj)
83
{
84
{
84
  using mozilla::dom::workers::WorkerPrivate;
85
  using mozilla::dom::workers::WorkerPrivate;
85
  using mozilla::dom::workers::GetWorkerPrivateFromContext;
86
  using mozilla::dom::workers::GetWorkerPrivateFromContext;
86
87
87
  // If we are on the main thread, then check the pref directly.
88
  // If we are on the main thread, then check the pref directly.
88
  if (NS_IsMainThread()) {
89
  if (NS_IsMainThread()) {
89
    bool enabled = false;
90
    bool enabled = false;
90
    Preferences::GetBool("dom.background.sync.enabled", &enabled);
91
    Preferences::GetBool("dom.backgroundSync.enabled", &enabled);
91
    return enabled;
92
    return enabled;
92
  }
93
  }
93
94
94
  // Otherwise check the pref via the worker private helper.
95
  // Otherwise check the pref via the worker private helper.
95
  WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aCx);
96
  WorkerPrivate* workerPrivate = GetWorkerPrivateFromContext(aCx);
96
  if (!workerPrivate) {
97
  if (!workerPrivate) {
97
    return false;
98
    return false;
98
  }
99
  }
(-)a/dom/sync/SyncManager.h (-2 / +2 lines)
Line     Link Here 
 Lines 41-64   public: Link Here 
41
  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SyncManager)
41
  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SyncManager)
42
42
43
  static already_AddRefed<SyncManager>
43
  static already_AddRefed<SyncManager>
44
  CreateOnMainThread(nsIGlobalObject* aGlobal,
44
  CreateOnMainThread(nsIGlobalObject* aGlobal,
45
                     nsIPrincipal* aPrincipal,
45
                     nsIPrincipal* aPrincipal,
46
                     ErrorResult& aRv);
46
                     ErrorResult& aRv);
47
47
48
  static already_AddRefed<SyncManager>
48
  static already_AddRefed<SyncManager>
49
  CreateOnWorker(workers::WorkerPrivate* aWorkerPrivate);
49
  CreateOnWorker(nsIGlobalObject* aGlobal,
50
                 workers::WorkerPrivate* aWorkerPrivate);
50
51
51
  // Binding methods.
52
  // Binding methods.
52
53
53
  nsIGlobalObject*
54
  nsIGlobalObject*
54
  GetParentObject() const
55
  GetParentObject() const
55
  {
56
  {
56
    // Can be nullptr on workers.
57
    return mGlobal;
57
    return mGlobal;
58
  }
58
  }
59
59
60
  JSObject*
60
  JSObject*
61
  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
61
  WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
62
62
63
  static bool PrefEnabled(JSContext* aCx, JSObject* aObj);
63
  static bool PrefEnabled(JSContext* aCx, JSObject* aObj);
64
64
(-)a/dom/webidl/ServiceWorkerRegistration.webidl (+2 lines)
Line     Link Here 
 Lines 27-35   interface ServiceWorkerRegistration : Ev Link Here 
27
  attribute EventHandler onupdatefound;
27
  attribute EventHandler onupdatefound;
28
};
28
};
29
29
30
partial interface ServiceWorkerRegistration {
30
partial interface ServiceWorkerRegistration {
31
#ifndef MOZ_SIMPLEPUSH
31
#ifndef MOZ_SIMPLEPUSH
32
  [Throws, Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled"]
32
  [Throws, Exposed=(Window,Worker), Func="nsContentUtils::PushEnabled"]
33
  readonly attribute PushManager pushManager;
33
  readonly attribute PushManager pushManager;
34
#endif
34
#endif
35
  [Throws, Exposed=(Window,Worker), Func="SyncManager::PrefEnabled"]
36
  readonly attribute SyncManager sync;
35
};
37
};
(-)a/dom/workers/ServiceWorkerRegistration.cpp (-1 / +50 lines)
Line     Link Here 
 Lines 28-43    Link Here 
28
#include "Workers.h"
28
#include "Workers.h"
29
#include "WorkerScope.h"
29
#include "WorkerScope.h"
30
30
31
#ifndef MOZ_SIMPLEPUSH
31
#ifndef MOZ_SIMPLEPUSH
32
#include "mozilla/dom/PushManagerBinding.h"
32
#include "mozilla/dom/PushManagerBinding.h"
33
#include "mozilla/dom/PushManager.h"
33
#include "mozilla/dom/PushManager.h"
34
#endif
34
#endif
35
35
36
#include "mozilla/dom/SyncManagerBinding.h"
37
#include "mozilla/dom/SyncManager.h"
38
36
using namespace mozilla::dom::workers;
39
using namespace mozilla::dom::workers;
37
40
38
namespace mozilla {
41
namespace mozilla {
39
namespace dom {
42
namespace dom {
40
43
41
bool
44
bool
42
ServiceWorkerRegistrationVisible(JSContext* aCx, JSObject* aObj)
45
ServiceWorkerRegistrationVisible(JSContext* aCx, JSObject* aObj)
43
{
46
{
 Lines 87-106   ServiceWorkerRegistrationBase::ServiceWo Link Here 
87
NS_IMPL_ADDREF_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase)
90
NS_IMPL_ADDREF_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase)
88
NS_IMPL_RELEASE_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase)
91
NS_IMPL_RELEASE_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase)
89
92
90
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationMainThread)
93
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationMainThread)
91
NS_INTERFACE_MAP_END_INHERITING(ServiceWorkerRegistrationBase)
94
NS_INTERFACE_MAP_END_INHERITING(ServiceWorkerRegistrationBase)
92
95
93
#ifndef MOZ_SIMPLEPUSH
96
#ifndef MOZ_SIMPLEPUSH
94
NS_IMPL_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase,
97
NS_IMPL_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase,
95
                                   mPushManager,
98
                                   mPushManager, mSyncManager,
96
                                   mInstallingWorker, mWaitingWorker, mActiveWorker);
99
                                   mInstallingWorker, mWaitingWorker, mActiveWorker);
97
#else
100
#else
98
NS_IMPL_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase,
101
NS_IMPL_CYCLE_COLLECTION_INHERITED(ServiceWorkerRegistrationMainThread, ServiceWorkerRegistrationBase,
102
                                   mSyncManager,
99
                                   mInstallingWorker, mWaitingWorker, mActiveWorker);
103
                                   mInstallingWorker, mWaitingWorker, mActiveWorker);
100
#endif
104
#endif
101
105
102
ServiceWorkerRegistrationMainThread::ServiceWorkerRegistrationMainThread(nsPIDOMWindowInner* aWindow,
106
ServiceWorkerRegistrationMainThread::ServiceWorkerRegistrationMainThread(nsPIDOMWindowInner* aWindow,
103
                                                                         const nsAString& aScope)
107
                                                                         const nsAString& aScope)
104
  : ServiceWorkerRegistrationBase(aWindow, aScope)
108
  : ServiceWorkerRegistrationBase(aWindow, aScope)
105
  , mListeningForEvents(false)
109
  , mListeningForEvents(false)
106
{
110
{
 Lines 777-792   ServiceWorkerRegistrationMainThread::Get Link Here 
777
  }
781
  }
778
782
779
  RefPtr<PushManager> ret = mPushManager;
783
  RefPtr<PushManager> ret = mPushManager;
780
  return ret.forget();
784
  return ret.forget();
781
785
782
#endif /* ! MOZ_SIMPLEPUSH */
786
#endif /* ! MOZ_SIMPLEPUSH */
783
}
787
}
784
788
789
SyncManager*
790
ServiceWorkerRegistrationMainThread::GetSync(ErrorResult& aRv)
791
{
792
  AssertIsOnMainThread();
793
794
  if (!mSyncManager) {
795
    nsCOMPtr<nsIGlobalObject> globalObject = do_QueryInterface(GetOwner());
796
797
    if (!globalObject) {
798
      aRv.Throw(NS_ERROR_FAILURE);
799
      return nullptr;
800
    }
801
802
    nsCOMPtr<nsIDocument> document = GetOwner()->GetExtantDoc();
803
    if (!document) {
804
      aRv.Throw(NS_ERROR_FAILURE);
805
      return nullptr;
806
    }
807
808
    nsCOMPtr<nsIPrincipal> principal = document->NodePrincipal();
809
    if (!principal) {
810
      aRv.Throw(NS_ERROR_FAILURE);
811
      return nullptr;
812
    }
813
814
    mSyncManager = SyncManager::CreateOnMainThread(globalObject, principal,
815
                                                   aRv);
816
  }
817
818
  return mSyncManager;
819
}
820
785
////////////////////////////////////////////////////
821
////////////////////////////////////////////////////
786
// Worker Thread implementation
822
// Worker Thread implementation
787
class WorkerListener final : public ServiceWorkerRegistrationListener
823
class WorkerListener final : public ServiceWorkerRegistrationListener
788
{
824
{
789
  // Accessed on the main thread.
825
  // Accessed on the main thread.
790
  WorkerPrivate* mWorkerPrivate;
826
  WorkerPrivate* mWorkerPrivate;
791
  nsString mScope;
827
  nsString mScope;
792
  bool mListeningForEvents;
828
  bool mListeningForEvents;
 Lines 901-923   NS_INTERFACE_MAP_END_INHERITING(ServiceW Link Here 
901
// Expanded macros since we need special behaviour to release the proxy.
937
// Expanded macros since we need special behaviour to release the proxy.
902
NS_IMPL_CYCLE_COLLECTION_CLASS(ServiceWorkerRegistrationWorkerThread)
938
NS_IMPL_CYCLE_COLLECTION_CLASS(ServiceWorkerRegistrationWorkerThread)
903
939
904
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ServiceWorkerRegistrationWorkerThread,
940
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN_INHERITED(ServiceWorkerRegistrationWorkerThread,
905
                                                  ServiceWorkerRegistrationBase)
941
                                                  ServiceWorkerRegistrationBase)
906
#ifndef MOZ_SIMPLEPUSH
942
#ifndef MOZ_SIMPLEPUSH
907
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPushManager)
943
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mPushManager)
908
#endif
944
#endif
945
  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mSyncManager)
909
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
946
NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
910
947
911
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(ServiceWorkerRegistrationWorkerThread,
948
NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN_INHERITED(ServiceWorkerRegistrationWorkerThread,
912
                                                ServiceWorkerRegistrationBase)
949
                                                ServiceWorkerRegistrationBase)
913
#ifndef MOZ_SIMPLEPUSH
950
#ifndef MOZ_SIMPLEPUSH
914
  NS_IMPL_CYCLE_COLLECTION_UNLINK(mPushManager)
951
  NS_IMPL_CYCLE_COLLECTION_UNLINK(mPushManager)
915
#endif
952
#endif
953
  NS_IMPL_CYCLE_COLLECTION_UNLINK(mSyncManager)
916
  tmp->ReleaseListener(RegistrationIsGoingAway);
954
  tmp->ReleaseListener(RegistrationIsGoingAway);
917
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
955
NS_IMPL_CYCLE_COLLECTION_UNLINK_END
918
956
919
ServiceWorkerRegistrationWorkerThread::ServiceWorkerRegistrationWorkerThread(WorkerPrivate* aWorkerPrivate,
957
ServiceWorkerRegistrationWorkerThread::ServiceWorkerRegistrationWorkerThread(WorkerPrivate* aWorkerPrivate,
920
                                                                             const nsAString& aScope)
958
                                                                             const nsAString& aScope)
921
  : ServiceWorkerRegistrationBase(nullptr, aScope)
959
  : ServiceWorkerRegistrationBase(nullptr, aScope)
922
  , mWorkerPrivate(aWorkerPrivate)
960
  , mWorkerPrivate(aWorkerPrivate)
923
{
961
{
 Lines 1215-1224   ServiceWorkerRegistrationWorkerThread::G Link Here 
1215
  }
1253
  }
1216
1254
1217
  RefPtr<PushManager> ret = mPushManager;
1255
  RefPtr<PushManager> ret = mPushManager;
1218
  return ret.forget();
1256
  return ret.forget();
1219
1257
1220
#endif /* ! MOZ_SIMPLEPUSH */
1258
#endif /* ! MOZ_SIMPLEPUSH */
1221
}
1259
}
1222
1260
1261
SyncManager*
1262
ServiceWorkerRegistrationWorkerThread::GetSync(ErrorResult& aRv)
1263
{
1264
  if (!mSyncManager) {
1265
    mSyncManager = SyncManager::CreateOnWorker(mWorkerPrivate->GlobalScope(),
1266
                                               mWorkerPrivate);
1267
  }
1268
1269
  return mSyncManager;
1270
}
1271
1223
} // dom namespace
1272
} // dom namespace
1224
} // mozilla namespace
1273
} // mozilla namespace
(-)a/dom/workers/ServiceWorkerRegistration.h (+11 lines)
Line     Link Here 
 Lines 17-32    Link Here 
17
17
18
class nsPIDOMWindowInner;
18
class nsPIDOMWindowInner;
19
19
20
namespace mozilla {
20
namespace mozilla {
21
namespace dom {
21
namespace dom {
22
22
23
class Promise;
23
class Promise;
24
class PushManager;
24
class PushManager;
25
class SyncManager;
25
class WorkerListener;
26
class WorkerListener;
26
27
27
namespace workers {
28
namespace workers {
28
class ServiceWorker;
29
class ServiceWorker;
29
class WorkerPrivate;
30
class WorkerPrivate;
30
} // namespace workers
31
} // namespace workers
31
32
32
bool
33
bool
 Lines 120-135   public: Link Here 
120
  GetWaiting() override;
121
  GetWaiting() override;
121
122
122
  already_AddRefed<workers::ServiceWorker>
123
  already_AddRefed<workers::ServiceWorker>
123
  GetActive() override;
124
  GetActive() override;
124
125
125
  already_AddRefed<PushManager>
126
  already_AddRefed<PushManager>
126
  GetPushManager(JSContext* aCx, ErrorResult& aRv);
127
  GetPushManager(JSContext* aCx, ErrorResult& aRv);
127
128
129
  SyncManager*
130
  GetSync(ErrorResult& aRv);
131
128
  // DOMEventTargethelper
132
  // DOMEventTargethelper
129
  void DisconnectFromOwner() override
133
  void DisconnectFromOwner() override
130
  {
134
  {
131
    StopListeningForEvents();
135
    StopListeningForEvents();
132
    ServiceWorkerRegistrationBase::DisconnectFromOwner();
136
    ServiceWorkerRegistrationBase::DisconnectFromOwner();
133
  }
137
  }
134
138
135
  // ServiceWorkerRegistrationListener
139
  // ServiceWorkerRegistrationListener
 Lines 170-185   private: Link Here 
170
  // These three may change to a new worker at any time.
174
  // These three may change to a new worker at any time.
171
  RefPtr<workers::ServiceWorker> mInstallingWorker;
175
  RefPtr<workers::ServiceWorker> mInstallingWorker;
172
  RefPtr<workers::ServiceWorker> mWaitingWorker;
176
  RefPtr<workers::ServiceWorker> mWaitingWorker;
173
  RefPtr<workers::ServiceWorker> mActiveWorker;
177
  RefPtr<workers::ServiceWorker> mActiveWorker;
174
178
175
#ifndef MOZ_SIMPLEPUSH
179
#ifndef MOZ_SIMPLEPUSH
176
  RefPtr<PushManager> mPushManager;
180
  RefPtr<PushManager> mPushManager;
177
#endif
181
#endif
182
183
  RefPtr<SyncManager> mSyncManager;
178
};
184
};
179
185
180
class ServiceWorkerRegistrationWorkerThread final : public ServiceWorkerRegistrationBase
186
class ServiceWorkerRegistrationWorkerThread final : public ServiceWorkerRegistrationBase
181
                                                  , public workers::WorkerFeature
187
                                                  , public workers::WorkerFeature
182
{
188
{
183
public:
189
public:
184
  NS_DECL_ISUPPORTS_INHERITED
190
  NS_DECL_ISUPPORTS_INHERITED
185
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServiceWorkerRegistrationWorkerThread,
191
  NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServiceWorkerRegistrationWorkerThread,
 Lines 223-238   public: Link Here 
223
  }
229
  }
224
230
225
  bool
231
  bool
226
  Notify(workers::Status aStatus) override;
232
  Notify(workers::Status aStatus) override;
227
233
228
  already_AddRefed<PushManager>
234
  already_AddRefed<PushManager>
229
  GetPushManager(ErrorResult& aRv);
235
  GetPushManager(ErrorResult& aRv);
230
236
237
  SyncManager*
238
  GetSync(ErrorResult& aRv);
239
231
private:
240
private:
232
  enum Reason
241
  enum Reason
233
  {
242
  {
234
    RegistrationIsGoingAway = 0,
243
    RegistrationIsGoingAway = 0,
235
    WorkerIsGoingAway,
244
    WorkerIsGoingAway,
236
  };
245
  };
237
246
238
  ~ServiceWorkerRegistrationWorkerThread();
247
  ~ServiceWorkerRegistrationWorkerThread();
 Lines 244-257   private: Link Here 
244
  ReleaseListener(Reason aReason);
253
  ReleaseListener(Reason aReason);
245
254
246
  workers::WorkerPrivate* mWorkerPrivate;
255
  workers::WorkerPrivate* mWorkerPrivate;
247
  RefPtr<WorkerListener> mListener;
256
  RefPtr<WorkerListener> mListener;
248
257
249
#ifndef MOZ_SIMPLEPUSH
258
#ifndef MOZ_SIMPLEPUSH
250
  RefPtr<PushManager> mPushManager;
259
  RefPtr<PushManager> mPushManager;
251
#endif
260
#endif
261
262
  RefPtr<SyncManager> mSyncManager;
252
};
263
};
253
264
254
} // namespace dom
265
} // namespace dom
255
} // namespace mozilla
266
} // namespace mozilla
256
267
257
#endif /* mozilla_dom_ServiceWorkerRegistration_h */
268
#endif /* mozilla_dom_ServiceWorkerRegistration_h */
(-)a/dom/workers/WorkerPrefs.h (-1 / +1 lines)
Line     Link Here 
 Lines 28-44   WORKER_SIMPLE_PREF("dom.caches.enabled", Link Here 
28
WORKER_SIMPLE_PREF("dom.caches.testing.enabled", DOMCachesTestingEnabled, DOM_CACHES_TESTING)
28
WORKER_SIMPLE_PREF("dom.caches.testing.enabled", DOMCachesTestingEnabled, DOM_CACHES_TESTING)
29
WORKER_SIMPLE_PREF("dom.performance.enable_user_timing_logging", PerformanceLoggingEnabled, PERFORMANCE_LOGGING_ENABLED)
29
WORKER_SIMPLE_PREF("dom.performance.enable_user_timing_logging", PerformanceLoggingEnabled, PERFORMANCE_LOGGING_ENABLED)
30
WORKER_SIMPLE_PREF("dom.webnotifications.enabled", DOMWorkerNotificationEnabled, DOM_WORKERNOTIFICATION)
30
WORKER_SIMPLE_PREF("dom.webnotifications.enabled", DOMWorkerNotificationEnabled, DOM_WORKERNOTIFICATION)
31
WORKER_SIMPLE_PREF("dom.webnotifications.serviceworker.enabled", DOMServiceWorkerNotificationEnabled, DOM_SERVICEWORKERNOTIFICATION)
31
WORKER_SIMPLE_PREF("dom.webnotifications.serviceworker.enabled", DOMServiceWorkerNotificationEnabled, DOM_SERVICEWORKERNOTIFICATION)
32
WORKER_SIMPLE_PREF("dom.serviceWorkers.enabled", ServiceWorkersEnabled, SERVICEWORKERS_ENABLED)
32
WORKER_SIMPLE_PREF("dom.serviceWorkers.enabled", ServiceWorkersEnabled, SERVICEWORKERS_ENABLED)
33
WORKER_SIMPLE_PREF("dom.serviceWorkers.testing.enabled", ServiceWorkersTestingEnabled, SERVICEWORKERS_TESTING_ENABLED)
33
WORKER_SIMPLE_PREF("dom.serviceWorkers.testing.enabled", ServiceWorkersTestingEnabled, SERVICEWORKERS_TESTING_ENABLED)
34
WORKER_SIMPLE_PREF("dom.serviceWorkers.openWindow.enabled", OpenWindowEnabled, OPEN_WINDOW_ENABLED)
34
WORKER_SIMPLE_PREF("dom.serviceWorkers.openWindow.enabled", OpenWindowEnabled, OPEN_WINDOW_ENABLED)
35
WORKER_SIMPLE_PREF("dom.push.enabled", PushEnabled, PUSH_ENABLED)
35
WORKER_SIMPLE_PREF("dom.push.enabled", PushEnabled, PUSH_ENABLED)
36
WORKER_SIMPLE_PREF("dom.background.sync.enabled", BackgroundSyncEnabled, BACKGROUND_SYNC_ENABLED)
36
WORKER_SIMPLE_PREF("dom.backgroundSync.enabled", BackgroundSyncEnabled, BACKGROUND_SYNC_ENABLED)
37
WORKER_SIMPLE_PREF("dom.requestcontext.enabled", RequestContextEnabled, REQUESTCONTEXT_ENABLED)
37
WORKER_SIMPLE_PREF("dom.requestcontext.enabled", RequestContextEnabled, REQUESTCONTEXT_ENABLED)
38
WORKER_SIMPLE_PREF("gfx.offscreencanvas.enabled", OffscreenCanvasEnabled, OFFSCREENCANVAS_ENABLED)
38
WORKER_SIMPLE_PREF("gfx.offscreencanvas.enabled", OffscreenCanvasEnabled, OFFSCREENCANVAS_ENABLED)
39
WORKER_PREF("dom.workers.latestJSVersion", JSVersionChanged)
39
WORKER_PREF("dom.workers.latestJSVersion", JSVersionChanged)
40
WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
40
WORKER_PREF("intl.accept_languages", PrefLanguagesChanged)
41
WORKER_PREF("general.appname.override", AppNameOverrideChanged)
41
WORKER_PREF("general.appname.override", AppNameOverrideChanged)
42
WORKER_PREF("general.appversion.override", AppVersionOverrideChanged)
42
WORKER_PREF("general.appversion.override", AppVersionOverrideChanged)
43
WORKER_PREF("general.platform.override", PlatformOverrideChanged)
43
WORKER_PREF("general.platform.override", PlatformOverrideChanged)
44
#ifdef JS_GC_ZEAL
44
#ifdef JS_GC_ZEAL

Return to bug 1217544