2015-05-03 22:32:37 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-03-31 08:42:20 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* 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/. */
|
2008-11-27 09:16:40 +03:00
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
#ifndef mozilla_dom_workers_workers_h__
|
|
|
|
#define mozilla_dom_workers_workers_h__
|
2008-11-27 09:16:40 +03:00
|
|
|
|
2011-12-05 11:58:27 +04:00
|
|
|
#include "jsapi.h"
|
2012-03-31 08:42:20 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2011-12-05 11:58:27 +04:00
|
|
|
#include "mozilla/Mutex.h"
|
2013-07-30 18:25:31 +04:00
|
|
|
#include <stdint.h>
|
2012-03-31 08:42:20 +04:00
|
|
|
#include "nsAutoPtr.h"
|
|
|
|
#include "nsCOMPtr.h"
|
|
|
|
#include "nsDebug.h"
|
2013-09-23 21:25:00 +04:00
|
|
|
#include "nsString.h"
|
2015-02-12 12:50:05 +03:00
|
|
|
#include "nsTArray.h"
|
|
|
|
|
|
|
|
#include "nsILoadContext.h"
|
|
|
|
#include "nsIWeakReferenceUtils.h"
|
|
|
|
#include "nsIInterfaceRequestor.h"
|
2015-05-25 21:21:05 +03:00
|
|
|
#include "mozilla/dom/ChannelInfo.h"
|
2016-07-05 06:47:13 +03:00
|
|
|
#include "mozilla/net/ReferrerPolicy.h"
|
2008-11-27 09:16:40 +03:00
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
#define BEGIN_WORKERS_NAMESPACE \
|
|
|
|
namespace mozilla { namespace dom { namespace workers {
|
|
|
|
#define END_WORKERS_NAMESPACE \
|
|
|
|
} /* namespace workers */ } /* namespace dom */ } /* namespace mozilla */
|
|
|
|
#define USING_WORKERS_NAMESPACE \
|
|
|
|
using namespace mozilla::dom::workers;
|
2011-07-12 20:32:14 +04:00
|
|
|
|
2011-12-29 22:28:09 +04:00
|
|
|
#define WORKERS_SHUTDOWN_TOPIC "web-workers-shutdown"
|
|
|
|
|
2015-02-12 12:50:05 +03:00
|
|
|
class nsIContentSecurityPolicy;
|
2013-06-06 21:28:47 +04:00
|
|
|
class nsIScriptContext;
|
2015-02-12 12:50:05 +03:00
|
|
|
class nsIGlobalObject;
|
2016-01-30 20:05:36 +03:00
|
|
|
class nsPIDOMWindowInner;
|
2015-02-12 12:50:05 +03:00
|
|
|
class nsIPrincipal;
|
|
|
|
class nsILoadGroup;
|
|
|
|
class nsITabChild;
|
|
|
|
class nsIChannel;
|
2015-07-15 22:21:40 +03:00
|
|
|
class nsIRunnable;
|
2015-02-12 12:50:05 +03:00
|
|
|
class nsIURI;
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace ipc {
|
|
|
|
class PrincipalInfo;
|
2015-07-13 18:25:42 +03:00
|
|
|
} // namespace ipc
|
2015-03-04 16:54:16 +03:00
|
|
|
|
|
|
|
namespace dom {
|
|
|
|
// If you change this, the corresponding list in nsIWorkerDebugger.idl needs to
|
|
|
|
// be updated too.
|
|
|
|
enum WorkerType
|
|
|
|
{
|
|
|
|
WorkerTypeDedicated,
|
|
|
|
WorkerTypeShared,
|
|
|
|
WorkerTypeService
|
|
|
|
};
|
2015-07-13 18:25:42 +03:00
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
2011-07-12 20:32:14 +04:00
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
BEGIN_WORKERS_NAMESPACE
|
2008-11-27 09:16:40 +03:00
|
|
|
|
2011-12-05 11:58:27 +04:00
|
|
|
class WorkerPrivate;
|
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
struct PrivatizableBase
|
|
|
|
{ };
|
2011-07-12 20:32:14 +04:00
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
#ifdef DEBUG
|
|
|
|
void
|
|
|
|
AssertIsOnMainThread();
|
|
|
|
#else
|
|
|
|
inline void
|
|
|
|
AssertIsOnMainThread()
|
|
|
|
{ }
|
|
|
|
#endif
|
2011-07-12 20:32:14 +04:00
|
|
|
|
2013-05-17 02:49:43 +04:00
|
|
|
struct JSSettings
|
|
|
|
{
|
|
|
|
enum {
|
|
|
|
// All the GC parameters that we support.
|
|
|
|
JSSettings_JSGC_MAX_BYTES = 0,
|
|
|
|
JSSettings_JSGC_MAX_MALLOC_BYTES,
|
|
|
|
JSSettings_JSGC_HIGH_FREQUENCY_TIME_LIMIT,
|
|
|
|
JSSettings_JSGC_LOW_FREQUENCY_HEAP_GROWTH,
|
|
|
|
JSSettings_JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN,
|
|
|
|
JSSettings_JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX,
|
|
|
|
JSSettings_JSGC_HIGH_FREQUENCY_LOW_LIMIT,
|
|
|
|
JSSettings_JSGC_HIGH_FREQUENCY_HIGH_LIMIT,
|
|
|
|
JSSettings_JSGC_ALLOCATION_THRESHOLD,
|
|
|
|
JSSettings_JSGC_SLICE_TIME_BUDGET,
|
|
|
|
JSSettings_JSGC_DYNAMIC_HEAP_GROWTH,
|
|
|
|
JSSettings_JSGC_DYNAMIC_MARK_SLICE,
|
2016-04-01 00:26:30 +03:00
|
|
|
JSSettings_JSGC_REFRESH_FRAME_SLICES,
|
2013-05-17 02:49:43 +04:00
|
|
|
// JSGC_MODE not supported
|
|
|
|
|
|
|
|
// This must be last so that we get an accurate count.
|
|
|
|
kGCSettingsArraySize
|
|
|
|
};
|
|
|
|
|
|
|
|
struct JSGCSetting
|
|
|
|
{
|
|
|
|
JSGCParamKey key;
|
|
|
|
uint32_t value;
|
|
|
|
|
|
|
|
JSGCSetting()
|
|
|
|
: key(static_cast<JSGCParamKey>(-1)), value(0)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsSet() const
|
|
|
|
{
|
|
|
|
return key != static_cast<JSGCParamKey>(-1);
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
Unset()
|
|
|
|
{
|
|
|
|
key = static_cast<JSGCParamKey>(-1);
|
|
|
|
value = 0;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
// There are several settings that we know we need so it makes sense to
|
|
|
|
// preallocate here.
|
|
|
|
typedef JSGCSetting JSGCSettingsArray[kGCSettingsArraySize];
|
|
|
|
|
|
|
|
// Settings that change based on chrome/content context.
|
|
|
|
struct JSContentChromeSettings
|
|
|
|
{
|
2013-12-10 15:43:16 +04:00
|
|
|
JS::CompartmentOptions compartmentOptions;
|
2013-05-17 02:49:43 +04:00
|
|
|
int32_t maxScriptRuntime;
|
|
|
|
|
|
|
|
JSContentChromeSettings()
|
2014-07-30 08:00:37 +04:00
|
|
|
: compartmentOptions(), maxScriptRuntime(0)
|
2013-05-17 02:49:43 +04:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|
|
|
|
JSContentChromeSettings chrome;
|
|
|
|
JSContentChromeSettings content;
|
|
|
|
JSGCSettingsArray gcSettings;
|
2016-07-07 09:15:15 +03:00
|
|
|
JS::ContextOptions contextOptions;
|
2013-12-25 12:21:59 +04:00
|
|
|
|
2013-05-17 02:49:43 +04:00
|
|
|
#ifdef JS_GC_ZEAL
|
|
|
|
uint8_t gcZeal;
|
|
|
|
uint32_t gcZealFrequency;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
JSSettings()
|
|
|
|
#ifdef JS_GC_ZEAL
|
2013-12-25 12:21:59 +04:00
|
|
|
: gcZeal(0), gcZealFrequency(0)
|
2013-05-17 02:49:43 +04:00
|
|
|
#endif
|
|
|
|
{
|
|
|
|
for (uint32_t index = 0; index < ArrayLength(gcSettings); index++) {
|
|
|
|
new (gcSettings + index) JSGCSetting();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool
|
|
|
|
ApplyGCSetting(JSGCParamKey aKey, uint32_t aValue)
|
|
|
|
{
|
|
|
|
JSSettings::JSGCSetting* firstEmptySetting = nullptr;
|
|
|
|
JSSettings::JSGCSetting* foundSetting = nullptr;
|
|
|
|
|
|
|
|
for (uint32_t index = 0; index < ArrayLength(gcSettings); index++) {
|
|
|
|
JSSettings::JSGCSetting& setting = gcSettings[index];
|
|
|
|
if (setting.key == aKey) {
|
|
|
|
foundSetting = &setting;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (!firstEmptySetting && !setting.IsSet()) {
|
|
|
|
firstEmptySetting = &setting;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (aValue) {
|
|
|
|
if (!foundSetting) {
|
|
|
|
foundSetting = firstEmptySetting;
|
|
|
|
if (!foundSetting) {
|
|
|
|
NS_ERROR("Not enough space for this value!");
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
foundSetting->key = aKey;
|
|
|
|
foundSetting->value = aValue;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (foundSetting) {
|
|
|
|
foundSetting->Unset();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2013-11-24 23:27:15 +04:00
|
|
|
enum WorkerPreference
|
|
|
|
{
|
2015-10-24 19:06:57 +03:00
|
|
|
#define WORKER_SIMPLE_PREF(name, getter, NAME) WORKERPREF_ ## NAME,
|
|
|
|
#define WORKER_PREF(name, callback)
|
|
|
|
#include "mozilla/dom/WorkerPrefs.h"
|
|
|
|
#undef WORKER_SIMPLE_PREF
|
|
|
|
#undef WORKER_PREF
|
2013-11-24 23:27:15 +04:00
|
|
|
WORKERPREF_COUNT
|
|
|
|
};
|
|
|
|
|
2015-02-12 12:50:05 +03:00
|
|
|
// Implemented in WorkerPrivate.cpp
|
|
|
|
|
|
|
|
struct WorkerLoadInfo
|
|
|
|
{
|
|
|
|
// All of these should be released in WorkerPrivateParent::ForgetMainThreadObjects.
|
|
|
|
nsCOMPtr<nsIURI> mBaseURI;
|
|
|
|
nsCOMPtr<nsIURI> mResolvedScriptURI;
|
|
|
|
nsCOMPtr<nsIPrincipal> mPrincipal;
|
|
|
|
nsCOMPtr<nsIScriptContext> mScriptContext;
|
2016-01-30 20:05:36 +03:00
|
|
|
nsCOMPtr<nsPIDOMWindowInner> mWindow;
|
2015-02-12 12:50:05 +03:00
|
|
|
nsCOMPtr<nsIContentSecurityPolicy> mCSP;
|
|
|
|
nsCOMPtr<nsIChannel> mChannel;
|
|
|
|
nsCOMPtr<nsILoadGroup> mLoadGroup;
|
|
|
|
|
2015-07-15 22:21:40 +03:00
|
|
|
// mLoadFailedAsyncRunnable will execute on main thread if script loading
|
|
|
|
// fails during script loading. If script loading is never started due to
|
|
|
|
// a synchronous error, then the runnable is never executed. The runnable
|
|
|
|
// is guaranteed to be released on the main thread.
|
|
|
|
nsCOMPtr<nsIRunnable> mLoadFailedAsyncRunnable;
|
|
|
|
|
2015-03-21 19:28:04 +03:00
|
|
|
class InterfaceRequestor final : public nsIInterfaceRequestor
|
2015-02-12 12:50:05 +03:00
|
|
|
{
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
public:
|
|
|
|
InterfaceRequestor(nsIPrincipal* aPrincipal, nsILoadGroup* aLoadGroup);
|
|
|
|
void MaybeAddTabChild(nsILoadGroup* aLoadGroup);
|
2015-03-21 19:28:04 +03:00
|
|
|
NS_IMETHOD GetInterface(const nsIID& aIID, void** aSink) override;
|
2015-02-12 12:50:05 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
~InterfaceRequestor() { }
|
|
|
|
|
|
|
|
already_AddRefed<nsITabChild> GetAnyLiveTabChild();
|
|
|
|
|
|
|
|
nsCOMPtr<nsILoadContext> mLoadContext;
|
2015-03-29 20:43:34 +03:00
|
|
|
nsCOMPtr<nsIInterfaceRequestor> mOuterRequestor;
|
2015-02-12 12:50:05 +03:00
|
|
|
|
|
|
|
// Array of weak references to nsITabChild. We do not want to keep TabChild
|
|
|
|
// actors alive for long after their ActorDestroy() methods are called.
|
|
|
|
nsTArray<nsWeakPtr> mTabChildList;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Only set if we have a custom overriden load group
|
2015-10-18 08:24:48 +03:00
|
|
|
RefPtr<InterfaceRequestor> mInterfaceRequestor;
|
2015-02-12 12:50:05 +03:00
|
|
|
|
|
|
|
nsAutoPtr<mozilla::ipc::PrincipalInfo> mPrincipalInfo;
|
|
|
|
nsCString mDomain;
|
2017-02-14 00:06:47 +03:00
|
|
|
nsString mOrigin; // Derived from mPrincipal; can be used on worker thread.
|
2015-02-12 12:50:05 +03:00
|
|
|
|
2015-03-19 21:41:42 +03:00
|
|
|
nsString mServiceWorkerCacheName;
|
|
|
|
|
2015-05-25 21:21:05 +03:00
|
|
|
ChannelInfo mChannelInfo;
|
2017-01-04 12:09:00 +03:00
|
|
|
nsLoadFlags mLoadFlags;
|
2015-04-24 01:59:52 +03:00
|
|
|
|
2015-02-12 12:50:05 +03:00
|
|
|
uint64_t mWindowID;
|
2015-05-14 22:41:42 +03:00
|
|
|
uint64_t mServiceWorkerID;
|
2015-02-12 12:50:05 +03:00
|
|
|
|
2016-07-05 06:47:13 +03:00
|
|
|
net::ReferrerPolicy mReferrerPolicy;
|
2015-02-12 12:50:05 +03:00
|
|
|
bool mFromWindow;
|
|
|
|
bool mEvalAllowed;
|
|
|
|
bool mReportCSPViolations;
|
|
|
|
bool mXHRParamsAllowed;
|
|
|
|
bool mPrincipalIsSystem;
|
2015-07-16 00:01:02 +03:00
|
|
|
bool mStorageAllowed;
|
2015-06-28 06:19:24 +03:00
|
|
|
bool mServiceWorkersTestingInWindow;
|
2017-01-12 19:38:48 +03:00
|
|
|
OriginAttributes mOriginAttributes;
|
2015-02-12 12:50:05 +03:00
|
|
|
|
|
|
|
WorkerLoadInfo();
|
|
|
|
~WorkerLoadInfo();
|
|
|
|
|
|
|
|
void StealFrom(WorkerLoadInfo& aOther);
|
2017-02-07 18:28:38 +03:00
|
|
|
|
2017-02-10 21:34:38 +03:00
|
|
|
nsresult
|
2017-02-07 18:28:38 +03:00
|
|
|
SetPrincipalOnMainThread(nsIPrincipal* aPrincipal, nsILoadGroup* aLoadGroup);
|
2017-02-07 18:28:39 +03:00
|
|
|
|
2017-02-07 18:28:39 +03:00
|
|
|
nsresult
|
|
|
|
GetPrincipalAndLoadGroupFromChannel(nsIChannel* aChannel,
|
|
|
|
nsIPrincipal** aPrincipalOut,
|
|
|
|
nsILoadGroup** aLoadGroupOut);
|
|
|
|
|
2017-02-07 18:28:39 +03:00
|
|
|
nsresult
|
|
|
|
SetPrincipalFromChannel(nsIChannel* aChannel);
|
2017-02-07 18:28:39 +03:00
|
|
|
|
2017-05-26 19:53:35 +03:00
|
|
|
#ifdef MOZ_DIAGNOSTIC_ASSERT_ENABLED
|
2017-02-07 18:28:39 +03:00
|
|
|
bool
|
|
|
|
FinalChannelPrincipalIsValid(nsIChannel* aChannel);
|
2017-02-14 18:06:39 +03:00
|
|
|
|
|
|
|
bool
|
|
|
|
PrincipalIsValid() const;
|
2017-02-23 18:54:41 +03:00
|
|
|
|
|
|
|
bool
|
|
|
|
PrincipalURIMatchesScriptURL();
|
2017-02-07 18:28:39 +03:00
|
|
|
#endif
|
2017-02-07 18:28:39 +03:00
|
|
|
|
2017-02-07 18:28:39 +03:00
|
|
|
bool
|
|
|
|
ProxyReleaseMainThreadObjects(WorkerPrivate* aWorkerPrivate);
|
|
|
|
|
|
|
|
bool
|
|
|
|
ProxyReleaseMainThreadObjects(WorkerPrivate* aWorkerPrivate,
|
|
|
|
nsCOMPtr<nsILoadGroup>& aLoadGroupToCancel);
|
2015-02-12 12:50:05 +03:00
|
|
|
};
|
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
// All of these are implemented in RuntimeService.cpp
|
2014-07-04 23:41:27 +04:00
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
void
|
2016-01-30 20:05:36 +03:00
|
|
|
CancelWorkersForWindow(nsPIDOMWindowInner* aWindow);
|
2011-07-17 23:09:13 +04:00
|
|
|
|
|
|
|
void
|
2016-01-30 20:05:36 +03:00
|
|
|
FreezeWorkersForWindow(nsPIDOMWindowInner* aWindow);
|
2011-07-17 23:09:13 +04:00
|
|
|
|
|
|
|
void
|
2016-01-30 20:05:36 +03:00
|
|
|
ThawWorkersForWindow(nsPIDOMWindowInner* aWindow);
|
2011-07-17 23:09:13 +04:00
|
|
|
|
2015-10-07 13:20:59 +03:00
|
|
|
void
|
2016-01-30 20:05:36 +03:00
|
|
|
SuspendWorkersForWindow(nsPIDOMWindowInner* aWindow);
|
2015-10-07 13:20:59 +03:00
|
|
|
|
|
|
|
void
|
2016-01-30 20:05:36 +03:00
|
|
|
ResumeWorkersForWindow(nsPIDOMWindowInner* aWindow);
|
2015-10-07 13:20:59 +03:00
|
|
|
|
2016-02-19 02:02:51 +03:00
|
|
|
// A class that can be used with WorkerCrossThreadDispatcher to run a
|
|
|
|
// bit of C++ code on the worker thread.
|
2013-10-23 17:16:49 +04:00
|
|
|
class WorkerTask
|
|
|
|
{
|
|
|
|
protected:
|
|
|
|
WorkerTask()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
virtual ~WorkerTask()
|
|
|
|
{ }
|
2011-12-05 11:58:27 +04:00
|
|
|
|
2013-10-23 17:16:49 +04:00
|
|
|
public:
|
|
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WorkerTask)
|
2011-12-05 11:58:27 +04:00
|
|
|
|
2016-02-19 02:02:51 +03:00
|
|
|
// The return value here has the same semantics as the return value
|
|
|
|
// of WorkerRunnable::WorkerRun.
|
2013-10-23 17:16:49 +04:00
|
|
|
virtual bool
|
|
|
|
RunTask(JSContext* aCx) = 0;
|
2011-12-05 11:58:27 +04:00
|
|
|
};
|
|
|
|
|
2013-10-23 17:16:49 +04:00
|
|
|
class WorkerCrossThreadDispatcher
|
|
|
|
{
|
|
|
|
friend class WorkerPrivate;
|
2011-12-05 11:58:27 +04:00
|
|
|
|
2013-10-23 17:16:49 +04:00
|
|
|
// Must be acquired *before* the WorkerPrivate's mutex, when they're both
|
|
|
|
// held.
|
|
|
|
Mutex mMutex;
|
|
|
|
WorkerPrivate* mWorkerPrivate;
|
|
|
|
|
|
|
|
private:
|
|
|
|
// Only created by WorkerPrivate.
|
2014-07-28 21:17:51 +04:00
|
|
|
explicit WorkerCrossThreadDispatcher(WorkerPrivate* aWorkerPrivate);
|
2013-10-23 17:16:49 +04:00
|
|
|
|
|
|
|
// Only called by WorkerPrivate.
|
|
|
|
void
|
|
|
|
Forget()
|
2011-12-05 11:58:27 +04:00
|
|
|
{
|
2013-10-23 17:16:49 +04:00
|
|
|
MutexAutoLock lock(mMutex);
|
|
|
|
mWorkerPrivate = nullptr;
|
2011-12-05 11:58:27 +04:00
|
|
|
}
|
|
|
|
|
2014-06-19 06:28:59 +04:00
|
|
|
~WorkerCrossThreadDispatcher() {}
|
|
|
|
|
2013-10-23 17:16:49 +04:00
|
|
|
public:
|
|
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(WorkerCrossThreadDispatcher)
|
2011-12-05 11:58:27 +04:00
|
|
|
|
2013-10-23 17:16:49 +04:00
|
|
|
// Generically useful function for running a bit of C++ code on the worker
|
|
|
|
// thread.
|
|
|
|
bool
|
|
|
|
PostTask(WorkerTask* aTask);
|
2011-12-05 11:58:27 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
WorkerCrossThreadDispatcher*
|
2016-09-11 12:15:24 +03:00
|
|
|
GetWorkerCrossThreadDispatcher(JSContext* aCx, const JS::Value& aWorker);
|
2011-12-05 11:58:27 +04:00
|
|
|
|
2012-03-09 13:48:50 +04:00
|
|
|
// Random unique constant to facilitate JSPrincipal debugging
|
|
|
|
const uint32_t kJSPrincipalsDebugToken = 0x7e2df9d2;
|
|
|
|
|
2015-03-04 02:51:53 +03:00
|
|
|
bool
|
|
|
|
IsWorkerGlobal(JSObject* global);
|
|
|
|
|
|
|
|
bool
|
|
|
|
IsDebuggerGlobal(JSObject* global);
|
|
|
|
|
2015-03-31 13:22:40 +03:00
|
|
|
bool
|
|
|
|
IsDebuggerSandbox(JSObject* object);
|
|
|
|
|
2011-07-17 23:09:13 +04:00
|
|
|
END_WORKERS_NAMESPACE
|
|
|
|
|
2012-03-31 08:42:20 +04:00
|
|
|
#endif // mozilla_dom_workers_workers_h__
|