mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1432963 - Fixing workers headers - part 1 - no workers namespace for SharedWorker, r=smaug
This commit is contained in:
parent
04332d008f
commit
c08095be82
@ -762,11 +762,6 @@ DOMInterfaces = {
|
||||
'implicitJSContext': [ 'pushManager' ],
|
||||
},
|
||||
|
||||
'SharedWorker': {
|
||||
'nativeType': 'mozilla::dom::workers::SharedWorker',
|
||||
'headerFile': 'mozilla/dom/workers/bindings/SharedWorker.h',
|
||||
},
|
||||
|
||||
'SharedWorkerGlobalScope': {
|
||||
'headerFile': 'mozilla/dom/WorkerScope.h',
|
||||
'implicitJSContext': [ 'close' ],
|
||||
|
@ -19,9 +19,14 @@
|
||||
class nsITimer;
|
||||
class nsPIDOMWindowInner;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class SharedWorker;
|
||||
}
|
||||
}
|
||||
|
||||
BEGIN_WORKERS_NAMESPACE
|
||||
|
||||
class SharedWorker;
|
||||
struct WorkerLoadInfo;
|
||||
class WorkerThread;
|
||||
|
||||
|
@ -29,8 +29,8 @@ using mozilla::dom::Optional;
|
||||
using mozilla::dom::Sequence;
|
||||
using mozilla::dom::MessagePort;
|
||||
using namespace mozilla;
|
||||
|
||||
USING_WORKERS_NAMESPACE
|
||||
using namespace mozilla::dom;
|
||||
using namespace mozilla::dom::workers;
|
||||
|
||||
SharedWorker::SharedWorker(nsPIDOMWindowInner* aWindow,
|
||||
WorkerPrivate* aWorkerPrivate,
|
||||
|
@ -25,22 +25,20 @@ class EventChainPreVisitor;
|
||||
namespace dom {
|
||||
class MessagePort;
|
||||
class StringOrWorkerOptions;
|
||||
}
|
||||
} // namespace mozilla
|
||||
|
||||
BEGIN_WORKERS_NAMESPACE
|
||||
|
||||
namespace workers {
|
||||
class RuntimeService;
|
||||
class WorkerPrivate;
|
||||
}
|
||||
|
||||
class SharedWorker final : public DOMEventTargetHelper
|
||||
{
|
||||
friend class RuntimeService;
|
||||
friend class workers::RuntimeService;
|
||||
|
||||
typedef mozilla::ErrorResult ErrorResult;
|
||||
typedef mozilla::dom::GlobalObject GlobalObject;
|
||||
|
||||
RefPtr<WorkerPrivate> mWorkerPrivate;
|
||||
RefPtr<workers::WorkerPrivate> mWorkerPrivate;
|
||||
RefPtr<MessagePort> mMessagePort;
|
||||
nsTArray<nsCOMPtr<nsIDOMEvent>> mFrozenEvents;
|
||||
bool mFrozen;
|
||||
@ -82,7 +80,7 @@ public:
|
||||
virtual nsresult
|
||||
GetEventTargetParent(EventChainPreVisitor& aVisitor) override;
|
||||
|
||||
WorkerPrivate*
|
||||
workers::WorkerPrivate*
|
||||
GetWorkerPrivate() const
|
||||
{
|
||||
return mWorkerPrivate;
|
||||
@ -91,7 +89,7 @@ public:
|
||||
private:
|
||||
// This class can only be created from the RuntimeService.
|
||||
SharedWorker(nsPIDOMWindowInner* aWindow,
|
||||
WorkerPrivate* aWorkerPrivate,
|
||||
workers::WorkerPrivate* aWorkerPrivate,
|
||||
MessagePort* aMessagePort);
|
||||
|
||||
// This class is reference-counted and will be destroyed from Release().
|
||||
@ -103,6 +101,7 @@ private:
|
||||
const Sequence<JSObject*>& aTransferable, ErrorResult& aRv);
|
||||
};
|
||||
|
||||
END_WORKERS_NAMESPACE
|
||||
} // dom namespace
|
||||
} // mozilla namespace
|
||||
|
||||
#endif // mozilla_dom_workers_sharedworker_h__
|
||||
|
@ -36,6 +36,7 @@ class Function;
|
||||
class MessagePort;
|
||||
class MessagePortIdentifier;
|
||||
class PerformanceStorage;
|
||||
class SharedWorker;
|
||||
class WorkerDebuggerGlobalScope;
|
||||
class WorkerErrorReport;
|
||||
class WorkerGlobalScope;
|
||||
@ -46,7 +47,6 @@ struct WorkerOptions;
|
||||
|
||||
BEGIN_WORKERS_NAMESPACE
|
||||
|
||||
class SharedWorker;
|
||||
class WorkerControlRunnable;
|
||||
class WorkerDebugger;
|
||||
class WorkerEventTarget;
|
||||
|
@ -9,6 +9,7 @@ with Files("**"):
|
||||
|
||||
# Public stuff.
|
||||
EXPORTS.mozilla.dom += [
|
||||
'SharedWorker.h',
|
||||
'WorkerLocation.h',
|
||||
'WorkerNavigator.h',
|
||||
'WorkerPrivate.h',
|
||||
@ -26,7 +27,6 @@ EXPORTS.mozilla.dom.workers += [
|
||||
|
||||
# Stuff needed for the bindings, not really public though.
|
||||
EXPORTS.mozilla.dom.workers.bindings += [
|
||||
'SharedWorker.h',
|
||||
'WorkerHolder.h',
|
||||
'WorkerHolderToken.h',
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user