Backed out changeset 26cd857611b8 (bug 982726)

This commit is contained in:
Carsten "Tomcat" Book 2014-10-28 12:30:49 +01:00
parent a61812775e
commit ae724d67dd
3 changed files with 12 additions and 25 deletions

View File

@ -9,7 +9,6 @@
#include "nsAutoPtr.h"
#include "nsWrapperCache.h"
#include "mozilla/dom/WorkerScope.h"
namespace mozilla {
@ -21,6 +20,8 @@ class Promise;
namespace workers {
class ServiceWorkerGlobalScope;
class ServiceWorkerClients MOZ_FINAL : public nsISupports,
public nsWrapperCache
{

View File

@ -33,7 +33,6 @@
#include "WorkerPrivate.h"
#include "WorkerRunnable.h"
#include "Performance.h"
#include "ServiceWorkerClients.h"
#define UNWRAP_WORKER_OBJECT(Interface, obj, value) \
UnwrapObject<prototypes::id::Interface##_workers, \
@ -375,10 +374,6 @@ ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(WorkerPrivate* aWorkerPrivate
{
}
ServiceWorkerGlobalScope::~ServiceWorkerGlobalScope()
{
}
JSObject*
ServiceWorkerGlobalScope::WrapGlobalObject(JSContext* aCx)
{
@ -393,16 +388,6 @@ ServiceWorkerGlobalScope::WrapGlobalObject(JSContext* aCx)
true);
}
ServiceWorkerClients*
ServiceWorkerGlobalScope::Clients()
{
if (!mClients) {
mClients = new ServiceWorkerClients(this);
}
return mClients;
}
bool
GetterOnlyJSNative(JSContext* aCx, unsigned aArgc, JS::Value* aVp)
{

View File

@ -11,6 +11,8 @@
#include "mozilla/dom/Headers.h"
#include "mozilla/dom/RequestBinding.h"
#include "ServiceWorkerClients.h"
namespace mozilla {
namespace dom {
@ -24,7 +26,6 @@ class RequestOrScalarValueString;
BEGIN_WORKERS_NAMESPACE
class ServiceWorkerClients;
class WorkerPrivate;
class WorkerLocation;
class WorkerNavigator;
@ -173,7 +174,7 @@ class ServiceWorkerGlobalScope MOZ_FINAL : public WorkerGlobalScope
const nsString mScope;
nsRefPtr<ServiceWorkerClients> mClients;
~ServiceWorkerGlobalScope();
~ServiceWorkerGlobalScope() { }
public:
NS_DECL_ISUPPORTS_INHERITED
@ -207,7 +208,13 @@ public:
Unregister(ErrorResult& aRv);
ServiceWorkerClients*
Clients();
Clients() {
if (!mClients) {
mClients = new ServiceWorkerClients(this);
}
return mClients;
}
IMPL_EVENT_HANDLER(activate)
IMPL_EVENT_HANDLER(beforeevicted)
@ -222,10 +229,4 @@ CreateGlobalScope(JSContext* aCx);
END_WORKERS_NAMESPACE
inline nsISupports*
ToSupports(mozilla::dom::workers::WorkerGlobalScope* aScope)
{
return static_cast<nsIDOMEventTarget*>(aScope);
}
#endif /* mozilla_dom_workerscope_h__ */