import changes from `dev' branch of rmottola/Arctic-Fox:

- Bug 1268085 - Remove unused post barrier callbacks r=terrence (0ab13411c9)
- Bug 1267699 - Move some public types to the right namespace; r=sfink (3d5008e610)
- Bug 1267550 (part 1) - Rename MOZ_MUST_USE as MOZ_MUST_USE_TYPE. r=ehsan. (6f47375796)
- Bug 1259021 - Rename Vector::extractRawBuffer to extractOrCopyRawBuffer r=Waldo (97ca94495b)
- Bug 1259021 - Add Vector::extractRawBuffer method that doesn't copy the buffer r=Waldo (e58deec48f)
- Bug 1265892 - Change Vector to use Impl::new_ consistently. r=Waldo (7a52d21b29)
- Bug 1267912 - Rename nsNetUtil.inl as nsNetUtilInlines.h. r=valentin. (548a41b293)
- Bug 1265690 part 1 - Mark StringBuffer methods WARN_UNUSED_RESULT, fix OOM issues. r=jonco (0d7e6837e3)
- Bug 1265690 part 2 - Fix some more OOM issues in TypedObject code. r=jonco (b60902453e)
- Bug 1263490 - Part 2: Add GetFirstDollarIndex intrinsic and use it inRegExpReplace. r=till (4ba19db8c4)
- Bug 1263490 - Part 3: Inline GetFirstDollarIndex intrinsic. r=h4writer (e7d9b5d1cc)
- Bug 1263490 - Part 4: Fold GetFirstDollarIndex into a integer constant. r=h4writer (3479c7d1af)
- Bug 1267269 - Make MIRType an enum class. r=bbouvier (d580ef372a)
- Bug 1259295 - BaldrMonkey: Postorder (r=luke) (6ef7a77663)
- Bug 1254142: BaldrMonkey: make br_table yield (r=luke) (80e7635e58)
- Bug 1263202 - BaldrMonkey: switch to arities on branches, calls and return (r=bbouvier) (f5a0358634)
- Bug 1236358 - Improper reading of string16 in Pickle::ReadString16. r=jld (8370ba6a0b)
- Bug 1263205 - BaldrMonkey: Update section headers for proposed spec changes (r=luke) (0def2e6bc2)
- Bug 1263205 - BaldrMonkey: Update for proposed new section names (r=luke) (e57f0e3367)
- Bug 1263205 - BaldrMonkey: Add 'form' field to types section (r=bbouvier) (794edc890f)
- Bug 1259021 - Use in-place storage in AutoStableStringChars to avoid allocation for short strings r=jandem r=Waldo (ffb53cbcf4)
- Bug 1267550 (part 2) - Rename MOZ_WARN_UNUSED_RESULT as MOZ_MUST_USE. r=froydnj. (47bc674b86)
- Bug 1268518: Baldr: implement int32/int64 rotations; r=luke (0d5eedccce)
- Bug 1255008: IonMonkey - Add a by default disabled flow sensitive alias analysis pass, r=jandem (521c585d75)
- Bug 1266781: Baldr: implement proper checked truncations to integer types; r=sunfish (46078fb3d3)
- Bug 1266781: Rename MTruncateToInt64 into MWasmTruncateInt64; r=sunfish (c7d7d1ac11)
- Bug 1266781: Add new traps; r=luke (b7ed3d44e6)
- Bug 1268024: Pass the atomic attribute down to EmitHeapAccess; r=luke (6195f7d7a3)
- Bug 1268024: A few cleanups related to loads/stores; r=luke (88141e3a01)
- Bug 1258312 - Make Pickle::Resize infallible r=jld (241ee9b60d)
- Bug 1162772, part 1 - Allow CompartmentCreationOptions to store Secure Context state. r=jorendorff (ff666384cf)
- Bug 1162772, part 2 - Expose whether SEC_FORCE_INHERIT_PRINCIPAL was dropped from an nsILoadInfo. r=bz (ada46f86bf)
- Bug 1162772, part 3 - Add a getChannelResultPrincipalIfNotSandboxed method to nsIScriptSecurityManager. r=bz (5b1d9f6807)
- Bug 1162772, part 4 - Implement nsGlobalWindow::IsSecureContext. r=bz (f392f439c9)
- Bug 1162772, part 5 - Expose Window.isSecureContext to content. r=bz (e7296e2cf1)
- Bug 1267509 - Make nsContentSecurityManager::IsURIPotentiallyTrustworthy act on an nsIPrincipal. r=bz (83de80350a)
- Bug 1219098 - Use UniquePtr in UncompressedSourceCache, for it is good (r=jandem) (b68769c729)
- Bug 1244279 - Part 1: Take a bit in ObjectElements::Flags to indicate whether the object is in the whole cell store buffer. r=terrence (968cf373f9)
- Bug 1244279 - Part 0: Add a GC ubench for large arrays with both elements and properties. r=terrence (ec76b48323)
- Bug 1255925 - Give a name to getters/setters and integer-named methods. r=efaust (f978cc6916)
- Bug 888969 - Make the getPrototypeOf/setPrototypeOf traps scriptable. r=efaust, r=bholley (eb2325a9ea)
- Bug 1267557 part 0 - Move JS poison constants to jsutil.h. r=jonco (65afc690d2)
- Bug 1267557 part 1 - Also poison bytes allocated before the actual jitcode. r=nbp (70f0b327d3)
- Bug 1267557 part 2 - Use different jitcode poison values. r=nbp (08008ab9dc)
- Bug 1267557 part 3 - Define JS_SWEPT_CODE_PATTERN for mips. r=nbp (17e894d59d)
- Bug 1267449 - Do not infinite loop in js_fputs; r=jimb (67f961b6cd)
- Bug 1219098 - Reenable compression on large sources, but revert to uncompressed if decompression happens (r=jandem) (b44ee8d77d)
- Bug 1267551 (part 1) - Use MOZ_MUST_USE more in jsnum.h. r=jonco. (d2476bf8f4)
- Bug 1267551 (part 2) - Use MOZ_MUST_USE more in js/src/ds/. r=jonco. (4ff5d9aa88)
- Bug 1267412 - Use MutableHandleValue instead of pointer-to-AutoValueVector; r=sfink (3f6dd284bb)
- Bug 1266406 - Use EnumSet<AllocKind> to simplify GC sweeping phase information r=terrence (64811500e7)
- Bug 1266457 - Update pointers in GC things in two phases when compacting r=terrence (f6f5bc4e4d)
- Bug 1266457 - Simplify typed object trace hook r=terence (3b06c8d1e5)
- Bug 1268541 - Compact arenas containing base shapes r=terrence (b458b92eea)
- Bug 1268805 - Implement PrivateGCThingValue. (r=terrence) (deec9a83ae)
- Bug 1268415: Initialize members in UpdatePointerTasks; r=jonco (6cb219005a)
- Bug 1268501 - Release the GC lock periodically when releasing arenas on the backgound thread r=terrence (37f0997682)
- Bug 1263572 - Wait for background sweeping to finish before checking base shapes r=terrence (354801a411)
- Bug 1266887 - Store Rooted heads on the Zone; r=sfink (91c0101ee3)
- Bug 1266402 - Add iteration to EnumSet<T> so that it can be used in range-based for loops r=Waldo (e9507a2524)
- Bug 1266404 - Allow construction of an EnumSet<T> using an initializer list r=Waldo (1b6d340e99)
- Bug 1254020 - Always compute theme scaling factor when per-monitor dpi aware, even if only a single display is currently present. r=emk (a00cda21f4)
- Bug 1263525 - Add dedicated function for std_Array self-hosted intrinsic. r=efaust (449d8bb7eb)
- Bug 1255925 - Change JSFunction::name to return a JSAtom. r=efaust (5ab396ce83)
- Bug 888969 - Make our tree's sole implementation of nsIRemoteTagService.getRemoteObjectTag not depend upon the infallibility of [[GetPrototypeOf]] on the object provided to it. r=bz (f388f4bf1f)
- Bug 1264896 - Kill off nsIRemoteTagService and do what it does, in its sole caller, in far-faster C++. r=billm (5ed3fb103d)
- Bug 1268246 - Add a simple Poison class lifetime checker. r=froydnj (7b237bc70e)
- Bug 1249496 - Don't apply dpi-based scaling for window titlebar dimensions when on a secondary display, because windows doesn't scale it. r=emk (64dd706dbc)
- Bug 1164518 - Avoid unnecessary DB updates when caching Safe Browsing results. r=gcp (3cafd9a4df)
- Bug 1264472 - Use nsRunnables in FIDO U2F. r=keeler (3aa9570132)
- Bug 1236060 - Dispatch error should advance queue. r=smaug (74155b75dd)
- Bug 1251697 part 1. Thread an ErrorResult reference through the worker XHR WorkerThreadProxySyncRunnable implementations. r=khuey (77804cbb7c)
- Bug 1251697 part 2. Have WorkerThreadProxySyncRunnable hand the ErrorResult reference it holds to its ResponseRunnable so it can report exceptions on there instead of on a JSContext. r=khuey (355c9ee313)
- Bug 1251697 part 3. Remove the JSContext argument of StopSyncLoopRunnable::MaybeSetException. r=khuey (010f5b1058)
- Bug 1155328. r=smaug (e1f8dac304)
- Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj (f83bfcae02)
- Bug 1239946 - Change test to return error on Speak. r=eeejay (1d402beb02)
- Bug 1254378 - Update synth tests and introduce no voiceschanged test. r=smaug (f5823bb70e)
- Bug 1251627. Fix XMLHttpRequest.send() to follow the spec better in terms of the exceptions it throws. r=khuey (cd0e321948)
- Bug 1268868: [MSE] P1. Re-enable gap detection within a media segment. r=gerald (b8b8df4bc2)
- Bug 1268868: [MSE] P2. Reset longest duration after keyframe is seen. r=gerald (2b1401465c)
- Bug 1268868: [MSE] P3. Prevent crash should gap be detected in content. r=gerald (063d9376fc)
- Bug 1254378 - Implement nsISynthVoiceRegistry.notifyVoicesChanged. r=smaug (4b63b1c360)
- Bug 1266804 - Un-inline js::Unbox(); r=jorendorff (0f288b6173)
- Bug 1268863 - Report ScriptSources that are only reachable via AsmJSModule (r=njn) (5ba40acb64)
- bump version to 45.1b1 (1414db0ca8)
- Bug 1262062 - remove old futex names. r=bbouvier (62662bdd2e)
- memory: build fix after renaming MOZ_WARN_UNUSED_RESULT (7254dc8d53)
- import from mozilla:
 - Bug 1268725 - BaldrMonkey: Refactor away the internal storage from ExprIter. r=luke (1931bd636f17)
 - Bug 1268725 - BaldrMonkey: Convert default arguments into explicit arguments. r=luke (c8a11b8b6bbd) (867ec715d6)
This commit is contained in:
2024-08-21 10:45:07 +08:00
parent afafcc8fa2
commit 69d1f32ff7
863 changed files with 15904 additions and 9408 deletions
+1 -1
View File
@@ -1760,7 +1760,7 @@ Accessible::GetNativeInterface(void** aNativeAccessible)
void
Accessible::DoCommand(nsIContent *aContent, uint32_t aActionIndex)
{
class Runnable final : public nsRunnable
class Runnable final : public mozilla::Runnable
{
public:
Runnable(Accessible* aAcc, nsIContent* aContent, uint32_t aIdx) :
+1 -1
View File
@@ -162,7 +162,7 @@ private:
uint32_t AddSubtree(ProxyAccessible* aParent,
const nsTArray<AccessibleData>& aNewTree, uint32_t aIdx,
uint32_t aIdxInParent);
MOZ_WARN_UNUSED_RESULT bool CheckDocTree() const;
MOZ_MUST_USE bool CheckDocTree() const;
xpcAccessibleGeneric* GetXPCAccessible(ProxyAccessible* aProxy);
nsTArray<DocAccessibleParent*> mChildDocs;
+1 -1
View File
@@ -334,7 +334,7 @@ static CustomTypeAnnotation HeapClass =
static CustomTypeAnnotation NonTemporaryClass =
CustomTypeAnnotation("moz_non_temporary_class", "non-temporary");
static CustomTypeAnnotation MustUse =
CustomTypeAnnotation("moz_must_use", "must-use");
CustomTypeAnnotation("moz_must_use_type", "must-use");
class MemMoveAnnotation final : public CustomTypeAnnotation {
public:
@@ -1,7 +1,7 @@
#define MOZ_MUST_USE __attribute__((annotate("moz_must_use")))
#define MOZ_MUST_USE_TYPE __attribute__((annotate("moz_must_use_type")))
#define MOZ_STACK_CLASS __attribute__((annotate("moz_stack_class")))
class MOZ_MUST_USE MOZ_STACK_CLASS TestClass {};
class MOZ_MUST_USE_TYPE MOZ_STACK_CLASS TestClass {};
TestClass foo; // expected-error {{variable of type 'TestClass' only valid on the stack}} expected-note {{value incorrectly allocated in a global variable}}
+2 -2
View File
@@ -1,6 +1,6 @@
#define MOZ_MUST_USE __attribute__((annotate("moz_must_use")))
#define MOZ_MUST_USE_TYPE __attribute__((annotate("moz_must_use_type")))
class MOZ_MUST_USE MustUse {};
class MOZ_MUST_USE_TYPE MustUse {};
class MayUse {};
MustUse producesMustUse();
+19 -1
View File
@@ -26,7 +26,7 @@ class DomainPolicyClone;
[ptr] native JSObjectPtr(JSObject);
[ptr] native DomainPolicyClonePtr(mozilla::dom::DomainPolicyClone);
[scriptable, uuid(b7ae2310-576e-11e5-a837-0800200c9a66)]
[scriptable, uuid(da831650-4241-4892-806c-cce8465a2ba8)]
interface nsIScriptSecurityManager : nsISupports
{
/**
@@ -240,6 +240,24 @@ interface nsIScriptSecurityManager : nsISupports
*/
nsIPrincipal getChannelResultPrincipal(in nsIChannel aChannel);
/**
* Temporary API until bug 1220687 is fixed.
*
* Returns the same value as getChannelResultPrincipal, but ignoring
* sandboxing. Specifically, if sandboxing would have prevented the
* channel's triggering principal from being returned by
* getChannelResultPrincipal, the triggering principal will be returned
* by this method.
*
* Note that this method only ignores sandboxing of the channel in
* question, it does not ignore sandboxing of any channels further up a
* document chain. The triggering principal itself may still be the null
* principal due to sandboxing further up a document chain. In that regard
* the ignoring of sandboxing is limited.
*/
[noscript, nostdcall]
nsIPrincipal getChannelResultPrincipalIfNotSandboxed(in nsIChannel aChannel);
/**
* Get the codebase principal for the channel's URI.
* aChannel must not be null.
+30 -2
View File
@@ -11,6 +11,7 @@
#include "xpcprivate.h"
#include "XPCWrapper.h"
#include "nsIAppsService.h"
#include "nsIInputStreamChannel.h"
#include "nsILoadContext.h"
#include "nsIServiceManager.h"
#include "nsIScriptObjectPrincipal.h"
@@ -326,6 +327,23 @@ nsScriptSecurityManager::AppStatusForPrincipal(nsIPrincipal *aPrin)
NS_IMETHODIMP
nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel,
nsIPrincipal** aPrincipal)
{
return GetChannelResultPrincipal(aChannel, aPrincipal,
/*aIgnoreSandboxing*/ false);
}
nsresult
nsScriptSecurityManager::GetChannelResultPrincipalIfNotSandboxed(nsIChannel* aChannel,
nsIPrincipal** aPrincipal)
{
return GetChannelResultPrincipal(aChannel, aPrincipal,
/*aIgnoreSandboxing*/ true);
}
nsresult
nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel,
nsIPrincipal** aPrincipal,
bool aIgnoreSandboxing)
{
NS_PRECONDITION(aChannel, "Must have channel!");
nsCOMPtr<nsISupports> owner;
@@ -341,7 +359,7 @@ nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel,
nsCOMPtr<nsILoadInfo> loadInfo;
aChannel->GetLoadInfo(getter_AddRefs(loadInfo));
if (loadInfo) {
if (loadInfo->GetLoadingSandboxed()) {
if (!aIgnoreSandboxing && loadInfo->GetLoadingSandboxed()) {
RefPtr<nsNullPrincipal> prin;
if (loadInfo->LoadingPrincipal()) {
prin =
@@ -357,7 +375,17 @@ nsScriptSecurityManager::GetChannelResultPrincipal(nsIChannel* aChannel,
return NS_OK;
}
if (loadInfo->GetForceInheritPrincipal()) {
bool forceInterit = loadInfo->GetForceInheritPrincipal();
if (aIgnoreSandboxing && !forceInterit) {
// Check if SEC_FORCE_INHERIT_PRINCIPAL was dropped because of
// sandboxing:
if (loadInfo->GetLoadingSandboxed() &&
(loadInfo->GetSecurityFlags() &
nsILoadInfo::SEC_FORCE_INHERIT_PRINCIPAL_WAS_DROPPED)) {
forceInterit = true;
}
}
if (forceInterit) {
NS_ADDREF(*aPrincipal = loadInfo->TriggeringPrincipal());
return NS_OK;
}
+4
View File
@@ -120,6 +120,10 @@ private:
// If aURI is a moz-extension:// URI, set mAddonId to the associated addon.
nsresult MaybeSetAddonIdFromURI(mozilla::OriginAttributes& aAttrs, nsIURI* aURI);
nsresult GetChannelResultPrincipal(nsIChannel* aChannel,
nsIPrincipal** aPrincipal,
bool aIgnoreSandboxing);
nsCOMPtr<nsIPrincipal> mSystemPrincipal;
bool mPrefInitialized;
bool mIsJavaScriptEnabled;
+2 -2
View File
@@ -9461,7 +9461,7 @@ nsDocShell::CopyFavicon(nsIURI* aOldURI,
#endif
}
class InternalLoadEvent : public nsRunnable
class InternalLoadEvent : public Runnable
{
public:
InternalLoadEvent(nsDocShell* aDocShell, nsIURI* aURI,
@@ -13565,7 +13565,7 @@ nsDocShell::SelectNone(void)
// link handling
class OnLinkClickEvent : public nsRunnable
class OnLinkClickEvent : public Runnable
{
public:
OnLinkClickEvent(nsDocShell* aHandler, nsIContent* aContent,
+1 -1
View File
@@ -757,7 +757,7 @@ protected:
public:
// Event type dispatched by RestorePresentation
class RestorePresentationEvent : public nsRunnable
class RestorePresentationEvent : public mozilla::Runnable
{
public:
NS_DECL_NSIRUNNABLE
+1 -1
View File
@@ -248,7 +248,7 @@ nsSHEntryShared::RemoveFromBFCacheSync()
return NS_OK;
}
class DestroyViewerEvent : public nsRunnable
class DestroyViewerEvent : public mozilla::Runnable
{
public:
DestroyViewerEvent(nsIContentViewer* aViewer, nsIDocument* aDocument)
+1 -1
View File
@@ -49,7 +49,7 @@ protected:
* This class runs in a different thread and it calls the 'exec()' method.
* The exec() must populate mFileList and mStatus then it must call RunShare();
*/
class ArchiveReaderEvent : public nsRunnable
class ArchiveReaderEvent : public Runnable
{
public:
NS_DECL_NSIRUNNABLE
+1 -1
View File
@@ -18,7 +18,7 @@ USING_ARCHIVEREADER_NAMESPACE
/**
* Class used to make asynchronous the ArchiveRequest.
*/
class ArchiveRequestEvent : public nsRunnable
class ArchiveRequestEvent : public Runnable
{
public:
NS_DECL_NSIRUNNABLE
+2 -2
View File
@@ -238,7 +238,7 @@ EvictEntries(nsIFile* aDirectory, const nsACString& aGroup,
// FileDescriptorHolder owns a file descriptor and its memory mapping.
// FileDescriptorHolder is derived by two runnable classes (that is,
// (Parent|Child)Runnable.
class FileDescriptorHolder : public nsRunnable
class FileDescriptorHolder : public Runnable
{
public:
FileDescriptorHolder()
@@ -330,7 +330,7 @@ protected:
};
class UnlockDirectoryRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<DirectoryLock> mDirectoryLock;
+3 -3
View File
@@ -43,7 +43,7 @@ namespace {
bool sAudioChannelMutedByDefault = false;
bool sXPCOMShuttingDown = false;
class NotifyChannelActiveRunnable final : public nsRunnable
class NotifyChannelActiveRunnable final : public Runnable
{
public:
NotifyChannelActiveRunnable(uint64_t aWindowID, AudioChannel aAudioChannel,
@@ -98,7 +98,7 @@ void
NotifyChannelActive(uint64_t aWindowID, AudioChannel aAudioChannel,
bool aActive)
{
RefPtr<nsRunnable> runnable =
RefPtr<Runnable> runnable =
new NotifyChannelActiveRunnable(aWindowID, aAudioChannel, aActive);
NS_DispatchToCurrentThread(runnable);
}
@@ -122,7 +122,7 @@ IsParentProcess()
return XRE_GetProcessType() == GeckoProcessType_Default;
}
class MediaPlaybackRunnable : public nsRunnable
class MediaPlaybackRunnable : public Runnable
{
public:
MediaPlaybackRunnable(nsIDOMWindow* aWindow, bool aActive)
+1 -1
View File
@@ -311,7 +311,7 @@ private:
JSContext* mCx;
};
class ConsoleRunnable : public nsRunnable
class ConsoleRunnable : public Runnable
, public WorkerFeature
, public StructuredCloneHolderBase
{
+2 -2
View File
@@ -296,7 +296,7 @@ DOMRequestService::FireDetailedError(nsIDOMDOMRequest* aRequest,
return NS_OK;
}
class FireSuccessAsyncTask : public nsRunnable
class FireSuccessAsyncTask : public mozilla::Runnable
{
FireSuccessAsyncTask(DOMRequest* aRequest,
@@ -333,7 +333,7 @@ private:
JS::PersistentRooted<JS::Value> mResult;
};
class FireErrorAsyncTask : public nsRunnable
class FireErrorAsyncTask : public mozilla::Runnable
{
public:
FireErrorAsyncTask(DOMRequest* aRequest,
+1 -1
View File
@@ -1366,7 +1366,7 @@ private:
EventStates mState;
};
class RemoveFromBindingManagerRunnable : public nsRunnable
class RemoveFromBindingManagerRunnable : public mozilla::Runnable
{
public:
RemoveFromBindingManagerRunnable(nsBindingManager* aManager,
+1 -1
View File
@@ -866,7 +866,7 @@ BlobImplFile::GetSize(ErrorResult& aRv)
namespace {
class GetTypeRunnable final : public nsRunnable
class GetTypeRunnable final : public Runnable
{
public:
GetTypeRunnable(WorkerPrivate* aWorkerPrivate,
+1 -1
View File
@@ -1237,7 +1237,7 @@ FragmentOrElement::FireNodeInserted(nsIDocument* aDoc,
#define SUBTREE_UNBINDINGS_PER_RUNNABLE 500
class ContentUnbinder : public nsRunnable
class ContentUnbinder : public Runnable
{
public:
ContentUnbinder()
+1 -1
View File
@@ -142,7 +142,7 @@ public:
virtual bool TextIsOnlyWhitespace() override;
virtual bool HasTextForTranslation() override;
virtual void AppendTextTo(nsAString& aResult) override;
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AppendTextTo(nsAString& aResult, const mozilla::fallible_t&) override;
virtual nsIContent *GetBindingParent() const override;
virtual nsXBLBinding *GetXBLBinding() const override;
+3 -3
View File
@@ -26,7 +26,7 @@ namespace dom {
// This class should be placed inside GetBRGADataSourceSurfaceSync(). However,
// due to B2G ICS uses old complier (C++98/03) which forbids local class as
// template parameter, we need to move this class outside.
class SurfaceHelper : public nsRunnable {
class SurfaceHelper : public Runnable {
public:
explicit SurfaceHelper(already_AddRefed<layers::Image> aImage) : mImage(aImage) {}
@@ -135,7 +135,7 @@ private:
bool mFailed;
};
class EncodingRunnable : public nsRunnable
class EncodingRunnable : public Runnable
{
virtual ~EncodingRunnable() {}
@@ -236,7 +236,7 @@ private:
bool mUsingCustomOptions;
};
NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, nsRunnable);
NS_IMPL_ISUPPORTS_INHERITED0(EncodingRunnable, Runnable);
StaticRefPtr<nsIThreadPool> ImageEncoder::sThreadPool;
+1 -1
View File
@@ -378,7 +378,7 @@ ImportLoader::RemoveLinkElement(nsINode* aNode)
// be set on the link element before the load event is fired even
// if ImportLoader::Get returns an already loaded import and we
// fire the load event immediately on the new referring link element.
class AsyncEvent : public nsRunnable {
class AsyncEvent : public Runnable {
public:
AsyncEvent(nsINode* aNode, bool aSuccess)
: mNode(aNode)
+1 -1
View File
@@ -25,7 +25,7 @@ namespace dom {
* Class used to represent events generated by calls to Window.postMessage,
* which asynchronously creates and dispatches events.
*/
class PostMessageEvent final : public nsRunnable
class PostMessageEvent final : public Runnable
, public StructuredCloneHolder
{
public:
+4 -4
View File
@@ -390,7 +390,7 @@ WebSocketImpl::PrintErrorOnConsole(const char *aBundleURI,
namespace {
class CancelWebSocketRunnable final : public nsRunnable
class CancelWebSocketRunnable final : public Runnable
{
public:
CancelWebSocketRunnable(nsIWebSocketChannel* aChannel, uint16_t aReasonCode,
@@ -438,7 +438,7 @@ private:
WebSocketImpl* mImpl;
};
class CloseConnectionRunnable final : public nsRunnable
class CloseConnectionRunnable final : public Runnable
{
public:
CloseConnectionRunnable(WebSocketImpl* aImpl,
@@ -467,9 +467,9 @@ WebSocketImpl::CloseConnection(uint16_t aReasonCode,
const nsACString& aReasonString)
{
if (!IsTargetThread()) {
RefPtr<nsRunnable> runnable =
nsCOMPtr<nsIRunnable> runnable =
new CloseConnectionRunnable(this, aReasonCode, aReasonString);
return Dispatch(runnable, NS_DISPATCH_NORMAL);
return Dispatch(runnable.forget(), NS_DISPATCH_NORMAL);
}
AssertIsOnTargetThread();
+5
View File
@@ -36,6 +36,11 @@ public:
virtual bool
delete_(JSContext* aCx, JS::Handle<JSObject*> aProxy, JS::Handle<jsid> aId,
JS::ObjectOpResult &aResult) const override;
// No need for getPrototypeIfOrdinary here: this object shouldn't have a
// lazy prototype, so this trap would never be called (and the inherited
// version, from BaseProxyHandler, just crashes).
virtual bool
preventExtensions(JSContext* aCx, JS::Handle<JSObject*> aProxy,
JS::ObjectOpResult& aResult) const override
+1 -1
View File
@@ -4719,7 +4719,7 @@ nsContentUtils::IsInSameAnonymousTree(const nsINode* aNode,
return nodeAsContent->GetBindingParent() == aContent->GetBindingParent();
}
class AnonymousContentDestroyer : public nsRunnable {
class AnonymousContentDestroyer : public Runnable {
public:
explicit AnonymousContentDestroyer(nsCOMPtr<nsIContent>* aContent) {
mContent.swap(*aContent);
+5 -5
View File
@@ -1375,7 +1375,7 @@ public:
* @param aResult the result. Out param.
* @return false on out of memory errors, true otherwise.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
static bool GetNodeTextContent(nsINode* aNode, bool aDeep,
nsAString& aResult, const mozilla::fallible_t&);
@@ -1747,7 +1747,7 @@ public:
*/
static bool CanAccessNativeAnon();
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
static nsresult WrapNative(JSContext *cx, nsISupports *native,
const nsIID* aIID, JS::MutableHandle<JS::Value> vp,
bool aAllowWrapping = true)
@@ -1756,7 +1756,7 @@ public:
}
// Same as the WrapNative above, but use this one if aIID is nsISupports' IID.
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
static nsresult WrapNative(JSContext *cx, nsISupports *native,
JS::MutableHandle<JS::Value> vp,
bool aAllowWrapping = true)
@@ -1764,7 +1764,7 @@ public:
return WrapNative(cx, native, nullptr, nullptr, vp, aAllowWrapping);
}
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
static nsresult WrapNative(JSContext *cx, nsISupports *native,
nsWrapperCache *cache,
JS::MutableHandle<JS::Value> vp,
@@ -1797,7 +1797,7 @@ public:
* @param aString the string to convert the newlines inside [in/out]
*/
static void PlatformToDOMLineBreaks(nsString &aString);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
static bool PlatformToDOMLineBreaks(nsString &aString,
const mozilla::fallible_t&);
+1 -1
View File
@@ -855,7 +855,7 @@ nsDOMMutationObserver::HandleMutation()
mCallback->Call(this, mutations, *this);
}
class AsyncMutationHandler : public nsRunnable
class AsyncMutationHandler : public mozilla::Runnable
{
public:
NS_IMETHOD Run()
@@ -14,7 +14,7 @@
#include "nsCOMPtr.h"
#include "nsIDocument.h"
class nsDocElementCreatedNotificationRunner : public nsRunnable
class nsDocElementCreatedNotificationRunner : public mozilla::Runnable
{
public:
explicit nsDocElementCreatedNotificationRunner(nsIDocument* aDoc)
+10 -10
View File
@@ -1358,7 +1358,7 @@ void nsIDocument::SelectorCache::CacheList(const nsAString& aSelector,
AddObject(key);
}
class nsIDocument::SelectorCacheKeyDeleter final : public nsRunnable
class nsIDocument::SelectorCacheKeyDeleter final : public Runnable
{
public:
explicit SelectorCacheKeyDeleter(SelectorCacheKey* aToDelete)
@@ -9115,7 +9115,7 @@ nsDocument::UnblockOnload(bool aFireSync)
}
}
class nsUnblockOnloadEvent : public nsRunnable {
class nsUnblockOnloadEvent : public Runnable {
public:
explicit nsUnblockOnloadEvent(nsDocument* aDoc) : mDoc(aDoc) {}
NS_IMETHOD Run() {
@@ -9973,7 +9973,7 @@ nsDocument::LoadChromeSheetSync(nsIURI* uri, bool isAgentSheet,
return CSSLoader()->LoadSheetSync(uri, mode, isAgentSheet, aSheet);
}
class nsDelayedEventDispatcher : public nsRunnable
class nsDelayedEventDispatcher : public Runnable
{
public:
explicit nsDelayedEventDispatcher(nsTArray<nsCOMPtr<nsIDocument>>& aDocuments)
@@ -11136,7 +11136,7 @@ nsIDocument::MozCancelFullScreen()
// run script. nsGlobalWindow::SetFullScreen() dispatches a synchronous event
// (handled in chome code) which is unsafe to run if this is called in
// Element::UnbindFromTree().
class nsSetWindowFullScreen : public nsRunnable {
class nsSetWindowFullScreen : public Runnable {
public:
nsSetWindowFullScreen(nsIDocument* aDoc, bool aValue, gfx::VRDeviceProxy* aHMD = nullptr)
: mDoc(aDoc), mValue(aValue), mHMD(aHMD) {}
@@ -11186,7 +11186,7 @@ SetWindowFullScreen(nsIDocument* aDoc, bool aValue, gfx::VRDeviceProxy *aVRHMD =
}
}
class nsCallExitFullscreen : public nsRunnable {
class nsCallExitFullscreen : public Runnable {
public:
explicit nsCallExitFullscreen(nsIDocument* aDoc)
: mDoc(aDoc) {}
@@ -11521,7 +11521,7 @@ FullScreenOptions::FullScreenOptions()
{
}
class nsCallRequestFullScreen : public nsRunnable
class nsCallRequestFullScreen : public Runnable
{
public:
explicit nsCallRequestFullScreen(Element* aElement, FullScreenOptions& aOptions)
@@ -12104,8 +12104,8 @@ nsDocument::IsFullScreenEnabled(bool aCallerIsChrome, bool aLogFailure)
if (nsContentUtils::IsFullScreenApiEnabled() && aCallerIsChrome) {
// Chrome code can always use the full-screen API, provided it's not
// explicitly disabled. Note IsCallerChrome() returns true when running
// in an nsRunnable, so don't use GetMozFullScreenEnabled() from an
// nsRunnable!
// in an Runnable, so don't use GetMozFullScreenEnabled() from an
// Runnable!
return true;
}
@@ -12199,7 +12199,7 @@ static const uint8_t kPointerLockRequestLimit = 2;
mozilla::StaticRefPtr<nsPointerLockPermissionRequest> gPendingPointerLockRequest;
class nsPointerLockPermissionRequest : public nsRunnable,
class nsPointerLockPermissionRequest : public Runnable,
public nsIContentPermissionRequest
{
public:
@@ -12276,7 +12276,7 @@ protected:
};
NS_IMPL_ISUPPORTS_INHERITED(nsPointerLockPermissionRequest,
nsRunnable,
Runnable,
nsIContentPermissionRequest)
NS_IMETHODIMP
+2 -2
View File
@@ -1971,7 +1971,7 @@ nsFocusManager::Focus(nsPIDOMWindow* aWindow,
mFirstFocusEvent = nullptr;
}
class FocusBlurEvent : public nsRunnable
class FocusBlurEvent : public Runnable
{
public:
FocusBlurEvent(nsISupports* aTarget, EventMessage aEventMessage,
@@ -3425,7 +3425,7 @@ nsFocusManager::GetFocusInSelection(nsPIDOMWindow* aWindow,
while (selectionNode && selectionNode != endSelectionNode);
}
class PointerUnlocker : public nsRunnable
class PointerUnlocker : public Runnable
{
public:
PointerUnlocker()
+2 -2
View File
@@ -1412,7 +1412,7 @@ nsFrameLoader::Destroy()
return NS_OK;
}
class nsFrameLoaderDestroyRunnable : public nsRunnable
class nsFrameLoaderDestroyRunnable : public Runnable
{
enum DestroyPhase
{
@@ -2528,7 +2528,7 @@ nsFrameLoader::DoLoadMessageManagerScript(const nsAString& aURL, bool aRunInGlob
}
class nsAsyncMessageToChild : public nsSameProcessAsyncMessageBase,
public nsRunnable
public Runnable
{
public:
nsAsyncMessageToChild(JSContext* aCx, JS::Handle<JSObject*> aCpows, nsFrameLoader* aFrameLoader)
+1 -1
View File
@@ -1890,7 +1890,7 @@ nsFrameMessageManager* nsFrameMessageManager::sParentProcessManager = nullptr;
nsFrameMessageManager* nsFrameMessageManager::sSameProcessParentManager = nullptr;
class nsAsyncMessageToSameProcessChild : public nsSameProcessAsyncMessageBase,
public nsRunnable
public Runnable
{
public:
nsAsyncMessageToSameProcessChild(JSContext* aCx, JS::Handle<JSObject*> aCpows)
+1 -1
View File
@@ -317,7 +317,7 @@ private:
/* A helper class for taking care of many details for async message sending
within a single process. Intended to be used like so:
class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public nsRunnable
class MyAsyncMessage : public nsSameProcessAsyncMessageBase, public Runnable
{
NS_IMETHOD Run() {
ReceiveMessage(..., ...);
+1 -1
View File
@@ -146,7 +146,7 @@ public:
virtual bool TextIsOnlyWhitespace() override;
virtual bool HasTextForTranslation() override;
virtual void AppendTextTo(nsAString& aResult) override;
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AppendTextTo(nsAString& aResult,
const mozilla::fallible_t&) override;
virtual void SaveSubtreeState() override;
+213 -9
View File
@@ -12,6 +12,7 @@
// Local Includes
#include "Navigator.h"
#include "nsContentSecurityManager.h"
#include "nsScreen.h"
#include "nsHistory.h"
#include "nsPerformance.h"
@@ -669,6 +670,12 @@ public:
virtual bool delete_(JSContext *cx, JS::Handle<JSObject*> proxy,
JS::Handle<jsid> id,
JS::ObjectOpResult &aResult) const override;
virtual bool getPrototypeIfOrdinary(JSContext* cx,
JS::Handle<JSObject*> proxy,
bool* isOrdinary,
JS::MutableHandle<JSObject*> protop) const override;
virtual bool enumerate(JSContext *cx, JS::Handle<JSObject*> proxy,
JS::MutableHandle<JSObject*> vp) const override;
virtual bool preventExtensions(JSContext* cx,
@@ -894,6 +901,27 @@ nsOuterWindowProxy::delete_(JSContext *cx, JS::Handle<JSObject*> proxy,
return js::Wrapper::delete_(cx, proxy, id, result);
}
bool
nsOuterWindowProxy::getPrototypeIfOrdinary(JSContext* cx,
JS::Handle<JSObject*> proxy,
bool* isOrdinary,
JS::MutableHandle<JSObject*> protop) const
{
// Window's [[GetPrototypeOf]] trap isn't the ordinary definition:
//
// https://html.spec.whatwg.org/multipage/browsers.html#windowproxy-getprototypeof
//
// We nonetheless can implement it here using a non-"lazy" [[Prototype]],
// because wrapper-class handlers (particularly, XOW in FilteringWrapper.cpp)
// supply all the non-ordinary behavior.
//
// But from a spec point of view, it's the exact same object in both cases --
// only the observer's changed. So both cases *must* report non-ordinary,
// even if non-"lazy" [[Prototype]] usually means ordinary.
*isOrdinary = false;
return true;
}
bool
nsOuterWindowProxy::preventExtensions(JSContext* cx,
JS::Handle<JSObject*> proxy,
@@ -1138,6 +1166,7 @@ nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
mInClose(false),
mHavePendingClose(false),
mHadOriginalOpener(false),
mOriginalOpenerWasSecureContext(false),
mIsPopupSpam(false),
mBlockScriptedClosingFlag(false),
mWasOffline(false),
@@ -2291,6 +2320,165 @@ InitializeLegacyNetscapeObject(JSContext* aCx, JS::Handle<JSObject*> aGlobal)
return JS_DefineFunctions(aCx, obj, EnablePrivilegeSpec);
}
/**
* Returns true if the "HTTPS state" of the document should be "modern". See:
*
* https://html.spec.whatwg.org/#concept-document-https-state
* https://fetch.spec.whatwg.org/#concept-response-https-state
*
* Note: this function only relates to figuring out HTTPS state, which is an
* input to the Secure Context algorithm. We are not actually implementing any
* part of the Secure Context algorithm itself here.
*
* This is a bit of a hack. Ideally we'd propagate HTTPS state through
* nsIChannel as described in the Fetch and HTML specs, but making channels
* know about whether they should inherit HTTPS state, propagating information
* about who the channel's "client" is, exposing GetHttpsState API on channels
* and modifying the various cache implementations to store and retrieve HTTPS
* state involves a huge amount of code (see bug 1220687). We avoid that for
* now using this function.
*
* This function takes advantage of the observation that we can return true if
* nsIContentSecurityManager::IsOriginPotentiallyTrustworthy returns true for
* the document's origin (e.g. the origin has a scheme of 'https' or host
* 'localhost' etc.). Since we generally propagate a creator document's origin
* onto data:, blob:, etc. documents, this works for them too.
*
* The scenario where this observation breaks down is sandboxing without the
* 'allow-same-origin' flag, since in this case a document is given a unique
* origin (IsOriginPotentiallyTrustworthy would return false). We handle that
* by using the origin that the document would have had had it not been
* sandboxed.
*
* DEFICIENCIES: Note that this function uses nsIScriptSecurityManager's
* getChannelResultPrincipalIfNotSandboxed, and that method's ignoring of
* sandboxing is limited to the immediate sandbox. In the case that aDocument
* should inherit its origin (e.g. data: URI) but its parent has ended up
* with a unique origin due to sandboxing further up the parent chain we may
* end up returning false when we would ideally return true (since we will
* examine the parent's origin for 'https' and not finding it.) This means
* that we may restrict the privileges of some pages unnecessarily in this
* edge case.
*/
static bool HttpsStateIsModern(nsIDocument* aDocument)
{
nsCOMPtr<nsIPrincipal> principal = aDocument->NodePrincipal();
// If aDocument is sandboxed, try and get the principal that it would have
// been given had it not been sandboxed:
if (principal->GetIsNullPrincipal() &&
(aDocument->GetSandboxFlags() & SANDBOXED_ORIGIN)) {
nsIChannel* channel = aDocument->GetChannel();
if (channel) {
nsCOMPtr<nsIScriptSecurityManager> ssm =
nsContentUtils::GetSecurityManager();
nsresult rv =
ssm->GetChannelResultPrincipalIfNotSandboxed(channel,
getter_AddRefs(principal));
if (NS_FAILED(rv)) {
return false;
}
}
}
if (principal->GetIsNullPrincipal()) {
return false;
}
MOZ_ASSERT(principal->GetIsCodebasePrincipal());
nsCOMPtr<nsIContentSecurityManager> csm =
do_GetService(NS_CONTENTSECURITYMANAGER_CONTRACTID);
NS_WARN_IF(!csm);
if (csm) {
bool isTrustworthyOrigin = false;
csm->IsOriginPotentiallyTrustworthy(principal, &isTrustworthyOrigin);
if (isTrustworthyOrigin) {
return true;
}
}
return false;
}
bool
nsGlobalWindow::ComputeIsSecureContext(nsIDocument* aDocument)
{
MOZ_ASSERT(IsOuterWindow());
nsCOMPtr<nsIPrincipal> principal = aDocument->NodePrincipal();
if (nsContentUtils::IsSystemPrincipal(principal)) {
return true;
}
// Implement https://w3c.github.io/webappsec-secure-contexts/#settings-object
bool hadNonSecureContextCreator = false;
nsPIDOMWindow* parentOuterWin = GetScriptableParent();
MOZ_ASSERT(parentOuterWin, "How can we get here? No docShell somehow?");
if (nsGlobalWindow::Cast(parentOuterWin) != this) {
// There may be a small chance that parentOuterWin has navigated in
// the time that it took us to start loading this sub-document. If that
// were the case then parentOuterWin->GetCurrentInnerWindow() wouldn't
// return the window for the document that is embedding us. For this
// reason we only use the GetScriptableParent call above to check that we
// have a same-type parent, but actually get the inner window via the
// document that we know is embedding us.
nsIDocument* creatorDoc = aDocument->GetParentDocument();
if (!creatorDoc) {
return false; // we must be tearing down
}
nsGlobalWindow* parentWin =
nsGlobalWindow::Cast(creatorDoc->GetInnerWindow());
if (!parentWin) {
return false; // we must be tearing down
}
MOZ_ASSERT(parentWin ==
nsGlobalWindow::Cast(parentOuterWin->GetCurrentInnerWindow()),
"Creator window mismatch while setting Secure Context state");
hadNonSecureContextCreator = !parentWin->IsSecureContext();
} else if (mHadOriginalOpener) {
hadNonSecureContextCreator = !mOriginalOpenerWasSecureContext;
}
if (hadNonSecureContextCreator) {
return false;
}
if (HttpsStateIsModern(aDocument)) {
return true;
}
if (principal->GetIsNullPrincipal()) {
nsCOMPtr<nsIURI> uri = aDocument->GetOriginalURI();
// IsOriginPotentiallyTrustworthy doesn't care about origin attributes so
// it doesn't actually matter what we use here, but reusing the document
// principal's attributes is convenient.
const OriginAttributes& attrs =
BasePrincipal::Cast(principal)->OriginAttributesRef();
// CreateCodebasePrincipal correctly gets a useful principal for blob: and
// other URI_INHERITS_SECURITY_CONTEXT URIs.
principal = BasePrincipal::CreateCodebasePrincipal(uri, attrs);
if (NS_WARN_IF(!principal)) {
return false;
}
}
nsCOMPtr<nsIContentSecurityManager> csm =
do_GetService(NS_CONTENTSECURITYMANAGER_CONTRACTID);
NS_WARN_IF(!csm);
if (csm) {
bool isTrustworthyOrigin = false;
csm->IsOriginPotentiallyTrustworthy(principal, &isTrustworthyOrigin);
if (isTrustworthyOrigin) {
return true;
}
}
return false;
}
/**
* Create a new global object that will be used for an inner window.
* Return the native global and an nsISupports 'holder' that can be used
@@ -2301,7 +2489,8 @@ CreateNativeGlobalForInner(JSContext* aCx,
nsGlobalWindow* aNewInner,
nsIURI* aURI,
nsIPrincipal* aPrincipal,
JS::MutableHandle<JSObject*> aGlobal)
JS::MutableHandle<JSObject*> aGlobal,
bool aIsSecureContext)
{
MOZ_ASSERT(aCx);
MOZ_ASSERT(aNewInner);
@@ -2331,6 +2520,8 @@ CreateNativeGlobalForInner(JSContext* aCx,
options.creationOptions().setSameZoneAs(top->GetGlobalJSObject());
}
options.creationOptions().setSecureContext(aIsSecureContext);
xpc::InitGlobalObjectOptions(options, aPrincipal);
// Determine if we need the Components object.
@@ -2559,7 +2750,8 @@ nsGlobalWindow::SetNewDocument(nsIDocument* aDocument,
rv = CreateNativeGlobalForInner(cx, newInnerWindow,
aDocument->GetDocumentURI(),
aDocument->NodePrincipal(),
&newInnerGlobal);
&newInnerGlobal,
ComputeIsSecureContext(aDocument));
NS_ASSERTION(NS_SUCCEEDED(rv) && newInnerGlobal &&
newInnerWindow->GetWrapperPreserveColor() == newInnerGlobal,
"Failed to get script global");
@@ -3007,7 +3199,11 @@ nsGlobalWindow::SetOpenerWindow(nsPIDOMWindow* aOpener,
NS_ASSERTION(mOpener || !aOpener, "Opener must support weak references!");
if (aOriginalOpener) {
MOZ_ASSERT(!mHadOriginalOpener,
"Probably too late to call ComputeIsSecureContext again");
mHadOriginalOpener = true;
mOriginalOpenerWasSecureContext =
nsGlobalWindow::Cast(aOpener->GetCurrentInnerWindow())->IsSecureContext();
}
#ifdef DEBUG
@@ -8580,7 +8776,7 @@ nsGlobalWindow::PostMessageMoz(JS::Handle<JS::Value> aMessage,
return rv.StealNSResult();
}
class nsCloseEvent : public nsRunnable {
class nsCloseEvent : public Runnable {
RefPtr<nsGlobalWindow> mWindow;
bool mIndirect;
@@ -8959,7 +9155,7 @@ nsGlobalWindow::RunPendingTimeoutsRecursive(nsGlobalWindow *aTopWindow,
}
}
class nsPendingTimeoutRunner : public nsRunnable
class nsPendingTimeoutRunner : public Runnable
{
public:
explicit nsPendingTimeoutRunner(nsGlobalWindow* aWindow)
@@ -9059,7 +9255,7 @@ struct BrowserCompartmentMatcher : public js::CompartmentFilter {
};
class WindowDestroyedEvent : public nsRunnable
class WindowDestroyedEvent : public Runnable
{
public:
WindowDestroyedEvent(nsPIDOMWindow* aWindow, uint64_t aID,
@@ -9542,7 +9738,7 @@ nsGlobalWindow::ShowModalDialog(const nsAString& aURI, nsIVariant *aArgs_,
return rv.StealNSResult();
}
class ChildCommandDispatcher : public nsRunnable
class ChildCommandDispatcher : public Runnable
{
public:
ChildCommandDispatcher(nsGlobalWindow* aWindow,
@@ -9572,7 +9768,7 @@ private:
nsString mAction;
};
class CommandDispatcher : public nsRunnable
class CommandDispatcher : public Runnable
{
public:
CommandDispatcher(nsIDOMXULCommandDispatcher* aDispatcher,
@@ -10416,7 +10612,7 @@ nsGlobalWindow::PageHidden()
mNeedsFocus = true;
}
class HashchangeCallback : public nsRunnable
class HashchangeCallback : public Runnable
{
public:
HashchangeCallback(const nsAString &aOldURL,
@@ -11085,7 +11281,7 @@ nsGlobalWindow::FireOfflineStatusEventIfChanged()
nsContentUtils::DispatchTrustedEvent(mDoc, eventTarget, name, true, false);
}
class NotifyIdleObserverRunnable : public nsRunnable
class NotifyIdleObserverRunnable : public Runnable
{
public:
NotifyIdleObserverRunnable(nsIIdleObserver* aIdleObserver,
@@ -14494,6 +14690,14 @@ nsGlobalWindow::GetConsole(ErrorResult& aRv)
return mConsole;
}
bool
nsGlobalWindow::IsSecureContext() const
{
MOZ_RELEASE_ASSERT(IsInnerWindow());
return JS_GetIsSecureContext(js::GetObjectCompartment(GetWrapperPreserveColor()));
}
already_AddRefed<External>
nsGlobalWindow::GetExternal(ErrorResult& aRv)
{
+8
View File
@@ -885,6 +885,9 @@ public:
mozilla::dom::Console* GetConsole(mozilla::ErrorResult& aRv);
// https://w3c.github.io/webappsec-secure-contexts/#dom-window-issecurecontext
bool IsSecureContext() const;
void GetSidebar(mozilla::dom::OwningExternalOrWindowProxy& aResult,
mozilla::ErrorResult& aRv);
already_AddRefed<mozilla::dom::External> GetExternal(mozilla::ErrorResult& aRv);
@@ -1613,6 +1616,10 @@ private:
void DisconnectEventTargetObjects();
// Called only on outer windows to compute the value that will be returned by
// IsSecureContext() for the inner window that corresponds to aDocument.
bool ComputeIsSecureContext(nsIDocument* aDocument);
protected:
// This member is also used on both inner and outer windows, but
// for slightly different purposes. On inner windows it means the
@@ -1633,6 +1640,7 @@ protected:
// event posted. If this is set, just ignore window.close() calls.
bool mHavePendingClose : 1;
bool mHadOriginalOpener : 1;
bool mOriginalOpenerWasSecureContext : 1;
bool mIsPopupSpam : 1;
// Indicates whether scripts are allowed to close this window.
+2 -2
View File
@@ -37,7 +37,7 @@ class nsHTMLContentSerializer final : public nsXHTMLContentSerializer {
nsAString& aStr) override;
protected:
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool SerializeHTMLAttributes(nsIContent* aContent,
nsIContent *aOriginalElement,
nsAString& aTagPrefix,
@@ -46,7 +46,7 @@ class nsHTMLContentSerializer final : public nsXHTMLContentSerializer {
int32_t aNamespace,
nsAString& aStr);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AppendAndTranslateEntities(const nsAString& aStr,
nsAString& aOutputStr) override;
+1 -1
View File
@@ -558,7 +558,7 @@ public:
* Append the text content to aResult.
* NOTE: This asserts and returns for elements
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AppendTextTo(nsAString& aResult, const mozilla::fallible_t&) = 0;
/**
+1 -1
View File
@@ -39,7 +39,7 @@ nsIGlobalObject::UnregisterHostObjectURI(const nsACString& aURI)
namespace {
class UnlinkHostObjectURIsRunnable final : public nsRunnable
class UnlinkHostObjectURIsRunnable final : public mozilla::Runnable
{
public:
explicit UnlinkHostObjectURIsRunnable(nsTArray<nsCString>& aURIs)
+1 -1
View File
@@ -306,7 +306,7 @@ nsInProcessTabChildGlobal::InitTabChildGlobal()
return NS_OK;
}
class nsAsyncScriptLoad : public nsRunnable
class nsAsyncScriptLoad : public Runnable
{
public:
nsAsyncScriptLoad(nsInProcessTabChildGlobal* aTabChild, const nsAString& aURL,
+2 -2
View File
@@ -419,7 +419,7 @@ NS_HandleScriptError(nsIScriptGlobalObject *aScriptGlobal,
return called;
}
class ScriptErrorEvent : public nsRunnable
class ScriptErrorEvent : public Runnable
{
public:
ScriptErrorEvent(nsPIDOMWindow* aWindow,
@@ -2180,7 +2180,7 @@ nsJSContext::KillICCTimer()
}
}
class NotifyGCEndRunnable : public nsRunnable
class NotifyGCEndRunnable : public Runnable
{
nsString mMessage;
+1 -1
View File
@@ -189,7 +189,7 @@ nsScriptNameSpaceManager* GetNameSpaceManager();
nsScriptNameSpaceManager* PeekNameSpaceManager();
// Runnable that's used to do async error reporting
class AsyncErrorReporter final : public nsRunnable
class AsyncErrorReporter final : public mozilla::Runnable
{
public:
// aWindow may be null if this error report is not associated with a window
+7 -7
View File
@@ -140,7 +140,7 @@ InActiveDocument(nsIContent *aContent)
/// Runnables and helper classes
///
class nsAsyncInstantiateEvent : public nsRunnable {
class nsAsyncInstantiateEvent : public Runnable {
public:
explicit nsAsyncInstantiateEvent(nsObjectLoadingContent* aContent)
: mContent(aContent) {}
@@ -173,7 +173,7 @@ nsAsyncInstantiateEvent::Run()
// (outside an active document) or stopped (in a document but unrendered). This
// is used to allow scripts to move a plugin around the document hierarchy
// without re-instantiating it.
class CheckPluginStopEvent : public nsRunnable {
class CheckPluginStopEvent : public Runnable {
public:
explicit CheckPluginStopEvent(nsObjectLoadingContent* aContent)
: mContent(aContent) {}
@@ -248,7 +248,7 @@ CheckPluginStopEvent::Run()
/**
* Helper task for firing simple events
*/
class nsSimplePluginEvent : public nsRunnable {
class nsSimplePluginEvent : public Runnable {
public:
nsSimplePluginEvent(nsIContent* aTarget, const nsAString &aEvent)
: mTarget(aTarget)
@@ -301,7 +301,7 @@ nsSimplePluginEvent::Run()
/**
* A task for firing PluginCrashed DOM Events.
*/
class nsPluginCrashedEvent : public nsRunnable {
class nsPluginCrashedEvent : public Runnable {
public:
nsCOMPtr<nsIContent> mContent;
nsString mPluginDumpID;
@@ -360,7 +360,7 @@ nsPluginCrashedEvent::Run()
return NS_OK;
}
class nsStopPluginRunnable : public nsRunnable, public nsITimerCallback
class nsStopPluginRunnable : public Runnable, public nsITimerCallback
{
public:
NS_DECL_ISUPPORTS_INHERITED
@@ -374,7 +374,7 @@ public:
NS_ASSERTION(aContent, "need a nsObjectLoadingContent");
}
// nsRunnable
// Runnable
NS_IMETHOD Run() override;
// nsITimerCallback
@@ -389,7 +389,7 @@ private:
nsCOMPtr<nsIObjectLoadingContent> mContent;
};
NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, nsRunnable, nsITimerCallback)
NS_IMPL_ISUPPORTS_INHERITED(nsStopPluginRunnable, Runnable, nsITimerCallback)
NS_IMETHODIMP
nsStopPluginRunnable::Notify(nsITimer *aTimer)
+1 -1
View File
@@ -215,7 +215,7 @@ nsReferencedElement::Observe(Element* aOldElement,
}
NS_IMPL_ISUPPORTS_INHERITED0(nsReferencedElement::ChangeNotification,
nsRunnable)
mozilla::Runnable)
NS_IMPL_ISUPPORTS(nsReferencedElement::DocumentLoadNotification,
nsIObserver)
+1 -1
View File
@@ -123,7 +123,7 @@ private:
nsReferencedElement* mTarget;
};
class ChangeNotification : public nsRunnable,
class ChangeNotification : public mozilla::Runnable,
public Notification
{
public:
+3 -3
View File
@@ -373,7 +373,7 @@ nsScriptLoader::PreloadURIComparator::Equals(const PreloadInfo &aPi,
same;
}
class nsScriptRequestProcessor : public nsRunnable
class nsScriptRequestProcessor : public Runnable
{
private:
RefPtr<nsScriptLoader> mLoader;
@@ -748,7 +748,7 @@ nsScriptLoader::ProcessScriptElement(nsIScriptElement *aElement)
namespace {
class NotifyOffThreadScriptLoadCompletedRunnable : public nsRunnable
class NotifyOffThreadScriptLoadCompletedRunnable : public Runnable
{
RefPtr<nsScriptLoadRequest> mRequest;
RefPtr<nsScriptLoader> mLoader;
@@ -1581,7 +1581,7 @@ nsScriptLoader::PrepareLoadedRequest(nsScriptLoadRequest* aRequest,
if (!aString.empty()) {
aRequest->mScriptTextLength = aString.length();
aRequest->mScriptTextBuf = aString.extractRawBuffer();
aRequest->mScriptTextBuf = aString.extractOrCopyRawBuffer();
}
// This assertion could fire errorously if we ran out of memory when
+2 -2
View File
@@ -179,14 +179,14 @@ public:
insertBack(aElem);
}
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
already_AddRefed<nsScriptLoadRequest> Steal(nsScriptLoadRequest* aElem)
{
aElem->removeFrom(*this);
return dont_AddRef(aElem);
}
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
already_AddRefed<nsScriptLoadRequest> StealFirst()
{
MOZ_ASSERT(!isEmpty());
+2 -2
View File
@@ -137,7 +137,7 @@ public:
* Append the contents of this string fragment to aString
* @return false if an out of memory condition is detected, true otherwise
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendTo(nsAString& aString,
const mozilla::fallible_t& aFallible) const {
if (mState.mIs2b) {
@@ -171,7 +171,7 @@ public:
* @param aLength the length of the substring
* @return false if an out of memory condition is detected, true otherwise
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendTo(nsAString& aString, int32_t aOffset, int32_t aLength,
const mozilla::fallible_t& aFallible) const
{
+4 -4
View File
@@ -47,7 +47,7 @@ class nsXHTMLContentSerializer : public nsXMLContentSerializer {
nsAString& aStr,
nsresult& aResult) override;
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AfterElementStart(nsIContent* aContent,
nsIContent* aOriginalElement,
nsAString& aStr) override;
@@ -70,7 +70,7 @@ class nsXHTMLContentSerializer : public nsXMLContentSerializer {
virtual void MaybeEnterInPreContent(nsIContent* aNode) override;
virtual void MaybeLeaveFromPreContent(nsIContent* aNode) override;
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool SerializeAttributes(nsIContent* aContent,
nsIContent *aOriginalElement,
nsAString& aTagPrefix,
@@ -82,13 +82,13 @@ class nsXHTMLContentSerializer : public nsXMLContentSerializer {
bool IsFirstChildOfOL(nsIContent* aElement);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool SerializeLIValueAttribute(nsIContent* aElement,
nsAString& aStr);
bool IsShorthandAttr(const nsIAtom* aAttrName,
const nsIAtom* aElementName);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AppendAndTranslateEntities(const nsAString& aStr,
nsAString& aOutputStr) override;
+17 -17
View File
@@ -72,14 +72,14 @@ class nsXMLContentSerializer : public nsIContentSerializer {
/**
* Appends a char16_t character and increments the column position
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendToString(const char16_t aChar,
nsAString& aOutputStr);
/**
* Appends a nsAString string and increments the column position
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendToString(const nsAString& aStr,
nsAString& aOutputStr);
@@ -88,7 +88,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* by mLineBreak, except in the case of raw output.
* It increments the column position.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendToStringConvertLF(const nsAString& aStr,
nsAString& aOutputStr);
@@ -96,7 +96,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* Appends a string by wrapping it when necessary.
* It updates the column position.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendToStringWrapped(const nsASingleFragmentString& aStr,
nsAString& aOutputStr);
@@ -104,12 +104,12 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* Appends a string by formating and wrapping it when necessary
* It updates the column position.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendToStringFormatedWrapped(const nsASingleFragmentString& aStr,
nsAString& aOutputStr);
// used by AppendToStringWrapped
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendWrapped_WhitespaceSequence(
nsASingleFragmentString::const_char_iterator &aPos,
const nsASingleFragmentString::const_char_iterator aEnd,
@@ -117,7 +117,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
nsAString &aOutputStr);
// used by AppendToStringFormatedWrapped
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendFormatedWrapped_WhitespaceSequence(
nsASingleFragmentString::const_char_iterator &aPos,
const nsASingleFragmentString::const_char_iterator aEnd,
@@ -126,7 +126,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
nsAString &aOutputStr);
// used by AppendToStringWrapped and AppendToStringFormatedWrapped
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendWrapped_NonWhitespaceSequence(
nsASingleFragmentString::const_char_iterator &aPos,
const nsASingleFragmentString::const_char_iterator aEnd,
@@ -139,7 +139,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* add mLineBreak to the string
* It updates the column position and other flags.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendNewLineToString(nsAString& aOutputStr);
@@ -147,7 +147,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* Appends a string by translating entities
* It doesn't increment the column position
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AppendAndTranslateEntities(const nsAString& aStr,
nsAString& aOutputStr);
@@ -197,7 +197,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
nsIContent *aOriginalElement,
const nsAString& aTagNamespaceURI);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool SerializeAttributes(nsIContent* aContent,
nsIContent *aOriginalElement,
nsAString& aTagPrefix,
@@ -207,7 +207,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
uint32_t aSkipAttr,
bool aAddNSAttr);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool SerializeAttr(const nsAString& aPrefix,
const nsAString& aName,
const nsAString& aValue,
@@ -239,7 +239,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* aElement and aOriginalElement are the same as the corresponding arguments
* to AppendElementStart.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendEndOfElementStart(mozilla::dom::Element* aEleemnt,
mozilla::dom::Element* aOriginalElement,
nsAString& aStr);
@@ -249,7 +249,7 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* after the serialization ot the start tag.
* (called at the end of AppendElementStart)
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
virtual bool AfterElementStart(nsIContent* aContent,
nsIContent* aOriginalElement,
nsAString& aStr) { return true; };
@@ -298,16 +298,16 @@ class nsXMLContentSerializer : public nsIContentSerializer {
* add intendation. Call only in the case of formating and if the current
* position is at 0. It updates the column position.
*/
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool AppendIndentation(nsAString& aStr);
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool IncrIndentation(nsIAtom* aName);
void DecrIndentation(nsIAtom* aName);
// Functions to check for newlines that needs to be added between nodes in
// the root of a document. See mAddNewlineForRootNode
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
bool MaybeAddNewlineForRootNode(nsAString& aStr);
void MaybeFlagNewlineForRootNode(nsINode* aNode);
+3 -4
View File
@@ -153,7 +153,7 @@ using namespace mozilla::dom;
NS_IMPL_ISUPPORTS(nsXHRParseEndListener, nsIDOMEventListener)
class nsResumeTimeoutsEvent : public nsRunnable
class nsResumeTimeoutsEvent : public Runnable
{
public:
explicit nsResumeTimeoutsEvent(nsPIDOMWindow* aWindow) : mWindow(aWindow) {}
@@ -2573,15 +2573,14 @@ nsXMLHttpRequest::Send(nsIVariant* aVariant, const Nullable<RequestBody>& aBody)
// Return error if we're already processing a request
if (XML_HTTP_REQUEST_SENT & mState) {
return NS_ERROR_FAILURE;
return NS_ERROR_DOM_INVALID_STATE_ERR;
}
// Make sure we've been opened
if (!mChannel || !(XML_HTTP_REQUEST_OPENED & mState)) {
return NS_ERROR_NOT_INITIALIZED;
return NS_ERROR_DOM_INVALID_STATE_ERR;
}
// nsIRequest::LOAD_BACKGROUND prevents throbber from becoming active, which
// in turn keeps STOP button from becoming active. If the consumer passed in
// a progress event handler we must load with nsIRequest::LOAD_NORMAL or
+1 -1
View File
@@ -104,7 +104,7 @@ public:
}
}
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
DataType* AddEntry(const nsAString& aKey)
{
EntryType* ent = this->PutEntry(aKey, fallible);
+23 -23
View File
@@ -25,7 +25,7 @@ class Promise;
// JSContext.
// Accept strings.
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const nsAString& aArgument,
JS::MutableHandle<JS::Value> aValue);
@@ -36,7 +36,7 @@ ToJSValue(JSContext* aCx,
// desirable. So make this a template that only gets used if the argument type
// is actually boolean
template<typename T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<IsSame<T, bool>::value, bool>::Type
ToJSValue(JSContext* aCx,
T aArgument,
@@ -124,7 +124,7 @@ ToJSValue(JSContext* aCx,
}
// Accept CallbackObjects
MOZ_WARN_UNUSED_RESULT inline bool
MOZ_MUST_USE inline bool
ToJSValue(JSContext* aCx,
CallbackObject& aArgument,
JS::MutableHandle<JS::Value> aValue)
@@ -140,7 +140,7 @@ ToJSValue(JSContext* aCx,
// Accept objects that inherit from nsWrapperCache (e.g. most
// DOM objects).
template <class T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<IsBaseOf<nsWrapperCache, T>::value, bool>::Type
ToJSValue(JSContext* aCx,
T& aArgument,
@@ -156,7 +156,7 @@ ToJSValue(JSContext* aCx,
// Accept typed arrays built from appropriate nsTArray values
template<typename T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<IsBaseOf<AllTypedArraysBase, T>::value, bool>::Type
ToJSValue(JSContext* aCx,
const TypedArrayCreator<T>& aArgument,
@@ -176,7 +176,7 @@ ToJSValue(JSContext* aCx,
// Accept objects that inherit from nsISupports but not nsWrapperCache (e.g.
// DOM File).
template <class T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<!IsBaseOf<nsWrapperCache, T>::value &&
!IsBaseOf<CallbackObject, T>::value &&
IsBaseOf<nsISupports, T>::value, bool>::Type
@@ -194,7 +194,7 @@ ToJSValue(JSContext* aCx,
// Accept nsRefPtr/nsCOMPtr
template <typename T>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const nsCOMPtr<T>& aArgument,
JS::MutableHandle<JS::Value> aValue)
@@ -203,7 +203,7 @@ ToJSValue(JSContext* aCx,
}
template <typename T>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const RefPtr<T>& aArgument,
JS::MutableHandle<JS::Value> aValue)
@@ -212,7 +212,7 @@ ToJSValue(JSContext* aCx,
}
template <typename T>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const NonNull<T>& aArgument,
JS::MutableHandle<JS::Value> aValue)
@@ -222,7 +222,7 @@ ToJSValue(JSContext* aCx,
// Accept WebIDL dictionaries
template <class T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<IsBaseOf<DictionaryBase, T>::value, bool>::Type
ToJSValue(JSContext* aCx,
const T& aArgument,
@@ -232,7 +232,7 @@ ToJSValue(JSContext* aCx,
}
// Accept existing JS values (which may not be same-compartment with us
MOZ_WARN_UNUSED_RESULT inline bool
MOZ_MUST_USE inline bool
ToJSValue(JSContext* aCx, JS::Handle<JS::Value> aArgument,
JS::MutableHandle<JS::Value> aValue)
{
@@ -241,7 +241,7 @@ ToJSValue(JSContext* aCx, JS::Handle<JS::Value> aArgument,
}
// Accept existing JS values on the Heap (which may not be same-compartment with us
MOZ_WARN_UNUSED_RESULT inline bool
MOZ_MUST_USE inline bool
ToJSValue(JSContext* aCx, const JS::Heap<JS::Value>& aArgument,
JS::MutableHandle<JS::Value> aValue)
{
@@ -250,7 +250,7 @@ ToJSValue(JSContext* aCx, const JS::Heap<JS::Value>& aArgument,
}
// Accept existing rooted JS values (which may not be same-compartment with us
MOZ_WARN_UNUSED_RESULT inline bool
MOZ_MUST_USE inline bool
ToJSValue(JSContext* aCx, const JS::Rooted<JS::Value>& aArgument,
JS::MutableHandle<JS::Value> aValue)
{
@@ -260,7 +260,7 @@ ToJSValue(JSContext* aCx, const JS::Rooted<JS::Value>& aArgument,
// Accept existing rooted JS objects (which may not be same-compartment with
// us).
MOZ_WARN_UNUSED_RESULT inline bool
MOZ_MUST_USE inline bool
ToJSValue(JSContext* aCx, const JS::Rooted<JSObject*>& aArgument,
JS::MutableHandle<JS::Value> aValue)
{
@@ -270,7 +270,7 @@ ToJSValue(JSContext* aCx, const JS::Rooted<JSObject*>& aArgument,
// Accept nsresult, for use in rejections, and create an XPCOM
// exception object representing that nsresult.
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
nsresult aArgument,
JS::MutableHandle<JS::Value> aValue);
@@ -278,14 +278,14 @@ ToJSValue(JSContext* aCx,
// Accept ErrorResult, for use in rejections, and create an exception
// representing the failure. Note, the ErrorResult must indicate a failure
// with aArgument.Failure() returning true.
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
ErrorResult& aArgument,
JS::MutableHandle<JS::Value> aValue);
// Accept owning WebIDL unions.
template <typename T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<IsBaseOf<AllOwningUnionBase, T>::value, bool>::Type
ToJSValue(JSContext* aCx,
const T& aArgument,
@@ -297,7 +297,7 @@ ToJSValue(JSContext* aCx,
// Accept pointers to other things we accept
template <typename T>
MOZ_WARN_UNUSED_RESULT
MOZ_MUST_USE
typename EnableIf<IsPointer<T>::value, bool>::Type
ToJSValue(JSContext* aCx,
T aArgument,
@@ -308,7 +308,7 @@ ToJSValue(JSContext* aCx,
#ifdef SPIDERMONKEY_PROMISE
// Accept Promise objects, which need special handling.
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
Promise& aArgument,
JS::MutableHandle<JS::Value> aValue);
@@ -316,7 +316,7 @@ ToJSValue(JSContext* aCx,
// Accept arrays of other things we accept
template <typename T>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
T* aArguments,
size_t aLength,
@@ -343,7 +343,7 @@ ToJSValue(JSContext* aCx,
}
template <typename T>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const nsTArray<T>& aArgument,
JS::MutableHandle<JS::Value> aValue)
@@ -353,7 +353,7 @@ ToJSValue(JSContext* aCx,
}
template <typename T>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const FallibleTArray<T>& aArgument,
JS::MutableHandle<JS::Value> aValue)
@@ -363,7 +363,7 @@ ToJSValue(JSContext* aCx,
}
template <typename T, int N>
MOZ_WARN_UNUSED_RESULT bool
MOZ_MUST_USE bool
ToJSValue(JSContext* aCx,
const T(&aArgument)[N],
JS::MutableHandle<JS::Value> aValue)
@@ -171,7 +171,7 @@ BrowserElementAudioChannel::Name() const
namespace {
class BaseRunnable : public nsRunnable
class BaseRunnable : public Runnable
{
protected:
nsCOMPtr<nsPIDOMWindow> mParentWindow;
+2 -2
View File
@@ -436,7 +436,7 @@ private:
MaybeDestroyInstance();
}
class AbortRunnable final : public nsRunnable
class AbortRunnable final : public Runnable
{
public:
explicit AbortRunnable(const nsACString& aOrigin)
@@ -456,7 +456,7 @@ private:
const nsCString mOrigin;
};
class ShutdownAllRunnable final : public nsRunnable
class ShutdownAllRunnable final : public Runnable
{
public:
NS_IMETHOD
+1 -1
View File
@@ -22,7 +22,7 @@ namespace cache {
class ManagerId;
class PrincipalVerifier final : public nsRunnable
class PrincipalVerifier final : public Runnable
{
public:
// An interface to be implemented by code wishing to use the
+2 -2
View File
@@ -26,7 +26,7 @@ CameraControlImpl::CameraControlImpl()
DOM_CAMERA_LOGT("%s:%d : this=%p\n", __func__, __LINE__, this);
mCurrentConfiguration.mMode = ICameraControl::kUnspecifiedMode;
class Delegate : public nsRunnable
class Delegate : public Runnable
{
public:
NS_IMETHOD
@@ -329,7 +329,7 @@ CameraControlImpl::OnSystemError(CameraControlListener::SystemContext aContext,
// Camera control asynchronous message; these are dispatched from
// the Main Thread to the Camera Thread, where they are consumed.
class CameraControlImpl::ControlMessage : public nsRunnable
class CameraControlImpl::ControlMessage : public Runnable
{
public:
ControlMessage(CameraControlImpl* aCameraControl,
+1 -1
View File
@@ -22,7 +22,7 @@ namespace dom {
* CameraClosedListenerProxy and CameraClosedMessage
*/
template<class T>
class CameraClosedMessage : public nsRunnable
class CameraClosedMessage : public Runnable
{
public:
explicit CameraClosedMessage(nsMainThreadPtrHandle<T> aListener)
+1 -1
View File
@@ -30,7 +30,7 @@ DOMCameraControlListener::~DOMCameraControlListener()
}
// Boilerplate callback runnable
class DOMCameraControlListener::DOMCallback : public nsRunnable
class DOMCameraControlListener::DOMCallback : public Runnable
{
public:
explicit DOMCallback(nsMainThreadPtrHandle<nsISupports> aDOMCameraControl)
+5 -5
View File
@@ -968,7 +968,7 @@ nsGonkCameraControl::GetCameraHw()
nsresult
nsGonkCameraControl::SetThumbnailSize(const Size& aSize)
{
class SetThumbnailSize : public nsRunnable
class SetThumbnailSize : public Runnable
{
public:
SetThumbnailSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
@@ -1086,7 +1086,7 @@ nsGonkCameraControl::RationalizeRotation(int32_t aRotation)
nsresult
nsGonkCameraControl::SetPictureSize(const Size& aSize)
{
class SetPictureSize : public nsRunnable
class SetPictureSize : public Runnable
{
public:
SetPictureSize(nsGonkCameraControl* aCameraControl, const Size& aSize)
@@ -1288,7 +1288,7 @@ nsGonkCameraControl::StartRecordingImpl(DeviceStorageFileDescriptor* aFileDescri
nsresult
nsGonkCameraControl::StopRecordingImpl()
{
class RecordingComplete : public nsRunnable
class RecordingComplete : public Runnable
{
public:
RecordingComplete(already_AddRefed<DeviceStorageFile> aFile)
@@ -1472,7 +1472,7 @@ nsGonkCameraControl::OnAutoFocusMoving(bool aIsMoving)
void
nsGonkCameraControl::OnAutoFocusComplete(bool aSuccess, bool aExpired)
{
class AutoFocusComplete : public nsRunnable
class AutoFocusComplete : public Runnable
{
public:
AutoFocusComplete(nsGonkCameraControl* aCameraControl, bool aSuccess, bool aExpired)
@@ -2247,7 +2247,7 @@ nsGonkCameraControl::OnRateLimitPreview(bool aLimit)
void
nsGonkCameraControl::CreatePoster(Image* aImage, uint32_t aWidth, uint32_t aHeight, int32_t aRotation)
{
class PosterRunnable : public nsRunnable {
class PosterRunnable : public Runnable {
public:
PosterRunnable(nsGonkCameraControl* aTarget, Image* aImage,
uint32_t aWidth, uint32_t aHeight, int32_t aRotation)
+2 -2
View File
@@ -851,7 +851,7 @@ private:
RefPtr<ImageBitmap> mImageBitmap;
};
class FulfillImageBitmapPromiseTask final : public nsRunnable,
class FulfillImageBitmapPromiseTask final : public Runnable,
public FulfillImageBitmapPromise
{
public:
@@ -1041,7 +1041,7 @@ protected:
Maybe<IntRect> mCropRect;
};
class CreateImageBitmapFromBlobTask final : public nsRunnable,
class CreateImageBitmapFromBlobTask final : public Runnable,
public CreateImageBitmapFromBlob
{
public:
+1 -1
View File
@@ -23,7 +23,7 @@ class WebGLQuery final
public:
explicit WebGLQuery(WebGLContext* webgl);
class AvailableRunnable final : public nsRunnable
class AvailableRunnable final : public Runnable
{
public:
explicit AvailableRunnable(WebGLQuery* query) : mQuery(query) { }
@@ -41,7 +41,8 @@ private:
NS_DECL_OWNINGTHREAD
DeviceStorageParams mParams;
class CancelableRunnable : public nsRunnable
// XXXkhuey name collision :(
class CancelableRunnable : public Runnable
{
public:
explicit CancelableRunnable(DeviceStorageRequestParent* aParent)
+1 -1
View File
@@ -487,7 +487,7 @@ DeviceStorageTypeChecker::IsSharedMediaRoot(const nsAString& aType)
#endif
}
class IOEventComplete : public nsRunnable
class IOEventComplete : public Runnable
{
public:
IOEventComplete(DeviceStorageFile *aFile, const char *aType)
+2 -2
View File
@@ -101,7 +101,7 @@ public:
~DeviceStorageUsedSpaceCache();
class InvalidateRunnable final : public nsRunnable
class InvalidateRunnable final : public mozilla::Runnable
{
public:
InvalidateRunnable(DeviceStorageUsedSpaceCache* aCache,
@@ -305,7 +305,7 @@ private:
};
class DeviceStorageRequest
: public nsRunnable
: public mozilla::Runnable
{
protected:
DeviceStorageRequest();
+1 -1
View File
@@ -195,7 +195,7 @@ private:
* Helper classes to notify IME.
*/
class AChangeEvent: public nsRunnable
class AChangeEvent: public Runnable
{
protected:
enum ChangeEventType
+1 -1
View File
@@ -890,7 +890,7 @@ IMEStateManager::GetNewIMEState(nsPresContext* aPresContext,
}
// Helper class, used for IME enabled state change notification
class IMEEnabledStateChangedEvent : public nsRunnable {
class IMEEnabledStateChangedEvent : public Runnable {
public:
explicit IMEEnabledStateChangedEvent(uint32_t aState)
: mState(aState)
+1 -1
View File
@@ -380,7 +380,7 @@ private:
* CompositionEventDispatcher dispatches the specified composition (or text)
* event.
*/
class CompositionEventDispatcher : public nsRunnable
class CompositionEventDispatcher : public Runnable
{
public:
CompositionEventDispatcher(TextComposition* aTextComposition,
+2 -2
View File
@@ -106,7 +106,7 @@ private:
~MainThreadFetchResolver();
};
class MainThreadFetchRunnable : public nsRunnable
class MainThreadFetchRunnable : public Runnable
{
RefPtr<WorkerFetchResolver> mResolver;
RefPtr<InternalRequest> mRequest;
@@ -696,7 +696,7 @@ NS_INTERFACE_MAP_BEGIN(ConsumeBodyDoneObserver<Derived>)
NS_INTERFACE_MAP_END
template <class Derived>
class BeginConsumeBodyRunnable final : public nsRunnable
class BeginConsumeBodyRunnable final : public Runnable
{
FetchBody<Derived>* mFetchBody;
public:
+2 -2
View File
@@ -61,7 +61,7 @@ const uint32_t kStreamCopyBlockSize = 32768;
} // namespace
class FileHandleThreadPool::FileHandleQueue final
: public nsRunnable
: public Runnable
{
friend class FileHandleThreadPool;
@@ -570,7 +570,7 @@ protected:
};
class CopyFileHandleOp::ProgressRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<CopyFileHandleOp> mCopyFileHandleOp;
uint64_t mProgress;
+1 -1
View File
@@ -207,7 +207,7 @@ private:
// This class is the 'alter ego' of FileSystemTaskChildBase in the PBackground
// world.
class FileSystemTaskParentBase : public nsRunnable
class FileSystemTaskParentBase : public Runnable
{
public:
/*
+3 -3
View File
@@ -223,7 +223,7 @@ public:
NS_IMPL_ISUPPORTS(GeolocationSettingsCallback, nsISettingsServiceCallback)
class RequestPromptEvent : public nsRunnable
class RequestPromptEvent : public Runnable
{
public:
RequestPromptEvent(nsGeolocationRequest* aRequest, nsWeakPtr aWindow)
@@ -244,7 +244,7 @@ private:
nsWeakPtr mWindow;
};
class RequestAllowEvent : public nsRunnable
class RequestAllowEvent : public Runnable
{
public:
RequestAllowEvent(int allow, nsGeolocationRequest* request)
@@ -267,7 +267,7 @@ private:
RefPtr<nsGeolocationRequest> mRequest;
};
class RequestSendLocationEvent : public nsRunnable
class RequestSendLocationEvent : public Runnable
{
public:
RequestSendLocationEvent(nsIDOMGeoPosition* aPosition,
+1 -1
View File
@@ -436,7 +436,7 @@ protected:
class RemoveElementRunnable;
friend class RemoveElementRunnable;
class RemoveElementRunnable : public nsRunnable {
class RemoveElementRunnable : public Runnable {
public:
explicit RemoveElementRunnable(HTMLFormElement* aForm)
: mForm(aForm)
+1 -1
View File
@@ -77,7 +77,7 @@ namespace dom {
// Calls LoadSelectedImage on host element unless it has been superseded or
// canceled -- this is the synchronous section of "update the image data".
// https://html.spec.whatwg.org/multipage/embedded-content.html#update-the-image-data
class ImageLoadTask : public nsRunnable
class ImageLoadTask : public Runnable
{
public:
ImageLoadTask(HTMLImageElement *aElement, bool aAlwaysLoad)
+1 -1
View File
@@ -206,7 +206,7 @@ static const double THRESHOLD_LOW_PLAYBACKRATE_AUDIO = 0.5;
// receive events. If we neglect to remove the self-reference then the element
// just lives longer than it needs to.
class nsMediaEvent : public nsRunnable
class nsMediaEvent : public Runnable
{
public:
+1 -1
View File
@@ -122,7 +122,7 @@ static nsIWidget* GetWidget(Element* aElement)
Element* HTMLObjectElement::sLastFocused = nullptr; // Weak
class PluginFocusSetter : public nsRunnable
class PluginFocusSetter : public Runnable
{
public:
PluginFocusSetter(nsIWidget* aWidget, Element* aElement)
+1 -1
View File
@@ -118,7 +118,7 @@ using namespace mozilla::dom;
* nsGenericHTMLFormElement is binded to the tree with the autofocus attribute
* enabled.
*/
class nsAutoFocusEvent : public nsRunnable
class nsAutoFocusEvent : public Runnable
{
public:
explicit nsAutoFocusEvent(nsGenericHTMLFormElement* aElement) : mElement(aElement) {}
+1 -1
View File
@@ -2525,7 +2525,7 @@ nsHTMLDocument::EndUpdate(nsUpdateType aUpdateType)
// Helper class, used below in ChangeContentEditableCount().
class DeferredContentEditableCountChangeEvent : public nsRunnable
class DeferredContentEditableCountChangeEvent : public Runnable
{
public:
DeferredContentEditableCountChangeEvent(nsHTMLDocument *aDoc,
+2 -2
View File
@@ -83,7 +83,7 @@ private:
bool mOuterTransaction;
};
class RestoreSelectionState : public nsRunnable {
class RestoreSelectionState : public Runnable {
public:
RestoreSelectionState(nsTextEditorState *aState, nsTextControlFrame *aFrame)
: mFrame(aFrame),
@@ -1088,7 +1088,7 @@ nsTextEditorState::GetSelectionController() const
}
// Helper class, used below in BindToFrame().
class PrepareEditorEvent : public nsRunnable {
class PrepareEditorEvent : public Runnable {
public:
PrepareEditorEvent(nsTextEditorState &aState,
nsIContent *aOwnerContent,
+1 -2
View File
@@ -155,8 +155,7 @@ public:
// Whether the value change should be notified to the frame/contet nor not.
eSetValue_Notify = 1 << 2
};
MOZ_WARN_UNUSED_RESULT bool SetValue(const nsAString& aValue,
uint32_t aFlags);
MOZ_MUST_USE bool SetValue(const nsAString& aValue, uint32_t aFlags);
void GetValue(nsAString& aValue, bool aIgnoreWrap) const;
void EmptyValue() { if (mValue) mValue->Truncate(); }
bool IsEmpty() const { return mValue ? mValue->IsEmpty() : true; }
+1 -1
View File
@@ -898,7 +898,7 @@ protected:
Recv__delete__(const uint32_t& aPermission) override;
};
class WorkerPermissionChallenge final : public nsRunnable
class WorkerPermissionChallenge final : public Runnable
, public WorkerFeature
{
public:
+13 -14
View File
@@ -5374,7 +5374,7 @@ private:
};
class ConnectionPool::ConnectionRunnable
: public nsRunnable
: public Runnable
{
protected:
DatabaseInfo* mDatabaseInfo;
@@ -5522,7 +5522,7 @@ protected:
};
class ConnectionPool::FinishCallbackWrapper final
: public nsRunnable
: public Runnable
{
RefPtr<ConnectionPool> mConnectionPool;
RefPtr<FinishCallback> mCallback;
@@ -5615,7 +5615,7 @@ public:
};
class ConnectionPool::ThreadRunnable final
: public nsRunnable
: public Runnable
{
// Only touched on the background thread.
static uint32_t sNextSerialNumber;
@@ -5698,7 +5698,7 @@ private:
******************************************************************************/
class DatabaseOperationBase
: public nsRunnable
: public Runnable
, public mozIStorageProgressHandler
{
friend class UpgradeFileIdsFunction;
@@ -6083,7 +6083,7 @@ private:
};
class WaitForTransactionsHelper final
: public nsRunnable
: public Runnable
{
nsCOMPtr<nsIEventTarget> mOwningThread;
const nsCString mDatabaseId;
@@ -6135,7 +6135,7 @@ private:
};
class UnlockDirectoryRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<DirectoryLock> mDirectoryLock;
@@ -9074,7 +9074,7 @@ struct QuotaClient::MultipleMaintenanceInfo final
};
class QuotaClient::ShutdownWorkThreadsRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<QuotaClient> mQuotaClient;
@@ -11705,7 +11705,7 @@ ConnectionPool::ScheduleTransaction(TransactionInfo* aTransactionInfo,
// We need a thread right now so force all idle processing to stop by
// posting a dummy runnable to each thread that might be doing idle
// maintenance.
nsCOMPtr<nsIRunnable> runnable = new nsRunnable();
nsCOMPtr<nsIRunnable> runnable = new Runnable();
for (uint32_t index = mDatabasesPerformingIdleMaintenance.Length();
index > 0;
@@ -12340,7 +12340,7 @@ FinishCallbackWrapper::~FinishCallbackWrapper()
MOZ_ASSERT(!mCallback);
}
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::FinishCallbackWrapper, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::FinishCallbackWrapper, Runnable)
nsresult
ConnectionPool::
@@ -12400,7 +12400,7 @@ ThreadRunnable::~ThreadRunnable()
MOZ_ASSERT(!mContinueRunning);
}
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::ThreadRunnable, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(ConnectionPool::ThreadRunnable, Runnable)
nsresult
ConnectionPool::
@@ -13107,8 +13107,7 @@ WaitForTransactionsHelper::CallCallback()
mState = State::Complete;
}
NS_IMPL_ISUPPORTS_INHERITED0(WaitForTransactionsHelper,
nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(WaitForTransactionsHelper, Runnable)
NS_IMETHODIMP
WaitForTransactionsHelper::Run()
@@ -18127,7 +18126,7 @@ AutoProgressHandler::OnProgress(mozIStorageConnection* aConnection,
}
NS_IMPL_ISUPPORTS_INHERITED0(QuotaClient::ShutdownWorkThreadsRunnable,
nsRunnable)
Runnable)
NS_IMETHODIMP
QuotaClient::
@@ -19153,7 +19152,7 @@ DatabaseOperationBase::ObjectStoreHasIndexes(DatabaseConnection* aConnection,
}
NS_IMPL_ISUPPORTS_INHERITED(DatabaseOperationBase,
nsRunnable,
Runnable,
mozIStorageProgressHandler)
NS_IMETHODIMP
+2 -2
View File
@@ -50,7 +50,7 @@ private:
};
class CleanupFileRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<FileManager> mFileManager;
int64_t mFileId;
@@ -243,7 +243,7 @@ CleanupFileRunnable::DoCleanup(FileManager* aFileManager, int64_t aFileId)
}
}
NS_IMPL_ISUPPORTS_INHERITED0(CleanupFileRunnable, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(CleanupFileRunnable, Runnable)
NS_IMETHODIMP
CleanupFileRunnable::Run()
+2 -2
View File
@@ -99,7 +99,7 @@ private:
};
class StreamWrapper::CloseRunnable final
: public nsRunnable
: public Runnable
{
friend class StreamWrapper;
@@ -283,7 +283,7 @@ StreamWrapper::Deserialize(const InputStreamParams& aParams,
}
NS_IMPL_ISUPPORTS_INHERITED0(StreamWrapper::CloseRunnable,
nsRunnable)
Runnable)
NS_IMETHODIMP
StreamWrapper::
+1 -1
View File
@@ -16,7 +16,7 @@
namespace {
class ScriptErrorRunnable final : public nsRunnable
class ScriptErrorRunnable final : public mozilla::Runnable
{
nsString mMessage;
nsCString mMessageName;
+1 -1
View File
@@ -16,7 +16,7 @@ namespace mozilla {
namespace dom {
namespace {
class InputPortServiceNotifyRunnable final : public nsRunnable
class InputPortServiceNotifyRunnable final : public Runnable
{
public:
InputPortServiceNotifyRunnable(
@@ -5,6 +5,7 @@
#include "nsISupports.idl"
interface nsIChannel;
interface nsIPrincipal;
interface nsIStreamListener;
interface nsIURI;
@@ -13,7 +14,7 @@ interface nsIURI;
* Describes an XPCOM component used to perform security checks.
*/
[scriptable, uuid(ec955006-747d-4151-aeec-70bd0edc3341)]
[scriptable, uuid(3a9a1818-2ae8-4ec5-a340-8b29d31fca3b)]
interface nsIContentSecurityManager : nsISupports
{
/**
@@ -45,10 +46,11 @@ interface nsIContentSecurityManager : nsISupports
* Implementation of
* https://w3c.github.io/webappsec-secure-contexts/#is-origin-trustworthy
*
* This method should only be used when the context of the URI isn't available
* since isSecureContext is preferred as it handles parent contexts.
* The value returned by this method feeds into the the Secure Context
* algorithm that determins the value of Window.isSecureContext and
* WorkerGlobalScope.isSecureContext.
*
* This method returns false instead of throwing upon errors.
*/
boolean isURIPotentiallyTrustworthy(in nsIURI aURI);
boolean isOriginPotentiallyTrustworthy(in nsIPrincipal aPrincipal);
};
+4 -4
View File
@@ -1456,7 +1456,7 @@ private:
// dispatch itself to the thread pool again in order to close the file input
// stream.
class BlobParent::OpenStreamRunnable final
: public nsRunnable
: public Runnable
{
friend class nsRevocableEventPtr<OpenStreamRunnable>;
@@ -1685,7 +1685,7 @@ private:
}
};
NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, nsRunnable)
NS_IMPL_ISUPPORTS_INHERITED0(BlobParent::OpenStreamRunnable, Runnable)
/*******************************************************************************
* BlobChild::RemoteBlobImpl Declaration
@@ -1824,7 +1824,7 @@ protected:
};
class BlobChild::RemoteBlobImpl::CreateStreamHelper final
: public nsRunnable
: public Runnable
{
Monitor mMonitor;
RefPtr<RemoteBlobImpl> mRemoteBlobImpl;
@@ -2428,7 +2428,7 @@ CreateStreamHelper::RunInternal(RemoteBlobImpl* aBaseRemoteBlobImpl,
}
NS_IMPL_ISUPPORTS_INHERITED0(BlobChild::RemoteBlobImpl::CreateStreamHelper,
nsRunnable)
Runnable)
NS_IMETHODIMP
BlobChild::RemoteBlobImpl::
+1 -1
View File
@@ -1991,7 +1991,7 @@ namespace {
// This runnable only exists to delegate ownership of the
// ContentParent to this runnable, until it's deleted by the event
// system.
struct DelayedDeleteContentParentTask : public nsRunnable
struct DelayedDeleteContentParentTask : public Runnable
{
explicit DelayedDeleteContentParentTask(ContentParent* aObj) : mObj(aObj) { }
+1 -1
View File
@@ -168,7 +168,7 @@ CrashReporterParent::FinalizeChildData()
}
nsCOMPtr<nsIThread> mainThread = do_GetMainThread();
class NotifyOnMainThread : public nsRunnable
class NotifyOnMainThread : public Runnable
{
public:
explicit NotifyOnMainThread(CrashReporterParent* aCR)
+1 -1
View File
@@ -76,7 +76,7 @@ class FilePickerParent : public PFilePickerParent
bool CreateFilePicker();
// This runnable is used to do some I/O operation on a separate thread.
class IORunnable : public nsRunnable
class IORunnable : public Runnable
{
FilePickerParent* mFilePickerParent;
nsTArray<nsCOMPtr<nsIFile>> mFiles;
+2 -2
View File
@@ -556,7 +556,7 @@ HangMonitorParent::Open(Transport* aTransport, ProcessId aPid,
MOZ_ASSERT(ok);
}
class HangObserverNotifier final : public nsRunnable
class HangObserverNotifier final : public Runnable
{
public:
HangObserverNotifier(HangMonitoredProcess* aProcess,
@@ -637,7 +637,7 @@ HangMonitorParent::RecvHangEvidence(const HangData& aHangData)
return true;
}
class ClearHangNotifier final : public nsRunnable
class ClearHangNotifier final : public Runnable
{
public:
explicit ClearHangNotifier(HangMonitoredProcess* aProcess)
+2 -2
View File
@@ -337,7 +337,7 @@ public:
}
};
class TabChild::CachedFileDescriptorCallbackRunnable : public nsRunnable
class TabChild::CachedFileDescriptorCallbackRunnable : public Runnable
{
typedef TabChild::CachedFileDescriptorInfo CachedFileDescriptorInfo;
@@ -373,7 +373,7 @@ private:
};
class TabChild::DelayedDeleteRunnable final
: public nsRunnable
: public Runnable
{
RefPtr<TabChild> mTabChild;
+2 -2
View File
@@ -109,7 +109,7 @@ using namespace mozilla::jsipc;
// from the ones registered by webProgressListeners.
#define NOTIFY_FLAG_SHIFT 16
class OpenFileAndSendFDRunnable : public nsRunnable
class OpenFileAndSendFDRunnable : public mozilla::Runnable
{
const nsString mPath;
RefPtr<TabParent> mTabParent;
@@ -2810,7 +2810,7 @@ TabParent::NavigateByKey(bool aForward, bool aForDocumentNavigation)
}
class LayerTreeUpdateRunnable final
: public nsRunnable
: public mozilla::Runnable
{
uint64_t mLayersId;
bool mActive;
+2 -2
View File
@@ -59,11 +59,11 @@ public:
virtual bool IsForApp() const = 0;
virtual bool IsForBrowser() const = 0;
MOZ_WARN_UNUSED_RESULT virtual PBlobParent*
MOZ_MUST_USE virtual PBlobParent*
SendPBlobConstructor(PBlobParent* aActor,
const BlobConstructorParams& aParams) = 0;
MOZ_WARN_UNUSED_RESULT virtual PBrowserParent*
MOZ_MUST_USE virtual PBrowserParent*
SendPBrowserConstructor(PBrowserParent* actor,
const TabId& aTabId,
const IPCTabContext& context,
+1 -1
View File
@@ -51,7 +51,7 @@ namespace mozilla {
// changes listed in mBlockChanges to file. Read() checks mBlockChanges and
// determines the current data to return, reading from file or from
// mBlockChanges as necessary.
class FileBlockCache : public nsRunnable {
class FileBlockCache : public Runnable {
public:
enum {
BLOCK_SIZE = MediaCacheStream::BLOCK_SIZE
+2 -2
View File
@@ -164,7 +164,7 @@ ThreadedDriver::~ThreadedDriver()
mThread->Shutdown();
}
}
class MediaStreamGraphInitThreadRunnable : public nsRunnable {
class MediaStreamGraphInitThreadRunnable : public Runnable {
public:
explicit MediaStreamGraphInitThreadRunnable(ThreadedDriver* aDriver)
: mDriver(aDriver)
@@ -406,7 +406,7 @@ OfflineClockDriver::OfflineClockDriver(MediaStreamGraphImpl* aGraphImpl, GraphTi
}
class MediaStreamGraphShutdownThreadRunnable : public nsRunnable {
class MediaStreamGraphShutdownThreadRunnable : public Runnable {
public:
explicit MediaStreamGraphShutdownThreadRunnable(nsIThread* aThread)
: mThread(aThread)
+1 -1
View File
@@ -528,7 +528,7 @@ private:
bool mMicrophoneActive;
};
class AsyncCubebTask : public nsRunnable
class AsyncCubebTask : public Runnable
{
public:

Some files were not shown because too many files have changed in this diff Show More