--- a/accessible/base/nsAccessibilityService.cpp
+++ b/accessible/base/nsAccessibilityService.cpp
@@ -477,17 +477,17 @@ class PluginTimerCallBack final : public
{
~PluginTimerCallBack() {}
public:
explicit PluginTimerCallBack(nsIContent* aContent) : mContent(aContent) {}
NS_DECL_ISUPPORTS
- NS_IMETHOD Notify(nsITimer* aTimer) final
+ NS_IMETHOD Notify(nsITimer* aTimer) final override
{
if (!mContent->IsInUncomposedDoc())
return NS_OK;
nsIPresShell* ps = mContent->OwnerDoc()->GetShell();
if (ps) {
DocAccessible* doc = ps->GetDocAccessible();
if (doc) {
@@ -501,17 +501,17 @@ public:
// We couldn't get a doc accessible so presumably the document went away.
// In this case don't leak our ref to the content or timer.
sPendingPlugins->RemoveElement(mContent);
sPluginTimers->RemoveElement(aTimer);
return NS_OK;
}
- NS_IMETHOD GetName(nsACString& aName) final
+ NS_IMETHOD GetName(nsACString& aName) final override
{
aName.AssignLiteral("PluginTimerCallBack");
return NS_OK;
}
private:
nsCOMPtr<nsIContent> mContent;
};
--- a/build/clang-plugin/tests/TestNeedsNoVTableType.cpp
+++ b/build/clang-plugin/tests/TestNeedsNoVTableType.cpp
@@ -31,17 +31,17 @@ struct B : virtual A {};
struct C : A {};
struct D {
void d();
};
struct E {
virtual void e();
};
struct F : E {
- virtual void e() final;
+ virtual void e() final override;
};
struct G {
virtual void e() = 0;
};
void f() {
{
PickyConsumer<A> a1;
--- a/caps/BasePrincipal.h
+++ b/caps/BasePrincipal.h
@@ -55,41 +55,41 @@ public:
{
MOZ_ASSERT(Is<T>());
return static_cast<T*>(this);
}
enum DocumentDomainConsideration { DontConsiderDocumentDomain, ConsiderDocumentDomain};
bool Subsumes(nsIPrincipal* aOther, DocumentDomainConsideration aConsideration);
- NS_IMETHOD GetOrigin(nsACString& aOrigin) final;
- NS_IMETHOD GetOriginNoSuffix(nsACString& aOrigin) final;
- NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) final;
- NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) final;
- NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) final;
- NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) final;
- NS_IMETHOD SubsumesConsideringDomainIgnoringFPD(nsIPrincipal* other, bool* _retval) final;
- NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) final;
- NS_IMETHOD GetAddonPolicy(nsISupports** aResult) final;
+ NS_IMETHOD GetOrigin(nsACString& aOrigin) final override;
+ NS_IMETHOD GetOriginNoSuffix(nsACString& aOrigin) final override;
+ NS_IMETHOD Equals(nsIPrincipal* other, bool* _retval) final override;
+ NS_IMETHOD EqualsConsideringDomain(nsIPrincipal* other, bool* _retval) final override;
+ NS_IMETHOD Subsumes(nsIPrincipal* other, bool* _retval) final override;
+ NS_IMETHOD SubsumesConsideringDomain(nsIPrincipal* other, bool* _retval) final override;
+ NS_IMETHOD SubsumesConsideringDomainIgnoringFPD(nsIPrincipal* other, bool* _retval) final override;
+ NS_IMETHOD CheckMayLoad(nsIURI* uri, bool report, bool allowIfInheritsPrincipal) final override;
+ NS_IMETHOD GetAddonPolicy(nsISupports** aResult) final override;
NS_IMETHOD GetCsp(nsIContentSecurityPolicy** aCsp) override;
NS_IMETHOD SetCsp(nsIContentSecurityPolicy* aCsp) override;
NS_IMETHOD EnsureCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD GetPreloadCsp(nsIContentSecurityPolicy** aPreloadCSP) override;
NS_IMETHOD EnsurePreloadCSP(nsIDOMDocument* aDocument, nsIContentSecurityPolicy** aCSP) override;
NS_IMETHOD GetCspJSON(nsAString& outCSPinJSON) override;
NS_IMETHOD GetIsNullPrincipal(bool* aResult) override;
NS_IMETHOD GetIsCodebasePrincipal(bool* aResult) override;
NS_IMETHOD GetIsExpandedPrincipal(bool* aResult) override;
NS_IMETHOD GetIsSystemPrincipal(bool* aResult) override;
- NS_IMETHOD GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) final;
- NS_IMETHOD GetOriginSuffix(nsACString& aOriginSuffix) final;
- NS_IMETHOD GetAppId(uint32_t* aAppId) final;
- NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) final;
- NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final;
- NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final;
+ NS_IMETHOD GetOriginAttributes(JSContext* aCx, JS::MutableHandle<JS::Value> aVal) final override;
+ NS_IMETHOD GetOriginSuffix(nsACString& aOriginSuffix) final override;
+ NS_IMETHOD GetAppId(uint32_t* aAppId) final override;
+ NS_IMETHOD GetIsInIsolatedMozBrowserElement(bool* aIsInIsolatedMozBrowserElement) final override;
+ NS_IMETHOD GetUserContextId(uint32_t* aUserContextId) final override;
+ NS_IMETHOD GetPrivateBrowsingId(uint32_t* aPrivateBrowsingId) final override;
virtual bool AddonHasPermission(const nsAtom* aPerm);
virtual bool IsCodebasePrincipal() const { return false; };
static BasePrincipal* Cast(nsIPrincipal* aPrin) { return static_cast<BasePrincipal*>(aPrin); }
static already_AddRefed<BasePrincipal>
@@ -97,17 +97,17 @@ public:
// These following method may not create a codebase principal in case it's
// not possible to generate a correct origin from the passed URI. If this
// happens, a NullPrincipal is returned.
static already_AddRefed<BasePrincipal>
CreateCodebasePrincipal(nsIURI* aURI, const OriginAttributes& aAttrs);
- const OriginAttributes& OriginAttributesRef() final { return mOriginAttributes; }
+ const OriginAttributes& OriginAttributesRef() final override { return mOriginAttributes; }
uint32_t AppId() const { return mOriginAttributes.mAppId; }
extensions::WebExtensionPolicy* AddonPolicy();
uint32_t UserContextId() const { return mOriginAttributes.mUserContextId; }
uint32_t PrivateBrowsingId() const { return mOriginAttributes.mPrivateBrowsingId; }
bool IsInIsolatedMozBrowserElement() const { return mOriginAttributes.mInIsolatedMozBrowser; }
PrincipalKind Kind() const { return mKind; }
--- a/caps/nsJSPrincipals.h
+++ b/caps/nsJSPrincipals.h
@@ -20,17 +20,17 @@ public:
static bool ReadPrincipals(JSContext* aCx, JSStructuredCloneReader* aReader,
JSPrincipals** aOutPrincipals);
static bool ReadKnownPrincipalType(JSContext* aCx,
JSStructuredCloneReader* aReader,
uint32_t aTag,
JSPrincipals** aOutPrincipals);
- bool write(JSContext* aCx, JSStructuredCloneWriter* aWriter) final;
+ bool write(JSContext* aCx, JSStructuredCloneWriter* aWriter) final override;
/*
* Get a weak reference to nsIPrincipal associated with the given JS
* principal, and vice-versa.
*/
static nsJSPrincipals* get(JSPrincipals *principals) {
nsJSPrincipals *self = static_cast<nsJSPrincipals *>(principals);
MOZ_ASSERT_IF(self, self->debugToken == DEBUG_TOKEN);
--- a/devtools/shared/heapsnapshot/DeserializedNode.h
+++ b/devtools/shared/heapsnapshot/DeserializedNode.h
@@ -247,23 +247,23 @@ protected:
return *static_cast<DeserializedNode*>(ptr);
}
public:
static void construct(void* storage, DeserializedNode* ptr) {
new (storage) Concrete(ptr);
}
- CoarseType coarseType() const final { return get().coarseType; }
+ CoarseType coarseType() const final override { return get().coarseType; }
Id identifier() const override { return get().id; }
bool isLive() const override { return false; }
const char16_t* typeName() const override;
Node::Size size(mozilla::MallocSizeOf mallocSizeof) const override;
const char* jsObjectClassName() const override { return get().jsObjectClassName; }
- const char* scriptFilename() const final { return get().scriptFilename; }
+ const char* scriptFilename() const final override { return get().scriptFilename; }
bool hasAllocationStack() const override { return get().allocationStack.isSome(); }
StackFrame allocationStack() const override;
// We ignore the `bool wantNames` parameter because we can't control whether
// the core dump was serialized with edge names or not.
js::UniquePtr<EdgeRange> edges(JSContext* cx, bool) const override;
--- a/devtools/shared/heapsnapshot/HeapSnapshot.cpp
+++ b/devtools/shared/heapsnapshot/HeapSnapshot.cpp
@@ -1250,17 +1250,17 @@ public:
bool init() {
return framesAlreadySerialized.init() &&
twoByteStringsAlreadySerialized.init() &&
oneByteStringsAlreadySerialized.init();
}
~StreamWriter() override { }
- virtual bool writeMetadata(uint64_t timestamp) final {
+ virtual bool writeMetadata(uint64_t timestamp) final override {
protobuf::Metadata metadata;
metadata.set_timestamp(timestamp);
return writeMessage(metadata);
}
virtual bool writeNode(const JS::ubi::Node& ubiNode,
EdgePolicy includeEdges) override final {
// NB: de-duplicated string properties must be written in the same order
--- a/docshell/base/nsDocShellEnumerator.h
+++ b/docshell/base/nsDocShellEnumerator.h
@@ -83,25 +83,25 @@ class nsDocShellForwardsEnumerator : pub
public:
nsDocShellForwardsEnumerator()
: nsDocShellEnumerator(enumerateForwards)
{
}
protected:
virtual nsresult BuildArrayRecursive(nsIDocShellTreeItem* aItem,
- nsTArray<nsWeakPtr>& aItemArray);
+ nsTArray<nsWeakPtr>& aItemArray) override;
};
class nsDocShellBackwardsEnumerator : public nsDocShellEnumerator
{
public:
nsDocShellBackwardsEnumerator()
: nsDocShellEnumerator(enumerateBackwards)
{
}
protected:
virtual nsresult BuildArrayRecursive(nsIDocShellTreeItem* aItem,
- nsTArray<nsWeakPtr>& aItemArray);
+ nsTArray<nsWeakPtr>& aItemArray) override;
};
#endif // nsDocShellEnumerator_h___
--- a/docshell/shistory/nsSHistory.h
+++ b/docshell/shistory/nsSHistory.h
@@ -44,17 +44,17 @@ public:
nsIEventTarget* aEventTarget)
: nsExpirationTracker(1000 * aTimeout / 2, "HistoryTracker", aEventTarget)
{
MOZ_ASSERT(aSHistory);
mSHistory = aSHistory;
}
protected:
- virtual void NotifyExpired(nsSHEntryShared* aObj)
+ virtual void NotifyExpired(nsSHEntryShared* aObj) override
{
RemoveObject(aObj);
mSHistory->EvictExpiredContentViewerForEntry(aObj);
}
private:
// HistoryTracker is owned by nsSHistory; it always outlives HistoryTracker
// so it's safe to use raw pointer here.
--- a/dom/base/FragmentOrElement.h
+++ b/dom/base/FragmentOrElement.h
@@ -238,18 +238,18 @@ public:
*/
class nsExtendedDOMSlots final : public nsIContent::nsExtendedContentSlots
{
public:
nsExtendedDOMSlots();
~nsExtendedDOMSlots() final;
- void Traverse(nsCycleCollectionTraversalCallback&) final;
- void Unlink() final;
+ void Traverse(nsCycleCollectionTraversalCallback&) final override;
+ void Unlink() final override;
/**
* SMIL Overridde style rules (for SMIL animation of CSS properties)
* @see Element::GetSMILOverrideStyle
*/
nsCOMPtr<nsICSSDeclaration> mSMILOverrideStyle;
/**
@@ -290,18 +290,18 @@ public:
};
class nsDOMSlots final : public nsIContent::nsContentSlots
{
public:
nsDOMSlots();
~nsDOMSlots() final;
- void Traverse(nsCycleCollectionTraversalCallback&) final;
- void Unlink() final;
+ void Traverse(nsCycleCollectionTraversalCallback&) final override;
+ void Unlink() final override;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
/**
* The .style attribute (an interface that forwards to the actual
* style rules)
* @see nsGenericHTMLElement::GetStyle
*/
@@ -335,17 +335,17 @@ protected:
void SetInnerHTMLInternal(const nsAString& aInnerHTML, ErrorResult& aError);
// Override from nsINode
nsIContent::nsContentSlots* CreateSlots() override
{
return new nsDOMSlots();
}
- nsIContent::nsExtendedContentSlots* CreateExtendedSlots() final
+ nsIContent::nsExtendedContentSlots* CreateExtendedSlots() final override
{
return new nsExtendedDOMSlots();
}
nsDOMSlots* DOMSlots()
{
return static_cast<nsDOMSlots*>(Slots());
}
--- a/dom/base/ShadowRoot.h
+++ b/dom/base/ShadowRoot.h
@@ -180,9 +180,8 @@ protected:
nsresult Clone(mozilla::dom::NodeInfo *aNodeInfo, nsINode **aResult,
bool aPreallocateChildren) const override;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_shadowroot_h__
-
--- a/dom/base/nsContentPermissionHelper.cpp
+++ b/dom/base/nsContentPermissionHelper.cpp
@@ -138,20 +138,20 @@ class ContentPermissionRequestParent : p
nsCOMPtr<nsIPrincipal> mPrincipal;
nsCOMPtr<Element> mElement;
bool mIsHandlingUserInput;
RefPtr<nsContentPermissionRequestProxy> mProxy;
nsTArray<PermissionRequest> mRequests;
private:
- virtual mozilla::ipc::IPCResult Recvprompt();
- virtual mozilla::ipc::IPCResult RecvNotifyVisibility(const bool& aIsVisible);
- virtual mozilla::ipc::IPCResult RecvDestroy();
- virtual void ActorDestroy(ActorDestroyReason why);
+ virtual mozilla::ipc::IPCResult Recvprompt() override;
+ virtual mozilla::ipc::IPCResult RecvNotifyVisibility(const bool& aIsVisible) override;
+ virtual mozilla::ipc::IPCResult RecvDestroy() override;
+ virtual void ActorDestroy(ActorDestroyReason why) override;
};
ContentPermissionRequestParent::ContentPermissionRequestParent(const nsTArray<PermissionRequest>& aRequests,
Element* aElement,
const IPC::Principal& aPrincipal,
const bool aIsHandlingUserInput)
{
MOZ_COUNT_CTOR(ContentPermissionRequestParent);
--- a/dom/base/nsDocument.cpp
+++ b/dom/base/nsDocument.cpp
@@ -12071,17 +12071,17 @@ class PointerLockRequest final : public
public:
PointerLockRequest(Element* aElement, bool aUserInputOrChromeCaller)
: mozilla::Runnable("PointerLockRequest")
, mElement(do_GetWeakReference(aElement))
, mDocument(do_GetWeakReference(aElement->OwnerDoc()))
, mUserInputOrChromeCaller(aUserInputOrChromeCaller)
{}
- NS_IMETHOD Run() final;
+ NS_IMETHOD Run() final override;
private:
nsWeakPtr mElement;
nsWeakPtr mDocument;
bool mUserInputOrChromeCaller;
};
static const char*
--- a/dom/base/nsDocument.h
+++ b/dom/base/nsDocument.h
@@ -418,17 +418,17 @@ public:
/**
* Create a new presentation shell that will use aContext for
* its presentation context (presentation contexts <b>must not</b> be
* shared among multiple presentation shells).
*/
already_AddRefed<nsIPresShell> CreateShell(nsPresContext* aContext,
nsViewManager* aViewManager,
mozilla::StyleSetHandle aStyleSet)
- final;
+ final override;
virtual void DeleteShell() override;
virtual bool GetAllowPlugins() override;
static bool IsElementAnimateEnabled(JSContext* aCx, JSObject* aObject);
static bool IsWebAnimationsEnabled(JSContext* aCx, JSObject* aObject);
static bool IsWebAnimationsEnabled(mozilla::dom::CallerType aCallerType);
virtual mozilla::dom::DocumentTimeline* Timeline() override;
--- a/dom/base/nsDocumentEncoder.cpp
+++ b/dom/base/nsDocumentEncoder.cpp
@@ -1249,24 +1249,24 @@ NS_NewTextEncoder(nsIDocumentEncoder** a
class nsHTMLCopyEncoder : public nsDocumentEncoder
{
public:
nsHTMLCopyEncoder();
virtual ~nsHTMLCopyEncoder();
- NS_IMETHOD Init(nsIDOMDocument* aDocument, const nsAString& aMimeType, uint32_t aFlags);
+ NS_IMETHOD Init(nsIDOMDocument* aDocument, const nsAString& aMimeType, uint32_t aFlags) override;
// overridden methods from nsDocumentEncoder
- NS_IMETHOD SetSelection(nsISelection* aSelection);
+ NS_IMETHOD SetSelection(nsISelection* aSelection) override;
NS_IMETHOD EncodeToStringWithContext(nsAString& aContextString,
nsAString& aInfoString,
- nsAString& aEncodedString);
- NS_IMETHOD EncodeToString(nsAString& aOutputString);
+ nsAString& aEncodedString) override;
+ NS_IMETHOD EncodeToString(nsAString& aOutputString) override;
protected:
enum Endpoint
{
kStart,
kEnd
};
@@ -1279,19 +1279,19 @@ protected:
nsCOMPtr<nsIDOMNode> *outNode, int32_t *outOffset, nsIDOMNode *aCommon);
nsCOMPtr<nsIDOMNode> GetChildAt(nsIDOMNode *aParent, int32_t aOffset);
bool IsMozBR(nsIDOMNode* aNode);
nsresult GetNodeLocation(nsIDOMNode *inChild, nsCOMPtr<nsIDOMNode> *outParent, int32_t *outOffset);
bool IsRoot(nsIDOMNode* aNode);
bool IsFirstNode(nsIDOMNode *aNode);
bool IsLastNode(nsIDOMNode *aNode);
bool IsEmptyTextContent(nsIDOMNode* aNode);
- virtual bool IncludeInContext(nsINode *aNode);
+ virtual bool IncludeInContext(nsINode *aNode) override;
virtual int32_t
- GetImmediateContextCount(const nsTArray<nsINode*>& aAncestorArray);
+ GetImmediateContextCount(const nsTArray<nsINode*>& aAncestorArray) override;
bool mIsTextWidget;
};
nsHTMLCopyEncoder::nsHTMLCopyEncoder()
{
mIsTextWidget = false;
}
--- a/dom/base/nsFrameMessageManager.h
+++ b/dom/base/nsFrameMessageManager.h
@@ -307,17 +307,17 @@ private:
bool* aValid);
};
/* 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 Runnable
{
- NS_IMETHOD Run() override {
+ NS_IMETHOD Run() {
ReceiveMessage(..., ...);
return NS_OK;
}
};
RefPtr<nsSameProcessAsyncMessageBase> ev = new MyAsyncMessage();
nsresult rv = ev->Init(...);
--- a/dom/base/nsGenericDOMDataNode.h
+++ b/dom/base/nsGenericDOMDataNode.h
@@ -140,17 +140,17 @@ public:
// Need to implement this here too to avoid hiding.
nsresult SetText(const nsAString& aStr, bool aNotify)
{
return SetText(aStr.BeginReading(), aStr.Length(), aNotify);
}
virtual nsresult AppendText(const char16_t* aBuffer, uint32_t aLength,
bool aNotify) override;
virtual bool TextIsOnlyWhitespace() override;
- virtual bool ThreadSafeTextIsOnlyWhitespace() const final;
+ virtual bool ThreadSafeTextIsOnlyWhitespace() const final override;
virtual bool HasTextForTranslation() override;
virtual void AppendTextTo(nsAString& aResult) override;
MOZ_MUST_USE
virtual bool AppendTextTo(nsAString& aResult,
const mozilla::fallible_t&) override;
virtual void SaveSubtreeState() override;
#ifdef DEBUG
--- a/dom/base/nsGlobalWindowCommands.cpp
+++ b/dom/base/nsGlobalWindowCommands.cpp
@@ -132,47 +132,47 @@ protected:
// no member variables, please, we're stateless!
};
// this class implements commands whose behavior depends on the 'browse with caret' setting
class nsSelectMoveScrollCommand : public nsSelectionCommandsBase
{
public:
- NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+ NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
// no member variables, please, we're stateless!
};
// this class implements physical-movement versions of the above
class nsPhysicalSelectMoveScrollCommand : public nsSelectionCommandsBase
{
public:
- NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+ NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
// no member variables, please, we're stateless!
};
// this class implements other selection commands
class nsSelectCommand : public nsSelectionCommandsBase
{
public:
- NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+ NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
// no member variables, please, we're stateless!
};
// this class implements physical-movement versions of selection commands
class nsPhysicalSelectCommand : public nsSelectionCommandsBase
{
public:
- NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext);
+ NS_IMETHOD DoCommand(const char * aCommandName, nsISupports *aCommandContext) override;
// no member variables, please, we're stateless!
};
#if 0
#pragma mark -
#endif
@@ -692,19 +692,21 @@ nsSelectionCommand::GetContentViewerEdit
#endif
#define NS_DECL_CLIPBOARD_COMMAND(_cmd) \
class _cmd : public nsSelectionCommand \
{ \
protected: \
\
virtual nsresult IsClipboardCommandEnabled(const char* aCommandName, \
- nsIContentViewerEdit* aEdit, bool *outCmdEnabled); \
+ nsIContentViewerEdit* aEdit, \
+ bool *outCmdEnabled) override; \
virtual nsresult DoClipboardCommand(const char* aCommandName, \
- nsIContentViewerEdit* aEdit, nsICommandParams* aParams); \
+ nsIContentViewerEdit* aEdit, \
+ nsICommandParams* aParams) override; \
/* no member variables, please, we're stateless! */ \
};
NS_DECL_CLIPBOARD_COMMAND(nsClipboardCopyLinkCommand)
NS_DECL_CLIPBOARD_COMMAND(nsClipboardImageCommands)
NS_DECL_CLIPBOARD_COMMAND(nsClipboardSelectAllNoneCommands)
NS_DECL_CLIPBOARD_COMMAND(nsClipboardGetContentsCommand)
--- a/dom/base/nsWrapperCache.cpp
+++ b/dom/base/nsWrapperCache.cpp
@@ -62,40 +62,40 @@ public:
explicit DebugWrapperTraversalCallback(JSObject* aWrapper)
: mFound(false)
, mWrapper(JS::GCCellPtr(aWrapper))
{
mFlags = WANT_ALL_TRACES;
}
NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt aRefCount,
- const char* aObjName)
+ const char* aObjName) override
{
}
NS_IMETHOD_(void) DescribeGCedNode(bool aIsMarked,
const char* aObjName,
- uint64_t aCompartmentAddress)
+ uint64_t aCompartmentAddress) override
{
}
- NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aChild)
+ NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aChild) override
{
if (aChild == mWrapper) {
mFound = true;
}
}
- NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild)
+ NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild) override
{
}
NS_IMETHOD_(void) NoteNativeChild(void* aChild,
- nsCycleCollectionParticipant* aHelper)
+ nsCycleCollectionParticipant* aHelper) override
{
}
- NS_IMETHOD_(void) NoteNextEdgeName(const char* aName)
+ NS_IMETHOD_(void) NoteNextEdgeName(const char* aName) override
{
}
bool mFound;
private:
JS::GCCellPtr mWrapper;
};
--- a/dom/bindings/IterableIterator.h
+++ b/dom/bindings/IterableIterator.h
@@ -172,17 +172,17 @@ protected:
aResult.set(&dictValue.toObject());
}
protected:
virtual ~IterableIterator() {}
// Since we're templated on a binding, we need to possibly CC it, but can't do
// that through macros. So it happens here.
- virtual void UnlinkHelper() final
+ virtual void UnlinkHelper() final override
{
mIterableObj = nullptr;
}
virtual void TraverseHelper(nsCycleCollectionTraversalCallback& cb) override
{
IterableIterator<T>* tmp = this;
NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mIterableObj);
--- a/dom/canvas/CanvasImageCache.cpp
+++ b/dom/canvas/CanvasImageCache.cpp
@@ -161,17 +161,17 @@ class ImageCacheObserver;
class ImageCache final : public nsExpirationTracker<ImageCacheEntryData,4>
{
public:
// We use 3 generations of 1 second each to get a 2-3 seconds timeout.
enum { GENERATION_MS = 1000 };
ImageCache();
~ImageCache();
- virtual void NotifyExpired(ImageCacheEntryData* aObject)
+ virtual void NotifyExpired(ImageCacheEntryData* aObject) override
{
mTotal -= aObject->SizeInBytes();
RemoveObject(aObject);
// Remove from the all canvas cache entry first since nsExpirationTracker
// will delete aObject.
mAllCanvasCache.RemoveEntry(AllCanvasImageCacheKey(aObject->mImage, aObject->mIsAccelerated));
--- a/dom/canvas/CanvasRenderingContext2D.cpp
+++ b/dom/canvas/CanvasRenderingContext2D.cpp
@@ -4284,17 +4284,17 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
// notify front-end code if we encountered missing glyphs in any script
if (mMissingFonts) {
mMissingFonts->Flush();
}
}
typedef CanvasRenderingContext2D::ContextState ContextState;
- virtual void SetText(const char16_t* aText, int32_t aLength, nsBidiDirection aDirection)
+ virtual void SetText(const char16_t* aText, int32_t aLength, nsBidiDirection aDirection) override
{
mFontgrp->UpdateUserFonts(); // ensure user font generation is current
// adjust flags for current direction run
gfx::ShapedTextFlags flags = mTextRunFlags;
if (aDirection == NSBIDI_RTL) {
flags |= gfx::ShapedTextFlags::TEXT_IS_RTL;
} else {
flags &= ~gfx::ShapedTextFlags::TEXT_IS_RTL;
@@ -4303,17 +4303,17 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
aLength,
mDrawTarget,
mAppUnitsPerDevPixel,
flags,
nsTextFrameUtils::Flags(),
mMissingFonts);
}
- virtual nscoord GetWidth()
+ virtual nscoord GetWidth() override
{
gfxTextRun::Metrics textRunMetrics = mTextRun->MeasureText(
mDoMeasureBoundingBox ? gfxFont::TIGHT_INK_EXTENTS
: gfxFont::LOOSE_INK_EXTENTS, mDrawTarget);
// this only measures the height; the total width is gotten from the
// the return value of ProcessText.
if (mDoMeasureBoundingBox) {
@@ -4376,17 +4376,17 @@ struct MOZ_STACK_CLASS CanvasBidiProcess
already_AddRefed<gfxPattern> GetPatternFor(Style aStyle)
{
const CanvasPattern* pat = mCtx->CurrentState().patternStyles[aStyle];
RefPtr<gfxPattern> pattern = new gfxPattern(pat->mSurface, Matrix());
pattern->SetExtend(CvtCanvasRepeatToGfxRepeat(pat->mRepeat));
return pattern.forget();
}
- virtual void DrawText(nscoord aXOffset, nscoord aWidth)
+ virtual void DrawText(nscoord aXOffset, nscoord aWidth) override
{
gfx::Point point = mPt;
bool rtl = mTextRun->IsRightToLeft();
bool verticalRun = mTextRun->IsVertical();
RefPtr<gfxPattern> pattern;
float& inlineCoord = verticalRun ? point.y : point.x;
inlineCoord += aXOffset;
--- a/dom/canvas/CanvasRenderingContextHelper.cpp
+++ b/dom/canvas/CanvasRenderingContextHelper.cpp
@@ -32,17 +32,17 @@ CanvasRenderingContextHelper::ToBlob(JSC
class EncodeCallback : public EncodeCompleteCallback
{
public:
EncodeCallback(nsIGlobalObject* aGlobal, BlobCallback* aCallback)
: mGlobal(aGlobal)
, mBlobCallback(aCallback) {}
// This is called on main thread.
- nsresult ReceiveBlob(already_AddRefed<Blob> aBlob)
+ nsresult ReceiveBlob(already_AddRefed<Blob> aBlob) override
{
RefPtr<Blob> blob = aBlob;
RefPtr<Blob> newBlob = Blob::Create(mGlobal, blob->Impl());
ErrorResult rv;
mBlobCallback->Call(newBlob, rv);
--- a/dom/canvas/OffscreenCanvas.cpp
+++ b/dom/canvas/OffscreenCanvas.cpp
@@ -259,17 +259,17 @@ OffscreenCanvas::ToBlob(JSContext* aCx,
class EncodeCallback : public EncodeCompleteCallback
{
public:
EncodeCallback(nsIGlobalObject* aGlobal, Promise* aPromise)
: mGlobal(aGlobal)
, mPromise(aPromise) {}
// This is called on main thread.
- nsresult ReceiveBlob(already_AddRefed<Blob> aBlob)
+ nsresult ReceiveBlob(already_AddRefed<Blob> aBlob) override
{
RefPtr<Blob> blob = aBlob;
if (mPromise) {
RefPtr<Blob> newBlob = Blob::Create(mGlobal, blob->Impl());
mPromise->MaybeResolve(newBlob);
}
--- a/dom/clients/manager/ClientSourceParent.cpp
+++ b/dom/clients/manager/ClientSourceParent.cpp
@@ -38,17 +38,17 @@ public:
explicit KillContentParentRunnable(RefPtr<ContentParent>&& aContentParent)
: Runnable("KillContentParentRunnable")
, mContentParent(Move(aContentParent))
{
MOZ_ASSERT(mContentParent);
}
NS_IMETHOD
- Run()
+ Run() override
{
MOZ_ASSERT(NS_IsMainThread());
mContentParent->KillHard("invalid ClientSourceParent actor");
mContentParent = nullptr;
return NS_OK;
}
};
--- a/dom/events/DOMEventTargetHelper.h
+++ b/dom/events/DOMEventTargetHelper.h
@@ -235,29 +235,29 @@ NS_DEFINE_STATIC_IID_ACCESSOR(DOMEventTa
}
/* Use this macro to declare functions that forward the behavior of this
* interface to another object.
* This macro doesn't forward GetEventTargetParent because sometimes subclasses
* want to override it.
*/
#define NS_FORWARD_NSIDOMEVENTTARGET_NOGETEVENTTARGETPARENT(_to) \
- NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc) { \
+ NS_IMETHOD AddEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture, bool wantsUntrusted, uint8_t _argc) override { \
return _to AddEventListener(type, listener, useCapture, wantsUntrusted, _argc); \
} \
- NS_IMETHOD AddSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc) { \
+ NS_IMETHOD AddSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture, bool aWantsUntrusted, uint8_t _argc) override { \
return _to AddSystemEventListener(type, listener, aUseCapture, aWantsUntrusted, _argc); \
} \
- NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture) { \
+ NS_IMETHOD RemoveEventListener(const nsAString & type, nsIDOMEventListener *listener, bool useCapture) override { \
return _to RemoveEventListener(type, listener, useCapture); \
} \
- NS_IMETHOD RemoveSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture) { \
+ NS_IMETHOD RemoveSystemEventListener(const nsAString & type, nsIDOMEventListener *listener, bool aUseCapture) override { \
return _to RemoveSystemEventListener(type, listener, aUseCapture); \
} \
- NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, bool *_retval) { \
+ NS_IMETHOD DispatchEvent(nsIDOMEvent *evt, bool *_retval) override { \
return _to DispatchEvent(evt, _retval); \
} \
virtual mozilla::dom::EventTarget* GetTargetForDOMEvent() { \
return _to GetTargetForDOMEvent(); \
} \
virtual mozilla::dom::EventTarget* GetTargetForEventTargetChain() { \
return _to GetTargetForEventTargetChain(); \
} \
--- a/dom/html/HTMLMediaElement.cpp
+++ b/dom/html/HTMLMediaElement.cpp
@@ -250,17 +250,17 @@ public:
explicit nsMediaEvent(const char* aName, HTMLMediaElement* aElement)
: Runnable(aName)
, mElement(aElement)
, mLoadID(mElement->GetCurrentLoadID())
{
}
~nsMediaEvent() {}
- NS_IMETHOD Run() = 0;
+ NS_IMETHOD Run() override = 0;
protected:
bool IsCancelled() {
return mElement->GetCurrentLoadID() != mLoadID;
}
RefPtr<HTMLMediaElement> mElement;
uint32_t mLoadID;
@@ -5269,17 +5269,17 @@ private:
class HTMLMediaElement::MediaStreamTracksAvailableCallback:
public OnTracksAvailableCallback
{
public:
explicit MediaStreamTracksAvailableCallback(HTMLMediaElement* aElement):
OnTracksAvailableCallback(), mElement(aElement)
{}
- virtual void NotifyTracksAvailable(DOMMediaStream* aStream)
+ virtual void NotifyTracksAvailable(DOMMediaStream* aStream) override
{
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
if (!mElement) {
return;
}
mElement->NotifyMediaStreamTracksAvailable(aStream);
}
--- a/dom/html/HTMLMenuItemElement.cpp
+++ b/dom/html/HTMLMenuItemElement.cpp
@@ -58,17 +58,17 @@ public:
// Find the selected radio, see GetSelectedRadio().
class GetCheckedVisitor : public Visitor
{
public:
explicit GetCheckedVisitor(HTMLMenuItemElement** aResult)
: mResult(aResult)
{ }
- virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+ virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
{
if (aMenuItem->IsChecked()) {
*mResult = aMenuItem;
return false;
}
return true;
}
protected:
@@ -77,17 +77,17 @@ protected:
// Deselect all radios except the one passed to the constructor.
class ClearCheckedVisitor : public Visitor
{
public:
explicit ClearCheckedVisitor(HTMLMenuItemElement* aExcludeMenuItem)
: mExcludeMenuItem(aExcludeMenuItem)
{ }
- virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+ virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
{
if (aMenuItem != mExcludeMenuItem && aMenuItem->IsChecked()) {
aMenuItem->ClearChecked();
}
return true;
}
protected:
HTMLMenuItemElement* mExcludeMenuItem;
@@ -98,17 +98,17 @@ protected:
class GetCheckedDirtyVisitor : public Visitor
{
public:
GetCheckedDirtyVisitor(bool* aCheckedDirty,
HTMLMenuItemElement* aExcludeMenuItem)
: mCheckedDirty(aCheckedDirty),
mExcludeMenuItem(aExcludeMenuItem)
{ }
- virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+ virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
{
if (aMenuItem == mExcludeMenuItem) {
return true;
}
*mCheckedDirty = aMenuItem->IsCheckedDirty();
return false;
}
protected:
@@ -117,33 +117,33 @@ protected:
};
// Set checked dirty to true on all radios in the group.
class SetCheckedDirtyVisitor : public Visitor
{
public:
SetCheckedDirtyVisitor()
{ }
- virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+ virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
{
aMenuItem->SetCheckedDirty();
return true;
}
};
// A helper visitor that is used to combine two operations (visitors) to avoid
// iterating over radios twice.
class CombinedVisitor : public Visitor
{
public:
CombinedVisitor(Visitor* aVisitor1, Visitor* aVisitor2)
: mVisitor1(aVisitor1), mVisitor2(aVisitor2),
mContinue1(true), mContinue2(true)
{ }
- virtual bool Visit(HTMLMenuItemElement* aMenuItem)
+ virtual bool Visit(HTMLMenuItemElement* aMenuItem) override
{
if (mContinue1) {
mContinue1 = mVisitor1->Visit(aMenuItem);
}
if (mContinue2) {
mContinue2 = mVisitor2->Visit(aMenuItem);
}
return mContinue1 || mContinue2;
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -493,17 +493,17 @@ public:
TextTrackCue* aCue)
: Runnable("dom::SimpleTextTrackEvent")
, mName(aEventName)
, mTime(aTime)
, mTrack(aTrack)
, mCue(aCue)
{}
- NS_IMETHOD Run() {
+ NS_IMETHOD Run() override {
WEBVTT_LOGV("SimpleTextTrackEvent cue %p mName %s mTime %lf",
mCue.get(), NS_ConvertUTF16toUTF8(mName).get(), mTime);
mCue->DispatchTrustedEvent(mName);
return NS_OK;
}
void Dispatch() {
if (nsCOMPtr<nsIGlobalObject> global = mCue->GetOwnerGlobal()) {
--- a/dom/html/VideoDocument.cpp
+++ b/dom/html/VideoDocument.cpp
@@ -20,20 +20,20 @@ class VideoDocument final : public Media
{
public:
virtual nsresult StartDocumentLoad(const char* aCommand,
nsIChannel* aChannel,
nsILoadGroup* aLoadGroup,
nsISupports* aContainer,
nsIStreamListener** aDocListener,
bool aReset = true,
- nsIContentSink* aSink = nullptr);
- virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject);
+ nsIContentSink* aSink = nullptr) override;
+ virtual void SetScriptGlobalObject(nsIScriptGlobalObject* aScriptGlobalObject) override;
- virtual void Destroy()
+ virtual void Destroy() override
{
if (mStreamListener) {
mStreamListener->DropDocumentRef();
}
MediaDocument::Destroy();
}
protected:
--- a/dom/indexedDB/ActorsParent.cpp
+++ b/dom/indexedDB/ActorsParent.cpp
@@ -7548,17 +7548,17 @@ protected:
// Should only be called by Run().
virtual void
SendResults() = 0;
NS_DECL_ISUPPORTS_INHERITED
// Common nsIRunnable implementation that subclasses may not override.
NS_IMETHOD
- Run() final;
+ Run() final override;
// OpenDirectoryListener overrides.
void
DirectoryLockAcquired(DirectoryLock* aLock) override;
void
DirectoryLockFailed() override;
@@ -7891,17 +7891,17 @@ protected:
virtual nsresult
DoDatabaseWork() = 0;
virtual void
SendResults() = 0;
// Common nsIRunnable implementation that subclasses may not override.
NS_IMETHOD
- Run() final;
+ Run() final override;
// IPDL methods.
void
ActorDestroy(ActorDestroyReason aWhy) override;
};
class CreateFileOp final
: public DatabaseOp
--- a/dom/ipc/ContentChild.cpp
+++ b/dom/ipc/ContentChild.cpp
@@ -467,17 +467,17 @@ ConsoleListener::Observe(nsIConsoleMessa
* The singleton of this class is registered with the HangMonitor as an
* annotator, so that the hang monitor can record whether or not there were
* pending input events when the thread hung.
*/
class PendingInputEventHangAnnotator final
: public HangMonitor::Annotator
{
public:
- virtual void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations)
+ virtual void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) override
{
int32_t pending = ContentChild::GetSingleton()->GetPendingInputEvents();
if (pending > 0) {
aAnnotations.AddAnnotation(NS_LITERAL_STRING("PendingInput"), pending);
}
}
static PendingInputEventHangAnnotator sSingleton;
--- a/dom/ipc/FilePickerParent.h
+++ b/dom/ipc/FilePickerParent.h
@@ -87,17 +87,17 @@ class FilePickerParent : public PFilePic
bool mIsDirectory;
public:
IORunnable(FilePickerParent *aFPParent,
nsTArray<nsCOMPtr<nsIFile>>& aFiles,
bool aIsDirectory);
bool Dispatch();
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
void Destroy();
};
RefPtr<IORunnable> mRunnable;
RefPtr<FilePickerShownCallback> mCallback;
nsCOMPtr<nsIFilePicker> mFilePicker;
nsString mTitle;
--- a/dom/ipc/URLClassifierParent.h
+++ b/dom/ipc/URLClassifierParent.h
@@ -18,17 +18,17 @@ template<typename BaseProtocol>
class URLClassifierParentBase : public nsIURIClassifierCallback,
public BaseProtocol
{
public:
// nsIURIClassifierCallback.
NS_IMETHOD OnClassifyComplete(nsresult aErrorCode,
const nsACString& aList,
const nsACString& aProvider,
- const nsACString& aFullHash)
+ const nsACString& aFullHash) override
{
if (mIPCOpen) {
ClassifierInfo info = ClassifierInfo(nsCString(aList),
nsCString(aProvider),
nsCString(aFullHash));
Unused << BaseProtocol::Send__delete__(this, info, aErrorCode);
}
return NS_OK;
--- a/dom/jsurl/nsJSProtocolHandler.h
+++ b/dom/jsurl/nsJSProtocolHandler.h
@@ -88,17 +88,17 @@ public:
NS_IMETHOD Write(nsIObjectOutputStream* aStream) override;
// nsIIPCSerializableURI overrides
NS_DECL_NSIIPCSERIALIZABLEURI
// Override the nsIClassInfo method GetClassIDNoAlloc to make sure our
// nsISerializable impl works right.
NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) override;
- //NS_IMETHOD QueryInterface( const nsIID& aIID, void** aInstancePtr );
+ //NS_IMETHOD QueryInterface( const nsIID& aIID, void** aInstancePtr ) override;
protected:
virtual ~nsJSURI() {}
virtual nsresult EqualsInternal(nsIURI* other,
RefHandlingEnum refHandlingMode,
bool* result) override;
private:
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -3898,17 +3898,17 @@ class VideoQueueMemoryFunctor : public n
public:
VideoQueueMemoryFunctor()
: mSize(0)
{
}
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
- virtual void operator()(void* aObject)
+ virtual void operator()(void* aObject) override
{
const VideoData* v = static_cast<const VideoData*>(aObject);
mSize += v->SizeOfIncludingThis(MallocSizeOf);
}
size_t mSize;
};
@@ -3917,17 +3917,17 @@ class AudioQueueMemoryFunctor : public n
public:
AudioQueueMemoryFunctor()
: mSize(0)
{
}
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf);
- virtual void operator()(void* aObject)
+ virtual void operator()(void* aObject) override
{
const AudioData* audioData = static_cast<const AudioData*>(aObject);
mSize += audioData->SizeOfIncludingThis(MallocSizeOf);
}
size_t mSize;
};
--- a/dom/media/MediaDevices.cpp
+++ b/dom/media/MediaDevices.cpp
@@ -26,17 +26,17 @@ class FuzzTimerCallBack final : public n
{
~FuzzTimerCallBack() {}
public:
explicit FuzzTimerCallBack(MediaDevices* aMediaDevices) : mMediaDevices(aMediaDevices) {}
NS_DECL_ISUPPORTS
- NS_IMETHOD Notify(nsITimer* aTimer) final
+ NS_IMETHOD Notify(nsITimer* aTimer) final override
{
mMediaDevices->DispatchTrustedEvent(NS_LITERAL_STRING("devicechange"));
return NS_OK;
}
NS_IMETHOD GetName(nsACString& aName) override
{
aName.AssignLiteral("FuzzTimerCallBack");
--- a/dom/media/MediaQueue.h
+++ b/dom/media/MediaQueue.h
@@ -13,17 +13,17 @@
#include "MediaEventSource.h"
#include "TimeUnits.h"
namespace mozilla {
// Thread and type safe wrapper around nsDeque.
template <class T>
class MediaQueueDeallocator : public nsDequeFunctor {
- virtual void operator()(void* aObject)
+ virtual void operator()(void* aObject) override
{
RefPtr<T> releaseMe = dont_AddRef(static_cast<T*>(aObject));
}
};
template <class T>
class MediaQueue : private nsDeque {
public:
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -1416,17 +1416,17 @@ MediaStreamGraphImpl::GetName(nsACString
namespace {
class MediaStreamGraphShutDownRunnable : public Runnable {
public:
explicit MediaStreamGraphShutDownRunnable(MediaStreamGraphImpl* aGraph)
: Runnable("MediaStreamGraphShutDownRunnable")
, mGraph(aGraph)
{}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mGraph->mDetectedNotRunning && mGraph->mDriver,
"We should know the graph thread control loop isn't running!");
LOG(LogLevel::Debug, ("Shutting down graph %p", mGraph.get()));
// We've asserted the graph isn't running. Use mDriver instead of CurrentDriver
--- a/dom/media/VideoFrameContainer.cpp
+++ b/dom/media/VideoFrameContainer.cpp
@@ -99,17 +99,17 @@ SetImageToBlackPixel(PlanarYCbCrImage* a
}
class VideoFrameContainerInvalidateRunnable : public Runnable {
public:
explicit VideoFrameContainerInvalidateRunnable(VideoFrameContainer* aVideoFrameContainer)
: Runnable("VideoFrameContainerInvalidateRunnable")
, mVideoFrameContainer(aVideoFrameContainer)
{}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
MOZ_ASSERT(NS_IsMainThread());
mVideoFrameContainer->Invalidate();
return NS_OK;
}
private:
--- a/dom/media/mediasink/AudioSink.cpp
+++ b/dom/media/mediasink/AudioSink.cpp
@@ -239,21 +239,21 @@ AudioSink::GetEndTime() const
UniquePtr<AudioStream::Chunk>
AudioSink::PopFrames(uint32_t aFrames)
{
class Chunk : public AudioStream::Chunk {
public:
Chunk(AudioData* aBuffer, uint32_t aFrames, AudioDataValue* aData)
: mBuffer(aBuffer), mFrames(aFrames), mData(aData) {}
Chunk() : mFrames(0), mData(nullptr) {}
- const AudioDataValue* Data() const { return mData; }
- uint32_t Frames() const { return mFrames; }
- uint32_t Channels() const { return mBuffer ? mBuffer->mChannels: 0; }
- uint32_t Rate() const { return mBuffer ? mBuffer->mRate : 0; }
- AudioDataValue* GetWritable() const { return mData; }
+ const AudioDataValue* Data() const override { return mData; }
+ uint32_t Frames() const override { return mFrames; }
+ uint32_t Channels() const override { return mBuffer ? mBuffer->mChannels: 0; }
+ uint32_t Rate() const override { return mBuffer ? mBuffer->mRate : 0; }
+ AudioDataValue* GetWritable() const override { return mData; }
private:
const RefPtr<AudioData> mBuffer;
const uint32_t mFrames;
AudioDataValue* const mData;
};
bool needPopping = false;
if (!mCurrentData) {
--- a/dom/media/mp4/MoofParser.h
+++ b/dom/media/mp4/MoofParser.h
@@ -138,17 +138,17 @@ class Edts : public Atom
{
public:
Edts()
: mMediaStart(0)
, mEmptyOffset(0)
{
}
explicit Edts(Box& aBox);
- virtual bool IsValid()
+ virtual bool IsValid() override
{
// edts is optional
return true;
}
int64_t mMediaStart;
int64_t mEmptyOffset;
--- a/dom/media/ogg/OggCodecState.h
+++ b/dom/media/ogg/OggCodecState.h
@@ -43,17 +43,17 @@ struct OggPacketDeletePolicy
}
};
using OggPacketPtr = UniquePtr<ogg_packet, OggPacketDeletePolicy>;
// Deallocates a packet, used in OggPacketQueue below.
class OggPacketDeallocator : public nsDequeFunctor
{
- virtual void operator()(void* aPacket)
+ virtual void operator()(void* aPacket) override
{
OggPacketDeletePolicy()(static_cast<ogg_packet*>(aPacket));
}
};
// A queue of ogg_packets. When we read a page, we extract the page's packets
// and buffer them in the owning stream's OggCodecState. This is because
// if we're skipping up to the next keyframe in very large frame sized videos,
--- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
+++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp
@@ -868,17 +868,17 @@ public:
: Runnable("SupportsConfigEvent")
, mDXVA2Manager(aDXVA2Manager)
, mMediaType(aMediaType)
, mFramerate(aFramerate)
, mSupportsConfig(false)
{
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
MOZ_ASSERT(NS_IsMainThread(), "Must be on main thread.");
mSupportsConfig = mDXVA2Manager->SupportsConfig(mMediaType, mFramerate);
return NS_OK;
}
DXVA2Manager* mDXVA2Manager;
IMFMediaType* mMediaType;
const float mFramerate;
--- a/dom/media/systemservices/CamerasParent.h
+++ b/dom/media/systemservices/CamerasParent.h
@@ -58,17 +58,18 @@ private:
class InputObserver : public webrtc::VideoInputFeedBack
{
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(InputObserver)
explicit InputObserver(CamerasParent* aParent)
: mParent(aParent) {};
- virtual void OnDeviceChange();
+
+ virtual void OnDeviceChange() override;
friend CamerasParent;
private:
~InputObserver() {}
RefPtr<CamerasParent> mParent;
};
--- a/dom/media/webaudio/MediaBufferDecoder.cpp
+++ b/dom/media/webaudio/MediaBufferDecoder.cpp
@@ -91,17 +91,17 @@ public:
, mDecodeJob(aDecodeJob)
, mPhase(PhaseEnum::Decode)
, mFirstFrameDecoded(false)
{
MOZ_ASSERT(aBuffer);
MOZ_ASSERT(NS_IsMainThread());
}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
bool CreateReader();
MediaFormatReader* Reader()
{
MOZ_ASSERT(mDecoderReader);
return mDecoderReader;
}
private:
--- a/dom/media/webrtc/MediaEngineTabVideoSource.h
+++ b/dom/media/webrtc/MediaEngineTabVideoSource.h
@@ -60,47 +60,47 @@ class MediaEngineTabVideoSource : public
void Draw();
class StartRunnable : public Runnable {
public:
explicit StartRunnable(MediaEngineTabVideoSource *videoSource)
: Runnable("MediaEngineTabVideoSource::StartRunnable")
, mVideoSource(videoSource)
{}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
RefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class StopRunnable : public Runnable {
public:
explicit StopRunnable(MediaEngineTabVideoSource *videoSource)
: Runnable("MediaEngineTabVideoSource::StopRunnable")
, mVideoSource(videoSource)
{}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
RefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class InitRunnable : public Runnable {
public:
explicit InitRunnable(MediaEngineTabVideoSource *videoSource)
: Runnable("MediaEngineTabVideoSource::InitRunnable")
, mVideoSource(videoSource)
{}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
RefPtr<MediaEngineTabVideoSource> mVideoSource;
};
class DestroyRunnable : public Runnable {
public:
explicit DestroyRunnable(MediaEngineTabVideoSource* videoSource)
: Runnable("MediaEngineTabVideoSource::DestroyRunnable")
, mVideoSource(videoSource)
{}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
RefPtr<MediaEngineTabVideoSource> mVideoSource;
};
protected:
~MediaEngineTabVideoSource() {}
private:
int32_t mBufWidthMax;
--- a/dom/network/ConnectionWorker.cpp
+++ b/dom/network/ConnectionWorker.cpp
@@ -91,17 +91,17 @@ public:
, mProxy(aProxy)
, mNetworkInfo(aNetworkInfo)
{
MOZ_ASSERT(aProxy);
aWorkerPrivate->AssertIsOnWorkerThread();
}
bool
- MainThreadRun()
+ MainThreadRun() override
{
MOZ_ASSERT(NS_IsMainThread());
hal::RegisterNetworkObserver(mProxy);
hal::GetCurrentNetworkInformation(&mNetworkInfo);
return true;
}
};
@@ -118,17 +118,17 @@ public:
NS_LITERAL_CSTRING("ConnectionWorker :: Shutdown"))
, mProxy(aProxy)
{
MOZ_ASSERT(aProxy);
aWorkerPrivate->AssertIsOnWorkerThread();
}
bool
- MainThreadRun()
+ MainThreadRun() override
{
MOZ_ASSERT(NS_IsMainThread());
hal::UnregisterNetworkObserver(mProxy);
return true;
}
};
class NotifyRunnable : public WorkerRunnable
--- a/dom/notification/Notification.cpp
+++ b/dom/notification/Notification.cpp
@@ -88,17 +88,17 @@ public:
const nsAString& aTitle,
const nsAString& aDir,
const nsAString& aLang,
const nsAString& aBody,
const nsAString& aTag,
const nsAString& aIcon,
const nsAString& aData,
const nsAString& aBehavior,
- const nsAString& aServiceWorkerRegistrationScope) final
+ const nsAString& aServiceWorkerRegistrationScope) final override
{
AssertIsOnMainThread();
MOZ_ASSERT(!aID.IsEmpty());
// Skip scopes that don't match when called from getNotifications().
if (!mScope.IsEmpty() && !mScope.Equals(aServiceWorkerRegistrationScope)) {
return NS_OK;
}
@@ -141,17 +141,17 @@ public:
mWindow(aWindow),
mPromise(aPromise)
{
AssertIsOnMainThread();
MOZ_ASSERT(aWindow);
MOZ_ASSERT(aPromise);
}
- NS_IMETHOD Done() final
+ NS_IMETHOD Done() final override
{
ErrorResult result;
AutoTArray<RefPtr<Notification>, 5> notifications;
for (uint32_t i = 0; i < mStrings.Length(); ++i) {
RefPtr<Notification> n =
Notification::ConstructFromFields(mWindow,
mStrings[i].mID,
@@ -1628,17 +1628,17 @@ Notification::IsInPrivateBrowsing()
}
namespace {
struct StringWriteFunc : public JSONWriteFunc
{
nsAString& mBuffer; // This struct must not outlive this buffer
explicit StringWriteFunc(nsAString& buffer) : mBuffer(buffer) {}
- void Write(const char* aStr)
+ void Write(const char* aStr) override
{
mBuffer.Append(NS_ConvertUTF8toUTF16(aStr));
}
};
}
void
Notification::ShowInternal()
@@ -2101,17 +2101,17 @@ public:
WorkerGetCallback(PromiseWorkerProxy* aProxy, const nsAString& aScope)
: ScopeCheckingGetCallback(aScope), mPromiseProxy(aProxy)
{
AssertIsOnMainThread();
MOZ_ASSERT(aProxy);
}
- NS_IMETHOD Done() final
+ NS_IMETHOD Done() final override
{
AssertIsOnMainThread();
MOZ_ASSERT(mPromiseProxy, "Was Done() called twice?");
RefPtr<PromiseWorkerProxy> proxy = mPromiseProxy.forget();
MutexAutoLock lock(proxy->Lock());
if (proxy->CleanedUp()) {
return NS_OK;
--- a/dom/plugins/ipc/PluginMessageUtils.cpp
+++ b/dom/plugins/ipc/PluginMessageUtils.cpp
@@ -25,17 +25,17 @@ public:
DeferNPObjectReleaseRunnable(const NPNetscapeFuncs* f, NPObject* o)
: Runnable("DeferNPObjectReleaseRunnable")
, mFuncs(f)
, mObject(o)
{
NS_ASSERTION(o, "no release null objects");
}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
private:
const NPNetscapeFuncs* mFuncs;
NPObject* mObject;
};
NS_IMETHODIMP
DeferNPObjectReleaseRunnable::Run()
--- a/dom/promise/Promise.cpp
+++ b/dom/promise/Promise.cpp
@@ -651,17 +651,17 @@ public:
, mPromiseWorkerProxy(aPromiseWorkerProxy)
, mFunc(aFunc)
{
MOZ_ASSERT(NS_IsMainThread());
MOZ_ASSERT(mPromiseWorkerProxy);
}
virtual bool
- WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
{
MOZ_ASSERT(aWorkerPrivate);
aWorkerPrivate->AssertIsOnWorkerThread();
MOZ_ASSERT(aWorkerPrivate == mWorkerPrivate);
MOZ_ASSERT(mPromiseWorkerProxy);
RefPtr<Promise> workerPromise = mPromiseWorkerProxy->WorkerPromise();
--- a/dom/quota/ActorsParent.cpp
+++ b/dom/quota/ActorsParent.cpp
@@ -382,17 +382,17 @@ public:
void
Invalidate()
{
AssertIsOnOwningThread();
mInvalidated = true;
}
- NS_INLINE_DECL_REFCOUNTING(DirectoryLockImpl)
+ NS_INLINE_DECL_REFCOUNTING(DirectoryLockImpl, override)
private:
~DirectoryLockImpl();
};
class QuotaManager::CreateRunnable final
: public BackgroundThreadObject
, public Runnable
--- a/dom/security/nsCSPUtils.h
+++ b/dom/security/nsCSPUtils.h
@@ -246,38 +246,38 @@ class nsCSPBaseSrc {
/* =============== nsCSPSchemeSrc ============ */
class nsCSPSchemeSrc : public nsCSPBaseSrc {
public:
explicit nsCSPSchemeSrc(const nsAString& aScheme);
virtual ~nsCSPSchemeSrc();
bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
- bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
- bool visit(nsCSPSrcVisitor* aVisitor) const;
- void toString(nsAString& outStr) const;
+ bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
+ void toString(nsAString& outStr) const override;
inline void getScheme(nsAString& outStr) const
{ outStr.Assign(mScheme); };
private:
nsString mScheme;
};
/* =============== nsCSPHostSrc ============== */
class nsCSPHostSrc : public nsCSPBaseSrc {
public:
explicit nsCSPHostSrc(const nsAString& aHost);
virtual ~nsCSPHostSrc();
bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
- bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
- bool visit(nsCSPSrcVisitor* aVisitor) const;
- void toString(nsAString& outStr) const;
+ bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
+ void toString(nsAString& outStr) const override;
void setScheme(const nsAString& aScheme);
void setPort(const nsAString& aPort);
void appendPath(const nsAString &aPath);
inline void setGeneratedFromSelfKeyword() const
{ mGeneratedFromSelfKeyword = true; }
@@ -312,26 +312,26 @@ class nsCSPHostSrc : public nsCSPBaseSrc
/* =============== nsCSPKeywordSrc ============ */
class nsCSPKeywordSrc : public nsCSPBaseSrc {
public:
explicit nsCSPKeywordSrc(CSPKeyword aKeyword);
virtual ~nsCSPKeywordSrc();
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
- bool aParserCreated) const;
+ bool aParserCreated) const override;
bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
- bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
- bool visit(nsCSPSrcVisitor* aVisitor) const;
- void toString(nsAString& outStr) const;
+ bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
+ void toString(nsAString& outStr) const override;
inline CSPKeyword getKeyword() const
{ return mKeyword; };
- inline void invalidate() const
+ inline void invalidate() const override
{
// keywords that need to invalidated
if (mKeyword == CSP_SELF || mKeyword == CSP_UNSAFE_INLINE) {
mInvalidated = true;
}
}
private:
@@ -341,26 +341,26 @@ class nsCSPKeywordSrc : public nsCSPBase
/* =============== nsCSPNonceSource =========== */
class nsCSPNonceSrc : public nsCSPBaseSrc {
public:
explicit nsCSPNonceSrc(const nsAString& aNonce);
virtual ~nsCSPNonceSrc();
bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
- bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const;
+ bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override;
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
- bool aParserCreated) const;
- bool visit(nsCSPSrcVisitor* aVisitor) const;
- void toString(nsAString& outStr) const;
+ bool aParserCreated) const override;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
+ void toString(nsAString& outStr) const override;
inline void getNonce(nsAString& outStr) const
{ outStr.Assign(mNonce); };
- inline void invalidate() const
+ inline void invalidate() const override
{
// overwrite nsCSPBaseSRC::invalidate() and explicitily
// do *not* invalidate, because 'strict-dynamic' should
// not invalidate nonces.
}
private:
nsString mNonce;
@@ -369,27 +369,27 @@ class nsCSPNonceSrc : public nsCSPBaseSr
/* =============== nsCSPHashSource ============ */
class nsCSPHashSrc : public nsCSPBaseSrc {
public:
nsCSPHashSrc(const nsAString& algo, const nsAString& hash);
virtual ~nsCSPHashSrc();
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
- bool aParserCreated) const;
- void toString(nsAString& outStr) const;
- bool visit(nsCSPSrcVisitor* aVisitor) const;
+ bool aParserCreated) const override;
+ void toString(nsAString& outStr) const override;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
inline void getAlgorithm(nsAString& outStr) const
{ outStr.Assign(mAlgorithm); };
inline void getHash(nsAString& outStr) const
{ outStr.Assign(mHash); };
- inline void invalidate() const
+ inline void invalidate() const override
{
// overwrite nsCSPBaseSRC::invalidate() and explicitily
// do *not* invalidate, because 'strict-dynamic' should
// not invalidate hashes.
}
private:
nsString mAlgorithm;
@@ -398,32 +398,32 @@ class nsCSPHashSrc : public nsCSPBaseSrc
/* =============== nsCSPReportURI ============ */
class nsCSPReportURI : public nsCSPBaseSrc {
public:
explicit nsCSPReportURI(nsIURI* aURI);
virtual ~nsCSPReportURI();
- bool visit(nsCSPSrcVisitor* aVisitor) const;
- void toString(nsAString& outStr) const;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
+ void toString(nsAString& outStr) const override;
private:
nsCOMPtr<nsIURI> mReportURI;
};
/* =============== nsCSPSandboxFlags ================== */
class nsCSPSandboxFlags : public nsCSPBaseSrc {
public:
explicit nsCSPSandboxFlags(const nsAString& aFlags);
virtual ~nsCSPSandboxFlags();
- bool visit(nsCSPSrcVisitor* aVisitor) const;
- void toString(nsAString& outStr) const;
+ bool visit(nsCSPSrcVisitor* aVisitor) const override;
+ void toString(nsAString& outStr) const override;
private:
nsString mFlags;
};
/* =============== nsCSPSrcVisitor ================== */
class nsCSPSrcVisitor {
@@ -490,19 +490,19 @@ class nsCSPChildSrcDirective : public ns
virtual ~nsCSPChildSrcDirective();
void setRestrictFrames()
{ mRestrictFrames = true; }
void setRestrictWorkers()
{ mRestrictWorkers = true; }
- virtual bool restrictsContentType(nsContentPolicyType aContentType) const;
+ virtual bool restrictsContentType(nsContentPolicyType aContentType) const override;
- virtual bool equals(CSPDirective aDirective) const;
+ virtual bool equals(CSPDirective aDirective) const override;
private:
bool mRestrictFrames;
bool mRestrictWorkers;
};
/* =============== nsCSPScriptSrcDirective ============= */
@@ -514,45 +514,45 @@ class nsCSPChildSrcDirective : public ns
class nsCSPScriptSrcDirective : public nsCSPDirective {
public:
explicit nsCSPScriptSrcDirective(CSPDirective aDirective);
virtual ~nsCSPScriptSrcDirective();
void setRestrictWorkers()
{ mRestrictWorkers = true; }
- virtual bool restrictsContentType(nsContentPolicyType aContentType) const;
+ virtual bool restrictsContentType(nsContentPolicyType aContentType) const override;
- virtual bool equals(CSPDirective aDirective) const;
+ virtual bool equals(CSPDirective aDirective) const override;
private:
bool mRestrictWorkers;
};
/* =============== nsBlockAllMixedContentDirective === */
class nsBlockAllMixedContentDirective : public nsCSPDirective {
public:
explicit nsBlockAllMixedContentDirective(CSPDirective aDirective);
~nsBlockAllMixedContentDirective();
bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
- bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const
+ bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override
{ return false; }
bool permits(nsIURI* aUri) const
{ return false; }
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
- bool aParserCreated) const
+ bool aParserCreated) const override
{ return false; }
- void toString(nsAString& outStr) const;
+ void toString(nsAString& outStr) const override;
- void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs)
+ void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs) override
{ MOZ_ASSERT(false, "block-all-mixed-content does not hold any srcs"); }
};
/* =============== nsUpgradeInsecureDirective === */
/*
* Upgrading insecure requests includes the following actors:
* (1) CSP:
@@ -583,47 +583,47 @@ class nsBlockAllMixedContentDirective :
* gets upgraded from ws to wss.
*/
class nsUpgradeInsecureDirective : public nsCSPDirective {
public:
explicit nsUpgradeInsecureDirective(CSPDirective aDirective);
~nsUpgradeInsecureDirective();
bool permits(nsIURI* aUri, const nsAString& aNonce, bool aWasRedirected,
- bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const
+ bool aReportOnly, bool aUpgradeInsecure, bool aParserCreated) const override
{ return false; }
bool permits(nsIURI* aUri) const
{ return false; }
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
- bool aParserCreated) const
+ bool aParserCreated) const override
{ return false; }
- void toString(nsAString& outStr) const;
+ void toString(nsAString& outStr) const override;
- void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs)
+ void addSrcs(const nsTArray<nsCSPBaseSrc*>& aSrcs) override
{ MOZ_ASSERT(false, "upgrade-insecure-requests does not hold any srcs"); }
};
/* ===== nsRequireSRIForDirective ========================= */
class nsRequireSRIForDirective : public nsCSPDirective {
public:
explicit nsRequireSRIForDirective(CSPDirective aDirective);
~nsRequireSRIForDirective();
- void toString(nsAString& outStr) const;
+ void toString(nsAString& outStr) const override;
void addType(nsContentPolicyType aType)
{ mTypes.AppendElement(aType); }
bool hasType(nsContentPolicyType aType) const;
- bool restrictsContentType(nsContentPolicyType aType) const;
+ bool restrictsContentType(nsContentPolicyType aType) const override;
bool allows(enum CSPKeyword aKeyword, const nsAString& aHashOrNonce,
- bool aParserCreated) const;
+ bool aParserCreated) const override;
private:
nsTArray<nsContentPolicyType> mTypes;
};
/* =============== nsCSPPolicy ================== */
class nsCSPPolicy {
--- a/dom/storage/LocalStorageCache.h
+++ b/dom/storage/LocalStorageCache.h
@@ -71,17 +71,17 @@ protected:
// Implementation of scope cache that is responsible for preloading data
// for persistent storage (localStorage) and hold data for non-private,
// private and session-only cookie modes. It is also responsible for
// persisting data changes using the database, works as a write-back cache.
class LocalStorageCache : public LocalStorageCacheBridge
{
public:
- NS_IMETHOD_(void) Release(void);
+ NS_IMETHOD_(void) Release(void) override;
enum MutationSource {
// The mutation is a result of an explicit JS mutation in this process.
// The mutation should be sent to the sDatabase. Quota will be checked and
// QuotaExceededError may be returned without the mutation being applied.
ContentMutation,
// The mutation initially was triggered in a different process and is being
// propagated to this cache via LocalStorage::ApplyEvent. The mutation should
@@ -128,24 +128,24 @@ public:
const MutationSource aSource=ContentMutation);
nsresult Clear(const LocalStorage* aStorage,
const MutationSource aSource=ContentMutation);
void GetKeys(const LocalStorage* aStorage, nsTArray<nsString>& aKeys);
// LocalStorageCacheBridge
- virtual const nsCString Origin() const;
- virtual const nsCString& OriginNoSuffix() const { return mOriginNoSuffix; }
- virtual const nsCString& OriginSuffix() const { return mOriginSuffix; }
- virtual bool Loaded() { return mLoaded; }
- virtual uint32_t LoadedCount();
- virtual bool LoadItem(const nsAString& aKey, const nsString& aValue);
- virtual void LoadDone(nsresult aRv);
- virtual void LoadWait();
+ const nsCString Origin() const override;
+ const nsCString& OriginNoSuffix() const override { return mOriginNoSuffix; }
+ const nsCString& OriginSuffix() const override { return mOriginSuffix; }
+ bool Loaded() override { return mLoaded; }
+ uint32_t LoadedCount() override;
+ bool LoadItem(const nsAString& aKey, const nsString& aValue) override;
+ void LoadDone(nsresult aRv) override;
+ void LoadWait() override;
// Cache keeps 3 sets of data: regular, private and session-only.
// This class keeps keys and values for a set and also caches
// size of the data for quick per-origin quota checking.
class Data
{
public:
Data() : mOriginQuotaUsage(0) {}
@@ -274,18 +274,18 @@ class StorageUsage : public StorageUsage
{
public:
explicit StorageUsage(const nsACString& aOriginScope);
bool CheckAndSetETLD1UsageDelta(uint32_t aDataSetIndex, int64_t aUsageDelta,
const LocalStorageCache::MutationSource aSource);
private:
- virtual const nsCString& OriginScope() { return mOriginScope; }
- virtual void LoadUsage(const int64_t aUsage);
+ const nsCString& OriginScope() override { return mOriginScope; }
+ void LoadUsage(const int64_t aUsage) override;
nsCString mOriginScope;
int64_t mUsage[LocalStorageCache::kDataSetCount];
};
} // namespace dom
} // namespace mozilla
--- a/dom/storage/StorageIPC.cpp
+++ b/dom/storage/StorageIPC.cpp
@@ -653,52 +653,52 @@ public:
, mRv(rv)
, mLoaded(false)
, mLoadedCount(aAlreadyLoadedCount)
{
// Precaution
*mRv = NS_ERROR_UNEXPECTED;
}
- virtual const nsCString Origin() const
+ virtual const nsCString Origin() const override
{
return LocalStorageManager::CreateOrigin(mSuffix, mOrigin);
}
- virtual const nsCString& OriginNoSuffix() const { return mOrigin; }
- virtual const nsCString& OriginSuffix() const { return mSuffix; }
- virtual bool Loaded() { return mLoaded; }
- virtual uint32_t LoadedCount() { return mLoadedCount; }
- virtual bool LoadItem(const nsAString& aKey, const nsString& aValue)
+ virtual const nsCString& OriginNoSuffix() const override { return mOrigin; }
+ virtual const nsCString& OriginSuffix() const override { return mSuffix; }
+ virtual bool Loaded() override { return mLoaded; }
+ virtual uint32_t LoadedCount() override { return mLoadedCount; }
+ virtual bool LoadItem(const nsAString& aKey, const nsString& aValue) override
{
// Called on the aCache background thread
MOZ_ASSERT(!mLoaded);
if (mLoaded) {
return false;
}
++mLoadedCount;
mKeys->AppendElement(aKey);
mValues->AppendElement(aValue);
return true;
}
- virtual void LoadDone(nsresult aRv)
+ virtual void LoadDone(nsresult aRv) override
{
// Called on the aCache background thread
MonitorAutoLock monitor(mMonitor);
MOZ_ASSERT(!mLoaded && mRv);
mLoaded = true;
if (mRv) {
*mRv = aRv;
mRv = nullptr;
}
monitor.Notify();
}
- virtual void LoadWait()
+ virtual void LoadWait() override
{
// Called on the main thread, exits after LoadDone() call
MonitorAutoLock monitor(mMonitor);
while (!mLoaded) {
monitor.Wait();
}
}
--- a/dom/storage/StorageIPC.h
+++ b/dom/storage/StorageIPC.h
@@ -90,28 +90,28 @@ public:
MOZ_CRASH("Shouldn't be called!");
}
virtual bool ShouldPreloadOrigin(const nsACString& aOriginNoSuffix);
private:
mozilla::ipc::IPCResult RecvObserve(const nsCString& aTopic,
const nsString& aOriginAttributesPattern,
- const nsCString& aOriginScope);
+ const nsCString& aOriginScope) override;
mozilla::ipc::IPCResult RecvLoadItem(const nsCString& aOriginSuffix,
const nsCString& aOriginNoSuffix,
const nsString& aKey,
- const nsString& aValue);
+ const nsString& aValue) override;
mozilla::ipc::IPCResult RecvLoadDone(const nsCString& aOriginSuffix,
const nsCString& aOriginNoSuffix,
- const nsresult& aRv);
- mozilla::ipc::IPCResult RecvOriginsHavingData(nsTArray<nsCString>&& aOrigins);
+ const nsresult& aRv) override;
+ mozilla::ipc::IPCResult RecvOriginsHavingData(nsTArray<nsCString>&& aOrigins) override;
mozilla::ipc::IPCResult RecvLoadUsage(const nsCString& aOriginNoSuffix,
- const int64_t& aUsage);
- mozilla::ipc::IPCResult RecvError(const nsresult& aRv);
+ const int64_t& aUsage) override;
+ mozilla::ipc::IPCResult RecvError(const nsresult& aRv) override;
nsTHashtable<nsCStringHashKey>& OriginsHavingData();
// Held to get caches to forward answers to.
RefPtr<LocalStorageManager> mManager;
// Origins having data hash, for optimization purposes only
nsAutoPtr<nsTHashtable<nsCStringHashKey>> mOriginsHavingData;
@@ -162,32 +162,32 @@ public:
const nsACString& aOriginNoSuffix)
: mOwningEventTarget(GetCurrentThreadSerialEventTarget())
, mParent(aParentDB)
, mOriginSuffix(aOriginSuffix), mOriginNoSuffix(aOriginNoSuffix)
, mLoaded(false), mLoadedCount(0) {}
virtual ~CacheParentBridge() {}
// LocalStorageCacheBridge
- virtual const nsCString Origin() const;
- virtual const nsCString& OriginNoSuffix() const
+ virtual const nsCString Origin() const override;
+ virtual const nsCString& OriginNoSuffix() const override
{ return mOriginNoSuffix; }
- virtual const nsCString& OriginSuffix() const
+ virtual const nsCString& OriginSuffix() const override
{ return mOriginSuffix; }
- virtual bool Loaded()
+ virtual bool Loaded() override
{ return mLoaded; }
- virtual uint32_t LoadedCount()
+ virtual uint32_t LoadedCount() override
{ return mLoadedCount; }
- virtual bool LoadItem(const nsAString& aKey, const nsString& aValue);
- virtual void LoadDone(nsresult aRv);
- virtual void LoadWait();
+ virtual bool LoadItem(const nsAString& aKey, const nsString& aValue) override;
+ virtual void LoadDone(nsresult aRv) override;
+ virtual void LoadWait() override;
NS_IMETHOD_(void)
- Release(void);
+ Release(void) override;
private:
void
Destroy();
nsCOMPtr<nsISerialEventTarget> mOwningEventTarget;
RefPtr<StorageDBParent> mParent;
nsCString mOriginSuffix, mOriginNoSuffix;
@@ -202,21 +202,21 @@ public:
UsageParentBridge(StorageDBParent* aParentDB,
const nsACString& aOriginScope)
: mOwningEventTarget(GetCurrentThreadSerialEventTarget())
, mParent(aParentDB)
, mOriginScope(aOriginScope) {}
virtual ~UsageParentBridge() {}
// StorageUsageBridge
- virtual const nsCString& OriginScope() { return mOriginScope; }
- virtual void LoadUsage(const int64_t usage);
+ virtual const nsCString& OriginScope() override { return mOriginScope; }
+ virtual void LoadUsage(const int64_t usage) override;
NS_IMETHOD_(MozExternalRefCountType)
- Release(void);
+ Release(void) override;
private:
void
Destroy();
nsCOMPtr<nsISerialEventTarget> mOwningEventTarget;
RefPtr<StorageDBParent> mParent;
nsCString mOriginScope;
--- a/dom/svg/SVGRect.h
+++ b/dom/svg/SVGRect.h
@@ -27,47 +27,47 @@ public:
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(SVGRect)
// WebIDL
virtual float X() const override final
{
return mX;
}
- virtual void SetX(float aX, ErrorResult& aRv) final
+ virtual void SetX(float aX, ErrorResult& aRv) final override
{
mX = aX;
}
virtual float Y() const override final
{
return mY;
}
- virtual void SetY(float aY, ErrorResult& aRv) final
+ virtual void SetY(float aY, ErrorResult& aRv) final override
{
mY = aY;
}
virtual float Width() const override final
{
return mWidth;
}
- virtual void SetWidth(float aWidth, ErrorResult& aRv) final
+ virtual void SetWidth(float aWidth, ErrorResult& aRv) final override
{
mWidth = aWidth;
}
virtual float Height() const override final
{
return mHeight;
}
- virtual void SetHeight(float aHeight, ErrorResult& aRv) final
+ virtual void SetHeight(float aHeight, ErrorResult& aRv) final override
{
mHeight = aHeight;
}
virtual nsIContent* GetParentObject() const override
{
return mParent;
}
--- a/dom/time/DateCacheCleaner.cpp
+++ b/dom/time/DateCacheCleaner.cpp
@@ -25,17 +25,18 @@ public:
{
RegisterSystemTimezoneChangeObserver(this);
}
~DateCacheCleaner()
{
UnregisterSystemTimezoneChangeObserver(this);
}
- void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo)
+
+ void Notify(const SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override
{
JS::ResetTimeZone();
}
};
StaticAutoPtr<DateCacheCleaner> sDateCacheCleaner;
--- a/dom/time/TimeChangeObserver.cpp
+++ b/dom/time/TimeChangeObserver.cpp
@@ -26,21 +26,21 @@ class nsSystemTimeChangeObserver : publi
public SystemTimezoneChangeObserver
{
typedef nsTObserverArray<nsWeakPtr> ListenerArray;
public:
static nsSystemTimeChangeObserver* GetInstance();
virtual ~nsSystemTimeChangeObserver();
// Implementing hal::SystemClockChangeObserver::Notify()
- void Notify(const int64_t& aClockDeltaMS);
+ void Notify(const int64_t& aClockDeltaMS) override;
// Implementing hal::SystemTimezoneChangeObserver::Notify()
void Notify(
- const mozilla::hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo);
+ const mozilla::hal::SystemTimezoneChangeInformation& aSystemTimezoneChangeInfo) override;
nsresult AddWindowListenerImpl(nsPIDOMWindowInner* aWindow);
nsresult RemoveWindowListenerImpl(nsPIDOMWindowInner* aWindow);
private:
nsSystemTimeChangeObserver() { };
ListenerArray mWindowListeners;
void FireMozTimeChangeEvent();
--- a/dom/url/URLWorker.cpp
+++ b/dom/url/URLWorker.cpp
@@ -80,17 +80,17 @@ public:
MOZ_ASSERT(aBlobImpl);
DebugOnly<bool> isMutable;
MOZ_ASSERT(NS_SUCCEEDED(aBlobImpl->GetMutable(&isMutable)));
MOZ_ASSERT(!isMutable);
}
bool
- MainThreadRun()
+ MainThreadRun() override
{
using namespace mozilla::ipc;
AssertIsOnMainThread();
DebugOnly<bool> isMutable;
MOZ_ASSERT(NS_SUCCEEDED(mBlobImpl->GetMutable(&isMutable)));
MOZ_ASSERT(!isMutable);
@@ -140,17 +140,17 @@ public:
RevokeURLRunnable(WorkerPrivate* aWorkerPrivate,
const nsAString& aURL)
: WorkerMainThreadRunnable(aWorkerPrivate,
NS_LITERAL_CSTRING("URL :: RevokeURL"))
, mURL(aURL)
{}
bool
- MainThreadRun()
+ MainThreadRun() override
{
AssertIsOnMainThread();
NS_ConvertUTF16toUTF8 url(mURL);
nsIPrincipal* urlPrincipal =
nsHostObjectProtocolHandler::GetDataEntryPrincipal(url);
@@ -197,17 +197,17 @@ public:
const nsAString& aURL)
: WorkerMainThreadRunnable(aWorkerPrivate,
NS_LITERAL_CSTRING("URL :: IsValidURL"))
, mURL(aURL)
, mValid(false)
{}
bool
- MainThreadRun()
+ MainThreadRun() override
{
AssertIsOnMainThread();
NS_ConvertUTF16toUTF8 url(mURL);
mValid = nsHostObjectProtocolHandler::HasDataEntry(url);
return true;
}
@@ -240,17 +240,17 @@ public:
mBase = aBase.Value();
} else {
mBase.SetIsVoid(true);
}
mWorkerPrivate->AssertIsOnWorkerThread();
}
bool
- MainThreadRun()
+ MainThreadRun() override
{
AssertIsOnMainThread();
ErrorResult rv;
RefPtr<URLMainThread> url;
if (!mBase.IsVoid()) {
url = URLMainThread::Constructor(nullptr, mURL, mBase, rv);
} else {
@@ -284,17 +284,17 @@ class TeardownURLRunnable : public Runna
{
public:
explicit TeardownURLRunnable(URLWorker::URLProxy* aURLProxy)
: Runnable("dom::TeardownURLRunnable")
, mURLProxy(aURLProxy)
{
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
AssertIsOnMainThread();
mURLProxy->ReleaseURI();
mURLProxy = nullptr;
return NS_OK;
}
@@ -331,17 +331,17 @@ public:
, mValue(aValue)
, mType(aType)
, mURLProxy(aURLProxy)
{
mWorkerPrivate->AssertIsOnWorkerThread();
}
bool
- MainThreadRun()
+ MainThreadRun() override
{
AssertIsOnMainThread();
ErrorResult rv;
switch (mType) {
case GetterHref:
mURLProxy->URL()->GetHref(mValue, rv);
break;
@@ -431,17 +431,17 @@ public:
, mType(aType)
, mURLProxy(aURLProxy)
, mFailed(false)
{
mWorkerPrivate->AssertIsOnWorkerThread();
}
bool
- MainThreadRun()
+ MainThreadRun() override
{
AssertIsOnMainThread();
ErrorResult rv;
switch (mType) {
case SetterHref: {
mURLProxy->URL()->SetHref(mValue, rv);
break;
--- a/dom/webauthn/WebAuthnTransactionChild.h
+++ b/dom/webauthn/WebAuthnTransactionChild.h
@@ -23,27 +23,27 @@ namespace dom {
class WebAuthnTransactionChild final : public PWebAuthnTransactionChild
{
public:
NS_INLINE_DECL_REFCOUNTING(WebAuthnTransactionChild);
explicit WebAuthnTransactionChild(WebAuthnManagerBase* aManager);
mozilla::ipc::IPCResult
RecvConfirmRegister(const uint64_t& aTransactionId,
- nsTArray<uint8_t>&& aRegBuffer);
+ nsTArray<uint8_t>&& aRegBuffer) override;
mozilla::ipc::IPCResult
RecvConfirmSign(const uint64_t& aTransactionId,
nsTArray<uint8_t>&& aCredentialId,
- nsTArray<uint8_t>&& aBuffer);
+ nsTArray<uint8_t>&& aBuffer) override;
mozilla::ipc::IPCResult
- RecvAbort(const uint64_t& aTransactionId, const nsresult& aError);
+ RecvAbort(const uint64_t& aTransactionId, const nsresult& aError) override;
- void ActorDestroy(ActorDestroyReason why);
+ void ActorDestroy(ActorDestroyReason why) override;
void Disconnect();
private:
~WebAuthnTransactionChild() = default;
// Nulled by ~WebAuthnManager() when disconnecting.
WebAuthnManagerBase* mManager;
--- a/dom/workers/ServiceWorkerManager.cpp
+++ b/dom/workers/ServiceWorkerManager.cpp
@@ -1530,33 +1530,33 @@ public:
explicit UnregisterJobCallback(nsIServiceWorkerUnregisterCallback* aCallback)
: mCallback(aCallback)
{
AssertIsOnMainThread();
MOZ_ASSERT(mCallback);
}
void
- JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus)
+ JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus) override
{
AssertIsOnMainThread();
MOZ_ASSERT(aJob);
if (aStatus.Failed()) {
mCallback->UnregisterFailed();
return;
}
MOZ_ASSERT(aJob->GetType() == ServiceWorkerJob::Type::Unregister);
RefPtr<ServiceWorkerUnregisterJob> unregisterJob =
static_cast<ServiceWorkerUnregisterJob*>(aJob);
mCallback->UnregisterSucceeded(unregisterJob->GetResult());
}
- NS_INLINE_DECL_REFCOUNTING(UnregisterJobCallback)
+ NS_INLINE_DECL_REFCOUNTING(UnregisterJobCallback, override)
};
} // anonymous namespace
NS_IMETHODIMP
ServiceWorkerManager::Unregister(nsIPrincipal* aPrincipal,
nsIServiceWorkerUnregisterCallback* aCallback,
const nsAString& aScope)
@@ -3054,34 +3054,34 @@ public:
explicit UpdateJobCallback(ServiceWorkerUpdateFinishCallback* aCallback)
: mCallback(aCallback)
{
AssertIsOnMainThread();
MOZ_ASSERT(mCallback);
}
void
- JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus)
+ JobFinished(ServiceWorkerJob* aJob, ErrorResult& aStatus) override
{
AssertIsOnMainThread();
MOZ_ASSERT(aJob);
if (aStatus.Failed()) {
mCallback->UpdateFailed(aStatus);
return;
}
MOZ_DIAGNOSTIC_ASSERT(aJob->GetType() == ServiceWorkerJob::Type::Update);
RefPtr<ServiceWorkerUpdateJob> updateJob =
static_cast<ServiceWorkerUpdateJob*>(aJob);
RefPtr<ServiceWorkerRegistrationInfo> reg = updateJob->GetRegistration();
mCallback->UpdateSucceeded(reg);
}
- NS_INLINE_DECL_REFCOUNTING(UpdateJobCallback)
+ NS_INLINE_DECL_REFCOUNTING(UpdateJobCallback, override)
};
} // anonymous namespace
void
ServiceWorkerManager::SoftUpdateInternal(const OriginAttributes& aOriginAttributes,
const nsACString& aScope,
ServiceWorkerUpdateFinishCallback* aCallback)
--- a/dom/workers/ServiceWorkerPrivate.cpp
+++ b/dom/workers/ServiceWorkerPrivate.cpp
@@ -603,17 +603,17 @@ public:
nsMainThreadPtrHandle<ServiceWorkerRegistrationInfo>& aRegistration)
: ExtendableEventWorkerRunnable(aWorkerPrivate, aKeepAliveToken)
, mRegistration(aRegistration)
{
MOZ_DIAGNOSTIC_ASSERT(aRegistration);
}
void
- PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aRunResult)
+ PostRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate, bool aRunResult) override
{
// Sub-class PreRun() or WorkerRun() methods could clear our mRegistration.
if (mRegistration) {
nsCOMPtr<nsIRunnable> runnable =
new RegistrationUpdateRunnable(mRegistration, true /* time check */);
aWorkerPrivate->DispatchToMainThread(runnable.forget());
}
--- a/dom/workers/WorkerPrivate.cpp
+++ b/dom/workers/WorkerPrivate.cpp
@@ -1507,34 +1507,34 @@ class CycleCollectRunnable : public Work
public:
CycleCollectRunnable(WorkerPrivate* aWorkerPrivate, bool aCollectChildren)
: WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount),
mCollectChildren(aCollectChildren)
{ }
bool
- WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
{
aWorkerPrivate->CycleCollectInternal(mCollectChildren);
return true;
}
};
class OfflineStatusChangeRunnable : public WorkerRunnable
{
public:
OfflineStatusChangeRunnable(WorkerPrivate* aWorkerPrivate, bool aIsOffline)
: WorkerRunnable(aWorkerPrivate),
mIsOffline(aIsOffline)
{
}
bool
- WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
{
aWorkerPrivate->OfflineStatusChangeEventInternal(mIsOffline);
return true;
}
private:
bool mIsOffline;
};
@@ -1542,17 +1542,17 @@ private:
class MemoryPressureRunnable : public WorkerControlRunnable
{
public:
explicit MemoryPressureRunnable(WorkerPrivate* aWorkerPrivate)
: WorkerControlRunnable(aWorkerPrivate, WorkerThreadUnchangedBusyCount)
{}
bool
- WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
{
aWorkerPrivate->MemoryPressureInternal();
return true;
}
};
#ifdef DEBUG
static bool
@@ -1609,17 +1609,17 @@ PRThreadFromThread(nsIThread* aThread)
class SimpleWorkerHolder final : public WorkerHolder
{
public:
SimpleWorkerHolder()
: WorkerHolder("SimpleWorkerHolder")
{}
- virtual bool Notify(Status aStatus) { return true; }
+ virtual bool Notify(Status aStatus) override { return true; }
};
} /* anonymous namespace */
NS_IMPL_ISUPPORTS_INHERITED0(MainThreadReleaseRunnable, Runnable)
NS_IMPL_ISUPPORTS_INHERITED0(TopLevelWorkerFinishedRunnable, Runnable)
--- a/dom/xhr/XMLHttpRequestWorker.cpp
+++ b/dom/xhr/XMLHttpRequestWorker.cpp
@@ -336,17 +336,17 @@ public:
MOZ_ASSERT(aXHRPrivate);
}
private:
~XHRUnpinRunnable()
{ }
bool
- WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate)
+ WorkerRun(JSContext* aCx, WorkerPrivate* aWorkerPrivate) override
{
if (mXMLHttpRequestPrivate->SendInProgress()) {
mXMLHttpRequestPrivate->Unpin();
}
return true;
}
};
--- a/dom/xslt/xpath/XPathEvaluator.cpp
+++ b/dom/xslt/xpath/XPathEvaluator.cpp
@@ -48,21 +48,21 @@ public:
{
}
nsresult getError()
{
return mLastError;
}
- nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID);
+ nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID) override;
nsresult resolveFunctionCall(nsAtom* aName, int32_t aID,
- FunctionCall** aFunction);
- bool caseInsensitiveNameTests();
- void SetErrorOffset(uint32_t aOffset);
+ FunctionCall** aFunction) override;
+ bool caseInsensitiveNameTests() override;
+ void SetErrorOffset(uint32_t aOffset) override;
private:
XPathNSResolver* mResolver;
nsINode* mResolverNode;
nsresult mLastError;
bool mIsCaseSensitive;
};
--- a/dom/xslt/xpath/txExprResult.h
+++ b/dom/xslt/xpath/txExprResult.h
@@ -82,22 +82,21 @@ public:
virtual double numberValue() = 0;
private:
nsAutoRefCnt mRefCnt;
RefPtr<txResultRecycler> mRecycler;
};
#define TX_DECL_EXPRRESULT \
- virtual short getResultType(); \
- virtual void stringValue(nsString& aString); \
- virtual const nsString* stringValuePointer(); \
- virtual bool booleanValue(); \
- virtual double numberValue(); \
-
+ virtual short getResultType() override; \
+ virtual void stringValue(nsString& aString) override; \
+ virtual const nsString* stringValuePointer() override; \
+ virtual bool booleanValue() override; \
+ virtual double numberValue() override;
class BooleanResult : public txAExprResult {
public:
explicit BooleanResult(bool aValue);
TX_DECL_EXPRRESULT
@@ -123,9 +122,8 @@ public:
StringResult(const nsAString& aValue, txResultRecycler* aRecycler);
TX_DECL_EXPRRESULT
nsString mValue;
};
#endif
-
--- a/dom/xslt/xpath/txIXPathContext.h
+++ b/dom/xslt/xpath/txIXPathContext.h
@@ -101,21 +101,22 @@ public:
/*
* Callback to be used by the expression/pattern if errors are detected.
*/
virtual void receiveError(const nsAString& aMsg, nsresult aRes) = 0;
};
#define TX_DECL_MATCH_CONTEXT \
nsresult getVariable(int32_t aNamespace, nsAtom* aLName, \
- txAExprResult*& aResult); \
- nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed); \
- void* getPrivateContext(); \
- txResultRecycler* recycler(); \
- void receiveError(const nsAString& aMsg, nsresult aRes)
+ txAExprResult*& aResult) override; \
+ nsresult isStripSpaceAllowed(const txXPathNode& aNode, \
+ bool& aAllowed) override; \
+ void* getPrivateContext() override; \
+ txResultRecycler* recycler() override; \
+ void receiveError(const nsAString& aMsg, nsresult aRes) override
class txIEvalContext : public txIMatchContext
{
public:
/*
* Get the context node.
*/
virtual const txXPathNode& getContextNode() = 0;
@@ -129,13 +130,13 @@ public:
* Get the position of the context node in the context node set,
* starting with 1.
*/
virtual uint32_t position() = 0;
};
#define TX_DECL_EVAL_CONTEXT \
TX_DECL_MATCH_CONTEXT; \
- const txXPathNode& getContextNode(); \
- uint32_t size(); \
- uint32_t position()
+ const txXPathNode& getContextNode() override; \
+ uint32_t size() override; \
+ uint32_t position() override
#endif // __TX_I_XPATH_CONTEXT
--- a/dom/xslt/xpath/txXPathOptimizer.cpp
+++ b/dom/xslt/xpath/txXPathOptimizer.cpp
@@ -17,53 +17,53 @@ class txEarlyEvalContext : public txIEva
public:
explicit txEarlyEvalContext(txResultRecycler* aRecycler)
: mRecycler(aRecycler)
{
}
// txIEvalContext
nsresult getVariable(int32_t aNamespace, nsAtom* aLName,
- txAExprResult*& aResult)
+ txAExprResult*& aResult) override
{
MOZ_CRASH("shouldn't depend on this context");
}
- nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed)
+ nsresult isStripSpaceAllowed(const txXPathNode& aNode,
+ bool& aAllowed) override
{
MOZ_CRASH("shouldn't depend on this context");
}
- void* getPrivateContext()
+ void* getPrivateContext() override
{
MOZ_CRASH("shouldn't depend on this context");
}
- txResultRecycler* recycler()
+ txResultRecycler* recycler() override
{
return mRecycler;
}
- void receiveError(const nsAString& aMsg, nsresult aRes)
+ void receiveError(const nsAString& aMsg, nsresult aRes) override
{
}
- const txXPathNode& getContextNode()
+ const txXPathNode& getContextNode() override
{
MOZ_CRASH("shouldn't depend on this context");
}
- uint32_t size()
+ uint32_t size() override
{
MOZ_CRASH("shouldn't depend on this context");
}
- uint32_t position()
+ uint32_t position() override
{
MOZ_CRASH("shouldn't depend on this context");
}
private:
txResultRecycler* mRecycler;
};
-
nsresult
txXPathOptimizer::optimize(Expr* aInExpr, Expr** aOutExpr)
{
*aOutExpr = nullptr;
nsresult rv = NS_OK;
// First check if the expression will produce the same result
// under any context.
--- a/dom/xslt/xslt/txInstructions.h
+++ b/dom/xslt/xslt/txInstructions.h
@@ -33,17 +33,17 @@ public:
}
virtual nsresult execute(txExecutionState& aEs) = 0;
nsAutoPtr<txInstruction> mNext;
};
#define TX_DECL_TXINSTRUCTION \
- virtual nsresult execute(txExecutionState& aEs);
+ virtual nsresult execute(txExecutionState& aEs) override;
class txApplyDefaultElementTemplate : public txInstruction
{
public:
TX_DECL_TXINSTRUCTION
};
--- a/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
+++ b/dom/xslt/xslt/txMozillaStylesheetCompiler.cpp
@@ -366,17 +366,17 @@ txStylesheetSink::GetInterface(const nsI
class txCompileObserver final : public txACompileObserver
{
public:
txCompileObserver(txMozillaXSLTProcessor* aProcessor,
nsIDocument* aLoaderDocument);
TX_DECL_ACOMPILEOBSERVER
- NS_INLINE_DECL_REFCOUNTING(txCompileObserver)
+ NS_INLINE_DECL_REFCOUNTING(txCompileObserver, override)
nsresult startLoad(nsIURI* aUri, txStylesheetCompiler* aCompiler,
nsIPrincipal* aSourcePrincipal,
ReferrerPolicy aReferrerPolicy);
private:
RefPtr<txMozillaXSLTProcessor> mProcessor;
nsCOMPtr<nsIDocument> mLoaderDocument;
@@ -583,17 +583,17 @@ handleNode(nsINode* aNode, txStylesheetC
}
class txSyncCompileObserver final : public txACompileObserver
{
public:
explicit txSyncCompileObserver(txMozillaXSLTProcessor* aProcessor);
TX_DECL_ACOMPILEOBSERVER
- NS_INLINE_DECL_REFCOUNTING(txSyncCompileObserver)
+ NS_INLINE_DECL_REFCOUNTING(txSyncCompileObserver, override)
private:
// Private destructor, to discourage deletion outside of Release():
~txSyncCompileObserver()
{
}
RefPtr<txMozillaXSLTProcessor> mProcessor;
--- a/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
+++ b/dom/xslt/xslt/txMozillaXSLTProcessor.cpp
@@ -242,17 +242,17 @@ public:
explicit txVariable(nsIVariant* aValue) : mValue(aValue)
{
NS_ASSERTION(aValue, "missing value");
}
explicit txVariable(txAExprResult* aValue) : mTxValue(aValue)
{
NS_ASSERTION(aValue, "missing value");
}
- nsresult getValue(txAExprResult** aValue)
+ nsresult getValue(txAExprResult** aValue) override
{
NS_ASSERTION(mValue || mTxValue, "variablevalue is null");
if (!mTxValue) {
nsresult rv = Convert(mValue, getter_AddRefs(mTxValue));
NS_ENSURE_SUCCESS(rv, rv);
}
@@ -423,68 +423,68 @@ public:
txResultRecycler* aRecycler)
: mResolver(aResolver),
mContext(aContext),
mRecycler(aRecycler)
{
}
// txIParseContext
- nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID)
+ nsresult resolveNamespacePrefix(nsAtom* aPrefix, int32_t& aID) override
{
aID = mResolver->lookupNamespace(aPrefix);
return aID == kNameSpaceID_Unknown ? NS_ERROR_DOM_NAMESPACE_ERR :
NS_OK;
}
nsresult resolveFunctionCall(nsAtom* aName, int32_t aID,
- FunctionCall** aFunction)
+ FunctionCall** aFunction) override
{
return NS_ERROR_XPATH_UNKNOWN_FUNCTION;
}
- bool caseInsensitiveNameTests()
+ bool caseInsensitiveNameTests() override
{
return false;
}
- void SetErrorOffset(uint32_t aOffset)
+ void SetErrorOffset(uint32_t aOffset) override
{
}
// txIEvalContext
nsresult getVariable(int32_t aNamespace, nsAtom* aLName,
- txAExprResult*& aResult)
+ txAExprResult*& aResult) override
{
aResult = nullptr;
return NS_ERROR_INVALID_ARG;
}
- nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed)
+ nsresult isStripSpaceAllowed(const txXPathNode& aNode, bool& aAllowed) override
{
aAllowed = false;
return NS_OK;
}
- void* getPrivateContext()
+ void* getPrivateContext() override
{
return nullptr;
}
- txResultRecycler* recycler()
+ txResultRecycler* recycler() override
{
return mRecycler;
}
- void receiveError(const nsAString& aMsg, nsresult aRes)
+ void receiveError(const nsAString& aMsg, nsresult aRes) override
{
}
- const txXPathNode& getContextNode()
+ const txXPathNode& getContextNode() override
{
return mContext;
}
- uint32_t size()
+ uint32_t size() override
{
return 1;
}
- uint32_t position()
+ uint32_t position() override
{
return 1;
}
private:
txNamespaceMap *mResolver;
const txXPathNode& mContext;
txResultRecycler* mRecycler;
--- a/dom/xslt/xslt/txStylesheetCompiler.h
+++ b/dom/xslt/xslt/txStylesheetCompiler.h
@@ -56,20 +56,20 @@ public:
nsresult aResult,
const char16_t *aErrorText = nullptr,
const char16_t *aParam = nullptr) = 0;
};
#define TX_DECL_ACOMPILEOBSERVER \
nsresult loadURI(const nsAString& aUri, const nsAString& aReferrerUri, \
mozilla::net::ReferrerPolicy aReferrerPolicy, \
- txStylesheetCompiler* aCompiler); \
+ txStylesheetCompiler* aCompiler) override; \
void onDoneCompiling(txStylesheetCompiler* aCompiler, nsresult aResult, \
const char16_t *aErrorText = nullptr, \
- const char16_t *aParam = nullptr);
+ const char16_t *aParam = nullptr) override;
class txStylesheetCompilerState : public txIParseContext
{
public:
explicit txStylesheetCompilerState(txACompileObserver* aObserver);
~txStylesheetCompilerState();
nsresult init(const nsAString& aStylesheetURI,
@@ -228,17 +228,17 @@ public:
nsresult doneLoading();
void cancel(nsresult aError, const char16_t *aErrorText = nullptr,
const char16_t *aParam = nullptr);
txStylesheet* getStylesheet();
TX_DECL_ACOMPILEOBSERVER
- NS_INLINE_DECL_REFCOUNTING(txStylesheetCompiler)
+ NS_INLINE_DECL_REFCOUNTING(txStylesheetCompiler, override)
private:
// Private destructor, to discourage deletion outside of Release():
~txStylesheetCompiler()
{
}
nsresult startElementInternal(int32_t aNamespaceID, nsAtom* aLocalName,
--- a/dom/xslt/xslt/txToplevelItems.h
+++ b/dom/xslt/xslt/txToplevelItems.h
@@ -36,17 +36,17 @@ public:
stripSpace, //also used for preserve-space
templ,
variable
};
virtual type getType() = 0;
};
-#define TX_DECL_TOPLEVELITEM virtual type getType();
+#define TX_DECL_TOPLEVELITEM virtual type getType() override;
#define TX_IMPL_GETTYPE(_class, _type) \
txToplevelItem::type \
_class::getType() { return _type;}
class txInstructionContainer : public txToplevelItem
{
public:
nsAutoPtr<txInstruction> mFirstInstruction;
--- a/dom/xslt/xslt/txXMLEventHandler.h
+++ b/dom/xslt/xslt/txXMLEventHandler.h
@@ -115,50 +115,50 @@ public:
virtual nsresult startElement(nsAtom* aPrefix,
const nsAString& aLocalName,
const int32_t aNsID) = 0;
};
#define TX_DECL_TXAXMLEVENTHANDLER \
virtual nsresult attribute(nsAtom* aPrefix, nsAtom* aLocalName, \
nsAtom* aLowercaseLocalName, int32_t aNsID, \
- const nsString& aValue); \
+ const nsString& aValue) override; \
virtual nsresult attribute(nsAtom* aPrefix, \
const nsAString& aLocalName, \
const int32_t aNsID, \
- const nsString& aValue); \
- virtual nsresult characters(const nsAString& aData, bool aDOE); \
- virtual nsresult comment(const nsString& aData); \
- virtual nsresult endDocument(nsresult aResult = NS_OK); \
- virtual nsresult endElement(); \
+ const nsString& aValue) override; \
+ virtual nsresult characters(const nsAString& aData, bool aDOE) override; \
+ virtual nsresult comment(const nsString& aData) override; \
+ virtual nsresult endDocument(nsresult aResult = NS_OK) override; \
+ virtual nsresult endElement() override; \
virtual nsresult processingInstruction(const nsString& aTarget, \
- const nsString& aData); \
- virtual nsresult startDocument(); \
+ const nsString& aData) override; \
+ virtual nsresult startDocument() override; \
virtual nsresult startElement(nsAtom* aPrefix, \
nsAtom* aLocalName, \
nsAtom* aLowercaseLocalName, \
- int32_t aNsID); \
+ int32_t aNsID) override; \
virtual nsresult startElement(nsAtom* aPrefix, \
const nsAString& aName, \
- const int32_t aNsID);
+ const int32_t aNsID) override;
class txAOutputXMLEventHandler : public txAXMLEventHandler
{
public:
/**
* Gets the Mozilla output document
*
* @param aDocument the Mozilla output document
*/
virtual void getOutputDocument(nsIDOMDocument** aDocument) = 0;
};
#define TX_DECL_TXAOUTPUTXMLEVENTHANDLER \
- virtual void getOutputDocument(nsIDOMDocument** aDocument);
+ virtual void getOutputDocument(nsIDOMDocument** aDocument) override;
/**
* Interface used to create the appropriate outputhandler
*/
class txAOutputHandlerFactory
{
public:
virtual ~txAOutputHandlerFactory() {}
@@ -184,15 +184,15 @@ public:
createHandlerWith(txOutputFormat* aFormat,
const nsAString& aName,
int32_t aNsID,
txAXMLEventHandler** aHandler) = 0;
};
#define TX_DECL_TXAOUTPUTHANDLERFACTORY \
nsresult createHandlerWith(txOutputFormat* aFormat, \
- txAXMLEventHandler** aHandler); \
+ txAXMLEventHandler** aHandler) override; \
nsresult createHandlerWith(txOutputFormat* aFormat, \
const nsAString& aName, \
int32_t aNsID, \
- txAXMLEventHandler** aHandler);
+ txAXMLEventHandler** aHandler) override;
#endif
--- a/dom/xslt/xslt/txXSLTNumberCounters.cpp
+++ b/dom/xslt/xslt/txXSLTNumberCounters.cpp
@@ -11,43 +11,43 @@ class txDecimalCounter : public txFormat
public:
txDecimalCounter() : mMinLength(1), mGroupSize(50)
{
}
txDecimalCounter(int32_t aMinLength, int32_t aGroupSize,
const nsAString& mGroupSeparator);
- virtual void appendNumber(int32_t aNumber, nsAString& aDest);
+ virtual void appendNumber(int32_t aNumber, nsAString& aDest) override;
private:
int32_t mMinLength;
int32_t mGroupSize;
nsString mGroupSeparator;
};
class txAlphaCounter : public txFormattedCounter {
public:
explicit txAlphaCounter(char16_t aOffset) : mOffset(aOffset)
{
}
- virtual void appendNumber(int32_t aNumber, nsAString& aDest);
+ virtual void appendNumber(int32_t aNumber, nsAString& aDest) override;
private:
char16_t mOffset;
};
class txRomanCounter : public txFormattedCounter {
public:
explicit txRomanCounter(bool aUpper) : mTableOffset(aUpper ? 30 : 0)
{
}
- void appendNumber(int32_t aNumber, nsAString& aDest);
+ void appendNumber(int32_t aNumber, nsAString& aDest) override;
private:
int32_t mTableOffset;
};
nsresult
txFormattedCounter::getCounterFor(const nsString& aToken,
--- a/dom/xul/nsXULElement.h
+++ b/dom/xul/nsXULElement.h
@@ -375,17 +375,17 @@ public:
{
}
#endif
virtual bool PerformAccesskey(bool aKeyCausesActivation,
bool aIsTrustedEvent) override;
void ClickWithInputSource(uint16_t aInputSource, bool aIsTrustedEvent);
- nsIContent* GetBindingParent() const final
+ nsIContent* GetBindingParent() const final override
{
return mBindingParent;
}
virtual bool IsNodeOfType(uint32_t aFlags) const override;
virtual bool IsFocusableInternal(int32_t* aTabIndex, bool aWithMouse) override;
NS_IMETHOD WalkContentStyleRules(nsRuleWalker* aRuleWalker) override;
--- a/editor/libeditor/EditorUtils.h
+++ b/editor/libeditor/EditorUtils.h
@@ -517,17 +517,17 @@ public:
nsresult Init(nsRange& aRange);
};
class TrivialFunctor final : public BoolDomIterFunctor
{
public:
// Used to build list of all nodes iterator covers
- virtual bool operator()(nsINode* aNode) const
+ virtual bool operator()(nsINode* aNode) const override
{
return true;
}
};
class EditorUtils final
{
public:
--- a/editor/libeditor/HTMLEditRules.cpp
+++ b/editor/libeditor/HTMLEditRules.cpp
@@ -128,40 +128,40 @@ ParagraphSeparatorElement(ParagraphSepar
return *nsGkAtoms::br;
}
}
class TableCellAndListItemFunctor final : public BoolDomIterFunctor
{
public:
// Used to build list of all li's, td's & th's iterator covers
- virtual bool operator()(nsINode* aNode) const
+ virtual bool operator()(nsINode* aNode) const override
{
return HTMLEditUtils::IsTableCell(aNode) ||
HTMLEditUtils::IsListItem(aNode);
}
};
class BRNodeFunctor final : public BoolDomIterFunctor
{
public:
- virtual bool operator()(nsINode* aNode) const
+ virtual bool operator()(nsINode* aNode) const override
{
return aNode->IsHTMLElement(nsGkAtoms::br);
}
};
class EmptyEditableFunctor final : public BoolDomIterFunctor
{
public:
explicit EmptyEditableFunctor(HTMLEditor* aHTMLEditor)
: mHTMLEditor(aHTMLEditor)
{}
- virtual bool operator()(nsINode* aNode) const
+ virtual bool operator()(nsINode* aNode) const override
{
if (mHTMLEditor->IsEditable(aNode) &&
(HTMLEditUtils::IsListItem(aNode) ||
HTMLEditUtils::IsTableCellOrCaption(*aNode))) {
bool bIsEmptyNode;
nsresult rv =
mHTMLEditor->IsEmptyNode(aNode, &bIsEmptyNode, false, false);
NS_ENSURE_SUCCESS(rv, false);
@@ -6111,17 +6111,17 @@ class UniqueFunctor final : public BoolD
{
public:
explicit UniqueFunctor(nsTArray<OwningNonNull<nsINode>>& aArray)
: mArray(aArray)
{
}
// Used to build list of all nodes iterator covers.
- virtual bool operator()(nsINode* aNode) const
+ virtual bool operator()(nsINode* aNode) const override
{
return !mArray.Contains(aNode);
}
private:
nsTArray<OwningNonNull<nsINode>>& mArray;
};
--- a/editor/txmgr/nsTransactionStack.cpp
+++ b/editor/txmgr/nsTransactionStack.cpp
@@ -6,17 +6,17 @@
#include "nsCOMPtr.h"
#include "nsCycleCollectionParticipant.h"
#include "nsISupportsUtils.h"
#include "nsTransactionItem.h"
#include "nsTransactionStack.h"
#include "nscore.h"
class nsTransactionStackDeallocator : public nsDequeFunctor {
- virtual void operator()(void* aObject)
+ virtual void operator()(void* aObject) override
{
RefPtr<nsTransactionItem> releaseMe = dont_AddRef(static_cast<nsTransactionItem*>(aObject));
}
};
nsTransactionStack::nsTransactionStack(Type aType)
: nsDeque(new nsTransactionStackDeallocator())
, mType(aType)
--- a/extensions/cookie/nsPermissionManager.cpp
+++ b/extensions/cookie/nsPermissionManager.cpp
@@ -369,17 +369,17 @@ public:
"INSERT INTO moz_hosts_new "
"(id, origin, type, permission, expireType, expireTime, modificationTime) "
"VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7)"), getter_AddRefs(mStmt));
}
nsresult
Insert(const nsACString& aOrigin, const nsCString& aType,
uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
- int64_t aModificationTime) final
+ int64_t aModificationTime) final override
{
nsresult rv = mStmt->BindInt64ByIndex(0, *mID);
NS_ENSURE_SUCCESS(rv, rv);
rv = mStmt->BindUTF8StringByIndex(1, aOrigin);
NS_ENSURE_SUCCESS(rv, rv);
rv = mStmt->BindUTF8StringByIndex(2, aType);
@@ -419,17 +419,17 @@ public:
int64_t aID) : mPm(aPm)
, mOperation(aOperation)
, mID(aID)
{}
nsresult
Insert(const nsACString& aOrigin, const nsCString& aType,
uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
- int64_t aModificationTime) final
+ int64_t aModificationTime) final override
{
nsCOMPtr<nsIPrincipal> principal;
nsresult rv = GetPrincipalFromOrigin(aOrigin, getter_AddRefs(principal));
NS_ENSURE_SUCCESS(rv, rv);
return mPm->AddInternal(principal, aType, aPermission, mID,
aExpireType, aExpireTime, aModificationTime,
nsPermissionManager::eDontNotify, mOperation);
@@ -454,17 +454,17 @@ public:
mDBConn->CreateStatement(NS_LITERAL_CSTRING(
"SELECT id FROM moz_perms WHERE origin = ?1 AND type = ?2"),
getter_AddRefs(mLookupStmt));
}
nsresult
Insert(const nsACString& aOrigin, const nsCString& aType,
uint32_t aPermission, uint32_t aExpireType, int64_t aExpireTime,
- int64_t aModificationTime) final
+ int64_t aModificationTime) final override
{
// Every time the migration code wants to insert an origin into
// the database we need to check to see if someone has already
// created a permissions entry for that permission. If they have,
// we don't want to insert a duplicate row.
//
// We can afford to do this lookup unconditionally and not perform
// caching, as a origin type pair should only be attempted to be
--- a/extensions/universalchardet/src/base/CharDistribution.h
+++ b/extensions/universalchardet/src/base/CharDistribution.h
@@ -89,71 +89,75 @@ class EUCTWDistributionAnalysis: public
public:
EUCTWDistributionAnalysis();
protected:
//for euc-TW encoding, we are interested
// first byte range: 0xc4 -- 0xfe
// second byte range: 0xa1 -- 0xfe
//no validation needed here. State machine has done that
- int32_t GetOrder(const char* str)
- { if ((unsigned char)*str >= (unsigned char)0xc4)
+ int32_t GetOrder(const char* str) override
+ {
+ if ((unsigned char)*str >= (unsigned char)0xc4)
return 94*((unsigned char)str[0]-(unsigned char)0xc4) + (unsigned char)str[1] - (unsigned char)0xa1;
else
return -1;
}
};
class EUCKRDistributionAnalysis : public CharDistributionAnalysis
{
public:
EUCKRDistributionAnalysis();
protected:
//for euc-KR encoding, we are interested
// first byte range: 0xb0 -- 0xfe
// second byte range: 0xa1 -- 0xfe
//no validation needed here. State machine has done that
- int32_t GetOrder(const char* str)
- { if ((unsigned char)*str >= (unsigned char)0xb0)
+ int32_t GetOrder(const char* str) override
+ {
+ if ((unsigned char)*str >= (unsigned char)0xb0)
return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;
else
return -1;
}
};
class GB2312DistributionAnalysis : public CharDistributionAnalysis
{
public:
GB2312DistributionAnalysis();
protected:
//for GB2312 encoding, we are interested
// first byte range: 0xb0 -- 0xfe
// second byte range: 0xa1 -- 0xfe
//no validation needed here. State machine has done that
- int32_t GetOrder(const char* str)
- { if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1)
+ int32_t GetOrder(const char* str) override
+ {
+ if ((unsigned char)*str >= (unsigned char)0xb0 && (unsigned char)str[1] >= (unsigned char)0xa1)
return 94*((unsigned char)str[0]-(unsigned char)0xb0) + (unsigned char)str[1] - (unsigned char)0xa1;
else
return -1;
}
};
class Big5DistributionAnalysis : public CharDistributionAnalysis
{
public:
Big5DistributionAnalysis();
protected:
//for big5 encoding, we are interested
// first byte range: 0xa4 -- 0xfe
// second byte range: 0x40 -- 0x7e , 0xa1 -- 0xfe
//no validation needed here. State machine has done that
- int32_t GetOrder(const char* str)
- { if ((unsigned char)*str >= (unsigned char)0xa4)
+ int32_t GetOrder(const char* str) override
+ {
+ if ((unsigned char)*str >= (unsigned char)0xa4)
if ((unsigned char)str[1] >= (unsigned char)0xa1)
return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0xa1 +63;
else
return 157*((unsigned char)str[0]-(unsigned char)0xa4) + (unsigned char)str[1] - (unsigned char)0x40;
else
return -1;
}
};
@@ -162,17 +166,17 @@ class SJISDistributionAnalysis : public
{
public:
SJISDistributionAnalysis();
protected:
//for sjis encoding, we are interested
// first byte range: 0x81 -- 0x9f , 0xe0 -- 0xfe
// second byte range: 0x40 -- 0x7e, 0x81 -- oxfe
//no validation needed here. State machine has done that
- int32_t GetOrder(const char* str)
+ int32_t GetOrder(const char* str) override
{
int32_t order;
if ((unsigned char)*str >= (unsigned char)0x81 && (unsigned char)*str <= (unsigned char)0x9f)
order = 188 * ((unsigned char)str[0]-(unsigned char)0x81);
else if ((unsigned char)*str >= (unsigned char)0xe0 && (unsigned char)*str <= (unsigned char)0xef)
order = 188 * ((unsigned char)str[0]-(unsigned char)0xe0 + 31);
else
return -1;
@@ -187,18 +191,18 @@ class EUCJPDistributionAnalysis : public
{
public:
EUCJPDistributionAnalysis();
protected:
//for euc-JP encoding, we are interested
// first byte range: 0xa0 -- 0xfe
// second byte range: 0xa1 -- 0xfe
//no validation needed here. State machine has done that
- int32_t GetOrder(const char* str)
- { if ((unsigned char)*str >= (unsigned char)0xa0)
+ int32_t GetOrder(const char* str) override
+ {
+ if ((unsigned char)*str >= (unsigned char)0xa0)
return 94*((unsigned char)str[0]-(unsigned char)0xa1) + (unsigned char)str[1] - (unsigned char)0xa1;
else
return -1;
}
};
#endif //CharDistribution_h__
-
--- a/extensions/universalchardet/src/base/JpCntx.h
+++ b/extensions/universalchardet/src/base/JpCntx.h
@@ -70,34 +70,34 @@ protected:
bool mDone;
};
class SJISContextAnalysis : public JapaneseContextAnalysis
{
//SJISContextAnalysis(){};
protected:
- int32_t GetOrder(const char* str, uint32_t *charLen);
+ int32_t GetOrder(const char* str, uint32_t *charLen) override;
- int32_t GetOrder(const char* str)
+ int32_t GetOrder(const char* str) override
{
//We only interested in Hiragana, so first byte is '\202'
if (*str == '\202' &&
(unsigned char)*(str+1) >= (unsigned char)0x9f &&
(unsigned char)*(str+1) <= (unsigned char)0xf1)
return (unsigned char)*(str+1) - (unsigned char)0x9f;
return -1;
}
};
class EUCJPContextAnalysis : public JapaneseContextAnalysis
{
protected:
- int32_t GetOrder(const char* str, uint32_t *charLen);
- int32_t GetOrder(const char* str)
+ int32_t GetOrder(const char* str, uint32_t *charLen) override;
+ int32_t GetOrder(const char* str) override
//We only interested in Hiragana, so first byte is '\244'
{
if (*str == '\244' &&
(unsigned char)*(str+1) >= (unsigned char)0xa1 &&
(unsigned char)*(str+1) <= (unsigned char)0xf3)
return (unsigned char)*(str+1) - (unsigned char)0xa1;
return -1;
}
--- a/extensions/universalchardet/src/base/nsEUCJPProber.h
+++ b/extensions/universalchardet/src/base/nsEUCJPProber.h
@@ -17,27 +17,26 @@
#include "CharDistribution.h"
class nsEUCJPProber: public nsCharSetProber {
public:
nsEUCJPProber()
{mCodingSM = new nsCodingStateMachine(&EUCJPSMModel);
Reset();}
virtual ~nsEUCJPProber(void){delete mCodingSM;}
- nsProbingState HandleData(const char* aBuf, uint32_t aLen);
- const char* GetCharSetName() {return "EUC-JP";}
- nsProbingState GetState(void) {return mState;}
- void Reset(void);
- float GetConfidence(void);
+ nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+ const char* GetCharSetName() override {return "EUC-JP";}
+ nsProbingState GetState(void) override {return mState;}
+ void Reset(void) override;
+ float GetConfidence(void) override;
protected:
nsCodingStateMachine* mCodingSM;
nsProbingState mState;
EUCJPContextAnalysis mContextAnalyser;
EUCJPDistributionAnalysis mDistributionAnalyser;
char mLastChar[2];
};
-
#endif /* nsEUCJPProber_h__ */
--- a/extensions/universalchardet/src/base/nsEscCharsetProber.h
+++ b/extensions/universalchardet/src/base/nsEscCharsetProber.h
@@ -9,21 +9,21 @@
#include "nsCharSetProber.h"
#include "nsCodingStateMachine.h"
#include "nsAutoPtr.h"
class nsEscCharSetProber: public nsCharSetProber {
public:
nsEscCharSetProber();
virtual ~nsEscCharSetProber(void);
- nsProbingState HandleData(const char* aBuf, uint32_t aLen);
- const char* GetCharSetName() {return mDetectedCharset;}
- nsProbingState GetState(void) {return mState;}
- void Reset(void);
- float GetConfidence(void){return (float)0.99;}
+ nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+ const char* GetCharSetName() override {return mDetectedCharset;}
+ nsProbingState GetState(void) override {return mState;}
+ void Reset(void) override;
+ float GetConfidence(void) override {return (float)0.99;}
protected:
void GetDistribution(uint32_t aCharLen, const char* aStr);
nsAutoPtr<nsCodingStateMachine> mCodingSM;
nsProbingState mState;
const char * mDetectedCharset;
};
--- a/extensions/universalchardet/src/base/nsLatin1Prober.h
+++ b/extensions/universalchardet/src/base/nsLatin1Prober.h
@@ -9,28 +9,27 @@
#include "nsCharSetProber.h"
#define FREQ_CAT_NUM 4
class nsLatin1Prober: public nsCharSetProber {
public:
nsLatin1Prober(void){Reset();}
virtual ~nsLatin1Prober(void){}
- nsProbingState HandleData(const char* aBuf, uint32_t aLen);
- const char* GetCharSetName() {return "windows-1252";}
- nsProbingState GetState(void) {return mState;}
- void Reset(void);
- float GetConfidence(void);
+ nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+ const char* GetCharSetName() override {return "windows-1252";}
+ nsProbingState GetState(void) override {return mState;}
+ void Reset(void) override;
+ float GetConfidence(void) override;
#ifdef DEBUG_chardet
virtual void DumpStatus();
#endif
protected:
nsProbingState mState;
char mLastCharClass;
uint32_t mFreqCounter[FREQ_CAT_NUM];
};
-
#endif /* nsLatin1Prober_h__ */
--- a/extensions/universalchardet/src/base/nsMBCSGroupProber.h
+++ b/extensions/universalchardet/src/base/nsMBCSGroupProber.h
@@ -11,21 +11,21 @@
#include "nsEUCJPProber.h"
#define NUM_OF_PROBERS 3
class nsMBCSGroupProber: public nsCharSetProber {
public:
nsMBCSGroupProber();
virtual ~nsMBCSGroupProber();
- nsProbingState HandleData(const char* aBuf, uint32_t aLen);
- const char* GetCharSetName();
- nsProbingState GetState(void) {return mState;}
- void Reset(void);
- float GetConfidence(void);
+ nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+ const char* GetCharSetName() override;
+ nsProbingState GetState(void) override {return mState;}
+ void Reset(void) override;
+ float GetConfidence(void) override;
#ifdef DEBUG_chardet
void DumpStatus();
#endif
#ifdef DEBUG_jgmyers
void GetDetectorState(nsUniversalDetector::DetectorState (&states)[nsUniversalDetector::NumDetectors], uint32_t &offset);
#endif
@@ -34,9 +34,8 @@ protected:
nsCharSetProber* mProbers[NUM_OF_PROBERS];
bool mIsActive[NUM_OF_PROBERS];
int32_t mBestGuess;
uint32_t mActiveNum;
uint32_t mKeepNext;
};
#endif /* nsMBCSGroupProber_h__ */
-
--- a/extensions/universalchardet/src/base/nsSJISProber.h
+++ b/extensions/universalchardet/src/base/nsSJISProber.h
@@ -18,27 +18,25 @@
class nsSJISProber: public nsCharSetProber {
public:
nsSJISProber()
{mCodingSM = new nsCodingStateMachine(&SJISSMModel);
Reset();}
virtual ~nsSJISProber(void){delete mCodingSM;}
- nsProbingState HandleData(const char* aBuf, uint32_t aLen);
- const char* GetCharSetName() {return "Shift_JIS";}
- nsProbingState GetState(void) {return mState;}
- void Reset(void);
- float GetConfidence(void);
+ nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+ const char* GetCharSetName() override {return "Shift_JIS";}
+ nsProbingState GetState(void) override {return mState;}
+ void Reset(void) override;
+ float GetConfidence(void) override;
protected:
nsCodingStateMachine* mCodingSM;
nsProbingState mState;
SJISContextAnalysis mContextAnalyser;
SJISDistributionAnalysis mDistributionAnalyser;
char mLastChar[2];
};
-
#endif /* nsSJISProber_h__ */
-
--- a/extensions/universalchardet/src/base/nsUTF8Prober.h
+++ b/extensions/universalchardet/src/base/nsUTF8Prober.h
@@ -10,22 +10,21 @@
#include "nsCodingStateMachine.h"
class nsUTF8Prober: public nsCharSetProber {
public:
nsUTF8Prober(){mNumOfMBChar = 0;
mCodingSM = new nsCodingStateMachine(&UTF8SMModel);
Reset(); }
virtual ~nsUTF8Prober(){delete mCodingSM;}
- nsProbingState HandleData(const char* aBuf, uint32_t aLen);
- const char* GetCharSetName() {return "UTF-8";}
- nsProbingState GetState(void) {return mState;}
- void Reset(void);
- float GetConfidence(void);
+ nsProbingState HandleData(const char* aBuf, uint32_t aLen) override;
+ const char* GetCharSetName() override {return "UTF-8";}
+ nsProbingState GetState(void) override {return mState;}
+ void Reset(void) override;
+ float GetConfidence(void) override;
protected:
nsCodingStateMachine* mCodingSM;
nsProbingState mState;
uint32_t mNumOfMBChar;
};
#endif /* nsUTF8Prober_h__ */
-
--- a/gfx/2d/2D.h
+++ b/gfx/2d/2D.h
@@ -690,17 +690,17 @@ protected:
};
/** The PathBuilder class allows path creation. Once finish is called on the
* pathbuilder it may no longer be written to.
*/
class PathBuilder : public PathSink
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilder)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilder, override)
/** Finish writing to the path and return a Path object that can be used for
* drawing. Future use of the builder results in a crash!
*/
virtual already_AddRefed<Path> Finish() = 0;
virtual BackendType GetBackendType() const = 0;
};
@@ -1429,17 +1429,17 @@ protected:
bool mPermitSubpixelAA : 1;
SurfaceFormat mFormat;
};
class DrawTargetCapture : public DrawTarget
{
public:
- virtual bool IsCaptureDT() const { return true; }
+ virtual bool IsCaptureDT() const override { return true; }
/**
* Returns true if the recording only contains FillGlyph calls with
* a single font and color. Returns the list of Glyphs along with
* the font and color as outparams if so.
*/
virtual bool ContainsOnlyColoredGlyphs(RefPtr<ScaledFont>& aScaledFont,
Color& aColor,
--- a/gfx/2d/DrawCommand.h
+++ b/gfx/2d/DrawCommand.h
@@ -167,21 +167,22 @@ public:
const DrawOptions& aOptions)
: DrawingCommand(CommandType::DRAWSURFACE)
, mSurface(aSurface), mDest(aDest)
, mSource(aSource), mSurfOptions(aSurfOptions)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(DrawSurfaceCommand)(mSurface, mDest, mSource, mSurfOptions, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->DrawSurface(mSurface, mDest, mSource, mSurfOptions, mOptions);
}
static const bool AffectsSnapshot = true;
private:
RefPtr<SourceSurface> mSurface;
@@ -205,21 +206,22 @@ public:
mDest(aDest),
mColor(aColor),
mOffset(aOffset),
mSigma(aSigma),
mOperator(aOperator)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(DrawSurfaceWithShadowCommand)(mSurface, mDest, mColor, mOffset, mSigma, mOperator);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->DrawSurfaceWithShadow(mSurface, mDest, mColor, mOffset, mSigma, mOperator);
}
static const bool AffectsSnapshot = true;
private:
RefPtr<SourceSurface> mSurface;
@@ -236,21 +238,22 @@ public:
DrawFilterCommand(FilterNode* aFilter, const Rect& aSourceRect,
const Point& aDestPoint, const DrawOptions& aOptions)
: DrawingCommand(CommandType::DRAWSURFACE)
, mFilter(aFilter), mSourceRect(aSourceRect)
, mDestPoint(aDestPoint), mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(DrawFilterCommand)(mFilter, mSourceRect, mDestPoint, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
RefPtr<FilterNode> filter = mFilter;
if (mFilter->GetBackendType() == FilterBackend::FILTER_BACKEND_CAPTURE) {
filter = static_cast<FilterNodeCapture*>(filter.get())->Validate(aDT);
}
aDT->DrawFilter(filter, mSourceRect, mDestPoint, mOptions);
}
@@ -267,21 +270,22 @@ class ClearRectCommand : public DrawingC
{
public:
explicit ClearRectCommand(const Rect& aRect)
: DrawingCommand(CommandType::CLEARRECT)
, mRect(aRect)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(ClearRectCommand)(mRect);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->ClearRect(mRect);
}
static const bool AffectsSnapshot = true;
private:
Rect mRect;
@@ -295,21 +299,22 @@ public:
const IntPoint& aDestination)
: DrawingCommand(CommandType::COPYSURFACE)
, mSurface(aSurface)
, mSourceRect(aSourceRect)
, mDestination(aDestination)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(CopySurfaceCommand)(mSurface, mSourceRect, mDestination);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aTransform) const override
{
MOZ_ASSERT(!aTransform || !aTransform->HasNonIntegerTranslation());
Point dest(Float(mDestination.x), Float(mDestination.y));
if (aTransform) {
dest = aTransform->TransformPoint(dest);
}
aDT->CopySurface(mSurface, mSourceRect, IntPoint(uint32_t(dest.x), uint32_t(dest.y)));
}
@@ -330,26 +335,27 @@ public:
const DrawOptions& aOptions)
: DrawingCommand(CommandType::FILLRECT)
, mRect(aRect)
, mPattern(aPattern)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(FillRectCommand)(mRect, mPattern, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->FillRect(mRect, mPattern, mOptions);
}
- bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const
+ bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const override
{
aDeviceRect = aTransform.TransformBounds(mRect);
return true;
}
static const bool AffectsSnapshot = true;
private:
@@ -367,21 +373,22 @@ public:
const DrawOptions& aOptions)
: StrokeOptionsCommand(CommandType::STROKERECT, aStrokeOptions)
, mRect(aRect)
, mPattern(aPattern)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(StrokeRectCommand)(mRect, mPattern, mStrokeOptions, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->StrokeRect(mRect, mPattern, mStrokeOptions, mOptions);
}
static const bool AffectsSnapshot = true;
private:
Rect mRect;
@@ -400,21 +407,22 @@ public:
: StrokeOptionsCommand(CommandType::STROKELINE, aStrokeOptions)
, mStart(aStart)
, mEnd(aEnd)
, mPattern(aPattern)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(StrokeLineCommand)(mStart, mEnd, mPattern, mStrokeOptions, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->StrokeLine(mStart, mEnd, mPattern, mStrokeOptions, mOptions);
}
static const bool AffectsSnapshot = true;
private:
Point mStart;
@@ -431,26 +439,27 @@ public:
const DrawOptions& aOptions)
: DrawingCommand(CommandType::FILL)
, mPath(const_cast<Path*>(aPath))
, mPattern(aPattern)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(FillCommand)(mPath, mPattern, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->Fill(mPath, mPattern, mOptions);
}
- bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const
+ bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const override
{
aDeviceRect = mPath->GetBounds(aTransform);
return true;
}
static const bool AffectsSnapshot = true;
private:
@@ -509,26 +518,27 @@ public:
const DrawOptions& aOptions)
: StrokeOptionsCommand(CommandType::STROKE, aStrokeOptions)
, mPath(const_cast<Path*>(aPath))
, mPattern(aPattern)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(StrokeCommand)(mPath, mPattern, mStrokeOptions, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->Stroke(mPath, mPattern, mStrokeOptions, mOptions);
}
- bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const
+ bool GetAffectedRect(Rect& aDeviceRect, const Matrix& aTransform) const override
{
aDeviceRect = PathExtentsToMaxStrokeExtents(mStrokeOptions, mPath->GetBounds(aTransform), aTransform);
return true;
}
static const bool AffectsSnapshot = true;
private:
@@ -549,25 +559,26 @@ public:
, mFont(aFont)
, mPattern(aPattern)
, mOptions(aOptions)
{
mGlyphs.resize(aBuffer.mNumGlyphs);
memcpy(&mGlyphs.front(), aBuffer.mGlyphs, sizeof(Glyph) * aBuffer.mNumGlyphs);
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
GlyphBuffer glyphs = {
mGlyphs.data(),
(uint32_t)mGlyphs.size(),
};
CLONE_INTO(FillGlyphsCommand)(mFont, glyphs, mPattern, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
GlyphBuffer buf;
buf.mNumGlyphs = mGlyphs.size();
buf.mGlyphs = &mGlyphs.front();
aDT->FillGlyphs(mFont, buf, mPattern, mOptions);
}
static const bool AffectsSnapshot = true;
@@ -592,25 +603,26 @@ public:
, mFont(aFont)
, mPattern(aPattern)
, mOptions(aOptions)
{
mGlyphs.resize(aBuffer.mNumGlyphs);
memcpy(&mGlyphs.front(), aBuffer.mGlyphs, sizeof(Glyph) * aBuffer.mNumGlyphs);
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
GlyphBuffer glyphs = {
mGlyphs.data(),
(uint32_t)mGlyphs.size(),
};
CLONE_INTO(StrokeGlyphsCommand)(mFont, glyphs, mPattern, mStrokeOptions, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
GlyphBuffer buf;
buf.mNumGlyphs = mGlyphs.size();
buf.mGlyphs = &mGlyphs.front();
aDT->StrokeGlyphs(mFont, buf, mPattern, mStrokeOptions, mOptions);
}
static const bool AffectsSnapshot = true;
@@ -630,21 +642,22 @@ public:
const DrawOptions& aOptions)
: DrawingCommand(CommandType::MASK)
, mSource(aSource)
, mMask(aMask)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(MaskCommand)(mSource, mMask, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->Mask(mSource, mMask, mOptions);
}
static const bool AffectsSnapshot = true;
private:
StoredPattern mSource;
@@ -662,21 +675,22 @@ public:
: DrawingCommand(CommandType::MASKSURFACE)
, mSource(aSource)
, mMask(const_cast<SourceSurface*>(aMask))
, mOffset(aOffset)
, mOptions(aOptions)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(MaskSurfaceCommand)(mSource, mMask, mOffset, mOptions);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->MaskSurface(mSource, mMask, mOffset, mOptions);
}
static const bool AffectsSnapshot = true;
private:
StoredPattern mSource;
@@ -689,21 +703,22 @@ class PushClipCommand : public DrawingCo
{
public:
explicit PushClipCommand(const Path* aPath)
: DrawingCommand(CommandType::PUSHCLIP)
, mPath(const_cast<Path*>(aPath))
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(PushClipCommand)(mPath);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->PushClip(mPath);
}
static const bool AffectsSnapshot = false;
private:
RefPtr<Path> mPath;
@@ -713,21 +728,22 @@ class PushClipRectCommand : public Drawi
{
public:
explicit PushClipRectCommand(const Rect& aRect)
: DrawingCommand(CommandType::PUSHCLIPRECT)
, mRect(aRect)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(PushClipRectCommand)(mRect);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->PushClipRect(mRect);
}
static const bool AffectsSnapshot = false;
private:
Rect mRect;
@@ -747,21 +763,22 @@ public:
, mOpacity(aOpacity)
, mMask(aMask)
, mMaskTransform(aMaskTransform)
, mBounds(aBounds)
, mCopyBackground(aCopyBackground)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(PushLayerCommand)(mOpaque, mOpacity, mMask, mMaskTransform, mBounds, mCopyBackground);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->PushLayer(mOpaque, mOpacity, mMask,
mMaskTransform, mBounds, mCopyBackground);
}
static const bool AffectsSnapshot = false;
private:
@@ -776,41 +793,43 @@ private:
class PopClipCommand : public DrawingCommand
{
public:
PopClipCommand()
: DrawingCommand(CommandType::POPCLIP)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(PopClipCommand)();
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->PopClip();
}
static const bool AffectsSnapshot = false;
};
class PopLayerCommand : public DrawingCommand
{
public:
PopLayerCommand()
: DrawingCommand(CommandType::POPLAYER)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(PopLayerCommand)();
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->PopLayer();
}
static const bool AffectsSnapshot = true;
};
class SetTransformCommand : public DrawingCommand
@@ -818,21 +837,22 @@ class SetTransformCommand : public Drawi
friend class DrawTargetCaptureImpl;
public:
explicit SetTransformCommand(const Matrix& aTransform)
: DrawingCommand(CommandType::SETTRANSFORM)
, mTransform(aTransform)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(SetTransformCommand)(mTransform);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const override
{
if (aMatrix) {
aDT->SetTransform(mTransform * (*aMatrix));
} else {
aDT->SetTransform(mTransform);
}
}
@@ -847,21 +867,22 @@ class SetPermitSubpixelAACommand : publi
friend class DrawTargetCaptureImpl;
public:
explicit SetPermitSubpixelAACommand(bool aPermitSubpixelAA)
: DrawingCommand(CommandType::SETPERMITSUBPIXELAA)
, mPermitSubpixelAA(aPermitSubpixelAA)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(SetPermitSubpixelAACommand)(mPermitSubpixelAA);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix* aMatrix) const override
{
aDT->SetPermitSubpixelAA(mPermitSubpixelAA);
}
static const bool AffectsSnapshot = false;
private:
bool mPermitSubpixelAA;
@@ -870,41 +891,44 @@ private:
class FlushCommand : public DrawingCommand
{
public:
explicit FlushCommand()
: DrawingCommand(CommandType::FLUSH)
{
}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(FlushCommand)();
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
{
aDT->Flush();
}
static const bool AffectsSnapshot = false;
};
class BlurCommand : public DrawingCommand
{
public:
explicit BlurCommand(const AlphaBoxBlur& aBlur)
: DrawingCommand(CommandType::BLUR)
, mBlur(aBlur)
{}
- void CloneInto(CaptureCommandList* aList) {
+ void CloneInto(CaptureCommandList* aList) override
+ {
CLONE_INTO(BlurCommand)(mBlur);
}
- virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const {
+ virtual void ExecuteOnDT(DrawTarget* aDT, const Matrix*) const override
+ {
aDT->Blur(mBlur);
}
static const bool AffectsSnapshot = true;
private:
AlphaBoxBlur mBlur;
};
--- a/gfx/2d/DrawEventRecorder.h
+++ b/gfx/2d/DrawEventRecorder.h
@@ -20,20 +20,21 @@
namespace mozilla {
namespace gfx {
class PathRecording;
class DrawEventRecorderPrivate : public DrawEventRecorder
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DrawEventRecorderPrivate, override)
+
DrawEventRecorderPrivate();
virtual ~DrawEventRecorderPrivate() { }
- virtual void Finish() { ClearResources(); }
+ virtual void Finish() override { ClearResources(); }
virtual void FlushItem(IntRect) { }
void DetatchResources() {
// The iteration is a bit awkward here because our iterator will
// be invalidated by the removal
for (auto font = mStoredFonts.begin(); font != mStoredFonts.end(); ) {
auto oldFont = font++;
(*oldFont)->RemoveUserData(reinterpret_cast<UserDataKey*>(this));
}
--- a/gfx/2d/DrawTargetCairo.h
+++ b/gfx/2d/DrawTargetCairo.h
@@ -16,17 +16,18 @@
namespace mozilla {
namespace gfx {
class SourceSurfaceCairo;
class GradientStopsCairo : public GradientStops
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsCairo)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsCairo, override)
+
GradientStopsCairo(GradientStop* aStops, uint32_t aNumStops,
ExtendMode aExtendMode)
: mExtendMode(aExtendMode)
{
for (uint32_t i = 0; i < aNumStops; ++i) {
mStops.push_back(aStops[i]);
}
}
@@ -38,17 +39,17 @@ class GradientStopsCairo : public Gradie
return mStops;
}
ExtendMode GetExtendMode() const
{
return mExtendMode;
}
- virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
+ virtual BackendType GetBackendType() const override { return BackendType::CAIRO; }
private:
std::vector<GradientStop> mStops;
ExtendMode mExtendMode;
};
class DrawTargetCairo final : public DrawTarget
{
--- a/gfx/2d/DrawTargetRecording.cpp
+++ b/gfx/2d/DrawTargetRecording.cpp
@@ -75,33 +75,34 @@ EnsureSurfaceStoredRecording(DrawEventRe
userData->recorder = aRecorder;
aSurface->AddUserData(reinterpret_cast<UserDataKey*>(aRecorder),
userData, &RecordingSourceSurfaceUserDataFunc);
}
class SourceSurfaceRecording : public SourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceRecording)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceRecording, override)
+
SourceSurfaceRecording(IntSize aSize, SurfaceFormat aFormat, DrawEventRecorderPrivate *aRecorder)
: mSize(aSize), mFormat(aFormat), mRecorder(aRecorder)
{
mRecorder->AddStoredObject(this);
}
~SourceSurfaceRecording()
{
mRecorder->RemoveStoredObject(this);
mRecorder->RecordEvent(RecordedSourceSurfaceDestruction(ReferencePtr(this)));
}
- virtual SurfaceType GetType() const { return SurfaceType::RECORDING; }
- virtual IntSize GetSize() const { return mSize; }
- virtual SurfaceFormat GetFormat() const { return mFormat; }
- virtual already_AddRefed<DataSourceSurface> GetDataSurface() { return nullptr; }
+ virtual SurfaceType GetType() const override { return SurfaceType::RECORDING; }
+ virtual IntSize GetSize() const override { return mSize; }
+ virtual SurfaceFormat GetFormat() const override { return mFormat; }
+ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override { return nullptr; }
IntSize mSize;
SurfaceFormat mFormat;
RefPtr<DrawEventRecorderPrivate> mRecorder;
};
class DataSourceSurfaceRecording : public DataSourceSurface
{
@@ -144,30 +145,31 @@ public:
int32_t mStride;
SurfaceFormat mFormat;
};
class GradientStopsRecording : public GradientStops
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsRecording)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsRecording, override)
+
explicit GradientStopsRecording(DrawEventRecorderPrivate *aRecorder)
: mRecorder(aRecorder)
{
mRecorder->AddStoredObject(this);
}
~GradientStopsRecording()
{
mRecorder->RemoveStoredObject(this);
mRecorder->RecordEvent(RecordedGradientStopsDestruction(ReferencePtr(this)));
}
- virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
+ virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
RefPtr<DrawEventRecorderPrivate> mRecorder;
};
class FilterNodeRecording : public FilterNode
{
public:
MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeRecording, override)
--- a/gfx/2d/DrawTargetSkia.cpp
+++ b/gfx/2d/DrawTargetSkia.cpp
@@ -53,17 +53,18 @@
using namespace std;
namespace mozilla {
namespace gfx {
class GradientStopsSkia : public GradientStops
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsSkia)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsSkia, override)
+
GradientStopsSkia(const std::vector<GradientStop>& aStops, uint32_t aNumStops, ExtendMode aExtendMode)
: mCount(aNumStops)
, mExtendMode(aExtendMode)
{
if (mCount == 0) {
return;
}
@@ -88,17 +89,17 @@ public:
mPositions[i + shift] = SkFloatToScalar(aStops[i].offset);
}
if (aStops[aNumStops-1].offset != 1) {
mColors[mCount-1] = ColorToSkColor(aStops[aNumStops-1].color, 1.0);
mPositions[mCount-1] = SK_Scalar1;
}
}
- BackendType GetBackendType() const { return BackendType::SKIA; }
+ BackendType GetBackendType() const override { return BackendType::SKIA; }
std::vector<SkColor> mColors;
std::vector<SkScalar> mPositions;
int mCount;
ExtendMode mExtendMode;
};
/**
--- a/gfx/2d/DrawTargetTiled.h
+++ b/gfx/2d/DrawTargetTiled.h
@@ -187,24 +187,24 @@ public:
: mRect(aRect)
{
for (size_t i = 0; i < aTiles.size(); i++) {
mSnapshots.push_back(aTiles[i].mDrawTarget->Snapshot());
mOrigins.push_back(aTiles[i].mTileOrigin);
}
}
- virtual SurfaceType GetType() const { return SurfaceType::TILED; }
- virtual IntSize GetSize() const {
+ virtual SurfaceType GetType() const override { return SurfaceType::TILED; }
+ virtual IntSize GetSize() const override {
MOZ_ASSERT(mRect.Width() > 0 && mRect.Height() > 0);
return IntSize(mRect.XMost(), mRect.YMost());
}
- virtual SurfaceFormat GetFormat() const { return mSnapshots[0]->GetFormat(); }
+ virtual SurfaceFormat GetFormat() const override { return mSnapshots[0]->GetFormat(); }
- virtual already_AddRefed<DataSourceSurface> GetDataSurface()
+ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override
{
RefPtr<DataSourceSurface> surf = Factory::CreateDataSourceSurface(GetSize(), GetFormat());
DataSourceSurface::MappedSurface mappedSurf;
if (!surf->Map(DataSourceSurface::MapType::WRITE, &mappedSurf)) {
gfxCriticalError() << "DrawTargetTiled::GetDataSurface failed to map surface";
return nullptr;
}
--- a/gfx/2d/DrawTargetWrapAndRecord.cpp
+++ b/gfx/2d/DrawTargetWrapAndRecord.cpp
@@ -75,55 +75,57 @@ EnsureSurfaceStored(DrawEventRecorderPri
userData->recorder = aRecorder;
aSurface->AddUserData(reinterpret_cast<UserDataKey*>(aRecorder),
userData, &WrapAndRecordSourceSurfaceUserDataFunc);
}
class SourceSurfaceWrapAndRecord : public SourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceWrapAndRecord)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceWrapAndRecord, override)
+
SourceSurfaceWrapAndRecord(SourceSurface *aFinalSurface, DrawEventRecorderPrivate *aRecorder)
: mFinalSurface(aFinalSurface), mRecorder(aRecorder)
{
mRecorder->AddStoredObject(this);
}
~SourceSurfaceWrapAndRecord()
{
mRecorder->RemoveStoredObject(this);
mRecorder->RecordEvent(RecordedSourceSurfaceDestruction(ReferencePtr(this)));
}
- virtual SurfaceType GetType() const { return SurfaceType::RECORDING; }
- virtual IntSize GetSize() const { return mFinalSurface->GetSize(); }
- virtual SurfaceFormat GetFormat() const { return mFinalSurface->GetFormat(); }
- virtual already_AddRefed<DataSourceSurface> GetDataSurface() { return mFinalSurface->GetDataSurface(); }
+ virtual SurfaceType GetType() const override { return SurfaceType::RECORDING; }
+ virtual IntSize GetSize() const override { return mFinalSurface->GetSize(); }
+ virtual SurfaceFormat GetFormat() const override { return mFinalSurface->GetFormat(); }
+ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override { return mFinalSurface->GetDataSurface(); }
RefPtr<SourceSurface> mFinalSurface;
RefPtr<DrawEventRecorderPrivate> mRecorder;
};
class GradientStopsWrapAndRecord : public GradientStops
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsWrapAndRecord)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsWrapAndRecord, override)
+
GradientStopsWrapAndRecord(GradientStops *aFinalGradientStops, DrawEventRecorderPrivate *aRecorder)
: mFinalGradientStops(aFinalGradientStops), mRecorder(aRecorder)
{
mRecorder->AddStoredObject(this);
}
~GradientStopsWrapAndRecord()
{
mRecorder->RemoveStoredObject(this);
mRecorder->RecordEvent(RecordedGradientStopsDestruction(ReferencePtr(this)));
}
- virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
+ virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
RefPtr<GradientStops> mFinalGradientStops;
RefPtr<DrawEventRecorderPrivate> mRecorder;
};
static SourceSurface *
GetSourceSurface(SourceSurface *aSurface)
{
--- a/gfx/2d/FilterNodeD2D1.h
+++ b/gfx/2d/FilterNodeD2D1.h
@@ -14,17 +14,18 @@
#include <cguid.h>
namespace mozilla {
namespace gfx {
class FilterNodeD2D1 : public FilterNode
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeD2D1)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FilterNodeD2D1, override)
+
static already_AddRefed<FilterNode> Create(ID2D1DeviceContext *aDC, FilterType aType);
FilterNodeD2D1(ID2D1Effect *aEffect, FilterType aType)
: mEffect(aEffect)
, mType(aType)
{
InitUnmappedProperties();
}
--- a/gfx/2d/GradientStopsD2D.h
+++ b/gfx/2d/GradientStopsD2D.h
@@ -12,17 +12,18 @@
#include <d2d1.h>
namespace mozilla {
namespace gfx {
class GradientStopsD2D : public GradientStops
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsD2D)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(GradientStopsD2D, override)
+
GradientStopsD2D(ID2D1GradientStopCollection *aStopCollection, ID3D11Device *aDevice)
: mStopCollection(aStopCollection)
, mDevice(aDevice)
{}
virtual BackendType GetBackendType() const { return BackendType::DIRECT2D; }
virtual bool IsValid() const final{ return mDevice == Factory::GetDirect3D11Device(); }
--- a/gfx/2d/InlineTranslator.h
+++ b/gfx/2d/InlineTranslator.h
@@ -29,52 +29,52 @@ using gfx::NativeFontResource;
class InlineTranslator final : public Translator
{
public:
explicit InlineTranslator(DrawTarget* aDT, void* aFontContext = nullptr);
bool TranslateRecording(char *, size_t len);
- DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final
+ DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final override
{
DrawTarget* result = mDrawTargets.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- Path* LookupPath(ReferencePtr aRefPtr) final
+ Path* LookupPath(ReferencePtr aRefPtr) final override
{
Path* result = mPaths.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final
+ SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final override
{
SourceSurface* result = mSourceSurfaces.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final
+ FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final override
{
FilterNode* result = mFilterNodes.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final
+ GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final override
{
GradientStops* result = mGradientStops.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final
+ ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final override
{
ScaledFont* result = mScaledFonts.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) override final
{
@@ -84,108 +84,108 @@ public:
}
virtual UnscaledFont* LookupUnscaledFontByIndex(size_t index) override final
{
UnscaledFont* result = mUnscaledFontTable[index];
return result;
}
- NativeFontResource* LookupNativeFontResource(uint64_t aKey) final
+ NativeFontResource* LookupNativeFontResource(uint64_t aKey) final override
{
NativeFontResource* result = mNativeFontResources.GetWeak(aKey);
MOZ_ASSERT(result);
return result;
}
- void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final
+ void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final override
{
mDrawTargets.Put(aRefPtr, aDT);
}
- void AddPath(ReferencePtr aRefPtr, Path *aPath) final
+ void AddPath(ReferencePtr aRefPtr, Path *aPath) final override
{
mPaths.Put(aRefPtr, aPath);
}
- void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final
+ void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final override
{
mSourceSurfaces.Put(aRefPtr, aSurface);
}
- void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final
+ void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final override
{
mFilterNodes.Put(aRefPtr, aFilter);
}
- void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final
+ void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final override
{
mGradientStops.Put(aRefPtr, aStops);
}
- void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final
+ void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final override
{
mScaledFonts.Put(aRefPtr, aScaledFont);
}
- void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont *aUnscaledFont) final
+ void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont *aUnscaledFont) final override
{
mUnscaledFontTable.push_back(aUnscaledFont);
mUnscaledFonts.Put(aRefPtr, aUnscaledFont);
}
void AddNativeFontResource(uint64_t aKey,
- NativeFontResource *aScaledFontResouce) final
+ NativeFontResource *aScaledFontResouce) final override
{
mNativeFontResources.Put(aKey, aScaledFontResouce);
}
- void RemoveDrawTarget(ReferencePtr aRefPtr) final
+ void RemoveDrawTarget(ReferencePtr aRefPtr) final override
{
mDrawTargets.Remove(aRefPtr);
}
- void RemovePath(ReferencePtr aRefPtr) final
+ void RemovePath(ReferencePtr aRefPtr) final override
{
mPaths.Remove(aRefPtr);
}
- void RemoveSourceSurface(ReferencePtr aRefPtr) final
+ void RemoveSourceSurface(ReferencePtr aRefPtr) final override
{
mSourceSurfaces.Remove(aRefPtr);
}
- void RemoveFilterNode(ReferencePtr aRefPtr) final
+ void RemoveFilterNode(ReferencePtr aRefPtr) final override
{
mFilterNodes.Remove(aRefPtr);
}
- void RemoveGradientStops(ReferencePtr aRefPtr) final
+ void RemoveGradientStops(ReferencePtr aRefPtr) final override
{
mGradientStops.Remove(aRefPtr);
}
- void RemoveScaledFont(ReferencePtr aRefPtr) final
+ void RemoveScaledFont(ReferencePtr aRefPtr) final override
{
mScaledFonts.Remove(aRefPtr);
}
- void RemoveUnscaledFont(ReferencePtr aRefPtr) final
+ void RemoveUnscaledFont(ReferencePtr aRefPtr) final override
{
mUnscaledFonts.Remove(aRefPtr);
}
already_AddRefed<DrawTarget> CreateDrawTarget(ReferencePtr aRefPtr,
const gfx::IntSize &aSize,
- gfx::SurfaceFormat aFormat) final;
+ gfx::SurfaceFormat aFormat) final override;
- mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final { return mBaseDT; }
+ mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final override { return mBaseDT; }
- void* GetFontContext() final { return mFontContext; }
+ void* GetFontContext() final override { return mFontContext; }
private:
RefPtr<DrawTarget> mBaseDT;
void* mFontContext;
std::vector<RefPtr<UnscaledFont>> mUnscaledFontTable;
nsRefPtrHashtable<nsPtrHashKey<void>, DrawTarget> mDrawTargets;
nsRefPtrHashtable<nsPtrHashKey<void>, Path> mPaths;
--- a/gfx/2d/NativeFontResourceDWrite.h
+++ b/gfx/2d/NativeFontResourceDWrite.h
@@ -13,33 +13,34 @@
#include "mozilla/AlreadyAddRefed.h"
namespace mozilla {
namespace gfx {
class NativeFontResourceDWrite final : public NativeFontResource
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceDWrite)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceDWrite, override)
+
/**
* Creates a NativeFontResourceDWrite if data is valid. Note aFontData will be
* copied if required and so can be released after calling.
*
* @param aFontData the SFNT data.
* @param aDataLength length of data.
* @param aNeedsCairo whether the ScaledFont created needs a cairo scaled font
* @return Referenced NativeFontResourceDWrite or nullptr if invalid.
*/
static already_AddRefed<NativeFontResourceDWrite>
Create(uint8_t *aFontData, uint32_t aDataLength, bool aNeedsCairo);
already_AddRefed<UnscaledFont>
CreateUnscaledFont(uint32_t aIndex,
const uint8_t* aInstanceData,
- uint32_t aInstanceDataLength) final;
+ uint32_t aInstanceDataLength) final override;
private:
NativeFontResourceDWrite(IDWriteFactory *aFactory,
already_AddRefed<IDWriteFontFile> aFontFile,
DWRITE_FONT_FACE_TYPE aFaceType,
uint32_t aNumberOfFaces, bool aNeedsCairo)
: mFactory(aFactory), mFontFile(aFontFile), mFaceType(aFaceType)
, mNumberOfFaces(aNumberOfFaces), mNeedsCairo(aNeedsCairo)
--- a/gfx/2d/NativeFontResourceFontconfig.h
+++ b/gfx/2d/NativeFontResourceFontconfig.h
@@ -13,24 +13,24 @@
#include "mozilla/UniquePtr.h"
namespace mozilla {
namespace gfx {
class NativeFontResourceFontconfig final : public NativeFontResource
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceFontconfig)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceFontconfig, override)
static already_AddRefed<NativeFontResourceFontconfig>
Create(uint8_t *aFontData, uint32_t aDataLength, FT_Library aFTLibrary = nullptr);
already_AddRefed<UnscaledFont>
CreateUnscaledFont(uint32_t aIndex,
- const uint8_t* aInstanceData, uint32_t aInstanceDataLength) final;
+ const uint8_t* aInstanceData, uint32_t aInstanceDataLength) final override;
~NativeFontResourceFontconfig();
private:
NativeFontResourceFontconfig(UniquePtr<uint8_t[]>&& aFontData, FT_Face aFace);
UniquePtr<uint8_t[]> mFontData;
FT_Face mFace;
--- a/gfx/2d/NativeFontResourceGDI.h
+++ b/gfx/2d/NativeFontResourceGDI.h
@@ -14,34 +14,35 @@
#include "mozilla/Vector.h"
namespace mozilla {
namespace gfx {
class NativeFontResourceGDI final : public NativeFontResource
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceGDI)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceGDI, override)
+
/**
* Creates a NativeFontResourceGDI if data is valid. Note aFontData will be
* copied if required and so can be released after calling.
*
* @param aFontData the SFNT data.
* @param aDataLength length of data.
* @return Referenced NativeFontResourceGDI or nullptr if invalid.
*/
static already_AddRefed<NativeFontResourceGDI>
Create(uint8_t *aFontData, uint32_t aDataLength);
~NativeFontResourceGDI();
already_AddRefed<UnscaledFont>
CreateUnscaledFont(uint32_t aIndex,
const uint8_t* aInstanceData,
- uint32_t aInstanceDataLength) final;
+ uint32_t aInstanceDataLength) final override;
private:
explicit NativeFontResourceGDI(HANDLE aFontResourceHandle)
: mFontResourceHandle(aFontResourceHandle)
{}
HANDLE mFontResourceHandle;
};
--- a/gfx/2d/NativeFontResourceMac.h
+++ b/gfx/2d/NativeFontResourceMac.h
@@ -12,25 +12,25 @@
#include "ScaledFontMac.h"
namespace mozilla {
namespace gfx {
class NativeFontResourceMac final : public NativeFontResource
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceMac)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(NativeFontResourceMac, override)
static already_AddRefed<NativeFontResourceMac>
Create(uint8_t *aFontData, uint32_t aDataLength);
already_AddRefed<UnscaledFont>
CreateUnscaledFont(uint32_t aIndex,
const uint8_t* aInstanceData,
- uint32_t aInstanceDataLength) final;
+ uint32_t aInstanceDataLength) final override;
~NativeFontResourceMac()
{
CFRelease(mFontRef);
}
private:
explicit NativeFontResourceMac(CGFontRef aFontRef) : mFontRef(aFontRef) {}
--- a/gfx/2d/PathAnalysis.h
+++ b/gfx/2d/PathAnalysis.h
@@ -19,34 +19,35 @@ struct FlatPathOp
OpType mType;
Point mPoint;
};
class FlattenedPath : public PathSink
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FlattenedPath)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(FlattenedPath, override)
+
FlattenedPath() : mCachedLength(0)
, mCalculatedLength(false)
{
}
- virtual void MoveTo(const Point &aPoint);
- virtual void LineTo(const Point &aPoint);
+ virtual void MoveTo(const Point &aPoint) override;
+ virtual void LineTo(const Point &aPoint) override;
virtual void BezierTo(const Point &aCP1,
const Point &aCP2,
- const Point &aCP3);
+ const Point &aCP3) override;
virtual void QuadraticBezierTo(const Point &aCP1,
- const Point &aCP2);
- virtual void Close();
+ const Point &aCP2) override;
+ virtual void Close() override;
virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
- float aEndAngle, bool aAntiClockwise = false);
+ float aEndAngle, bool aAntiClockwise = false) override;
- virtual Point CurrentPoint() const { return mPathOps.empty() ? Point() : mPathOps[mPathOps.size() - 1].mPoint; }
+ virtual Point CurrentPoint() const override { return mPathOps.empty() ? Point() : mPathOps[mPathOps.size() - 1].mPoint; }
Float ComputeLength();
Point ComputePointAtLength(Float aLength, Point *aTangent);
private:
Float mCachedLength;
bool mCalculatedLength;
Point mLastMove;
--- a/gfx/2d/PathCairo.h
+++ b/gfx/2d/PathCairo.h
@@ -14,73 +14,75 @@
namespace mozilla {
namespace gfx {
class PathCairo;
class PathBuilderCairo : public PathBuilder
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderCairo)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderCairo, override)
+
explicit PathBuilderCairo(FillRule aFillRule);
- virtual void MoveTo(const Point &aPoint);
- virtual void LineTo(const Point &aPoint);
+ virtual void MoveTo(const Point &aPoint) override;
+ virtual void LineTo(const Point &aPoint) override;
virtual void BezierTo(const Point &aCP1,
const Point &aCP2,
- const Point &aCP3);
+ const Point &aCP3) override;
virtual void QuadraticBezierTo(const Point &aCP1,
- const Point &aCP2);
- virtual void Close();
+ const Point &aCP2) override;
+ virtual void Close() override;
virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
- float aEndAngle, bool aAntiClockwise = false);
- virtual Point CurrentPoint() const;
- virtual already_AddRefed<Path> Finish();
+ float aEndAngle, bool aAntiClockwise = false) override;
+ virtual Point CurrentPoint() const override;
+ virtual already_AddRefed<Path> Finish() override;
- virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
+ virtual BackendType GetBackendType() const override { return BackendType::CAIRO; }
private: // data
friend class PathCairo;
FillRule mFillRule;
std::vector<cairo_path_data_t> mPathData;
// It's easiest to track this here, parsing the path data to find the current
// point is a little tricky.
Point mCurrentPoint;
Point mBeginPoint;
};
class PathCairo : public Path
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathCairo)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathCairo, override)
+
PathCairo(FillRule aFillRule, std::vector<cairo_path_data_t> &aPathData, const Point &aCurrentPoint);
explicit PathCairo(cairo_t *aContext);
~PathCairo();
- virtual BackendType GetBackendType() const { return BackendType::CAIRO; }
+ virtual BackendType GetBackendType() const override { return BackendType::CAIRO; }
- virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const;
+ virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const override;
virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(const Matrix &aTransform,
- FillRule aFillRule) const;
+ FillRule aFillRule) const override;
- virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const;
+ virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const override;
virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
const Point &aPoint,
- const Matrix &aTransform) const;
+ const Matrix &aTransform) const override;
- virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const;
+ virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
- const Matrix &aTransform = Matrix()) const;
+ const Matrix &aTransform = Matrix()) const override;
- virtual void StreamToSink(PathSink *aSink) const;
+ virtual void StreamToSink(PathSink *aSink) const override;
- virtual FillRule GetFillRule() const { return mFillRule; }
+ virtual FillRule GetFillRule() const override { return mFillRule; }
void SetPathOnContext(cairo_t *aContext) const;
void AppendPathToBuilder(PathBuilderCairo *aBuilder, const Matrix *aTransform = nullptr) const;
private:
void EnsureContainingContext(const Matrix &aTransform) const;
FillRule mFillRule;
--- a/gfx/2d/PathD2D.h
+++ b/gfx/2d/PathD2D.h
@@ -14,17 +14,17 @@
namespace mozilla {
namespace gfx {
class PathD2D;
class PathBuilderD2D : public PathBuilder
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderD2D)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderD2D, override)
PathBuilderD2D(ID2D1GeometrySink *aSink, ID2D1PathGeometry *aGeom, FillRule aFillRule, BackendType aBackendType)
: mSink(aSink)
, mGeometry(aGeom)
, mFigureActive(false)
, mFillRule(aFillRule)
, mBackendType(aBackendType)
{
}
@@ -63,17 +63,17 @@ private:
Point mBeginPoint;
FillRule mFillRule;
BackendType mBackendType;
};
class PathD2D : public Path
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathD2D)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathD2D, override)
PathD2D(ID2D1PathGeometry *aGeometry, bool aEndedActive,
const Point &aEndPoint, FillRule aFillRule, BackendType aBackendType)
: mGeometry(aGeometry)
, mEndedActive(aEndedActive)
, mEndPoint(aEndPoint)
, mFillRule(aFillRule)
, mBackendType(aBackendType)
{}
--- a/gfx/2d/PathRecording.h
+++ b/gfx/2d/PathRecording.h
@@ -35,97 +35,99 @@ struct PathOp
const int32_t sPointCount[] = { 1, 1, 3, 2, 0, 0 };
class PathRecording;
class DrawEventRecorderPrivate;
class PathBuilderRecording : public PathBuilder
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderRecording)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderRecording, override)
+
PathBuilderRecording(PathBuilder *aBuilder, FillRule aFillRule)
: mPathBuilder(aBuilder), mFillRule(aFillRule)
{
}
/* Move the current point in the path, any figure currently being drawn will
* be considered closed during fill operations, however when stroking the
* closing line segment will not be drawn.
*/
- virtual void MoveTo(const Point &aPoint);
+ virtual void MoveTo(const Point &aPoint) override;
/* Add a linesegment to the current figure */
- virtual void LineTo(const Point &aPoint);
+ virtual void LineTo(const Point &aPoint) override;
/* Add a cubic bezier curve to the current figure */
virtual void BezierTo(const Point &aCP1,
const Point &aCP2,
- const Point &aCP3);
+ const Point &aCP3) override;
/* Add a quadratic bezier curve to the current figure */
virtual void QuadraticBezierTo(const Point &aCP1,
- const Point &aCP2);
+ const Point &aCP2) override;
/* Close the current figure, this will essentially generate a line segment
* from the current point to the starting point for the current figure
*/
- virtual void Close();
+ virtual void Close() override;
/* Add an arc to the current figure */
virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
- float aEndAngle, bool aAntiClockwise) {
+ float aEndAngle, bool aAntiClockwise) override {
ArcToBezier(this, aOrigin, Size(aRadius, aRadius), aStartAngle, aEndAngle,
aAntiClockwise);
}
/* Point the current subpath is at - or where the next subpath will start
* if there is no active subpath.
*/
- virtual Point CurrentPoint() const;
+ virtual Point CurrentPoint() const override;
- virtual already_AddRefed<Path> Finish();
+ virtual already_AddRefed<Path> Finish() override;
- virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
+ virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
private:
friend class PathRecording;
RefPtr<PathBuilder> mPathBuilder;
FillRule mFillRule;
std::vector<PathOp> mPathOps;
};
class PathRecording : public Path
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathRecording)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathRecording, override)
+
PathRecording(Path *aPath, const std::vector<PathOp> aOps, FillRule aFillRule)
: mPath(aPath), mPathOps(aOps), mFillRule(aFillRule)
{
}
~PathRecording();
- virtual BackendType GetBackendType() const { return BackendType::RECORDING; }
- virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const;
+ virtual BackendType GetBackendType() const override { return BackendType::RECORDING; }
+ virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const override;
virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(const Matrix &aTransform,
- FillRule aFillRule) const;
- virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const
+ FillRule aFillRule) const override;
+ virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const override
{ return mPath->ContainsPoint(aPoint, aTransform); }
virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
const Point &aPoint,
- const Matrix &aTransform) const
+ const Matrix &aTransform) const override
{ return mPath->StrokeContainsPoint(aStrokeOptions, aPoint, aTransform); }
-
- virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const
+
+ virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override
{ return mPath->GetBounds(aTransform); }
-
+
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
- const Matrix &aTransform = Matrix()) const
+ const Matrix &aTransform = Matrix()) const override
{ return mPath->GetStrokedBounds(aStrokeOptions, aTransform); }
- virtual void StreamToSink(PathSink *aSink) const { mPath->StreamToSink(aSink); }
+ virtual void StreamToSink(PathSink *aSink) const override { mPath->StreamToSink(aSink); }
- virtual FillRule GetFillRule() const { return mFillRule; }
+ virtual FillRule GetFillRule() const override { return mFillRule; }
void StorePath(std::ostream &aStream) const;
static void ReadPathToBuilder(std::istream &aStream, PathBuilder *aBuilder);
private:
friend class DrawTargetWrapAndRecord;
friend class DrawTargetRecording;
friend class RecordedPathCreation;
--- a/gfx/2d/PathSkia.h
+++ b/gfx/2d/PathSkia.h
@@ -13,75 +13,77 @@
namespace mozilla {
namespace gfx {
class PathSkia;
class PathBuilderSkia : public PathBuilder
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderSkia)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathBuilderSkia, override)
+
PathBuilderSkia(const Matrix& aTransform, const SkPath& aPath, FillRule aFillRule);
explicit PathBuilderSkia(FillRule aFillRule);
- virtual void MoveTo(const Point &aPoint);
- virtual void LineTo(const Point &aPoint);
+ virtual void MoveTo(const Point &aPoint) override;
+ virtual void LineTo(const Point &aPoint) override;
virtual void BezierTo(const Point &aCP1,
const Point &aCP2,
- const Point &aCP3);
+ const Point &aCP3) override;
virtual void QuadraticBezierTo(const Point &aCP1,
- const Point &aCP2);
- virtual void Close();
+ const Point &aCP2) override;
+ virtual void Close() override;
virtual void Arc(const Point &aOrigin, float aRadius, float aStartAngle,
- float aEndAngle, bool aAntiClockwise = false);
- virtual Point CurrentPoint() const;
- virtual already_AddRefed<Path> Finish();
+ float aEndAngle, bool aAntiClockwise = false) override;
+ virtual Point CurrentPoint() const override;
+ virtual already_AddRefed<Path> Finish() override;
void AppendPath(const SkPath &aPath);
- virtual BackendType GetBackendType() const { return BackendType::SKIA; }
+ virtual BackendType GetBackendType() const override { return BackendType::SKIA; }
private:
void SetFillRule(FillRule aFillRule);
SkPath mPath;
FillRule mFillRule;
};
class PathSkia : public Path
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSkia)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(PathSkia, override)
+
PathSkia(SkPath& aPath, FillRule aFillRule)
: mFillRule(aFillRule)
{
mPath.swap(aPath);
}
-
- virtual BackendType GetBackendType() const { return BackendType::SKIA; }
- virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const;
+ virtual BackendType GetBackendType() const override { return BackendType::SKIA; }
+
+ virtual already_AddRefed<PathBuilder> CopyToBuilder(FillRule aFillRule) const override;
virtual already_AddRefed<PathBuilder> TransformedCopyToBuilder(const Matrix &aTransform,
- FillRule aFillRule) const;
+ FillRule aFillRule) const override;
- virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const;
-
+ virtual bool ContainsPoint(const Point &aPoint, const Matrix &aTransform) const override;
+
virtual bool StrokeContainsPoint(const StrokeOptions &aStrokeOptions,
const Point &aPoint,
- const Matrix &aTransform) const;
+ const Matrix &aTransform) const override;
- virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const;
-
+ virtual Rect GetBounds(const Matrix &aTransform = Matrix()) const override;
+
virtual Rect GetStrokedBounds(const StrokeOptions &aStrokeOptions,
- const Matrix &aTransform = Matrix()) const;
+ const Matrix &aTransform = Matrix()) const override;
- virtual void StreamToSink(PathSink *aSink) const;
+ virtual void StreamToSink(PathSink *aSink) const override;
- virtual FillRule GetFillRule() const { return mFillRule; }
+ virtual FillRule GetFillRule() const override { return mFillRule; }
const SkPath& GetPath() const { return mPath; }
private:
friend class DrawTargetSkia;
SkPath mPath;
FillRule mFillRule;
--- a/gfx/2d/RecordedEventImpl.h
+++ b/gfx/2d/RecordedEventImpl.h
@@ -19,69 +19,69 @@
namespace mozilla {
namespace gfx {
template<class Derived>
class RecordedEventDerived : public RecordedEvent {
using RecordedEvent::RecordedEvent;
public:
- void RecordToStream(std::ostream &aStream) const {
+ void RecordToStream(std::ostream &aStream) const override {
static_cast<const Derived*>(this)->Record(aStream);
}
- void RecordToStream(EventStream& aStream) const {
+ void RecordToStream(EventStream& aStream) const override {
static_cast<const Derived*>(this)->Record(aStream);
}
- void RecordToStream(MemStream &aStream) const {
+ void RecordToStream(MemStream &aStream) const override {
SizeCollector size;
static_cast<const Derived*>(this)->Record(size);
aStream.Resize(aStream.mLength + size.mTotalSize);
MemWriter writer(aStream.mData + aStream.mLength - size.mTotalSize);
static_cast<const Derived*>(this)->Record(writer);
}
};
template<class Derived>
class RecordedDrawingEvent : public RecordedEventDerived<Derived>
{
public:
- virtual ReferencePtr GetDestinedDT() { return mDT; }
+ virtual ReferencePtr GetDestinedDT() override { return mDT; }
protected:
RecordedDrawingEvent(RecordedEvent::EventType aType, DrawTarget *aTarget)
: RecordedEventDerived<Derived>(aType), mDT(aTarget)
{
}
template<class S>
RecordedDrawingEvent(RecordedEvent::EventType aType, S &aStream);
template<class S>
void Record(S &aStream) const;
- virtual ReferencePtr GetObjectRef() const;
+ virtual ReferencePtr GetObjectRef() const override;
ReferencePtr mDT;
};
class RecordedDrawTargetCreation : public RecordedEventDerived<RecordedDrawTargetCreation> {
public:
RecordedDrawTargetCreation(ReferencePtr aRefPtr, BackendType aType, const IntSize &aSize, SurfaceFormat aFormat,
bool aHasExistingData = false, SourceSurface *aExistingData = nullptr)
: RecordedEventDerived(DRAWTARGETCREATION), mRefPtr(aRefPtr), mBackendType(aType), mSize(aSize), mFormat(aFormat)
, mHasExistingData(aHasExistingData), mExistingData(aExistingData)
{}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "DrawTarget Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "DrawTarget Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
ReferencePtr mRefPtr;
BackendType mBackendType;
IntSize mSize;
SurfaceFormat mFormat;
bool mHasExistingData;
RefPtr<SourceSurface> mExistingData;
@@ -93,24 +93,24 @@ private:
};
class RecordedDrawTargetDestruction : public RecordedEventDerived<RecordedDrawTargetDestruction> {
public:
MOZ_IMPLICIT RecordedDrawTargetDestruction(ReferencePtr aRefPtr)
: RecordedEventDerived(DRAWTARGETDESTRUCTION), mRefPtr(aRefPtr)
{}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "DrawTarget Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "DrawTarget Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
ReferencePtr mRefPtr;
BackendType mBackendType;
private:
friend class RecordedEvent;
template<class S>
@@ -121,24 +121,24 @@ class RecordedCreateSimilarDrawTarget :
public:
RecordedCreateSimilarDrawTarget(ReferencePtr aRefPtr, const IntSize &aSize,
SurfaceFormat aFormat)
: RecordedEventDerived(CREATESIMILARDRAWTARGET)
, mRefPtr(aRefPtr) , mSize(aSize), mFormat(aFormat)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "CreateSimilarDrawTarget"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "CreateSimilarDrawTarget"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
ReferencePtr mRefPtr;
IntSize mSize;
SurfaceFormat mFormat;
private:
friend class RecordedEvent;
@@ -149,23 +149,24 @@ private:
class RecordedFillRect : public RecordedDrawingEvent<RecordedFillRect> {
public:
RecordedFillRect(DrawTarget *aDT, const Rect &aRect, const Pattern &aPattern, const DrawOptions &aOptions)
: RecordedDrawingEvent(FILLRECT, aDT), mRect(aRect), mOptions(aOptions)
{
StorePattern(mPattern, aPattern);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "FillRect"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "FillRect"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedFillRect(S &aStream);
Rect mRect;
PatternStorage mPattern;
@@ -177,23 +178,24 @@ public:
RecordedStrokeRect(DrawTarget *aDT, const Rect &aRect, const Pattern &aPattern,
const StrokeOptions &aStrokeOptions, const DrawOptions &aOptions)
: RecordedDrawingEvent(STROKERECT, aDT), mRect(aRect),
mStrokeOptions(aStrokeOptions), mOptions(aOptions)
{
StorePattern(mPattern, aPattern);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "StrokeRect"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "StrokeRect"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedStrokeRect(S &aStream);
Rect mRect;
PatternStorage mPattern;
@@ -207,23 +209,24 @@ public:
const Pattern &aPattern, const StrokeOptions &aStrokeOptions,
const DrawOptions &aOptions)
: RecordedDrawingEvent(STROKELINE, aDT), mBegin(aBegin), mEnd(aEnd),
mStrokeOptions(aStrokeOptions), mOptions(aOptions)
{
StorePattern(mPattern, aPattern);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "StrokeLine"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "StrokeLine"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedStrokeLine(S &aStream);
Point mBegin;
Point mEnd;
@@ -235,22 +238,23 @@ private:
class RecordedFill : public RecordedDrawingEvent<RecordedFill> {
public:
RecordedFill(DrawTarget *aDT, ReferencePtr aPath, const Pattern &aPattern, const DrawOptions &aOptions)
: RecordedDrawingEvent(FILL, aDT), mPath(aPath), mOptions(aOptions)
{
StorePattern(mPattern, aPattern);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Fill"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Fill"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedFill(S &aStream);
ReferencePtr mPath;
PatternStorage mPattern;
@@ -265,22 +269,23 @@ public:
{
StorePattern(mPattern, aPattern);
mNumGlyphs = aNumGlyphs;
mGlyphs = new Glyph[aNumGlyphs];
memcpy(mGlyphs, aGlyphs, sizeof(Glyph) * aNumGlyphs);
}
virtual ~RecordedFillGlyphs();
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "FillGlyphs"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "FillGlyphs"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedFillGlyphs(S &aStream);
ReferencePtr mScaledFont;
PatternStorage mPattern;
@@ -293,22 +298,23 @@ class RecordedMask : public RecordedDraw
public:
RecordedMask(DrawTarget *aDT, const Pattern &aSource, const Pattern &aMask, const DrawOptions &aOptions)
: RecordedDrawingEvent(MASK, aDT), mOptions(aOptions)
{
StorePattern(mSource, aSource);
StorePattern(mMask, aMask);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Mask"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Mask"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedMask(S &aStream);
PatternStorage mSource;
PatternStorage mMask;
@@ -320,22 +326,23 @@ public:
RecordedStroke(DrawTarget *aDT, ReferencePtr aPath, const Pattern &aPattern,
const StrokeOptions &aStrokeOptions, const DrawOptions &aOptions)
: RecordedDrawingEvent(STROKE, aDT), mPath(aPath),
mStrokeOptions(aStrokeOptions), mOptions(aOptions)
{
StorePattern(mPattern, aPattern);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Stroke"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Stroke"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedStroke(S &aStream);
ReferencePtr mPath;
PatternStorage mPattern;
@@ -345,22 +352,23 @@ private:
class RecordedClearRect : public RecordedDrawingEvent<RecordedClearRect> {
public:
RecordedClearRect(DrawTarget *aDT, const Rect &aRect)
: RecordedDrawingEvent(CLEARRECT, aDT), mRect(aRect)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "ClearRect"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "ClearRect"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedClearRect(S &aStream);
Rect mRect;
};
@@ -369,22 +377,23 @@ class RecordedCopySurface : public Recor
public:
RecordedCopySurface(DrawTarget *aDT, ReferencePtr aSourceSurface,
const IntRect &aSourceRect, const IntPoint &aDest)
: RecordedDrawingEvent(COPYSURFACE, aDT), mSourceSurface(aSourceSurface),
mSourceRect(aSourceRect), mDest(aDest)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "CopySurface"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "CopySurface"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedCopySurface(S &aStream);
ReferencePtr mSourceSurface;
IntRect mSourceRect;
@@ -393,65 +402,68 @@ private:
class RecordedPushClip : public RecordedDrawingEvent<RecordedPushClip> {
public:
RecordedPushClip(DrawTarget *aDT, ReferencePtr aPath)
: RecordedDrawingEvent(PUSHCLIP, aDT), mPath(aPath)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "PushClip"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "PushClip"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedPushClip(S &aStream);
ReferencePtr mPath;
};
class RecordedPushClipRect : public RecordedDrawingEvent<RecordedPushClipRect> {
public:
RecordedPushClipRect(DrawTarget *aDT, const Rect &aRect)
: RecordedDrawingEvent(PUSHCLIPRECT, aDT), mRect(aRect)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "PushClipRect"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "PushClipRect"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedPushClipRect(S &aStream);
Rect mRect;
};
class RecordedPopClip : public RecordedDrawingEvent<RecordedPopClip> {
public:
MOZ_IMPLICIT RecordedPopClip(DrawTarget *aDT)
: RecordedDrawingEvent(POPCLIP, aDT)
{}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "PopClip"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "PopClip"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedPopClip(S &aStream);
};
class RecordedPushLayer : public RecordedDrawingEvent<RecordedPushLayer> {
@@ -460,22 +472,23 @@ public:
SourceSurface* aMask, const Matrix& aMaskTransform,
const IntRect& aBounds, bool aCopyBackground)
: RecordedDrawingEvent(PUSHLAYER, aDT), mOpaque(aOpaque)
, mOpacity(aOpacity), mMask(aMask), mMaskTransform(aMaskTransform)
, mBounds(aBounds), mCopyBackground(aCopyBackground)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "PushLayer"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "PushLayer"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedPushLayer(S &aStream);
bool mOpaque;
Float mOpacity;
@@ -487,42 +500,43 @@ private:
class RecordedPopLayer : public RecordedDrawingEvent<RecordedPopLayer> {
public:
MOZ_IMPLICIT RecordedPopLayer(DrawTarget* aDT)
: RecordedDrawingEvent(POPLAYER, aDT)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "PopLayer"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "PopLayer"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedPopLayer(S &aStream);
};
class RecordedSetTransform : public RecordedDrawingEvent<RecordedSetTransform> {
public:
RecordedSetTransform(DrawTarget *aDT, const Matrix &aTransform)
: RecordedDrawingEvent(SETTRANSFORM, aDT), mTransform(aTransform)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "SetTransform"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "SetTransform"; }
Matrix mTransform;
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedSetTransform(S &aStream);
};
@@ -532,22 +546,23 @@ public:
RecordedDrawSurface(DrawTarget *aDT, ReferencePtr aRefSource, const Rect &aDest,
const Rect &aSource, const DrawSurfaceOptions &aDSOptions,
const DrawOptions &aOptions)
: RecordedDrawingEvent(DRAWSURFACE, aDT), mRefSource(aRefSource), mDest(aDest)
, mSource(aSource), mDSOptions(aDSOptions), mOptions(aOptions)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "DrawSurface"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "DrawSurface"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedDrawSurface(S &aStream);
ReferencePtr mRefSource;
Rect mDest;
@@ -561,22 +576,23 @@ public:
RecordedDrawSurfaceWithShadow(DrawTarget *aDT, ReferencePtr aRefSource, const Point &aDest,
const Color &aColor, const Point &aOffset,
Float aSigma, CompositionOp aOp)
: RecordedDrawingEvent(DRAWSURFACEWITHSHADOW, aDT), mRefSource(aRefSource), mDest(aDest)
, mColor(aColor), mOffset(aOffset), mSigma(aSigma), mOp(aOp)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "DrawSurfaceWithShadow"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "DrawSurfaceWithShadow"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedDrawSurfaceWithShadow(S &aStream);
ReferencePtr mRefSource;
Point mDest;
@@ -592,22 +608,23 @@ public:
const Rect &aSourceRect,
const Point &aDestPoint,
const DrawOptions &aOptions)
: RecordedDrawingEvent(DRAWFILTER, aDT), mNode(aNode), mSourceRect(aSourceRect)
, mDestPoint(aDestPoint), mOptions(aOptions)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "DrawFilter"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "DrawFilter"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedDrawFilter(S &aStream);
ReferencePtr mNode;
Rect mSourceRect;
@@ -615,23 +632,24 @@ private:
DrawOptions mOptions;
};
class RecordedPathCreation : public RecordedEventDerived<RecordedPathCreation> {
public:
MOZ_IMPLICIT RecordedPathCreation(PathRecording *aPath);
~RecordedPathCreation();
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Path Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Path Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
FillRule mFillRule;
std::vector<PathOp> mPathOps;
template<class S>
@@ -640,23 +658,24 @@ private:
class RecordedPathDestruction : public RecordedEventDerived<RecordedPathDestruction> {
public:
MOZ_IMPLICIT RecordedPathDestruction(PathRecording *aPath)
: RecordedEventDerived(PATHDESTRUCTION), mRefPtr(aPath)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Path Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Path Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
template<class S>
MOZ_IMPLICIT RecordedPathDestruction(S &aStream);
};
@@ -667,23 +686,24 @@ public:
const IntSize &aSize, SurfaceFormat aFormat)
: RecordedEventDerived(SOURCESURFACECREATION), mRefPtr(aRefPtr), mData(aData)
, mStride(aStride), mSize(aSize), mFormat(aFormat), mDataOwned(false)
{
}
~RecordedSourceSurfaceCreation();
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "SourceSurface Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "SourceSurface Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
uint8_t *mData;
int32_t mStride;
IntSize mSize;
SurfaceFormat mFormat;
@@ -695,23 +715,24 @@ private:
class RecordedSourceSurfaceDestruction : public RecordedEventDerived<RecordedSourceSurfaceDestruction> {
public:
MOZ_IMPLICIT RecordedSourceSurfaceDestruction(ReferencePtr aRefPtr)
: RecordedEventDerived(SOURCESURFACEDESTRUCTION), mRefPtr(aRefPtr)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "SourceSurface Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "SourceSurface Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
template<class S>
MOZ_IMPLICIT RecordedSourceSurfaceDestruction(S &aStream);
};
@@ -720,23 +741,24 @@ class RecordedFilterNodeCreation : publi
public:
RecordedFilterNodeCreation(ReferencePtr aRefPtr, FilterType aType)
: RecordedEventDerived(FILTERNODECREATION), mRefPtr(aRefPtr), mType(aType)
{
}
~RecordedFilterNodeCreation();
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "FilterNode Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "FilterNode Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
FilterType mType;
template<class S>
MOZ_IMPLICIT RecordedFilterNodeCreation(S &aStream);
@@ -744,23 +766,24 @@ private:
class RecordedFilterNodeDestruction : public RecordedEventDerived<RecordedFilterNodeDestruction> {
public:
MOZ_IMPLICIT RecordedFilterNodeDestruction(ReferencePtr aRefPtr)
: RecordedEventDerived(FILTERNODEDESTRUCTION), mRefPtr(aRefPtr)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "FilterNode Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "FilterNode Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
template<class S>
MOZ_IMPLICIT RecordedFilterNodeDestruction(S &aStream);
};
@@ -771,23 +794,24 @@ public:
uint32_t aNumStops, ExtendMode aExtendMode)
: RecordedEventDerived(GRADIENTSTOPSCREATION), mRefPtr(aRefPtr), mStops(aStops)
, mNumStops(aNumStops), mExtendMode(aExtendMode), mDataOwned(false)
{
}
~RecordedGradientStopsCreation();
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "GradientStops Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "GradientStops Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
GradientStop *mStops;
uint32_t mNumStops;
ExtendMode mExtendMode;
bool mDataOwned;
@@ -798,46 +822,48 @@ private:
class RecordedGradientStopsDestruction : public RecordedEventDerived<RecordedGradientStopsDestruction> {
public:
MOZ_IMPLICIT RecordedGradientStopsDestruction(ReferencePtr aRefPtr)
: RecordedEventDerived(GRADIENTSTOPSDESTRUCTION), mRefPtr(aRefPtr)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "GradientStops Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "GradientStops Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
template<class S>
MOZ_IMPLICIT RecordedGradientStopsDestruction(S &aStream);
};
class RecordedSnapshot : public RecordedEventDerived<RecordedSnapshot> {
public:
RecordedSnapshot(ReferencePtr aRefPtr, DrawTarget *aDT)
: RecordedEventDerived(SNAPSHOT), mRefPtr(aRefPtr), mDT(aDT)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Snapshot"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Snapshot"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
ReferencePtr mDT;
template<class S>
MOZ_IMPLICIT RecordedSnapshot(S &aStream);
@@ -847,23 +873,24 @@ class RecordedIntoLuminanceSource : publ
public:
RecordedIntoLuminanceSource(ReferencePtr aRefPtr, DrawTarget *aDT,
LuminanceType aLuminanceType, float aOpacity)
: RecordedEventDerived(SNAPSHOT), mRefPtr(aRefPtr), mDT(aDT),
mLuminanceType(aLuminanceType), mOpacity(aOpacity)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "IntoLuminanceSource"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "IntoLuminanceSource"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
ReferencePtr mDT;
LuminanceType mLuminanceType;
float mOpacity;
@@ -888,23 +915,23 @@ public:
{
mGetFontFileDataSucceeded = aUnscaledFont->GetFontFileData(&FontDataProc, this);
}
~RecordedFontData();
bool IsValid() const { return mGetFontFileDataSucceeded; }
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Font Data"; }
- virtual ReferencePtr GetObjectRef() const { return nullptr; };
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Font Data"; }
+ virtual ReferencePtr GetObjectRef() const override { return nullptr; };
void SetFontData(const uint8_t *aData, uint32_t aSize, uint32_t aIndex);
bool GetFontDetails(RecordedFontDetails& fontDetails);
private:
friend class RecordedEvent;
@@ -936,23 +963,23 @@ public:
{
mHasDesc = aUnscaledFont->GetFontDescriptor(FontDescCb, this);
}
~RecordedFontDescriptor();
bool IsValid() const { return mHasDesc; }
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "Font Desc"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "Font Desc"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
private:
friend class RecordedEvent;
void SetFontDescriptor(const uint8_t* aData, uint32_t aSize, uint32_t aIndex);
bool mHasDesc;
@@ -978,23 +1005,23 @@ public:
: RecordedEventDerived(UNSCALEDFONTCREATION)
, mRefPtr(aUnscaledFont)
, mFontDataKey(aFontDetails.fontDataKey)
, mIndex(aFontDetails.index)
{
aUnscaledFont->GetFontInstanceData(FontInstanceDataProc, this);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "UnscaledFont Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "UnscaledFont Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize);
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
uint64_t mFontDataKey;
@@ -1006,23 +1033,24 @@ private:
};
class RecordedUnscaledFontDestruction : public RecordedEventDerived<RecordedUnscaledFontDestruction> {
public:
MOZ_IMPLICIT RecordedUnscaledFontDestruction(ReferencePtr aRefPtr)
: RecordedEventDerived(UNSCALEDFONTDESTRUCTION), mRefPtr(aRefPtr)
{}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "UnscaledFont Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "UnscaledFont Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
template<class S>
MOZ_IMPLICIT RecordedUnscaledFontDestruction(S &aStream);
};
@@ -1043,23 +1071,23 @@ public:
: RecordedEventDerived(SCALEDFONTCREATION)
, mRefPtr(aScaledFont)
, mUnscaledFont(aUnscaledFont)
, mGlyphSize(aScaledFont->GetSize())
{
aScaledFont->GetFontInstanceData(FontInstanceDataProc, this);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "ScaledFont Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "ScaledFont Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize,
const FontVariation* aVariations, uint32_t aNumVariations);
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
@@ -1087,23 +1115,23 @@ public:
: RecordedEventDerived(SCALEDFONTCREATIONBYINDEX)
, mRefPtr(aScaledFont)
, mUnscaledFontIndex(aUnscaledFontIndex)
, mGlyphSize(aScaledFont->GetSize())
{
aScaledFont->GetFontInstanceData(FontInstanceDataProc, this);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "ScaledFont Creation"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "ScaledFont Creation"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
void SetFontInstanceData(const uint8_t *aData, uint32_t aSize,
const FontVariation* aVariations, uint32_t aNumVariations);
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
@@ -1118,24 +1146,25 @@ private:
class RecordedScaledFontDestruction : public RecordedEventDerived<RecordedScaledFontDestruction> {
public:
MOZ_IMPLICIT RecordedScaledFontDestruction(ReferencePtr aRefPtr)
: RecordedEventDerived(SCALEDFONTDESTRUCTION), mRefPtr(aRefPtr)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S>
void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "ScaledFont Destruction"; }
- virtual ReferencePtr GetObjectRef() const { return mRefPtr; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "ScaledFont Destruction"; }
+ virtual ReferencePtr GetObjectRef() const override { return mRefPtr; }
+
private:
friend class RecordedEvent;
ReferencePtr mRefPtr;
template<class S>
MOZ_IMPLICIT RecordedScaledFontDestruction(S &aStream);
};
@@ -1145,22 +1174,23 @@ public:
RecordedMaskSurface(DrawTarget *aDT, const Pattern &aPattern, ReferencePtr aRefMask,
const Point &aOffset, const DrawOptions &aOptions)
: RecordedDrawingEvent(MASKSURFACE, aDT), mRefMask(aRefMask), mOffset(aOffset)
, mOptions(aOptions)
{
StorePattern(mPattern, aPattern);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "MaskSurface"; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "MaskSurface"; }
+
private:
friend class RecordedEvent;
template<class S>
MOZ_IMPLICIT RecordedMaskSurface(S &aStream);
PatternStorage mPattern;
ReferencePtr mRefMask;
@@ -1198,23 +1228,22 @@ public:
RecordedFilterNodeSetAttribute(FilterNode *aNode, uint32_t aIndex, const Float *aFloat, uint32_t aSize)
: RecordedEventDerived(FILTERNODESETATTRIBUTE), mNode(aNode), mIndex(aIndex), mArgType(ARGTYPE_FLOAT_ARRAY)
{
mPayload.resize(sizeof(Float) * aSize);
memcpy(&mPayload.front(), aFloat, sizeof(Float) * aSize);
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "SetAttribute"; }
-
- virtual ReferencePtr GetObjectRef() const { return mNode; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "SetAttribute"; }
+ virtual ReferencePtr GetObjectRef() const override { return mNode; }
private:
friend class RecordedEvent;
ReferencePtr mNode;
uint32_t mIndex;
ArgType mArgType;
@@ -1234,23 +1263,22 @@ public:
}
RecordedFilterNodeSetInput(FilterNode *aNode, uint32_t aIndex, SourceSurface *aInputSurface)
: RecordedEventDerived(FILTERNODESETINPUT), mNode(aNode), mIndex(aIndex)
, mInputFilter(nullptr), mInputSurface(aInputSurface)
{
}
- virtual bool PlayEvent(Translator *aTranslator) const;
+ virtual bool PlayEvent(Translator *aTranslator) const override;
template<class S> void Record(S &aStream) const;
- virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const;
-
- virtual std::string GetName() const { return "SetInput"; }
-
- virtual ReferencePtr GetObjectRef() const { return mNode; }
+ virtual void OutputSimpleEventInfo(std::stringstream &aStringStream) const override;
+
+ virtual std::string GetName() const override { return "SetInput"; }
+ virtual ReferencePtr GetObjectRef() const override { return mNode; }
private:
friend class RecordedEvent;
ReferencePtr mNode;
uint32_t mIndex;
ReferencePtr mInputFilter;
ReferencePtr mInputSurface;
--- a/gfx/2d/ScaledFontBase.h
+++ b/gfx/2d/ScaledFontBase.h
@@ -23,39 +23,40 @@
#endif
namespace mozilla {
namespace gfx {
class ScaledFontBase : public ScaledFont
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontBase)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontBase, override)
+
ScaledFontBase(const RefPtr<UnscaledFont>& aUnscaledFont, Float aSize);
virtual ~ScaledFontBase();
- virtual already_AddRefed<Path> GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget);
+ virtual already_AddRefed<Path> GetPathForGlyphs(const GlyphBuffer &aBuffer, const DrawTarget *aTarget) override;
- virtual void CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, const Matrix *aTransformHint);
+ virtual void CopyGlyphsToBuilder(const GlyphBuffer &aBuffer, PathBuilder *aBuilder, const Matrix *aTransformHint) override;
- virtual void GetGlyphDesignMetrics(const uint16_t* aGlyphIndices, uint32_t aNumGlyphs, GlyphMetrics* aGlyphMetrics);
+ virtual void GetGlyphDesignMetrics(const uint16_t* aGlyphIndices, uint32_t aNumGlyphs, GlyphMetrics* aGlyphMetrics) override;
- virtual Float GetSize() const { return mSize; }
+ virtual Float GetSize() const override { return mSize; }
#ifdef USE_SKIA
virtual SkTypeface* GetSkTypeface() { return mTypeface; }
#endif
// Not true, but required to instantiate a ScaledFontBase.
- virtual FontType GetType() const { return FontType::SKIA; }
+ virtual FontType GetType() const override { return FontType::SKIA; }
#ifdef USE_CAIRO_SCALED_FONT
bool PopulateCairoScaledFont();
- virtual cairo_scaled_font_t* GetCairoScaledFont() { return mScaledFont; }
- virtual void SetCairoScaledFont(cairo_scaled_font_t* font);
+ virtual cairo_scaled_font_t* GetCairoScaledFont() override { return mScaledFont; }
+ virtual void SetCairoScaledFont(cairo_scaled_font_t* font) override;
#endif
protected:
friend class DrawTargetSkia;
#ifdef USE_SKIA
SkTypeface* mTypeface;
SkPath GetSkiaPathForGlyphs(const GlyphBuffer &aBuffer);
#endif
--- a/gfx/2d/ScaledFontCairo.h
+++ b/gfx/2d/ScaledFontCairo.h
@@ -12,23 +12,23 @@
#include "cairo.h"
namespace mozilla {
namespace gfx {
class ScaledFontCairo : public ScaledFontBase
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontCairo)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(ScaledFontCairo, override)
ScaledFontCairo(cairo_scaled_font_t* aScaledFont,
const RefPtr<UnscaledFont>& aUnscaledFont,
Float aSize);
#if defined(USE_SKIA) && defined(MOZ_ENABLE_FREETYPE)
- virtual SkTypeface* GetSkTypeface();
+ virtual SkTypeface* GetSkTypeface() override;
#endif
};
} // namespace gfx
} // namespace mozilla
#endif /* MOZILLA_GFX_SCALEDFONTCAIRO_H_ */
--- a/gfx/2d/SourceSurfaceCairo.h
+++ b/gfx/2d/SourceSurfaceCairo.h
@@ -12,31 +12,32 @@
namespace mozilla {
namespace gfx {
class DrawTargetCairo;
class SourceSurfaceCairo : public SourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCairo)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceCairo, override)
+
// Create a SourceSurfaceCairo. The surface will not be copied, but simply
// referenced.
// If aDrawTarget is non-nullptr, it is assumed that this is a snapshot source
// surface, and we'll call DrawTargetCairo::RemoveSnapshot(this) on it when
// we're destroyed.
SourceSurfaceCairo(cairo_surface_t* aSurface, const IntSize& aSize,
const SurfaceFormat& aFormat,
DrawTargetCairo* aDrawTarget = nullptr);
virtual ~SourceSurfaceCairo();
- virtual SurfaceType GetType() const { return SurfaceType::CAIRO; }
- virtual IntSize GetSize() const;
- virtual SurfaceFormat GetFormat() const;
- virtual already_AddRefed<DataSourceSurface> GetDataSurface();
+ virtual SurfaceType GetType() const override { return SurfaceType::CAIRO; }
+ virtual IntSize GetSize() const override;
+ virtual SurfaceFormat GetFormat() const override;
+ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
cairo_surface_t* GetSurface() const;
private: // methods
friend class DrawTargetCairo;
void DrawTargetWillChange();
private: // data
@@ -44,25 +45,26 @@ private: // data
SurfaceFormat mFormat;
cairo_surface_t* mSurface;
DrawTargetCairo* mDrawTarget;
};
class DataSourceSurfaceCairo : public DataSourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCairo)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceCairo, override)
+
explicit DataSourceSurfaceCairo(cairo_surface_t* imageSurf);
virtual ~DataSourceSurfaceCairo();
- virtual unsigned char *GetData();
- virtual int32_t Stride();
+ virtual unsigned char *GetData() override;
+ virtual int32_t Stride() override;
- virtual SurfaceType GetType() const { return SurfaceType::CAIRO_IMAGE; }
- virtual IntSize GetSize() const;
- virtual SurfaceFormat GetFormat() const;
+ virtual SurfaceType GetType() const override { return SurfaceType::CAIRO_IMAGE; }
+ virtual IntSize GetSize() const override;
+ virtual SurfaceFormat GetFormat() const override;
cairo_surface_t* GetSurface() const;
private:
cairo_surface_t* mImageSurface;
};
} // namespace gfx
--- a/gfx/2d/SourceSurfaceD2D1.h
+++ b/gfx/2d/SourceSurfaceD2D1.h
@@ -16,27 +16,28 @@
namespace mozilla {
namespace gfx {
class DrawTargetD2D1;
class SourceSurfaceD2D1 : public SourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceD2D1)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceD2D1, override)
+
SourceSurfaceD2D1(ID2D1Image* aImage, ID2D1DeviceContext *aDC,
SurfaceFormat aFormat, const IntSize &aSize,
DrawTargetD2D1 *aDT = nullptr);
~SourceSurfaceD2D1();
- virtual SurfaceType GetType() const { return SurfaceType::D2D1_1_IMAGE; }
- virtual IntSize GetSize() const { return mSize; }
- virtual SurfaceFormat GetFormat() const { return mFormat; }
- virtual bool IsValid() const;
- virtual already_AddRefed<DataSourceSurface> GetDataSurface();
+ virtual SurfaceType GetType() const override { return SurfaceType::D2D1_1_IMAGE; }
+ virtual IntSize GetSize() const override { return mSize; }
+ virtual SurfaceFormat GetFormat() const override { return mFormat; }
+ virtual bool IsValid() const override;
+ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override;
ID2D1Image *GetImage() { return mImage; }
void EnsureIndependent() { if (!mDrawTarget) return; DrawTargetWillChange(); }
private:
friend class DrawTargetD2D1;
@@ -63,28 +64,29 @@ private:
IntSize mSize;
DrawTargetD2D1* mDrawTarget;
std::shared_ptr<Mutex> mSnapshotLock;
};
class DataSourceSurfaceD2D1 : public DataSourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceD2D1)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceD2D1, override)
+
DataSourceSurfaceD2D1(ID2D1Bitmap1 *aMappableBitmap, SurfaceFormat aFormat);
~DataSourceSurfaceD2D1();
- virtual SurfaceType GetType() const { return SurfaceType::DATA; }
- virtual IntSize GetSize() const;
- virtual SurfaceFormat GetFormat() const { return mFormat; }
- virtual bool IsValid() const { return !!mBitmap; }
- virtual uint8_t *GetData();
- virtual int32_t Stride();
- virtual bool Map(MapType, MappedSurface *aMappedSurface);
- virtual void Unmap();
+ virtual SurfaceType GetType() const override{ return SurfaceType::DATA; }
+ virtual IntSize GetSize() const override;
+ virtual SurfaceFormat GetFormat() const override { return mFormat; }
+ virtual bool IsValid() const override { return !!mBitmap; }
+ virtual uint8_t *GetData() override;
+ virtual int32_t Stride() override;
+ virtual bool Map(MapType, MappedSurface *aMappedSurface) override;
+ virtual void Unmap() override;
private:
friend class SourceSurfaceD2DTarget;
void EnsureMapped();
mutable RefPtr<ID2D1Bitmap1> mBitmap;
SurfaceFormat mFormat;
D2D1_MAPPED_RECT mMap;
--- a/gfx/2d/SourceSurfaceDual.h
+++ b/gfx/2d/SourceSurfaceDual.h
@@ -13,30 +13,31 @@ namespace mozilla {
namespace gfx {
class DualSurface;
class DualPattern;
class SourceSurfaceDual : public SourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceDual)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SourceSurfaceDual, override)
+
SourceSurfaceDual(DrawTarget *aDTA, DrawTarget *aDTB)
: mA(aDTA->Snapshot())
, mB(aDTB->Snapshot())
{ }
- virtual SurfaceType GetType() const { return SurfaceType::DUAL_DT; }
- virtual IntSize GetSize() const { return mA->GetSize(); }
- virtual SurfaceFormat GetFormat() const { return mA->GetFormat(); }
+ virtual SurfaceType GetType() const override { return SurfaceType::DUAL_DT; }
+ virtual IntSize GetSize() const override { return mA->GetSize(); }
+ virtual SurfaceFormat GetFormat() const override { return mA->GetFormat(); }
// TODO: This is probably wrong as this was originally only
// used for debugging purposes, but now has legacy relying on
// giving the first type only.
- virtual already_AddRefed<DataSourceSurface> GetDataSurface() {
+ virtual already_AddRefed<DataSourceSurface> GetDataSurface() override {
return mA->GetDataSurface();
}
SourceSurface* GetFirstSurface() {
MOZ_ASSERT(mA->GetType() == mB->GetType());
return mA;
}
--- a/gfx/2d/SourceSurfaceSkia.h
+++ b/gfx/2d/SourceSurfaceSkia.h
@@ -18,23 +18,24 @@ namespace mozilla {
namespace gfx {
class DrawTargetSkia;
class SnapshotLock;
class SourceSurfaceSkia : public DataSourceSurface
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceSkia)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(DataSourceSurfaceSkia, override)
+
SourceSurfaceSkia();
~SourceSurfaceSkia();
- virtual SurfaceType GetType() const { return SurfaceType::SKIA; }
- virtual IntSize GetSize() const;
- virtual SurfaceFormat GetFormat() const;
+ virtual SurfaceType GetType() const override { return SurfaceType::SKIA; }
+ virtual IntSize GetSize() const override;
+ virtual SurfaceFormat GetFormat() const override;
// This is only ever called by the DT destructor, which can only ever happen
// from one place at a time. Therefore it doesn't need to hold the ChangeMutex
// as mSurface is never read to directly and is just there to keep the object
// alive, which itself is refcounted in a thread-safe manner.
void GiveSurface(sk_sp<SkSurface> &aSurface) { mSurface = aSurface; mDrawTarget = nullptr; }
sk_sp<SkImage> GetImage();
@@ -43,26 +44,26 @@ public:
const IntSize &aSize,
int32_t aStride,
SurfaceFormat aFormat);
bool InitFromImage(const sk_sp<SkImage>& aImage,
SurfaceFormat aFormat = SurfaceFormat::UNKNOWN,
DrawTargetSkia* aOwner = nullptr);
- virtual uint8_t* GetData();
+ virtual uint8_t* GetData() override;
/**
* The caller is responsible for ensuring aMappedSurface is not null.
*/
- virtual bool Map(MapType, MappedSurface *aMappedSurface);
+ virtual bool Map(MapType, MappedSurface *aMappedSurface) override;
- virtual void Unmap();
+ virtual void Unmap() override;
- virtual int32_t Stride() { return mStride; }
+ virtual int32_t Stride() override { return mStride; }
private:
friend class DrawTargetSkia;
void DrawTargetWillChange();
sk_sp<SkImage> mImage;
// This keeps a surface alive if needed because its DrawTarget has gone away.
--- a/gfx/angle/src/compiler/translator/IntermTraverse.h
+++ b/gfx/angle/src/compiler/translator/IntermTraverse.h
@@ -301,20 +301,20 @@ class TLValueTrackingTraverser : public
public:
TLValueTrackingTraverser(bool preVisit,
bool inVisit,
bool postVisit,
TSymbolTable *symbolTable,
int shaderVersion);
virtual ~TLValueTrackingTraverser() {}
- void traverseBinary(TIntermBinary *node) final;
- void traverseUnary(TIntermUnary *node) final;
- void traverseFunctionPrototype(TIntermFunctionPrototype *node) final;
- void traverseAggregate(TIntermAggregate *node) final;
+ void traverseBinary(TIntermBinary *node) final override;
+ void traverseUnary(TIntermUnary *node) final override;
+ void traverseFunctionPrototype(TIntermFunctionPrototype *node) final override;
+ void traverseAggregate(TIntermAggregate *node) final override;
protected:
bool isLValueRequiredHere() const
{
return mOperatorRequiresLValue || mInFunctionCallOutParameter;
}
private:
--- a/gfx/angle/src/tests/perf_tests/MultiviewPerf.cpp
+++ b/gfx/angle/src/tests/perf_tests/MultiviewPerf.cpp
@@ -116,17 +116,17 @@ class MultiviewBenchmark : public ANGLER
{
if (mProgram != 0)
{
glDeleteProgram(mProgram);
}
}
void initializeBenchmark() override;
- void drawBenchmark() final;
+ void drawBenchmark() final override;
void overrideWorkaroundsD3D(WorkaroundsD3D *workarounds) override
{
workarounds->selectViewInGeometryShader =
(GetParam().multiviewOption == MultiviewOption::InstancedMultiviewGeometryShader);
}
protected:
@@ -527,9 +527,9 @@ TEST_P(MultiviewGPUBoundBenchmark, Run)
ANGLE_INSTANTIATE_TEST(MultiviewGPUBoundBenchmark,
NoAcceleration(egl_platform::OPENGL(), BigWorkload()),
NoAcceleration(egl_platform::D3D11(), BigWorkload()),
SelectViewInGeometryShader(BigWorkload()),
SelectViewInVertexShader(egl_platform::OPENGL(), BigWorkload()),
SelectViewInVertexShader(egl_platform::D3D11(), BigWorkload()));
-} // anonymous namespace
\ No newline at end of file
+} // anonymous namespace
--- a/gfx/gl/GLTextureImage.h
+++ b/gfx/gl/GLTextureImage.h
@@ -189,24 +189,24 @@ public:
BasicTextureImage(GLuint aTexture,
const gfx::IntSize& aSize,
GLenum aWrapMode,
ContentType aContentType,
GLContext* aContext,
TextureImage::Flags aFlags = TextureImage::NoFlags);
- virtual void BindTexture(GLenum aTextureUnit);
+ virtual void BindTexture(GLenum aTextureUnit) override;
- virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0));
- virtual GLuint GetTextureID() { return mTexture; }
+ virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) override;
+ virtual GLuint GetTextureID() override { return mTexture; }
- virtual void MarkValid() { mTextureState = Valid; }
+ virtual void MarkValid() override { mTextureState = Valid; }
- virtual void Resize(const gfx::IntSize& aSize);
+ virtual void Resize(const gfx::IntSize& aSize) override;
protected:
GLuint mTexture;
TextureState mTextureState;
RefPtr<GLContext> mGLContext;
};
/**
@@ -220,31 +220,31 @@ class TiledTextureImage final
public:
TiledTextureImage(GLContext* aGL,
gfx::IntSize aSize,
TextureImage::ContentType,
TextureImage::Flags aFlags = TextureImage::NoFlags,
TextureImage::ImageFormat aImageFormat = gfx::SurfaceFormat::UNKNOWN);
~TiledTextureImage();
void DumpDiv();
- virtual void Resize(const gfx::IntSize& aSize);
- virtual uint32_t GetTileCount();
- virtual void BeginBigImageIteration();
- virtual bool NextTile();
+ virtual void Resize(const gfx::IntSize& aSize) override;
+ virtual uint32_t GetTileCount() override;
+ virtual void BeginBigImageIteration() override;
+ virtual bool NextTile() override;
virtual void SetIterationCallback(BigImageIterationCallback aCallback,
- void* aCallbackData);
- virtual gfx::IntRect GetTileRect();
- virtual GLuint GetTextureID() {
+ void* aCallbackData) override;
+ virtual gfx::IntRect GetTileRect() override;
+ virtual GLuint GetTextureID() override {
return mImages[mCurrentImage]->GetTextureID();
}
- virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0));
- virtual void BindTexture(GLenum);
+ virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) override;
+ virtual void BindTexture(GLenum) override;
protected:
- virtual gfx::IntRect GetSrcTileRect();
+ virtual gfx::IntRect GetSrcTileRect() override;
unsigned int mCurrentImage;
BigImageIterationCallback mIterationCallback;
void* mIterationCallbackData;
nsTArray< RefPtr<TextureImage> > mImages;
unsigned int mTileSize;
unsigned int mRows, mColumns;
GLContext* mGL;
--- a/gfx/gl/SkiaGLGlue.h
+++ b/gfx/gl/SkiaGLGlue.h
@@ -17,17 +17,18 @@ class GrContext;
namespace mozilla {
namespace gl {
class GLContext;
class SkiaGLGlue : public GenericAtomicRefCounted
{
public:
- MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SkiaGLGlue)
+ MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME(SkiaGLGlue, override)
+
explicit SkiaGLGlue(GLContext* context);
GLContext* GetGLContext() const { return mGLContext.get(); }
GrContext* GetGrContext() const { return mGrContext.get(); }
protected:
virtual ~SkiaGLGlue();
private:
--- a/gfx/gl/TextureImageEGL.h
+++ b/gfx/gl/TextureImageEGL.h
@@ -21,30 +21,30 @@ public:
ContentType aContentType,
GLContext* aContext,
Flags aFlags = TextureImage::NoFlags,
TextureState aTextureState = Created,
TextureImage::ImageFormat aImageFormat = SurfaceFormat::UNKNOWN);
virtual ~TextureImageEGL();
- virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0));
+ virtual bool DirectUpdate(gfx::DataSourceSurface* aSurf, const nsIntRegion& aRegion, const gfx::IntPoint& aFrom = gfx::IntPoint(0,0)) override;
- virtual void BindTexture(GLenum aTextureUnit);
+ virtual void BindTexture(GLenum aTextureUnit) override;
- virtual GLuint GetTextureID()
+ virtual GLuint GetTextureID() override
{
// Ensure the texture is allocated before it is used.
if (mTextureState == Created) {
Resize(mSize);
}
return mTexture;
};
- virtual void Resize(const gfx::IntSize& aSize);
+ virtual void Resize(const gfx::IntSize& aSize) override;
bool BindTexImage();
bool ReleaseTexImage();
virtual bool CreateEGLSurface(gfxASurface* aSurface)
{
return false;
--- a/gfx/layers/AxisPhysicsMSDModel.h
+++ b/gfx/layers/AxisPhysicsMSDModel.h
@@ -36,17 +36,17 @@ public:
/**
* Returns true when the position is close to the destination and the
* velocity is low.
*/
bool IsFinished(double aSmallestVisibleIncrement);
protected:
- virtual double Acceleration(const State &aState);
+ virtual double Acceleration(const State &aState) override;
private:
/**
* mDestination represents the target position and the resting position of
* the simulated spring.
*/
double mDestination;
--- a/gfx/layers/Effects.h
+++ b/gfx/layers/Effects.h
@@ -65,19 +65,19 @@ struct TexturedEffect : public Effect
gfx::SamplingFilter aSamplingFilter)
: Effect(aType)
, mTextureCoords(0, 0, 1.0f, 1.0f)
, mTexture(aTexture)
, mPremultiplied(aPremultiplied)
, mSamplingFilter(aSamplingFilter)
{}
- virtual TexturedEffect* AsTexturedEffect() { return this; }
+ virtual TexturedEffect* AsTexturedEffect() override { return this; }
virtual const char* Name() = 0;
- virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+ virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
gfx::Rect mTextureCoords;
TextureSource* mTexture;
bool mPremultiplied;
gfx::SamplingFilter mSamplingFilter;
};
// Support an alpha mask.
@@ -87,47 +87,47 @@ struct EffectMask : public Effect
gfx::IntSize aSize,
const gfx::Matrix4x4 &aMaskTransform)
: Effect(EffectTypes::MASK)
, mMaskTexture(aMaskTexture)
, mSize(aSize)
, mMaskTransform(aMaskTransform)
{}
- virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+ virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
TextureSource* mMaskTexture;
gfx::IntSize mSize;
gfx::Matrix4x4 mMaskTransform;
};
struct EffectBlendMode : public Effect
{
explicit EffectBlendMode(gfx::CompositionOp aBlendMode)
: Effect(EffectTypes::BLEND_MODE)
, mBlendMode(aBlendMode)
{ }
virtual const char* Name() { return "EffectBlendMode"; }
- virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+ virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
gfx::CompositionOp mBlendMode;
};
// Render to a render target rather than the screen.
struct EffectRenderTarget : public TexturedEffect
{
explicit EffectRenderTarget(CompositingRenderTarget *aRenderTarget)
: TexturedEffect(EffectTypes::RENDER_TARGET, aRenderTarget, true,
gfx::SamplingFilter::LINEAR)
, mRenderTarget(aRenderTarget)
{}
- virtual const char* Name() { return "EffectRenderTarget"; }
- virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+ virtual const char* Name() override { return "EffectRenderTarget"; }
+ virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
RefPtr<CompositingRenderTarget> mRenderTarget;
protected:
EffectRenderTarget(EffectTypes aType, CompositingRenderTarget *aRenderTarget)
: TexturedEffect(aType, aRenderTarget, true, gfx::SamplingFilter::LINEAR)
, mRenderTarget(aRenderTarget)
{}
@@ -138,80 +138,80 @@ protected:
struct EffectColorMatrix : public Effect
{
explicit EffectColorMatrix(gfx::Matrix5x4 aMatrix)
: Effect(EffectTypes::COLOR_MATRIX)
, mColorMatrix(aMatrix)
{}
virtual const char* Name() { return "EffectColorMatrix"; }
- virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+ virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
const gfx::Matrix5x4 mColorMatrix;
};
struct EffectRGB : public TexturedEffect
{
EffectRGB(TextureSource *aTexture,
bool aPremultiplied,
gfx::SamplingFilter aSamplingFilter,
bool aFlipped = false)
: TexturedEffect(EffectTypes::RGB, aTexture, aPremultiplied, aSamplingFilter)
{}
- virtual const char* Name() { return "EffectRGB"; }
+ virtual const char* Name() override { return "EffectRGB"; }
};
struct EffectYCbCr : public TexturedEffect
{
EffectYCbCr(TextureSource *aSource, YUVColorSpace aYUVColorSpace, uint32_t aBitDepth, gfx::SamplingFilter aSamplingFilter)
: TexturedEffect(EffectTypes::YCBCR, aSource, false, aSamplingFilter)
, mYUVColorSpace(aYUVColorSpace)
, mBitDepth(aBitDepth)
{}
- virtual const char* Name() { return "EffectYCbCr"; }
+ virtual const char* Name() override { return "EffectYCbCr"; }
YUVColorSpace mYUVColorSpace;
uint32_t mBitDepth;
};
struct EffectNV12 : public TexturedEffect
{
EffectNV12(TextureSource *aSource, gfx::SamplingFilter aSamplingFilter)
: TexturedEffect(EffectTypes::NV12, aSource, false, aSamplingFilter)
{}
- virtual const char* Name() { return "EffectNV12"; }
+ virtual const char* Name() override { return "EffectNV12"; }
};
struct EffectComponentAlpha : public TexturedEffect
{
EffectComponentAlpha(TextureSource *aOnBlack,
TextureSource *aOnWhite,
gfx::SamplingFilter aSamplingFilter)
: TexturedEffect(EffectTypes::COMPONENT_ALPHA, nullptr, false, aSamplingFilter)
, mOnBlack(aOnBlack)
, mOnWhite(aOnWhite)
{}
- virtual const char* Name() { return "EffectComponentAlpha"; }
+ virtual const char* Name() override { return "EffectComponentAlpha"; }
TextureSource* mOnBlack;
TextureSource* mOnWhite;
};
struct EffectSolidColor : public Effect
{
explicit EffectSolidColor(const gfx::Color &aColor)
: Effect(EffectTypes::SOLID_COLOR)
, mColor(aColor)
{}
- virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix);
+ virtual void PrintInfo(std::stringstream& aStream, const char* aPrefix) override;
gfx::Color mColor;
};
struct EffectChain
{
EffectChain() : mLayerRef(nullptr) {}
explicit EffectChain(void* aLayerRef) : mLayerRef(aLayerRef) {}
--- a/gfx/layers/basic/BasicImages.cpp
+++ b/gfx/layers/basic/BasicImages.cpp
@@ -75,17 +75,17 @@ private:
};
class BasicImageFactory : public ImageFactory
{
public:
BasicImageFactory() {}
virtual RefPtr<PlanarYCbCrImage>
- CreatePlanarYCbCrImage(const gfx::IntSize& aScaleHint, BufferRecycleBin* aRecycleBin)
+ CreatePlanarYCbCrImage(const gfx::IntSize& aScaleHint, BufferRecycleBin* aRecycleBin) override
{
return new BasicPlanarYCbCrImage(aScaleHint, gfxPlatform::GetPlatform()->GetOffscreenFormat(), aRecycleBin);
}
};
bool
BasicPlanarYCbCrImage::CopyData(const Data& aData)
{
--- a/gfx/layers/basic/BasicLayersImpl.h
+++ b/gfx/layers/basic/BasicLayersImpl.h
@@ -57,17 +57,17 @@ public:
protected:
virtual ~BasicReadbackLayer()
{
MOZ_COUNT_DTOR(BasicReadbackLayer);
}
public:
- virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
+ virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
{
NS_ASSERTION(BasicManager()->InConstruction(),
"Can only set properties in construction phase");
ReadbackLayer::SetVisibleRegion(aRegion);
}
protected:
BasicLayerManager* BasicManager()
--- a/gfx/layers/client/ClientBorderLayer.cpp
+++ b/gfx/layers/client/ClientBorderLayer.cpp
@@ -29,35 +29,35 @@ public:
protected:
virtual ~ClientBorderLayer()
{
MOZ_COUNT_DTOR(ClientBorderLayer);
}
public:
- virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
+ virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
{
NS_ASSERTION(ClientManager()->InConstruction(),
"Can only set properties in construction phase");
BorderLayer::SetVisibleRegion(aRegion);
}
- virtual void RenderLayer()
+ virtual void RenderLayer() override
{
RenderMaskLayers(this);
}
- virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
+ virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override
{
aAttrs = BorderLayerAttributes(mRect, mColors, mCorners, mWidths);
}
- virtual Layer* AsLayer() { return this; }
- virtual ShadowableLayer* AsShadowableLayer() { return this; }
+ virtual Layer* AsLayer() override { return this; }
+ virtual ShadowableLayer* AsShadowableLayer() override { return this; }
protected:
ClientLayerManager* ClientManager()
{
return static_cast<ClientLayerManager*>(mManager);
}
};
--- a/gfx/layers/client/ClientColorLayer.cpp
+++ b/gfx/layers/client/ClientColorLayer.cpp
@@ -29,35 +29,35 @@ public:
protected:
virtual ~ClientColorLayer()
{
MOZ_COUNT_DTOR(ClientColorLayer);
}
public:
- virtual void SetVisibleRegion(const LayerIntRegion& aRegion)
+ virtual void SetVisibleRegion(const LayerIntRegion& aRegion) override
{
NS_ASSERTION(ClientManager()->InConstruction(),
"Can only set properties in construction phase");
ColorLayer::SetVisibleRegion(aRegion);
}
- virtual void RenderLayer()
+ virtual void RenderLayer() override
{
RenderMaskLayers(this);
}
- virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs)
+ virtual void FillSpecificAttributes(SpecificLayerAttributes& aAttrs) override
{
aAttrs = ColorLayerAttributes(GetColor(), GetBounds());
}
- virtual Layer* AsLayer() { return this; }
- virtual ShadowableLayer* AsShadowableLayer() { return this; }
+ virtual Layer* AsLayer() override { return this; }
+ virtual ShadowableLayer* AsShadowableLayer() override { return this; }
protected:
ClientLayerManager* ClientManager()
{
return static_cast<ClientLayerManager*>(mManager);
}
};
--- a/gfx/layers/client/ClientContainerLayer.h
+++ b/gfx/layers/client/ClientContainerLayer.h
@@ -147,22 +147,22 @@ public:
protected:
virtual ~ClientRefLayer()
{
MOZ_COUNT_DTOR(ClientRefLayer);
}
public:
- virtual Layer* AsLayer() { return this; }
- virtual ShadowableLayer* AsShadowableLayer() { return this; }
+ virtual Layer* AsLayer() override { return this; }
+ virtual ShadowableLayer* AsShadowableLayer() override { return this; }
- virtual void RenderLayer() { }
+ virtual void RenderLayer() override { }
- virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface)
+ virtual void ComputeEffectiveTransforms(const gfx::Matrix4x4& aTransformToSurface) override
{
DefaultComputeEffectiveTransforms(aTransformToSurface);
}
private:
ClientLayerManager* ClientManager()
{
return static_cast<ClientLayerManager*>(mManager);
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -636,17 +636,17 @@ public:
, mBufferRect(aBufferRect)
, mBufferRotation(aBufferRotation)
{
for (uint32_t i = 0; i < mReadbackUpdates.Length(); ++i) {
mLayerRefs.push_back(mReadbackUpdates[i].mLayer);
}
}
- virtual void ProcessReadback(gfx::DataSourceSurface *aSourceSurface)
+ virtual void ProcessReadback(gfx::DataSourceSurface *aSourceSurface) override
{
SourceRotatedBuffer rotBuffer(aSourceSurface, nullptr, mBufferRect, mBufferRotation);
for (uint32_t i = 0; i < mReadbackUpdates.Length(); ++i) {
ReadbackProcessor::Update& update = mReadbackUpdates[i];
nsIntPoint offset = update.mLayer->GetBackgroundLayerOffset();
ReadbackSink* sink = update.mLayer->GetSink();
--- a/gfx/layers/composite/ContentHost.h
+++ b/gfx/layers/composite/ContentHost.h
@@ -50,30 +50,31 @@ struct TexturedEffect;
*
* ContentHosts support only UpdateThebes(), not Update().
*/
class ContentHost : public CompositableHost
{
public:
virtual bool UpdateThebes(const ThebesBufferData& aData,
const nsIntRegion& aUpdated,
- const nsIntRegion& aOldValidRegionBack) = 0;
+ const nsIntRegion& aOldValidRegionBack) override = 0;
virtual void SetPaintWillResample(bool aResample) { mPaintWillResample = aResample; }
bool PaintWillResample() { return mPaintWillResample; }
// We use this to allow TiledContentHost to invalidate regions where
// tiles are fading in.
virtual void AddAnimationInvalidation(nsIntRegion& aRegion) { }
virtual gfx::IntRect GetBufferRect() {
MOZ_ASSERT_UNREACHABLE("Must be implemented in derived class");
return gfx::IntRect();
}
- virtual ContentHost* AsContentHost() { return this; }
+
+ virtual ContentHost* AsContentHost() override { return this; }
protected:
explicit ContentHost(const TextureInfo& aTextureInfo)
: CompositableHost(aTextureInfo)
, mPaintWillResample(false)
{}
bool mPaintWillResample;
@@ -208,21 +209,21 @@ class ContentHostDoubleBuffered : public
{
public:
explicit ContentHostDoubleBuffered(const TextureInfo& aTextureInfo)
: ContentHostTexture(aTextureInfo)
{}
virtual ~ContentHostDoubleBuffered() {}
- virtual CompositableType GetType() { return CompositableType::CONTENT_DOUBLE; }
+ virtual CompositableType GetType() override { return CompositableType::CONTENT_DOUBLE; }
virtual bool UpdateThebes(const ThebesBufferData& aData,
const nsIntRegion& aUpdated,
- const nsIntRegion& aOldValidRegionBack);
+ const nsIntRegion& aOldValidRegionBack) override;
protected:
nsIntRegion mValidRegionForNextBackBuffer;
};
/**
* Single buffered, therefore we must synchronously upload the image from the
* TextureHost in the layers transaction (i.e., in UpdateThebes).
@@ -230,19 +231,19 @@ protected:
class ContentHostSingleBuffered : public ContentHostTexture
{
public:
explicit ContentHostSingleBuffered(const TextureInfo& aTextureInfo)
: ContentHostTexture(aTextureInfo)
{}
virtual ~ContentHostSingleBuffered() {}
- virtual CompositableType GetType() { return CompositableType::CONTENT_SINGLE; }
+ virtual CompositableType GetType() override { return CompositableType::CONTENT_SINGLE; }
virtual bool UpdateThebes(const ThebesBufferData& aData,
const nsIntRegion& aUpdated,
- const nsIntRegion& aOldValidRegionBack);
+ const nsIntRegion& aOldValidRegionBack) override;
};
} // namespace layers
} // namespace mozilla
#endif
--- a/gfx/layers/composite/LayerManagerComposite.h
+++ b/gfx/layers/composite/LayerManagerComposite.h
@@ -644,19 +644,19 @@ protected:
*/
class LayerComposite : public HostLayer
{
public:
explicit LayerComposite(LayerManagerComposite* aManager);
virtual ~LayerComposite();
- virtual void SetLayerManager(HostLayerManager* aManager);
+ virtual void SetLayerManager(HostLayerManager* aManager) override;
- virtual LayerComposite* GetFirstChildComposite()
+ virtual LayerComposite* GetFirstChildComposite() override
{
return nullptr;
}
/* Do NOT call this from the generic LayerComposite destructor. Only from the
* concrete class destructor
*/
virtual void Destroy();
@@ -669,17 +669,17 @@ public:
* must be called before RenderLayer.
*/
virtual void Prepare(const RenderTargetIntRect& aClipRect) {}
// TODO: This should also take RenderTargetIntRect like Prepare.
virtual void RenderLayer(const gfx::IntRect& aClipRect,
const Maybe<gfx::Polygon>& aGeometry) = 0;
- virtual bool SetCompositableHost(CompositableHost*)
+ virtual bool SetCompositableHost(CompositableHost*) override
{
// We must handle this gracefully, see bug 967824
NS_WARNING("called SetCompositableHost for a layer type not accepting a compositable");
return false;
}
virtual void CleanupResources() = 0;
--- a/gfx/layers/d3d11/CompositorD3D11.h
+++ b/gfx/layers/d3d11/CompositorD3D11.h
@@ -37,17 +37,17 @@ public:
virtual TextureFactoryIdentifier
GetTextureFactoryIdentifier() override;
virtual already_AddRefed<DataTextureSource>
CreateDataTextureSource(TextureFlags aFlags = TextureFlags::NO_FLAGS) override;
virtual bool CanUseCanvasLayerForSize(const gfx::IntSize& aSize) override;
- virtual int32_t GetMaxTextureSize() const final;
+ virtual int32_t GetMaxTextureSize() const final override;
virtual void MakeCurrent(MakeCurrentFlags aFlags = 0) override {}
virtual already_AddRefed<CompositingRenderTarget>
CreateRenderTarget(const gfx::IntRect &aRect,
SurfaceInitMode aInit) override;
virtual already_AddRefed<CompositingRenderTarget>
--- a/gfx/skia/skia/include/gpu/GrFragmentProcessor.h
+++ b/gfx/skia/skia/include/gpu/GrFragmentProcessor.h
@@ -299,17 +299,17 @@ protected:
*/
void setWillUseDistanceVectorField() { fFlags |= kUsesDistanceVectorField_Flag; }
private:
void addPendingIOs() const override { GrResourceIOProcessor::addPendingIOs(); }
void removeRefs() const override { GrResourceIOProcessor::removeRefs(); }
void pendingIOComplete() const override { GrResourceIOProcessor::pendingIOComplete(); }
- void notifyRefCntIsZero() const final;
+ void notifyRefCntIsZero() const final override;
virtual GrColor4f constantOutputForConstantInput(GrColor4f /* inputColor */) const {
SkFAIL("Subclass must override this if advertising this optimization.");
return GrColor4f::TransparentBlack();
}
/** Returns a new instance of the appropriate *GL* implementation class
for the given GrFragmentProcessor; caller is responsible for deleting
--- a/gfx/skia/skia/src/core/SkMD5.h
+++ b/gfx/skia/skia/src/core/SkMD5.h
@@ -12,19 +12,19 @@
/* Calculate a 128-bit MD5 message-digest of the bytes sent to this stream. */
class SkMD5 : public SkWStream {
public:
SkMD5();
/** Processes input, adding it to the digest.
Calling this after finish is undefined. */
- bool write(const void* buffer, size_t size) final;
+ bool write(const void* buffer, size_t size) final override;
- size_t bytesWritten() const final { return SkToSizeT(this->byteCount); }
+ size_t bytesWritten() const final override { return SkToSizeT(this->byteCount); }
struct Digest {
uint8_t data[16];
bool operator ==(Digest const& other) const {
return 0 == memcmp(data, other.data, sizeof(data));
}
bool operator !=(Digest const& other) const { return !(*this == other); }
};
--- a/gfx/skia/skia/src/gpu/GrClip.h
+++ b/gfx/skia/skia/src/gpu/GrClip.h
@@ -129,25 +129,25 @@ public:
}
};
/**
* Specialized implementation for no clip.
*/
class GrNoClip final : public GrClip {
private:
- bool quickContains(const SkRect&) const final { return true; }
- bool quickContains(const SkRRect&) const final { return true; }
+ bool quickContains(const SkRect&) const final override { return true; }
+ bool quickContains(const SkRRect&) const final override { return true; }
void getConservativeBounds(int width, int height, SkIRect* devResult,
- bool* isIntersectionOfRects) const final {
+ bool* isIntersectionOfRects) const final override {
devResult->setXYWH(0, 0, width, height);
if (isIntersectionOfRects) {
*isIntersectionOfRects = true;
}
}
bool apply(GrContext*, GrRenderTargetContext*, bool, bool, GrAppliedClip*,
- SkRect*) const final {
+ SkRect*) const final override {
return true;
}
bool isRRect(const SkRect&, SkRRect*, GrAA*) const override { return false; }
};
#endif
--- a/gfx/skia/skia/src/gpu/GrClipStackClip.h
+++ b/gfx/skia/skia/src/gpu/GrClipStackClip.h
@@ -19,22 +19,22 @@ class GrTextureProxy;
* 8-bit alpha clip mask and/or modify the stencil buffer during apply().
*/
class GrClipStackClip final : public GrClip {
public:
GrClipStackClip(const SkClipStack* stack = nullptr) { this->reset(stack); }
void reset(const SkClipStack* stack) { fStack = stack; }
- bool quickContains(const SkRect&) const final;
- bool quickContains(const SkRRect&) const final;
+ bool quickContains(const SkRect&) const final override;
+ bool quickContains(const SkRRect&) const final override;
void getConservativeBounds(int width, int height, SkIRect* devResult,
- bool* isIntersectionOfRects) const final;
+ bool* isIntersectionOfRects) const final override;
bool apply(GrContext*, GrRenderTargetContext*, bool useHWAA, bool hasUserStencilSettings,
- GrAppliedClip* out, SkRect* bounds) const final;
+ GrAppliedClip* out, SkRect* bounds) const final override;
bool isRRect(const SkRect& rtBounds, SkRRect* rr, GrAA* aa) const override;
sk_sp<GrTextureProxy> testingOnly_createClipMask(GrContext*) const;
static const char kMaskTestTag[];
private:
static bool PathNeedsSWRenderer(GrContext* context,
--- a/gfx/skia/skia/src/gpu/GrPrimitiveProcessor.h
+++ b/gfx/skia/skia/src/gpu/GrPrimitiveProcessor.h
@@ -112,15 +112,15 @@ protected:
enum { kPreallocAttribCnt = 8 };
SkSTArray<kPreallocAttribCnt, Attribute> fAttribs;
size_t fVertexStride;
private:
void addPendingIOs() const override { GrResourceIOProcessor::addPendingIOs(); }
void removeRefs() const override { GrResourceIOProcessor::removeRefs(); }
void pendingIOComplete() const override { GrResourceIOProcessor::pendingIOComplete(); }
- void notifyRefCntIsZero() const final {}
+ void notifyRefCntIsZero() const final override {}
virtual bool hasExplicitLocalCoords() const = 0;
typedef GrProcessor INHERITED;
};
#endif
--- a/gfx/skia/skia/src/gpu/SkGpuDevice.h
+++ b/gfx/skia/skia/src/gpu/SkGpuDevice.h
@@ -118,17 +118,17 @@ public:
void flush() override;
bool onAccessPixels(SkPixmap*) override;
protected:
bool onReadPixels(const SkImageInfo&, void*, size_t, int, int) override;
bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int) override;
- bool onShouldDisableLCD(const SkPaint&) const final;
+ bool onShouldDisableLCD(const SkPaint&) const final override;
private:
// We want these unreffed in RenderTargetContext, GrContext order.
sk_sp<GrContext> fContext;
sk_sp<GrRenderTargetContext> fRenderTargetContext;
SkISize fSize;
bool fOpaque;
--- a/gfx/skia/skia/src/gpu/ops/GrDrawPathOp.h
+++ b/gfx/skia/skia/src/gpu/ops/GrDrawPathOp.h
@@ -49,17 +49,17 @@ protected:
return fAnalysis;
}
const GrProcessorSet::Analysis& processorAnalysis() const {
SkASSERT(fAnalysis.isInitialized());
return fAnalysis;
}
private:
- void onPrepare(GrOpFlushState*) final {}
+ void onPrepare(GrOpFlushState*) final override {}
SkMatrix fViewMatrix;
GrColor fInputColor;
GrProcessorSet fProcessorSet;
GrProcessorSet::Analysis fAnalysis;
GrPathRendering::FillType fFillType;
GrAAType fAAType;
--- a/gfx/skia/skia/src/gpu/ops/GrMeshDrawOp.h
+++ b/gfx/skia/skia/src/gpu/ops/GrMeshDrawOp.h
@@ -60,18 +60,18 @@ protected:
using InstancedHelper::recordDraw;
private:
typedef InstancedHelper INHERITED;
};
private:
- void onPrepare(GrOpFlushState* state) final;
- void onExecute(GrOpFlushState* state) final;
+ void onPrepare(GrOpFlushState* state) final override;
+ void onExecute(GrOpFlushState* state) final override;
virtual void onPrepareDraws(Target*) const = 0;
// A set of contiguous draws that share a draw token and primitive processor. The draws all use
// the op's pipeline. The meshes for the draw are stored in the fMeshes array and each
// Queued draw uses fMeshCnt meshes from the fMeshes array. The reason for coallescing meshes
// that share a primitive processor into a QueuedDraw is that it allows the Gpu object to setup
// the shared state once and then issue draws for each mesh.
--- a/gfx/skia/skia/src/pdf/SkPDFTypes.h
+++ b/gfx/skia/skia/src/pdf/SkPDFTypes.h
@@ -161,17 +161,17 @@ static_assert(sizeof(SkString) == sizeof
#if 0 // Enable if needed.
/** This class is a SkPDFUnion with SkPDFObject virtuals attached.
The only use case of this is when a non-compound PDF object is
referenced indirectly. */
class SkPDFAtom final : public SkPDFObject {
public:
void emitObject(SkWStream* stream,
- const SkPDFObjNumMap& objNumMap) final;
+ const SkPDFObjNumMap& objNumMap) final override;
void addResources(SkPDFObjNumMap* const final;
SkPDFAtom(SkPDFUnion&& v) : fValue(std::move(v) {}
private:
const SkPDFUnion fValue;
typedef SkPDFObject INHERITED;
};
#endif // 0
@@ -329,17 +329,17 @@ public:
explicit SkPDFStream(std::unique_ptr<SkStreamAsset> stream);
~SkPDFStream() override;
SkPDFDict* dict() { return &fDict; }
// The SkPDFObject interface.
void emitObject(SkWStream* stream,
const SkPDFObjNumMap& objNumMap) const override;
- void addResources(SkPDFObjNumMap*) const final;
+ void addResources(SkPDFObjNumMap*) const final override;
void drop() override;
protected:
/* Create a PDF stream with no data. The setData method must be called to
* set the data. */
SkPDFStream();
/** Only call this function once. */
--- a/gfx/src/nsFontMetrics.cpp
+++ b/gfx/src/nsFontMetrics.cpp
@@ -79,36 +79,36 @@ private:
}
RefPtr<gfxTextRun> mTextRun;
};
class StubPropertyProvider final : public gfxTextRun::PropertyProvider {
public:
void GetHyphenationBreaks(gfxTextRun::Range aRange,
- gfxTextRun::HyphenType* aBreakBefore) const {
+ gfxTextRun::HyphenType* aBreakBefore) const override {
NS_ERROR("This shouldn't be called because we never call BreakAndMeasureText");
}
- mozilla::StyleHyphens GetHyphensOption() const {
+ mozilla::StyleHyphens GetHyphensOption() const override {
NS_ERROR("This shouldn't be called because we never call BreakAndMeasureText");
return mozilla::StyleHyphens::None;
}
- gfxFloat GetHyphenWidth() const {
+ gfxFloat GetHyphenWidth() const override {
NS_ERROR("This shouldn't be called because we never enable hyphens");
return 0;
}
- already_AddRefed<mozilla::gfx::DrawTarget> GetDrawTarget() const {
+ already_AddRefed<mozilla::gfx::DrawTarget> GetDrawTarget() const override {
NS_ERROR("This shouldn't be called because we never enable hyphens");
return nullptr;
}
- uint32_t GetAppUnitsPerDevUnit() const {
+ uint32_t GetAppUnitsPerDevUnit() const override {
NS_ERROR("This shouldn't be called because we never enable hyphens");
return 60;
}
- void GetSpacing(gfxTextRun::Range aRange, Spacing* aSpacing) const {
+ void GetSpacing(gfxTextRun::Range aRange, Spacing* aSpacing) const override {
NS_ERROR("This shouldn't be called because we never enable spacing");
}
};
} // namespace
nsFontMetrics::nsFontMetrics(const nsFont& aFont, const Params& aParams,
nsDeviceContext *aContext)
@@ -440,9 +440,8 @@ nsFontMetrics::GetBoundingMetrics(const
nsBoundingMetrics
nsFontMetrics::GetInkBoundsForVisualOverflow(const char16_t *aString, uint32_t aLength,
DrawTarget* aDrawTarget)
{
return GetTextBoundingMetrics(this, aString, aLength, aDrawTarget,
gfxFont::LOOSE_INK_EXTENTS);
}
-
--- a/gfx/src/nsThebesFontEnumerator.cpp
+++ b/gfx/src/nsThebesFontEnumerator.cpp
@@ -99,17 +99,17 @@ public:
, mRv(aRv)
, mEnumerateFontsPromise(Move(aEnumerateFontsPromise))
, mFontList(aFontList)
, mWorkerThread(do_GetCurrentThread())
{
MOZ_ASSERT(!NS_IsMainThread());
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
MOZ_ASSERT(NS_IsMainThread());
if (NS_FAILED(mRv)) {
mEnumerateFontsPromise->mPromise->MaybeReject(mRv);
} else {
mEnumerateFontsPromise->mPromise->MaybeResolve(mFontList);
}
@@ -135,17 +135,17 @@ public:
: Runnable("EnumerateFontsTask")
, mLangGroupAtom(aLangGroupAtom)
, mGeneric(aGeneric)
, mEnumerateFontsPromise(Move(aEnumerateFontsPromise))
{
MOZ_ASSERT(NS_IsMainThread());
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
MOZ_ASSERT(!NS_IsMainThread());
nsTArray<nsString> fontList;
nsresult rv = gfxPlatform::GetPlatform()->
GetFontList(mLangGroupAtom, mGeneric, fontList);
nsCOMPtr<nsIRunnable> runnable = new EnumerateFontsResult(
--- a/gfx/thebes/PrintTargetCG.h
+++ b/gfx/thebes/PrintTargetCG.h
@@ -22,24 +22,24 @@ public:
CreateOrNull(PMPrintSession aPrintSession,
PMPageFormat aPageFormat,
PMPrintSettings aPrintSettings,
const IntSize& aSize);
virtual nsresult BeginPrinting(const nsAString& aTitle,
const nsAString& aPrintToFileName,
int32_t aStartPage,
- int32_t aEndPage) final;
- virtual nsresult EndPrinting() final;
- virtual nsresult AbortPrinting() final;
- virtual nsresult BeginPage() final;
- virtual nsresult EndPage() final;
+ int32_t aEndPage) final override;
+ virtual nsresult EndPrinting() final override;
+ virtual nsresult AbortPrinting() final override;
+ virtual nsresult BeginPage() final override;
+ virtual nsresult EndPage() final override;
virtual already_AddRefed<DrawTarget>
- GetReferenceDrawTarget(DrawEventRecorder* aRecorder) final;
+ GetReferenceDrawTarget(DrawEventRecorder* aRecorder) final override;
private:
PrintTargetCG(PMPrintSession aPrintSession,
PMPageFormat aPageFormat,
PMPrintSettings aPrintSettings,
const IntSize& aSize);
~PrintTargetCG();
--- a/gfx/thebes/PrintTargetSkPDF.h
+++ b/gfx/thebes/PrintTargetSkPDF.h
@@ -36,17 +36,17 @@ public:
virtual nsresult EndPrinting() override;
virtual void Finish() override;
virtual nsresult BeginPage() override;
virtual nsresult EndPage() override;
virtual already_AddRefed<DrawTarget>
MakeDrawTarget(const IntSize& aSize,
- DrawEventRecorder* aRecorder = nullptr) final;
+ DrawEventRecorder* aRecorder = nullptr) final override;
virtual already_AddRefed<DrawTarget>
GetReferenceDrawTarget(DrawEventRecorder* aRecorder) override final;
private:
PrintTargetSkPDF(const IntSize& aSize,
UniquePtr<SkWStream> aStream);
virtual ~PrintTargetSkPDF();
--- a/gfx/thebes/PrintTargetThebes.h
+++ b/gfx/thebes/PrintTargetThebes.h
@@ -38,17 +38,17 @@ public:
virtual nsresult BeginPage() override;
virtual nsresult EndPage() override;
virtual void Finish() override;
virtual already_AddRefed<DrawTarget>
MakeDrawTarget(const IntSize& aSize,
DrawEventRecorder* aRecorder = nullptr) override;
- virtual already_AddRefed<DrawTarget> GetReferenceDrawTarget(DrawEventRecorder* aRecorder) final;
+ virtual already_AddRefed<DrawTarget> GetReferenceDrawTarget(DrawEventRecorder* aRecorder) final override;
private:
// Only created via CreateOrNull
explicit PrintTargetThebes(gfxASurface* aSurface);
RefPtr<gfxASurface> mGfxSurface;
};
--- a/gfx/thebes/gfxAndroidPlatform.cpp
+++ b/gfx/thebes/gfxAndroidPlatform.cpp
@@ -370,17 +370,17 @@ public:
}
private:
java::VsyncSource::GlobalRef mJavaVsync;
bool mObservingVsync;
TimeDuration mVsyncDuration;
};
- Display& GetGlobalDisplay() final { return GetDisplayInstance(); }
+ Display& GetGlobalDisplay() final override { return GetDisplayInstance(); }
private:
virtual ~AndroidVsyncSource() {}
static Display& GetDisplayInstance()
{
static Display globalDisplay;
return globalDisplay;
--- a/gfx/thebes/gfxBlur.cpp
+++ b/gfx/thebes/gfxBlur.cpp
@@ -374,17 +374,17 @@ class BlurCache final : public nsExpirat
{
public:
BlurCache()
: nsExpirationTracker<BlurCacheData, 4>(GENERATION_MS, "BlurCache",
SystemGroup::EventTargetFor(TaskCategory::Other))
{
}
- virtual void NotifyExpired(BlurCacheData* aObject)
+ virtual void NotifyExpired(BlurCacheData* aObject) override
{
RemoveObject(aObject);
mHashEntries.Remove(aObject->mKey);
}
BlurCacheData* Lookup(const IntSize& aMinSize,
const IntSize& aBlurRadius,
const RectCornerRadii* aCornerRadii,
--- a/gfx/thebes/gfxDWriteFontList.h
+++ b/gfx/thebes/gfxDWriteFontList.h
@@ -42,33 +42,33 @@ public:
*/
gfxDWriteFontFamily(const nsAString& aName,
IDWriteFontFamily *aFamily,
bool aIsSystemFontFamily = false)
: gfxFontFamily(aName), mDWFamily(aFamily),
mIsSystemFontFamily(aIsSystemFontFamily), mForceGDIClassic(false) {}
virtual ~gfxDWriteFontFamily();
- void FindStyleVariations(FontInfoData *aFontInfoData = nullptr) final;
+ void FindStyleVariations(FontInfoData *aFontInfoData = nullptr) final override;
- void LocalizedName(nsAString& aLocalizedName) final;
+ void LocalizedName(nsAString& aLocalizedName) final override;
void ReadFaceNames(gfxPlatformFontList *aPlatformFontList,
bool aNeedFullnamePostscriptNames,
- FontInfoData *aFontInfoData = nullptr) final;
+ FontInfoData *aFontInfoData = nullptr) final override;
void SetForceGDIClassic(bool aForce) { mForceGDIClassic = aForce; }
void AddSizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf,
- FontListSizes* aSizes) const final;
+ FontListSizes* aSizes) const final override;
void AddSizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf,
- FontListSizes* aSizes) const final;
+ FontListSizes* aSizes) const final override;
bool FilterForFontList(nsAtom* aLangGroup,
- const nsACString& aGeneric) const final {
+ const nsACString& aGeneric) const final override {
return !IsSymbolFontFamily();
}
protected:
// helper for FilterForFontList
bool IsSymbolFontFamily() const;
/** This font family's directwrite fontfamily object */
--- a/gfx/thebes/gfxDrawable.h
+++ b/gfx/thebes/gfxDrawable.h
@@ -76,26 +76,26 @@ public:
const gfxMatrix aTransform = gfxMatrix());
virtual ~gfxSurfaceDrawable() {}
virtual bool Draw(gfxContext* aContext,
const gfxRect& aFillRect,
mozilla::gfx::ExtendMode aExtendMode,
const mozilla::gfx::SamplingFilter aSamplingFilter,
gfxFloat aOpacity = 1.0,
- const gfxMatrix& aTransform = gfxMatrix());
+ const gfxMatrix& aTransform = gfxMatrix()) override;
virtual bool DrawWithSamplingRect(DrawTarget* aDrawTarget,
CompositionOp aOp,
AntialiasMode aAntialiasMode,
const gfxRect& aFillRect,
const gfxRect& aSamplingRect,
mozilla::gfx::ExtendMode aExtendMode,
const mozilla::gfx::SamplingFilter aSamplingFilter,
- gfxFloat aOpacity = 1.0);
+ gfxFloat aOpacity = 1.0) override;
protected:
void DrawInternal(DrawTarget* aDrawTarget,
CompositionOp aOp,
AntialiasMode aAntialiasMode,
const gfxRect& aFillRect,
const mozilla::gfx::IntRect& aSamplingRect,
mozilla::gfx::ExtendMode aExtendMode,
@@ -141,17 +141,17 @@ public:
gfxCallbackDrawable(gfxDrawingCallback* aCallback, const mozilla::gfx::IntSize aSize);
virtual ~gfxCallbackDrawable() {}
virtual bool Draw(gfxContext* aContext,
const gfxRect& aFillRect,
mozilla::gfx::ExtendMode aExtendMode,
const mozilla::gfx::SamplingFilter aSamplingFilter,
gfxFloat aOpacity = 1.0,
- const gfxMatrix& aTransform = gfxMatrix());
+ const gfxMatrix& aTransform = gfxMatrix()) override;
protected:
already_AddRefed<gfxSurfaceDrawable>
MakeSurfaceDrawable(gfxContext* aContext,
mozilla::gfx::SamplingFilter aSamplingFilter =
mozilla::gfx::SamplingFilter::LINEAR);
RefPtr<gfxDrawingCallback> mCallback;
@@ -168,18 +168,17 @@ public:
const mozilla::gfx::IntSize aSize);
virtual ~gfxPatternDrawable();
virtual bool Draw(gfxContext* aContext,
const gfxRect& aFillRect,
mozilla::gfx::ExtendMode aExtendMode,
const mozilla::gfx::SamplingFilter aSamplingFilter,
gfxFloat aOpacity = 1.0,
- const gfxMatrix& aTransform = gfxMatrix());
-
+ const gfxMatrix& aTransform = gfxMatrix()) override;
protected:
already_AddRefed<gfxCallbackDrawable> MakeCallbackDrawable();
RefPtr<gfxPattern> mPattern;
};
#endif /* GFX_DRAWABLE_H */
--- a/gfx/thebes/gfxFcPlatformFontList.h
+++ b/gfx/thebes/gfxFcPlatformFontList.h
@@ -208,17 +208,17 @@ public:
void
FindAllFontsForStyle(const gfxFontStyle& aFontStyle,
nsTArray<gfxFontEntry*>& aFontEntryList,
bool& aNeedsSyntheticBold,
bool aIgnoreSizeTolerance) override;
bool FilterForFontList(nsAtom* aLangGroup,
- const nsACString& aGeneric) const final {
+ const nsACString& aGeneric) const final override {
return SupportsLangGroup(aLangGroup);
}
protected:
virtual ~gfxFontconfigFontFamily();
// helper for FilterForFontList
bool SupportsLangGroup(nsAtom *aLangGroup) const;
--- a/gfx/thebes/gfxGDIFontList.h
+++ b/gfx/thebes/gfxGDIFontList.h
@@ -209,17 +209,17 @@ public:
mWindowsFamily(0),
mWindowsPitch(0),
mCharset()
{}
virtual void FindStyleVariations(FontInfoData *aFontInfoData = nullptr);
bool FilterForFontList(nsAtom* aLangGroup,
- const nsACString& aGeneric) const final {
+ const nsACString& aGeneric) const final override {
return !IsSymbolFontFamily() &&
SupportsLangGroup(aLangGroup) &&
MatchesGenericFamily(aGeneric);
}
protected:
friend class gfxGDIFontList;
--- a/gfx/thebes/gfxGradientCache.cpp
+++ b/gfx/thebes/gfxGradientCache.cpp
@@ -123,17 +123,17 @@ class GradientCache final : public nsExp
GradientCache()
: nsExpirationTracker<GradientCacheData,4>(MAX_GENERATION_MS,
"GradientCache",
SystemGroup::EventTargetFor(TaskCategory::Other))
{
srand(time(nullptr));
}
- virtual void NotifyExpired(GradientCacheData* aObject)
+ virtual void NotifyExpired(GradientCacheData* aObject) override
{
// This will free the gfxPattern.
RemoveObject(aObject);
mHashEntries.Remove(aObject->mKey);
}
GradientCacheData* Lookup(const nsTArray<GradientStop>& aStops, ExtendMode aExtend, BackendType aBackendType)
{
--- a/gfx/thebes/gfxPlatformFontList.h
+++ b/gfx/thebes/gfxPlatformFontList.h
@@ -473,19 +473,19 @@ protected:
// helper method for finding an appropriate lang string
bool TryLangForGroup(const nsACString& aOSLang, nsAtom* aLangGroup,
nsACString& aLang);
static const char* GetGenericName(mozilla::FontFamilyType aGenericType);
// gfxFontInfoLoader overrides, used to load in font cmaps
- virtual void InitLoader();
- virtual bool LoadFontInfo();
- virtual void CleanupLoader();
+ virtual void InitLoader() override;
+ virtual bool LoadFontInfo() override;
+ virtual void CleanupLoader() override;
// read the loader initialization prefs, and start it
void GetPrefsAndStartLoader();
// for font list changes that affect all documents
void ForceGlobalReflow() {
gfxPlatform::ForceGlobalReflow();
}
--- a/gfx/thebes/gfxTextRun.h
+++ b/gfx/thebes/gfxTextRun.h
@@ -534,21 +534,21 @@ public:
ConvertFromGlyphRunArray();
}
// Clear out the one remaining GlyphRun.
mSingleGlyphRun.mFont = nullptr;
}
void SortGlyphRuns();
void SanitizeGlyphRuns();
- const CompressedGlyph* GetCharacterGlyphs() const final {
+ const CompressedGlyph* GetCharacterGlyphs() const final override {
MOZ_ASSERT(mCharacterGlyphs, "failed to initialize mCharacterGlyphs");
return mCharacterGlyphs;
}
- CompressedGlyph* GetCharacterGlyphs() final {
+ CompressedGlyph* GetCharacterGlyphs() final override {
MOZ_ASSERT(mCharacterGlyphs, "failed to initialize mCharacterGlyphs");
return mCharacterGlyphs;
}
// clean out results from shaping in progress, used for fallback scenarios
void ClearGlyphsAndCharacters();
void SetSpaceGlyph(gfxFont* aFont, DrawTarget* aDrawTarget,
--- a/gfx/thebes/gfxUserFontSet.cpp
+++ b/gfx/thebes/gfxUserFontSet.cpp
@@ -53,17 +53,17 @@ public:
// over-allocated during growth), and give up ownership of it so the
// caller becomes responsible to call free() when finished with it.
void* forget() {
void* p = moz_xrealloc(mPtr, mOff);
mPtr = nullptr;
return p;
}
- bool WriteRaw(const void* data, size_t length) {
+ bool WriteRaw(const void* data, size_t length) override {
if ((mOff + length > mLength) ||
(mLength > std::numeric_limits<size_t>::max() - mOff)) {
if (mLength == mLimit) {
return false;
}
size_t newLength = (mLength + 1) * 2;
if (newLength < mLength) {
return false;
@@ -75,28 +75,28 @@ public:
mLength = newLength;
return WriteRaw(data, length);
}
std::memcpy(static_cast<char*>(mPtr) + mOff, data, length);
mOff += length;
return true;
}
- bool Seek(off_t position) {
+ bool Seek(off_t position) override {
if (position < 0) {
return false;
}
if (static_cast<size_t>(position) > mLength) {
return false;
}
mOff = position;
return true;
}
- off_t Tell() const {
+ off_t Tell() const override {
return mOff;
}
private:
void* mPtr;
size_t mLength;
const size_t mLimit;
off_t mOff;
--- a/image/ClippedImage.cpp
+++ b/image/ClippedImage.cpp
@@ -109,17 +109,17 @@ public:
, mOpacity(aOpacity)
{
MOZ_ASSERT(mImage, "Must have an image to clip");
}
virtual bool operator()(gfxContext* aContext,
const gfxRect& aFillRect,
const SamplingFilter aSamplingFilter,
- const gfxMatrix& aTransform)
+ const gfxMatrix& aTransform) override
{
MOZ_ASSERT(aTransform.IsIdentity(),
"Caller is probably CreateSamplingRestrictedDrawable, "
"which should not happen");
// Draw the image. |gfxCallbackDrawable| always calls this function with
// arguments that guarantee we never tile.
mDrawResult =
--- a/image/RasterImage.h
+++ b/image/RasterImage.h
@@ -449,17 +449,17 @@ private: // data
public:
/**
* Called from decoder threads when DoError() is called, since errors can't
* be handled safely off-main-thread. Dispatches an event which reinvokes
* DoError on the main thread if there isn't one already pending.
*/
static void DispatchIfNeeded(RasterImage* aImage);
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
private:
explicit HandleErrorWorker(RasterImage* aImage);
RefPtr<RasterImage> mImage;
};
// Helpers
--- a/image/VectorImage.cpp
+++ b/image/VectorImage.cpp
@@ -263,17 +263,17 @@ public:
: mSVGDocumentWrapper(aSVGDocumentWrapper)
, mViewportSize(aViewportSize)
, mSize(aSize)
, mImageFlags(aImageFlags)
{ }
virtual bool operator()(gfxContext* aContext,
const gfxRect& aFillRect,
const SamplingFilter aSamplingFilter,
- const gfxMatrix& aTransform);
+ const gfxMatrix& aTransform) override;
private:
RefPtr<SVGDocumentWrapper> mSVGDocumentWrapper;
const IntSize mViewportSize;
const IntSize mSize;
uint32_t mImageFlags;
};
// Based loosely on nsSVGIntegrationUtils' PaintFrameCallback::operator()
--- a/ipc/chromium/src/base/histogram.h
+++ b/ipc/chromium/src/base/histogram.h
@@ -335,38 +335,38 @@ class LinearHistogram : public Histogram
default underflow bucket. */
static Histogram* FactoryGet(Sample minimum,
Sample maximum,
size_t bucket_count,
Flags flags,
const int* buckets);
// Overridden from Histogram:
- virtual ClassType histogram_type() const;
+ virtual ClassType histogram_type() const override;
- virtual void Accumulate(Sample value, Count count, size_t index);
+ virtual void Accumulate(Sample value, Count count, size_t index) override;
// Store a list of number/text values for use in rendering the histogram.
// The last element in the array has a null in its "description" slot.
- virtual void SetRangeDescriptions(const DescriptionPair descriptions[]);
+ virtual void SetRangeDescriptions(const DescriptionPair descriptions[]) override;
protected:
LinearHistogram(Sample minimum, Sample maximum, size_t bucket_count);
LinearHistogram(TimeDelta minimum, TimeDelta maximum, size_t bucket_count);
- virtual double GetBucketSize(Count current, size_t i) const;
+ virtual double GetBucketSize(Count current, size_t i) const override;
// If we have a description for a bucket, then return that. Otherwise
// let parent class provide a (numeric) description.
- virtual const std::string GetAsciiBucketRange(size_t i) const;
+ virtual const std::string GetAsciiBucketRange(size_t i) const override;
// Skip printing of name for numeric range if we have a name (and if this is
// an empty bucket).
- virtual bool PrintEmptyBucket(size_t index) const;
+ virtual bool PrintEmptyBucket(size_t index) const override;
private:
// For some ranges, we store a printable description of a bucket range.
// If there is no desciption, then GetAsciiBucketRange() uses parent class
// to provide a description.
typedef std::map<Sample, std::string> BucketDescriptionMap;
BucketDescriptionMap bucket_description_;
@@ -376,64 +376,64 @@ class LinearHistogram : public Histogram
//------------------------------------------------------------------------------
// BooleanHistogram is a histogram for booleans.
class BooleanHistogram : public LinearHistogram {
public:
static Histogram* FactoryGet(Flags flags,
const int* buckets);
- virtual ClassType histogram_type() const;
+ virtual ClassType histogram_type() const override;
- virtual void AddBoolean(bool value);
+ virtual void AddBoolean(bool value) override;
- virtual void Accumulate(Sample value, Count count, size_t index);
+ virtual void Accumulate(Sample value, Count count, size_t index) override;
protected:
explicit BooleanHistogram();
DISALLOW_COPY_AND_ASSIGN(BooleanHistogram);
};
//------------------------------------------------------------------------------
// FlagHistogram is like boolean histogram, but only allows a single off/on value.
class FlagHistogram : public BooleanHistogram
{
public:
static Histogram *FactoryGet(Flags flags,
const int* buckets);
- virtual ClassType histogram_type() const;
+ virtual ClassType histogram_type() const override;
- virtual void Accumulate(Sample value, Count count, size_t index);
+ virtual void Accumulate(Sample value, Count count, size_t index) override;
- virtual void AddSampleSet(const SampleSet& sample);
+ virtual void AddSampleSet(const SampleSet& sample) override;
- virtual void Clear();
+ virtual void Clear() override;
private:
explicit FlagHistogram();
bool mSwitched;
DISALLOW_COPY_AND_ASSIGN(FlagHistogram);
};
// CountHistogram only allows a single monotic counter value.
class CountHistogram : public LinearHistogram
{
public:
static Histogram *FactoryGet(Flags flags,
const int* buckets);
- virtual ClassType histogram_type() const;
+ virtual ClassType histogram_type() const override;
- virtual void Accumulate(Sample value, Count count, size_t index);
+ virtual void Accumulate(Sample value, Count count, size_t index) override;
- virtual void AddSampleSet(const SampleSet& sample);
+ virtual void AddSampleSet(const SampleSet& sample) override;
private:
explicit CountHistogram();
DISALLOW_COPY_AND_ASSIGN(CountHistogram);
};
} // namespace base
--- a/ipc/chromium/src/base/message_pump_default.h
+++ b/ipc/chromium/src/base/message_pump_default.h
@@ -14,20 +14,20 @@
namespace base {
class MessagePumpDefault : public MessagePump {
public:
MessagePumpDefault();
~MessagePumpDefault() {}
// MessagePump methods:
- virtual void Run(Delegate* delegate);
- virtual void Quit();
- virtual void ScheduleWork();
- virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
+ virtual void Run(Delegate* delegate) override;
+ virtual void Quit() override;
+ virtual void ScheduleWork() override;
+ virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
protected:
// This flag is set to false when Run should return.
bool keep_running_;
// Used to sleep until there is more work to do.
WaitableEvent event_;
--- a/ipc/chromium/src/base/message_pump_glib.h
+++ b/ipc/chromium/src/base/message_pump_glib.h
@@ -54,20 +54,20 @@ class MessagePumpForUI : public MessageP
};
MessagePumpForUI();
virtual ~MessagePumpForUI();
// Like MessagePump::Run, but GdkEvent objects are routed through dispatcher.
virtual void RunWithDispatcher(Delegate* delegate, Dispatcher* dispatcher);
- virtual void Run(Delegate* delegate) { RunWithDispatcher(delegate, NULL); }
- virtual void Quit();
- virtual void ScheduleWork();
- virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time);
+ virtual void Run(Delegate* delegate) override { RunWithDispatcher(delegate, NULL); }
+ virtual void Quit() override;
+ virtual void ScheduleWork() override;
+ virtual void ScheduleDelayedWork(const TimeTicks& delayed_work_time) override;
// Internal methods used for processing the pump callbacks. They are
// public for simplicity but should not be used directly. HandlePrepare
// is called during the prepare step of glib, and returns a timeout that
// will be passed to the poll. HandleCheck is called after the poll
// has completed, and returns whether or not HandleDispatch should be called.
// HandleDispatch is called if HandleCheck returned true.
int HandlePrepare();
--- a/ipc/chromium/src/base/thread.h
+++ b/ipc/chromium/src/base/thread.h
@@ -138,17 +138,17 @@ class Thread : PlatformThread::Delegate
// Called just after the message loop ends
virtual void CleanUp() {}
static void SetThreadWasQuitProperly(bool flag);
static bool GetThreadWasQuitProperly();
private:
// PlatformThread::Delegate methods:
- virtual void ThreadMain();
+ virtual void ThreadMain() override;
// We piggy-back on the startup_data_ member to know if we successfully
// started the thread. This way we know that we need to call Join.
bool thread_was_started() const { return startup_data_ != NULL; }
// Used to pass data to ThreadMain.
struct StartupData;
StartupData* startup_data_;
--- a/ipc/chromium/src/base/waitable_event_posix.cc
+++ b/ipc/chromium/src/base/waitable_event_posix.cc
@@ -85,17 +85,17 @@ class SyncWaiter : public WaitableEvent:
public:
SyncWaiter(ConditionVariable* cv, Lock* lock)
: fired_(false),
cv_(cv),
lock_(lock),
signaling_event_(NULL) {
}
- bool Fire(WaitableEvent *signaling_event) {
+ bool Fire(WaitableEvent *signaling_event) override {
lock_->Acquire();
const bool previous_value = fired_;
fired_ = true;
if (!previous_value)
signaling_event_ = signaling_event;
lock_->Release();
if (previous_value)
@@ -110,17 +110,17 @@ class SyncWaiter : public WaitableEvent:
WaitableEvent* signaled_event() const {
return signaling_event_;
}
// ---------------------------------------------------------------------------
// These waiters are always stack allocated and don't delete themselves. Thus
// there's no problem and the ABA tag is the same as the object pointer.
// ---------------------------------------------------------------------------
- bool Compare(void* tag) {
+ bool Compare(void* tag) override {
return this == tag;
}
// ---------------------------------------------------------------------------
// Called with lock held.
// ---------------------------------------------------------------------------
bool fired() const {
return fired_;
--- a/ipc/chromium/src/chrome/common/child_process_host.h
+++ b/ipc/chromium/src/chrome/common/child_process_host.h
@@ -34,37 +34,37 @@ class ChildProcessHost : public IPC::Cha
virtual bool CanShutdown() = 0;
// Creates the IPC channel. Returns true iff it succeeded.
bool CreateChannel();
bool CreateChannel(mozilla::ipc::FileDescriptor& aFileDescriptor);
// IPC::Channel::Listener implementation:
- virtual void OnMessageReceived(IPC::Message&& msg) { }
- virtual void OnChannelConnected(int32_t peer_pid) { }
- virtual void OnChannelError() { }
+ virtual void OnMessageReceived(IPC::Message&& msg) override { }
+ virtual void OnChannelConnected(int32_t peer_pid) override { }
+ virtual void OnChannelError() override { }
bool opening_channel() { return opening_channel_; }
const std::wstring& channel_id() { return channel_id_; }
const IPC::Channel& channel() const { return *channel_; }
IPC::Channel* channelp() const { return channel_.get(); }
private:
// By using an internal class as the IPC::Channel::Listener, we can intercept
// OnMessageReceived/OnChannelConnected and do our own processing before
// calling the subclass' implementation.
class ListenerHook : public IPC::Channel::Listener {
public:
explicit ListenerHook(ChildProcessHost* host);
- virtual void OnMessageReceived(IPC::Message&& msg);
- virtual void OnChannelConnected(int32_t peer_pid);
- virtual void OnChannelError();
- virtual void GetQueuedMessages(std::queue<IPC::Message>& queue);
+ virtual void OnMessageReceived(IPC::Message&& msg) override;
+ virtual void OnChannelConnected(int32_t peer_pid) override;
+ virtual void OnChannelError() override;
+ virtual void GetQueuedMessages(std::queue<IPC::Message>& queue) override;
private:
ChildProcessHost* host_;
};
ListenerHook listener_;
// True while we're waiting the channel to be opened.
bool opening_channel_;
--- a/ipc/chromium/src/chrome/common/child_thread.h
+++ b/ipc/chromium/src/chrome/common/child_thread.h
@@ -29,23 +29,23 @@ class ChildThread : public IPC::Channel:
protected:
// Returns the one child thread.
static ChildThread* current();
IPC::Channel* channel() { return channel_.get(); }
// Thread implementation.
- virtual void Init();
- virtual void CleanUp();
+ virtual void Init() override;
+ virtual void CleanUp() override;
private:
// IPC::Channel::Listener implementation:
- virtual void OnMessageReceived(IPC::Message&& msg);
- virtual void OnChannelError();
+ virtual void OnMessageReceived(IPC::Message&& msg) override;
+ virtual void OnChannelError() override;
// The message loop used to run tasks on the thread that started this thread.
MessageLoop* owner_loop_;
std::wstring channel_name_;
mozilla::UniquePtr<IPC::Channel> channel_;
Thread::Options options_;
--- a/ipc/chromium/src/chrome/common/ipc_channel_posix.h
+++ b/ipc/chromium/src/chrome/common/ipc_channel_posix.h
@@ -60,18 +60,18 @@ class Channel::ChannelImpl : public Mess
void Init(Mode mode, Listener* listener);
bool CreatePipe(const std::wstring& channel_id, Mode mode);
bool EnqueueHelloMessage();
bool ProcessIncomingMessages();
bool ProcessOutgoingMessages();
// MessageLoopForIO::Watcher implementation.
- virtual void OnFileCanReadWithoutBlocking(int fd);
- virtual void OnFileCanWriteWithoutBlocking(int fd);
+ virtual void OnFileCanReadWithoutBlocking(int fd) override;
+ virtual void OnFileCanWriteWithoutBlocking(int fd) override;
#if defined(OS_MACOSX)
void CloseDescriptors(uint32_t pending_fd_id);
#endif
void OutputQueuePush(Message* msg);
void OutputQueuePop();
--- a/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
+++ b/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc
@@ -42,18 +42,17 @@ public:
virtual ~ChildReaper()
{
// subclasses should have cleaned up |process_| already
DCHECK(!process_);
// StopCatching() is implicit
}
- // @override
- virtual void OnSignal(int sig)
+ virtual void OnSignal(int sig) override
{
DCHECK(SIGCHLD == sig);
DCHECK(process_);
// this may be the SIGCHLD for a process other than |process_|
if (IsProcessDead(process_)) {
process_ = 0;
StopCatching();
@@ -136,29 +135,27 @@ public:
}
virtual ~ChildLaxReaper()
{
// WillDestroyCurrentMessageLoop() should have reaped process_ already
DCHECK(!process_);
}
- // @override
- virtual void OnSignal(int sig)
+ virtual void OnSignal(int sig) override
{
ChildReaper::OnSignal(sig);
if (!process_) {
MessageLoop::current()->RemoveDestructionObserver(this);
delete this;
}
}
- // @override
- virtual void WillDestroyCurrentMessageLoop()
+ virtual void WillDestroyCurrentMessageLoop() override
{
DCHECK(process_);
WaitForChildExit();
process_ = 0;
// XXX don't think this is necessary, since destruction can only
// be observed once, but can't hurt
--- a/ipc/glue/BrowserProcessSubThread.h
+++ b/ipc/glue/BrowserProcessSubThread.h
@@ -39,18 +39,18 @@ public:
};
explicit BrowserProcessSubThread(ID aId);
~BrowserProcessSubThread();
static MessageLoop* GetMessageLoop(ID identifier);
protected:
- virtual void Init();
- virtual void CleanUp();
+ virtual void Init() override;
+ virtual void CleanUp() override;
private:
// The identifier of this thread. Only one thread can exist with a given
// identifier at a given time.
ID mIdentifier;
// This lock protects |browser_threads_|. Do not read or modify that array
// without holding this lock. Do not block while holding this lock.
--- a/ipc/glue/GeckoChildProcessHost.h
+++ b/ipc/glue/GeckoChildProcessHost.h
@@ -69,24 +69,24 @@ public:
// Block until the child process has been created and it connects to
// the IPC channel, meaning it's fully initialized. (Or until an
// error occurs.)
bool SyncLaunch(StringVector aExtraOpts=StringVector(),
int32_t timeoutMs=0);
virtual bool PerformAsyncLaunch(StringVector aExtraOpts=StringVector());
- virtual void OnChannelConnected(int32_t peer_pid);
- virtual void OnMessageReceived(IPC::Message&& aMsg);
- virtual void OnChannelError();
- virtual void GetQueuedMessages(std::queue<IPC::Message>& queue);
+ virtual void OnChannelConnected(int32_t peer_pid) override;
+ virtual void OnMessageReceived(IPC::Message&& aMsg) override;
+ virtual void OnChannelError() override;
+ virtual void GetQueuedMessages(std::queue<IPC::Message>& queue) override;
virtual void InitializeChannel();
- virtual bool CanShutdown() { return true; }
+ virtual bool CanShutdown() override { return true; }
IPC::Channel* GetChannel() {
return channelp();
}
// Returns a "borrowed" handle to the child process - the handle returned
// by this function must not be closed by the caller.
ProcessHandle GetChildProcessHandle() {
--- a/ipc/glue/ProtocolUtils.h
+++ b/ipc/glue/ProtocolUtils.h
@@ -276,17 +276,17 @@ public:
{
mTrans = Move(aTrans);
}
Transport* GetTransport() const { return mTrans.get(); }
ProtocolId GetProtocolId() const { return mProtocolId; }
- base::ProcessId OtherPid() const;
+ base::ProcessId OtherPid() const override;
void SetOtherProcessId(base::ProcessId aOtherPid);
bool TakeMinidump(nsIFile** aDump, uint32_t* aSequence);
virtual void OnChannelClose() = 0;
virtual void OnChannelError() = 0;
virtual void ProcessingError(Result aError, const char* aMsgName) {}
virtual void OnChannelConnected(int32_t peer_pid) {}
@@ -399,17 +399,17 @@ public:
virtual already_AddRefed<nsIEventTarget>
GetMessageEventTarget(const Message& aMsg);
already_AddRefed<nsIEventTarget>
GetActorEventTarget(IProtocol* aActor);
virtual nsIEventTarget*
- GetActorEventTarget();
+ GetActorEventTarget() override;
virtual void OnChannelReceivedMessage(const Message& aMsg) {}
bool IsMainThreadProtocol() const { return mIsMainThreadProtocol; }
void SetIsMainThreadProtocol() { mIsMainThreadProtocol = NS_IsMainThread(); }
protected:
// Override this method in top-level protocols to change the event target
@@ -417,23 +417,24 @@ protected:
virtual already_AddRefed<nsIEventTarget>
GetConstructedEventTarget(const Message& aMsg) { return nullptr; }
// Override this method in top-level protocols to change the event target
// for specific messages.
virtual already_AddRefed<nsIEventTarget>
GetSpecificMessageEventTarget(const Message& aMsg) { return nullptr; }
- virtual void SetEventTargetForActorInternal(IProtocol* aActor, nsIEventTarget* aEventTarget);
+ virtual void SetEventTargetForActorInternal(IProtocol* aActor,
+ nsIEventTarget* aEventTarget) override;
virtual void ReplaceEventTargetForActorInternal(
IProtocol* aActor,
- nsIEventTarget* aEventTarget);
+ nsIEventTarget* aEventTarget) override;
virtual already_AddRefed<nsIEventTarget>
- GetActorEventTargetInternal(IProtocol* aActor);
+ GetActorEventTargetInternal(IProtocol* aActor) override;
private:
ProtocolId mProtocolId;
UniquePtr<Transport> mTrans;
base::ProcessId mOtherPid;
IDMap<IProtocol*> mActorMap;
int32_t mLastRouteId;
IDMap<Shmem::SharedMemory*> mShmemMap;
--- a/ipc/mscom/MainThreadInvoker.cpp
+++ b/ipc/mscom/MainThreadInvoker.cpp
@@ -32,17 +32,17 @@ class SyncRunnable : public mozilla::Run
public:
explicit SyncRunnable(already_AddRefed<nsIRunnable> aRunnable)
: mozilla::Runnable("MainThreadInvoker")
, mRunnable(aRunnable)
{}
~SyncRunnable() = default;
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
if (mHasRun) {
return NS_OK;
}
mHasRun = true;
TimeStamp runStart(TimeStamp::Now());
mRunnable->Run();
--- a/ipc/testshell/TestShellChild.h
+++ b/ipc/testshell/TestShellChild.h
@@ -18,27 +18,27 @@ namespace ipc {
class XPCShellEnvironment;
class TestShellChild : public PTestShellChild
{
public:
TestShellChild();
mozilla::ipc::IPCResult
- RecvExecuteCommand(const nsString& aCommand);
+ RecvExecuteCommand(const nsString& aCommand) override;
PTestShellCommandChild*
- AllocPTestShellCommandChild(const nsString& aCommand);
+ AllocPTestShellCommandChild(const nsString& aCommand) override;
mozilla::ipc::IPCResult
RecvPTestShellCommandConstructor(PTestShellCommandChild* aActor,
- const nsString& aCommand);
+ const nsString& aCommand) override;
bool
- DeallocPTestShellCommandChild(PTestShellCommandChild* aCommand);
+ DeallocPTestShellCommandChild(PTestShellCommandChild* aCommand) override;
private:
nsAutoPtr<XPCShellEnvironment> mXPCShell;
};
} /* namespace ipc */
} /* namespace mozilla */
--- a/ipc/testshell/TestShellParent.h
+++ b/ipc/testshell/TestShellParent.h
@@ -46,26 +46,25 @@ public:
bool RunCallback(const nsString& aResponse);
void ReleaseCallback();
protected:
bool ExecuteCallback(const nsString& aResponse);
- void ActorDestroy(ActorDestroyReason why);
+ void ActorDestroy(ActorDestroyReason why) override;
- mozilla::ipc::IPCResult Recv__delete__(const nsString& aResponse) {
+ mozilla::ipc::IPCResult Recv__delete__(const nsString& aResponse) override {
if (!ExecuteCallback(aResponse)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
private:
JS::PersistentRooted<JS::Value> mCallback;
};
-
} /* namespace ipc */
} /* namespace mozilla */
#endif /* ipc_testshell_TestShellParent_h */
--- a/js/ipc/CrossProcessObjectWrappers.h
+++ b/js/ipc/CrossProcessObjectWrappers.h
@@ -46,17 +46,17 @@ class CPOWManager
class CrossProcessCpowHolder : public CpowHolder
{
public:
CrossProcessCpowHolder(dom::CPOWManagerGetter* managerGetter,
const InfallibleTArray<CpowEntry>& cpows);
~CrossProcessCpowHolder();
- bool ToObject(JSContext* cx, JS::MutableHandleObject objp);
+ bool ToObject(JSContext* cx, JS::MutableHandleObject objp) override;
private:
CPOWManager* js_;
const InfallibleTArray<CpowEntry>& cpows_;
bool unwrapped_;
};
CPOWManager*
--- a/js/ipc/JavaScriptBase.h
+++ b/js/ipc/JavaScriptBase.h
@@ -19,278 +19,277 @@ namespace jsipc {
template<class Base>
class JavaScriptBase : public WrapperOwner, public WrapperAnswer, public Base
{
typedef WrapperAnswer Answer;
public:
virtual ~JavaScriptBase() {}
- virtual void ActorDestroy(WrapperOwner::ActorDestroyReason why) {
+ virtual void ActorDestroy(WrapperOwner::ActorDestroyReason why) override {
WrapperOwner::ActorDestroy(why);
}
/*** IPC handlers ***/
- mozilla::ipc::IPCResult RecvPreventExtensions(const uint64_t& objId, ReturnStatus* rs) {
+ mozilla::ipc::IPCResult RecvPreventExtensions(const uint64_t& objId, ReturnStatus* rs) override {
if (!Answer::RecvPreventExtensions(ObjectId::deserialize(objId), rs)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvGetPropertyDescriptor(const uint64_t& objId, const JSIDVariant& id,
ReturnStatus* rs,
- PPropertyDescriptor* out) {
+ PPropertyDescriptor* out) override {
if (!Answer::RecvGetPropertyDescriptor(ObjectId::deserialize(objId), id, rs, out)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvGetOwnPropertyDescriptor(const uint64_t& objId,
const JSIDVariant& id,
ReturnStatus* rs,
- PPropertyDescriptor* out) {
+ PPropertyDescriptor* out) override {
if (!Answer::RecvGetOwnPropertyDescriptor(ObjectId::deserialize(objId), id, rs, out)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvDefineProperty(const uint64_t& objId, const JSIDVariant& id,
- const PPropertyDescriptor& flags, ReturnStatus* rs) {
+ const PPropertyDescriptor& flags, ReturnStatus* rs) override {
if (!Answer::RecvDefineProperty(ObjectId::deserialize(objId), id, flags, rs)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvDelete(const uint64_t& objId, const JSIDVariant& id,
- ReturnStatus* rs) {
+ ReturnStatus* rs) override {
if (!Answer::RecvDelete(ObjectId::deserialize(objId), id, rs)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvHas(const uint64_t& objId, const JSIDVariant& id,
- ReturnStatus* rs, bool* bp) {
+ ReturnStatus* rs, bool* bp) override {
if (!Answer::RecvHas(ObjectId::deserialize(objId), id, rs, bp)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvHasOwn(const uint64_t& objId, const JSIDVariant& id,
- ReturnStatus* rs, bool* bp) {
+ ReturnStatus* rs, bool* bp) override {
if (!Answer::RecvHasOwn(ObjectId::deserialize(objId), id, rs, bp)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvGet(const uint64_t& objId, const JSVariant& receiverVar, const JSIDVariant& id,
- ReturnStatus* rs, JSVariant* result) {
+ ReturnStatus* rs, JSVariant* result) override {
if (!Answer::RecvGet(ObjectId::deserialize(objId), receiverVar, id, rs, result)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvSet(const uint64_t& objId, const JSIDVariant& id, const JSVariant& value,
- const JSVariant& receiverVar, ReturnStatus* rs) {
+ const JSVariant& receiverVar, ReturnStatus* rs) override {
if (!Answer::RecvSet(ObjectId::deserialize(objId), id, value, receiverVar, rs)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvIsExtensible(const uint64_t& objId, ReturnStatus* rs,
- bool* result) {
+ bool* result) override {
if (!Answer::RecvIsExtensible(ObjectId::deserialize(objId), rs, result)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvCallOrConstruct(const uint64_t& objId, InfallibleTArray<JSParam>&& argv,
const bool& construct, ReturnStatus* rs, JSVariant* result,
- nsTArray<JSParam>* outparams) {
+ nsTArray<JSParam>* outparams) override {
if (!Answer::RecvCallOrConstruct(ObjectId::deserialize(objId), Move(argv), construct, rs, result, outparams)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvHasInstance(const uint64_t& objId, const JSVariant& v, ReturnStatus* rs, bool* bp) {
+ mozilla::ipc::IPCResult RecvHasInstance(const uint64_t& objId, const JSVariant& v, ReturnStatus* rs, bool* bp) override {
if (!Answer::RecvHasInstance(ObjectId::deserialize(objId), v, rs, bp)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvGetBuiltinClass(const uint64_t& objId, ReturnStatus* rs, uint32_t* classValue) {
+ mozilla::ipc::IPCResult RecvGetBuiltinClass(const uint64_t& objId, ReturnStatus* rs, uint32_t* classValue) override {
if (!Answer::RecvGetBuiltinClass(ObjectId::deserialize(objId), rs, classValue)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvIsArray(const uint64_t& objId, ReturnStatus* rs, uint32_t* answer) {
+ mozilla::ipc::IPCResult RecvIsArray(const uint64_t& objId, ReturnStatus* rs, uint32_t* answer) override {
if (!Answer::RecvIsArray(ObjectId::deserialize(objId), rs, answer)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvClassName(const uint64_t& objId, nsCString* result) {
+ mozilla::ipc::IPCResult RecvClassName(const uint64_t& objId, nsCString* result) override {
if (!Answer::RecvClassName(ObjectId::deserialize(objId), result)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvGetPrototype(const uint64_t& objId, ReturnStatus* rs, ObjectOrNullVariant* result) {
+ mozilla::ipc::IPCResult RecvGetPrototype(const uint64_t& objId, ReturnStatus* rs, ObjectOrNullVariant* result) override {
if (!Answer::RecvGetPrototype(ObjectId::deserialize(objId), rs, result)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvGetPrototypeIfOrdinary(const uint64_t& objId, ReturnStatus* rs, bool* isOrdinary,
- ObjectOrNullVariant* result)
+ ObjectOrNullVariant* result) override
{
if (!Answer::RecvGetPrototypeIfOrdinary(ObjectId::deserialize(objId), rs, isOrdinary, result)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvRegExpToShared(const uint64_t& objId, ReturnStatus* rs, nsString* source, uint32_t* flags) {
+ mozilla::ipc::IPCResult RecvRegExpToShared(const uint64_t& objId, ReturnStatus* rs, nsString* source, uint32_t* flags) override {
if (!Answer::RecvRegExpToShared(ObjectId::deserialize(objId), rs, source, flags)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvGetPropertyKeys(const uint64_t& objId, const uint32_t& flags,
- ReturnStatus* rs, nsTArray<JSIDVariant>* ids) {
+ ReturnStatus* rs, nsTArray<JSIDVariant>* ids) override {
if (!Answer::RecvGetPropertyKeys(ObjectId::deserialize(objId), flags, rs, ids)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvInstanceOf(const uint64_t& objId, const JSIID& iid,
- ReturnStatus* rs, bool* instanceof) {
+ ReturnStatus* rs, bool* instanceof) override {
if (!Answer::RecvInstanceOf(ObjectId::deserialize(objId), iid, rs, instanceof)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
mozilla::ipc::IPCResult RecvDOMInstanceOf(const uint64_t& objId, const int& prototypeID, const int& depth,
- ReturnStatus* rs, bool* instanceof) {
+ ReturnStatus* rs, bool* instanceof) override {
if (!Answer::RecvDOMInstanceOf(ObjectId::deserialize(objId), prototypeID, depth, rs, instanceof)) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
- mozilla::ipc::IPCResult RecvDropObject(const uint64_t& objId) {
+ mozilla::ipc::IPCResult RecvDropObject(const uint64_t& objId) override {
if (!Answer::RecvDropObject(ObjectId::deserialize(objId))) {
return IPC_FAIL_NO_REASON(this);
}
return IPC_OK();
}
/*** Dummy call handlers ***/
- bool SendDropObject(const ObjectId& objId) {
+ bool SendDropObject(const ObjectId& objId) override {
return Base::SendDropObject(objId.serialize());
}
- bool SendPreventExtensions(const ObjectId& objId, ReturnStatus* rs) {
+ bool SendPreventExtensions(const ObjectId& objId, ReturnStatus* rs) override {
return Base::SendPreventExtensions(objId.serialize(), rs);
}
bool SendGetPropertyDescriptor(const ObjectId& objId, const JSIDVariant& id,
ReturnStatus* rs,
- PPropertyDescriptor* out) {
+ PPropertyDescriptor* out) override {
return Base::SendGetPropertyDescriptor(objId.serialize(), id, rs, out);
}
bool SendGetOwnPropertyDescriptor(const ObjectId& objId,
const JSIDVariant& id,
ReturnStatus* rs,
- PPropertyDescriptor* out) {
+ PPropertyDescriptor* out) override {
return Base::SendGetOwnPropertyDescriptor(objId.serialize(), id, rs, out);
}
bool SendDefineProperty(const ObjectId& objId, const JSIDVariant& id,
const PPropertyDescriptor& flags,
- ReturnStatus* rs) {
+ ReturnStatus* rs) override {
return Base::SendDefineProperty(objId.serialize(), id, flags, rs);
}
- bool SendDelete(const ObjectId& objId, const JSIDVariant& id, ReturnStatus* rs) {
+ bool SendDelete(const ObjectId& objId, const JSIDVariant& id, ReturnStatus* rs) override {
return Base::SendDelete(objId.serialize(), id, rs);
}
bool SendHas(const ObjectId& objId, const JSIDVariant& id,
- ReturnStatus* rs, bool* bp) {
+ ReturnStatus* rs, bool* bp) override {
return Base::SendHas(objId.serialize(), id, rs, bp);
}
bool SendHasOwn(const ObjectId& objId, const JSIDVariant& id,
- ReturnStatus* rs, bool* bp) {
+ ReturnStatus* rs, bool* bp) override {
return Base::SendHasOwn(objId.serialize(), id, rs, bp);
}
bool SendGet(const ObjectId& objId, const JSVariant& receiverVar, const JSIDVariant& id,
- ReturnStatus* rs, JSVariant* result) {
+ ReturnStatus* rs, JSVariant* result) override {
return Base::SendGet(objId.serialize(), receiverVar, id, rs, result);
}
bool SendSet(const ObjectId& objId, const JSIDVariant& id, const JSVariant& value,
- const JSVariant& receiverVar, ReturnStatus* rs) {
+ const JSVariant& receiverVar, ReturnStatus* rs) override {
return Base::SendSet(objId.serialize(), id, value, receiverVar, rs);
}
- bool SendIsExtensible(const ObjectId& objId, ReturnStatus* rs,
- bool* result) {
+ bool SendIsExtensible(const ObjectId& objId, ReturnStatus* rs, bool* result) override {
return Base::SendIsExtensible(objId.serialize(), rs, result);
}
bool SendCallOrConstruct(const ObjectId& objId, const nsTArray<JSParam>& argv,
const bool& construct, ReturnStatus* rs, JSVariant* result,
- nsTArray<JSParam>* outparams) {
+ nsTArray<JSParam>* outparams) override {
return Base::SendCallOrConstruct(objId.serialize(), argv, construct, rs, result, outparams);
}
- bool SendHasInstance(const ObjectId& objId, const JSVariant& v, ReturnStatus* rs, bool* bp) {
+ bool SendHasInstance(const ObjectId& objId, const JSVariant& v, ReturnStatus* rs, bool* bp) override {
return Base::SendHasInstance(objId.serialize(), v, rs, bp);
}
- bool SendGetBuiltinClass(const ObjectId& objId, ReturnStatus* rs, uint32_t* classValue) {
+ bool SendGetBuiltinClass(const ObjectId& objId, ReturnStatus* rs, uint32_t* classValue) override {
return Base::SendGetBuiltinClass(objId.serialize(), rs, classValue);
}
- bool SendIsArray(const ObjectId& objId, ReturnStatus* rs, uint32_t* answer)
+ bool SendIsArray(const ObjectId& objId, ReturnStatus* rs, uint32_t* answer) override
{
return Base::SendIsArray(objId.serialize(), rs, answer);
}
- bool SendClassName(const ObjectId& objId, nsCString* result) {
+ bool SendClassName(const ObjectId& objId, nsCString* result) override {
return Base::SendClassName(objId.serialize(), result);
}
- bool SendGetPrototype(const ObjectId& objId, ReturnStatus* rs, ObjectOrNullVariant* result) {
+ bool SendGetPrototype(const ObjectId& objId, ReturnStatus* rs, ObjectOrNullVariant* result) override {
return Base::SendGetPrototype(objId.serialize(), rs, result);
}
bool SendGetPrototypeIfOrdinary(const ObjectId& objId, ReturnStatus* rs, bool* isOrdinary,
- ObjectOrNullVariant* result)
+ ObjectOrNullVariant* result) override
{
return Base::SendGetPrototypeIfOrdinary(objId.serialize(), rs, isOrdinary, result);
}
bool SendRegExpToShared(const ObjectId& objId, ReturnStatus* rs,
- nsString* source, uint32_t* flags) {
+ nsString* source, uint32_t* flags) override {
return Base::SendRegExpToShared(objId.serialize(), rs, source, flags);
}
bool SendGetPropertyKeys(const ObjectId& objId, const uint32_t& flags,
- ReturnStatus* rs, nsTArray<JSIDVariant>* ids) {
+ ReturnStatus* rs, nsTArray<JSIDVariant>* ids) override {
return Base::SendGetPropertyKeys(objId.serialize(), flags, rs, ids);
}
bool SendInstanceOf(const ObjectId& objId, const JSIID& iid,
- ReturnStatus* rs, bool* instanceof) {
+ ReturnStatus* rs, bool* instanceof) override {
return Base::SendInstanceOf(objId.serialize(), iid, rs, instanceof);
}
bool SendDOMInstanceOf(const ObjectId& objId, const int& prototypeID, const int& depth,
- ReturnStatus* rs, bool* instanceof) {
+ ReturnStatus* rs, bool* instanceof) override {
return Base::SendDOMInstanceOf(objId.serialize(), prototypeID, depth, rs, instanceof);
}
/* The following code is needed to suppress a bogus MSVC warning (C4250). */
- virtual bool toObjectVariant(JSContext* cx, JSObject* obj, ObjectVariant* objVarp) {
+ virtual bool toObjectVariant(JSContext* cx, JSObject* obj, ObjectVariant* objVarp) override {
return WrapperOwner::toObjectVariant(cx, obj, objVarp);
}
- virtual JSObject* fromObjectVariant(JSContext* cx, const ObjectVariant& objVar) {
+ virtual JSObject* fromObjectVariant(JSContext* cx, const ObjectVariant& objVar) override {
return WrapperOwner::fromObjectVariant(cx, objVar);
}
};
} // namespace jsipc
} // namespace mozilla
#endif
--- a/js/ipc/JavaScriptShared.h
+++ b/js/ipc/JavaScriptShared.h
@@ -139,18 +139,18 @@ class JavaScriptShared : public CPOWMana
JavaScriptShared();
virtual ~JavaScriptShared();
bool init();
void decref();
void incref();
- bool Unwrap(JSContext* cx, const InfallibleTArray<CpowEntry>& aCpows, JS::MutableHandleObject objp);
- bool Wrap(JSContext* cx, JS::HandleObject aObj, InfallibleTArray<CpowEntry>* outCpows);
+ bool Unwrap(JSContext* cx, const InfallibleTArray<CpowEntry>& aCpows, JS::MutableHandleObject objp) override;
+ bool Wrap(JSContext* cx, JS::HandleObject aObj, InfallibleTArray<CpowEntry>* outCpows) override;
protected:
bool toVariant(JSContext* cx, JS::HandleValue from, JSVariant* to);
bool fromVariant(JSContext* cx, const JSVariant& from, JS::MutableHandleValue to);
bool toJSIDVariant(JSContext* cx, JS::HandleId from, JSIDVariant* to);
bool fromJSIDVariant(JSContext* cx, const JSIDVariant& from, JS::MutableHandleId to);
--- a/js/ipc/WrapperOwner.h
+++ b/js/ipc/WrapperOwner.h
@@ -77,18 +77,18 @@ class WrapperOwner : public virtual Java
virtual bool allowMessage(JSContext* cx) = 0;
void drop(JSObject* obj);
void updatePointer(JSObject* obj, const JSObject* old);
virtual void ActorDestroy(ActorDestroyReason why);
- virtual bool toObjectVariant(JSContext* cx, JSObject* obj, ObjectVariant* objVarp);
- virtual JSObject* fromObjectVariant(JSContext* cx, const ObjectVariant& objVar);
+ virtual bool toObjectVariant(JSContext* cx, JSObject* obj, ObjectVariant* objVarp) override;
+ virtual JSObject* fromObjectVariant(JSContext* cx, const ObjectVariant& objVar) override;
JSObject* fromRemoteObjectVariant(JSContext* cx, const RemoteObject& objVar);
JSObject* fromLocalObjectVariant(JSContext* cx, const LocalObject& objVar);
protected:
ObjectId idOf(JSObject* obj);
private:
ObjectId idOfUnchecked(JSObject* obj);
--- a/js/public/UbiNode.h
+++ b/js/public/UbiNode.h
@@ -1061,19 +1061,19 @@ class JS_PUBLIC_API(Concrete<JS::Symbol>
template<>
class JS_PUBLIC_API(Concrete<JSScript>) : TracerConcreteWithCompartment<JSScript> {
protected:
explicit Concrete(JSScript *ptr) : TracerConcreteWithCompartment<JSScript>(ptr) { }
public:
static void construct(void *storage, JSScript *ptr) { new (storage) Concrete(ptr); }
- CoarseType coarseType() const final { return CoarseType::Script; }
+ CoarseType coarseType() const final override { return CoarseType::Script; }
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
- const char* scriptFilename() const final;
+ const char* scriptFilename() const final override;
const char16_t* typeName() const override { return concreteTypeName; }
static const char16_t concreteTypeName[];
};
// The JSObject specialization.
template<>
class JS_PUBLIC_API(Concrete<JSObject>) : public TracerConcreteWithCompartment<JSObject> {
@@ -1088,48 +1088,48 @@ class JS_PUBLIC_API(Concrete<JSObject>)
const char* jsObjectClassName() const override;
MOZ_MUST_USE bool jsObjectConstructorName(JSContext* cx, UniqueTwoByteChars& outName)
const override;
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
bool hasAllocationStack() const override;
StackFrame allocationStack() const override;
- CoarseType coarseType() const final { return CoarseType::Object; }
+ CoarseType coarseType() const final override { return CoarseType::Object; }
const char16_t* typeName() const override { return concreteTypeName; }
static const char16_t concreteTypeName[];
};
// For JSString, we extend the generic template with a 'size' implementation.
template<>
class JS_PUBLIC_API(Concrete<JSString>) : TracerConcrete<JSString> {
protected:
explicit Concrete(JSString *ptr) : TracerConcrete<JSString>(ptr) { }
public:
static void construct(void *storage, JSString *ptr) { new (storage) Concrete(ptr); }
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
- CoarseType coarseType() const final { return CoarseType::String; }
+ CoarseType coarseType() const final override { return CoarseType::String; }
const char16_t* typeName() const override { return concreteTypeName; }
static const char16_t concreteTypeName[];
};
// The ubi::Node null pointer. Any attempt to operate on a null ubi::Node asserts.
template<>
class JS_PUBLIC_API(Concrete<void>) : public Base {
const char16_t* typeName() const override;
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
js::UniquePtr<EdgeRange> edges(JSContext* cx, bool wantNames) const override;
JS::Zone* zone() const override;
JSCompartment* compartment() const override;
- CoarseType coarseType() const final;
+ CoarseType coarseType() const final override;
explicit Concrete(void* ptr) : Base(ptr) { }
public:
static void construct(void* storage, void* ptr) { new (storage) Concrete(ptr); }
};
--- a/js/src/frontend/Parser.h
+++ b/js/src/frontend/Parser.h
@@ -315,17 +315,17 @@ class ParserBase
const char* getFilename() const { return anyChars.getFilename(); }
TokenPos pos() const { return anyChars.currentToken().pos; }
// Determine whether |yield| is a valid name in the current context.
bool yieldExpressionsSupported() const {
return pc->isGenerator();
}
- virtual bool strictMode() { return pc->sc()->strict(); }
+ virtual bool strictMode() override { return pc->sc()->strict(); }
bool setLocalStrictMode(bool strict) {
MOZ_ASSERT(anyChars.debugHasNoLookahead());
return pc->sc()->setLocalStrictMode(strict);
}
const ReadOnlyCompileOptions& options() const {
return anyChars.options();
}
--- a/js/src/gdb/gdb-tests.h
+++ b/js/src/gdb/gdb-tests.h
@@ -56,18 +56,18 @@ struct GDBFragment {
// where <category> and <name> are identifiers. The gdb-tests executable
// takes a series of fragment names as command-line arguments and runs them in
// turn; each fragment is named <category>.<name> on the command line.
//
// The body runs in a scope where 'cx' is a usable JSContext*.
#define FRAGMENT(category, subname) \
class FRAGMENT_CLASS_NAME(category, subname): public GDBFragment { \
- void run(JSContext* cx, const char**& argv); \
- const char* name() { return FRAGMENT_STRING_NAME(category, subname); } \
+ void run(JSContext* cx, const char**& argv) override; \
+ const char* name() override { return FRAGMENT_STRING_NAME(category, subname); } \
static FRAGMENT_CLASS_NAME(category, subname) singleton; \
}; \
FRAGMENT_CLASS_NAME(category, subname) FRAGMENT_CLASS_NAME(category, subname)::singleton; \
void FRAGMENT_CLASS_NAME(category, subname)::run(JSContext* cx, const char**& argv)
#define FRAGMENT_STRING_NAME(category, subname) (#category "." #subname)
#define FRAGMENT_CLASS_NAME(category, subname) Fragment_ ## category ## _ ## subname
--- a/js/src/irregexp/NativeRegExpMacroAssembler.h
+++ b/js/src/irregexp/NativeRegExpMacroAssembler.h
@@ -87,64 +87,64 @@ class MOZ_STACK_CLASS NativeRegExpMacroA
public:
// Type of input string to generate code for.
enum Mode { LATIN1 = 1, CHAR16 = 2 };
NativeRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc, Mode mode, int registers_to_save,
RegExpShared::JitCodeTables& tables);
// Inherited virtual methods.
- RegExpCode GenerateCode(JSContext* cx, bool match_only);
- int stack_limit_slack();
- bool CanReadUnaligned();
- void AdvanceCurrentPosition(int by);
- void AdvanceRegister(int reg, int by);
- void Backtrack();
- void Bind(jit::Label* label);
- void CheckAtStart(jit::Label* on_at_start);
- void CheckCharacter(unsigned c, jit::Label* on_equal);
- void CheckCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_equal);
- void CheckCharacterGT(char16_t limit, jit::Label* on_greater);
- void CheckCharacterLT(char16_t limit, jit::Label* on_less);
- void CheckGreedyLoop(jit::Label* on_tos_equals_current_position);
- void CheckNotAtStart(jit::Label* on_not_at_start);
- void CheckNotBackReference(int start_reg, jit::Label* on_no_match);
- void CheckNotBackReferenceIgnoreCase(int start_reg, jit::Label* on_no_match, bool unicode);
- void CheckNotCharacter(unsigned c, jit::Label* on_not_equal);
- void CheckNotCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_not_equal);
+ RegExpCode GenerateCode(JSContext* cx, bool match_only) override;
+ int stack_limit_slack() override;
+ bool CanReadUnaligned() override;
+ void AdvanceCurrentPosition(int by) override;
+ void AdvanceRegister(int reg, int by) override;
+ void Backtrack() override;
+ void Bind(jit::Label* label) override;
+ void CheckAtStart(jit::Label* on_at_start) override;
+ void CheckCharacter(unsigned c, jit::Label* on_equal) override;
+ void CheckCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_equal) override;
+ void CheckCharacterGT(char16_t limit, jit::Label* on_greater) override;
+ void CheckCharacterLT(char16_t limit, jit::Label* on_less) override;
+ void CheckGreedyLoop(jit::Label* on_tos_equals_current_position) override;
+ void CheckNotAtStart(jit::Label* on_not_at_start) override;
+ void CheckNotBackReference(int start_reg, jit::Label* on_no_match) override;
+ void CheckNotBackReferenceIgnoreCase(int start_reg, jit::Label* on_no_match, bool unicode) override;
+ void CheckNotCharacter(unsigned c, jit::Label* on_not_equal) override;
+ void CheckNotCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_not_equal) override;
void CheckNotCharacterAfterMinusAnd(char16_t c, char16_t minus, char16_t and_with,
- jit::Label* on_not_equal);
+ jit::Label* on_not_equal) override;
void CheckCharacterInRange(char16_t from, char16_t to,
- jit::Label* on_in_range);
+ jit::Label* on_in_range) override;
void CheckCharacterNotInRange(char16_t from, char16_t to,
- jit::Label* on_not_in_range);
- void CheckBitInTable(RegExpShared::JitCodeTable table, jit::Label* on_bit_set);
- void CheckPosition(int cp_offset, jit::Label* on_outside_input);
- void JumpOrBacktrack(jit::Label* to);
- bool CheckSpecialCharacterClass(char16_t type, jit::Label* on_no_match);
- void Fail();
- void IfRegisterGE(int reg, int comparand, jit::Label* if_ge);
- void IfRegisterLT(int reg, int comparand, jit::Label* if_lt);
- void IfRegisterEqPos(int reg, jit::Label* if_eq);
+ jit::Label* on_not_in_range) override;
+ void CheckBitInTable(RegExpShared::JitCodeTable table, jit::Label* on_bit_set) override;
+ void CheckPosition(int cp_offset, jit::Label* on_outside_input) override;
+ void JumpOrBacktrack(jit::Label* to) override;
+ bool CheckSpecialCharacterClass(char16_t type, jit::Label* on_no_match) override;
+ void Fail() override;
+ void IfRegisterGE(int reg, int comparand, jit::Label* if_ge) override;
+ void IfRegisterLT(int reg, int comparand, jit::Label* if_lt) override;
+ void IfRegisterEqPos(int reg, jit::Label* if_eq) override;
void LoadCurrentCharacter(int cp_offset, jit::Label* on_end_of_input,
- bool check_bounds = true, int characters = 1);
- void PopCurrentPosition();
- void PopRegister(int register_index);
- void PushCurrentPosition();
- void PushRegister(int register_index, StackCheckFlag check_stack_limit);
- void ReadCurrentPositionFromRegister(int reg);
- void ReadBacktrackStackPointerFromRegister(int reg);
- void SetCurrentPositionFromEnd(int by);
- void SetRegister(int register_index, int to);
- bool Succeed();
- void WriteCurrentPositionToRegister(int reg, int cp_offset);
- void ClearRegisters(int reg_from, int reg_to);
- void WriteBacktrackStackPointerToRegister(int reg);
- void PushBacktrack(jit::Label* label);
- void BindBacktrack(jit::Label* label);
+ bool check_bounds = true, int characters = 1) override;
+ void PopCurrentPosition() override;
+ void PopRegister(int register_index) override;
+ void PushCurrentPosition() override;
+ void PushRegister(int register_index, StackCheckFlag check_stack_limit) override;
+ void ReadCurrentPositionFromRegister(int reg) override;
+ void ReadBacktrackStackPointerFromRegister(int reg) override;
+ void SetCurrentPositionFromEnd(int by) override;
+ void SetRegister(int register_index, int to) override;
+ bool Succeed() override;
+ void WriteCurrentPositionToRegister(int reg, int cp_offset) override;
+ void ClearRegisters(int reg_from, int reg_to) override;
+ void WriteBacktrackStackPointerToRegister(int reg) override;
+ void PushBacktrack(jit::Label* label) override;
+ void BindBacktrack(jit::Label* label) override;
// Compares two-byte strings case insensitively.
// Called from generated RegExp code.
static int CaseInsensitiveCompareUC16(jit::Address byte_offset1,
jit::Address byte_offset2,
size_t byte_length);
// Byte map of one byte characters with a 0xff if the character is a word
--- a/js/src/irregexp/RegExpAST.h
+++ b/js/src/irregexp/RegExpAST.h
@@ -85,47 +85,47 @@ class RegExpTree
typedef InfallibleVector<RegExpTree*, 1> RegExpTreeVector;
class RegExpDisjunction : public RegExpTree
{
public:
explicit RegExpDisjunction(RegExpTreeVector* alternatives);
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpDisjunction* AsDisjunction();
- virtual Interval CaptureRegisters();
- virtual bool IsDisjunction();
- virtual bool IsAnchoredAtStart();
- virtual bool IsAnchoredAtEnd();
- virtual int min_match() { return min_match_; }
- virtual int max_match() { return max_match_; }
+ RegExpNode* on_success) override;
+ virtual RegExpDisjunction* AsDisjunction() override;
+ virtual Interval CaptureRegisters() override;
+ virtual bool IsDisjunction() override;
+ virtual bool IsAnchoredAtStart() override;
+ virtual bool IsAnchoredAtEnd() override;
+ virtual int min_match() override { return min_match_; }
+ virtual int max_match() override { return max_match_; }
const RegExpTreeVector& alternatives() { return *alternatives_; }
private:
RegExpTreeVector* alternatives_;
int min_match_;
int max_match_;
};
class RegExpAlternative : public RegExpTree
{
public:
explicit RegExpAlternative(RegExpTreeVector* nodes);
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpAlternative* AsAlternative();
- virtual Interval CaptureRegisters();
- virtual bool IsAlternative();
- virtual bool IsAnchoredAtStart();
- virtual bool IsAnchoredAtEnd();
- virtual int min_match() { return min_match_; }
- virtual int max_match() { return max_match_; }
+ RegExpNode* on_success) override;
+ virtual RegExpAlternative* AsAlternative() override;
+ virtual Interval CaptureRegisters() override;
+ virtual bool IsAlternative() override;
+ virtual bool IsAnchoredAtStart() override;
+ virtual bool IsAnchoredAtEnd() override;
+ virtual int min_match() override { return min_match_; }
+ virtual int max_match() override { return max_match_; }
const RegExpTreeVector& nodes() { return *nodes_; }
private:
RegExpTreeVector* nodes_;
int min_match_;
int max_match_;
};
@@ -140,23 +140,23 @@ class RegExpAssertion : public RegExpTre
BOUNDARY,
NON_BOUNDARY,
NOT_AFTER_LEAD_SURROGATE,
NOT_IN_SURROGATE_PAIR
};
explicit RegExpAssertion(AssertionType type) : assertion_type_(type) { }
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpAssertion* AsAssertion();
- virtual bool IsAssertion();
- virtual bool IsAnchoredAtStart();
- virtual bool IsAnchoredAtEnd();
- virtual int min_match() { return 0; }
- virtual int max_match() { return 0; }
+ RegExpNode* on_success) override;
+ virtual RegExpAssertion* AsAssertion() override;
+ virtual bool IsAssertion() override;
+ virtual bool IsAnchoredAtStart() override;
+ virtual bool IsAnchoredAtEnd() override;
+ virtual int min_match() override { return 0; }
+ virtual int max_match() override { return 0; }
AssertionType assertion_type() { return assertion_type_; }
private:
AssertionType assertion_type_;
};
class CharacterSet
{
public:
@@ -195,23 +195,23 @@ class RegExpCharacterClass : public RegE
explicit RegExpCharacterClass(char16_t type)
: set_(type),
is_negated_(false)
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpCharacterClass* AsCharacterClass();
- virtual bool IsCharacterClass();
- virtual bool IsTextElement() { return true; }
- virtual int min_match() { return 1; }
- virtual int max_match() { return 1; }
- virtual void AppendToText(RegExpText* text);
+ RegExpNode* on_success) override;
+ virtual RegExpCharacterClass* AsCharacterClass() override;
+ virtual bool IsCharacterClass() override;
+ virtual bool IsTextElement() override { return true; }
+ virtual int min_match() override { return 1; }
+ virtual int max_match() override { return 1; }
+ virtual void AppendToText(RegExpText* text) override;
CharacterSet character_set() { return set_; }
// TODO(lrn): Remove need for complex version if is_standard that
// recognizes a mangled standard set and just do { return set_.is_special(); }
bool is_standard(LifoAlloc* alloc);
// Returns a value representing the standard character set if is_standard()
@@ -241,23 +241,23 @@ class RegExpAtom : public RegExpTree
{
public:
explicit RegExpAtom(CharacterVector* data)
: data_(data)
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpAtom* AsAtom();
- virtual bool IsAtom();
- virtual bool IsTextElement() { return true; }
- virtual int min_match() { return data_->length(); }
- virtual int max_match() { return data_->length(); }
- virtual void AppendToText(RegExpText* text);
+ RegExpNode* on_success) override;
+ virtual RegExpAtom* AsAtom() override;
+ virtual bool IsAtom() override;
+ virtual bool IsTextElement() override { return true; }
+ virtual int min_match() override { return data_->length(); }
+ virtual int max_match() override { return data_->length(); }
+ virtual void AppendToText(RegExpText* text) override;
const CharacterVector& data() { return *data_; }
int length() { return data_->length(); }
private:
CharacterVector* data_;
};
@@ -265,23 +265,23 @@ class RegExpText : public RegExpTree
{
public:
explicit RegExpText(LifoAlloc* alloc)
: elements_(*alloc), length_(0)
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpText* AsText();
- virtual bool IsText();
- virtual bool IsTextElement() { return true; }
- virtual int min_match() { return length_; }
- virtual int max_match() { return length_; }
- virtual void AppendToText(RegExpText* text);
+ RegExpNode* on_success) override;
+ virtual RegExpText* AsText() override;
+ virtual bool IsText() override;
+ virtual bool IsTextElement() override { return true; }
+ virtual int min_match() override { return length_; }
+ virtual int max_match() override { return length_; }
+ void AppendToText(RegExpText* text) override;
void AddElement(TextElement elm) {
elements_.append(elm);
length_ += elm.length();
}
const TextElementVector& elements() { return elements_; }
private:
@@ -304,29 +304,29 @@ class RegExpQuantifier : public RegExpTr
max_match_ = kInfinity;
} else {
max_match_ = max * body->max_match();
}
}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
+ RegExpNode* on_success) override;
static RegExpNode* ToNode(int min,
int max,
bool is_greedy,
RegExpTree* body,
RegExpCompiler* compiler,
RegExpNode* on_success,
bool not_at_start = false);
- virtual RegExpQuantifier* AsQuantifier();
- virtual Interval CaptureRegisters();
- virtual bool IsQuantifier();
- virtual int min_match() { return min_match_; }
- virtual int max_match() { return max_match_; }
+ virtual RegExpQuantifier* AsQuantifier() override;
+ virtual Interval CaptureRegisters() override;
+ virtual bool IsQuantifier() override;
+ virtual int min_match() override { return min_match_; }
+ virtual int max_match() override { return max_match_; }
int min() { return min_; }
int max() { return max_; }
bool is_possessive() { return quantifier_type_ == POSSESSIVE; }
bool is_non_greedy() { return quantifier_type_ == NON_GREEDY; }
bool is_greedy() { return quantifier_type_ == GREEDY; }
RegExpTree* body() { return body_; }
private:
@@ -342,28 +342,28 @@ class RegExpCapture : public RegExpTree
{
public:
explicit RegExpCapture(RegExpTree* body, int index)
: body_(body), index_(index)
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
+ RegExpNode* on_success) override;
static RegExpNode* ToNode(RegExpTree* body,
int index,
RegExpCompiler* compiler,
RegExpNode* on_success);
- virtual RegExpCapture* AsCapture();
- virtual bool IsAnchoredAtStart();
- virtual bool IsAnchoredAtEnd();
- virtual Interval CaptureRegisters();
- virtual bool IsCapture();
- virtual int min_match() { return body_->min_match(); }
- virtual int max_match() { return body_->max_match(); }
+ virtual RegExpCapture* AsCapture() override;
+ virtual bool IsAnchoredAtStart() override;
+ virtual bool IsAnchoredAtEnd() override;
+ virtual Interval CaptureRegisters() override;
+ virtual bool IsCapture() override;
+ virtual int min_match() override { return body_->min_match(); }
+ virtual int max_match() override { return body_->max_match(); }
RegExpTree* body() { return body_; }
int index() { return index_; }
static int StartRegister(int index) { return index * 2; }
static int EndRegister(int index) { return index * 2 + 1; }
private:
RegExpTree* body_;
int index_;
@@ -379,23 +379,23 @@ class RegExpLookahead : public RegExpTre
: body_(body),
is_positive_(is_positive),
capture_count_(capture_count),
capture_from_(capture_from)
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpLookahead* AsLookahead();
- virtual Interval CaptureRegisters();
- virtual bool IsLookahead();
- virtual bool IsAnchoredAtStart();
- virtual int min_match() { return 0; }
- virtual int max_match() { return 0; }
+ RegExpNode* on_success) override;
+ virtual RegExpLookahead* AsLookahead() override;
+ virtual Interval CaptureRegisters() override;
+ virtual bool IsLookahead() override;
+ virtual bool IsAnchoredAtStart() override;
+ virtual int min_match() override { return 0; }
+ virtual int max_match() override { return 0; }
RegExpTree* body() { return body_; }
bool is_positive() { return is_positive_; }
int capture_count() { return capture_count_; }
int capture_from() { return capture_from_; }
private:
RegExpTree* body_;
bool is_positive_;
@@ -409,40 +409,40 @@ class RegExpBackReference : public RegEx
{
public:
explicit RegExpBackReference(RegExpCapture* capture)
: capture_(capture)
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpBackReference* AsBackReference();
- virtual bool IsBackReference();
- virtual int min_match() { return 0; }
- virtual int max_match() { return capture_->max_match(); }
+ RegExpNode* on_success) override;
+ virtual RegExpBackReference* AsBackReference() override;
+ virtual bool IsBackReference() override;
+ virtual int min_match() override { return 0; }
+ virtual int max_match() override { return capture_->max_match(); }
int index() { return capture_->index(); }
RegExpCapture* capture() { return capture_; }
private:
RegExpCapture* capture_;
};
class RegExpEmpty : public RegExpTree
{
public:
RegExpEmpty()
{}
virtual void* Accept(RegExpVisitor* visitor, void* data);
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
- RegExpNode* on_success);
- virtual RegExpEmpty* AsEmpty();
- virtual bool IsEmpty();
- virtual int min_match() { return 0; }
- virtual int max_match() { return 0; }
+ RegExpNode* on_success) override;
+ virtual RegExpEmpty* AsEmpty() override;
+ virtual bool IsEmpty() override;
+ virtual int min_match() override { return 0; }
+ virtual int max_match() override { return 0; }
static RegExpEmpty* GetInstance() {
static RegExpEmpty instance;
return &instance;
}
};
} } // namespace js::irregexp
--- a/js/src/irregexp/RegExpEngine.h
+++ b/js/src/irregexp/RegExpEngine.h
@@ -654,21 +654,21 @@ class SeqRegExpNode : public RegExpNode
{
public:
explicit SeqRegExpNode(RegExpNode* on_success)
: RegExpNode(on_success->alloc()), on_success_(on_success)
{}
RegExpNode* on_success() { return on_success_; }
void set_on_success(RegExpNode* node) { on_success_ = node; }
- virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode);
+ virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode) override;
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
protected:
RegExpNode* FilterSuccessor(int depth, bool ignore_case, bool unicode);
private:
RegExpNode* on_success_;
};
@@ -703,33 +703,33 @@ class ActionNode : public SeqRegExpNode
int restore_reg,
int clear_capture_count,
int clear_capture_from,
RegExpNode* on_success);
static ActionNode* EmptyMatchCheck(int start_register,
int repetition_register,
int repetition_limit,
RegExpNode* on_success);
- virtual void Accept(NodeVisitor* visitor);
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
- virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start);
+ virtual void Accept(NodeVisitor* visitor) override;
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
+ virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start) override;
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int filled_in,
- bool not_at_start) {
- return on_success()->GetQuickCheckDetails(
- details, compiler, filled_in, not_at_start);
+ bool not_at_start) override {
+ return on_success()->GetQuickCheckDetails(details, compiler, filled_in,
+ not_at_start);
}
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
ActionType action_type() { return action_type_; }
// TODO(erikcorry): We should allow some action nodes in greedy loops.
- virtual int GreedyLoopTextLength() { return kNodeIsTooComplexForGreedyLoops; }
+ virtual int GreedyLoopTextLength() override { return kNodeIsTooComplexForGreedyLoops; }
private:
union {
struct {
int reg;
int value;
} u_store_register;
struct {
@@ -771,34 +771,33 @@ class TextNode : public SeqRegExpNode
TextNode(RegExpCharacterClass* that,
RegExpNode* on_success)
: SeqRegExpNode(on_success),
elements_(alloc()->newInfallible<TextElementVector>(*alloc()))
{
elements_->append(TextElement::CharClass(that));
}
- virtual void Accept(NodeVisitor* visitor);
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
- virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start);
+ virtual void Accept(NodeVisitor* visitor) override;
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
+ virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start) override;
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int characters_filled_in,
- bool not_at_start);
+ bool not_at_start) override;
TextElementVector& elements() { return *elements_; }
void MakeCaseIndependent(bool is_latin1, bool unicode);
- virtual int GreedyLoopTextLength();
- virtual RegExpNode* GetSuccessorOfOmnivorousTextNode(
- RegExpCompiler* compiler);
+ virtual int GreedyLoopTextLength() override;
+ virtual RegExpNode* GetSuccessorOfOmnivorousTextNode(RegExpCompiler* compiler) override;
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
void CalculateOffsets();
- virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode);
+ virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode) override;
private:
enum TextEmitPassType {
NON_LATIN1_MATCH, // Check for characters that can't match.
SIMPLE_CHARACTER_MATCH, // Case-dependent single character check.
CASE_SINGLE_CHARACTER_MATCH, // Case-independent single character check.
CASE_MUTLI_CHARACTER_MATCH, // Case-independent single character with
// multiple variation.
@@ -851,27 +850,27 @@ class AssertionNode : public SeqRegExpNo
static AssertionNode* NotAfterLeadSurrogate(RegExpNode* on_success) {
return on_success->alloc()->newInfallible<AssertionNode>(NOT_AFTER_LEAD_SURROGATE,
on_success);
}
static AssertionNode* NotInSurrogatePair(RegExpNode* on_success) {
return on_success->alloc()->newInfallible<AssertionNode>(NOT_IN_SURROGATE_PAIR,
on_success);
}
- virtual void Accept(NodeVisitor* visitor);
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
- virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start);
+ virtual void Accept(NodeVisitor* visitor) override;
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
+ virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start) override;
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int filled_in,
- bool not_at_start);
+ bool not_at_start) override;
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
AssertionType assertion_type() { return assertion_type_; }
private:
void EmitBoundaryCheck(RegExpCompiler* compiler, Trace* trace);
enum IfPrevious { kIsNonWord, kIsWord };
void BacktrackIfPrevious(RegExpCompiler* compiler,
Trace* trace,
IfPrevious backtrack_if_previous);
@@ -884,64 +883,64 @@ class BackReferenceNode : public SeqRegE
BackReferenceNode(int start_reg,
int end_reg,
RegExpNode* on_success)
: SeqRegExpNode(on_success),
start_reg_(start_reg),
end_reg_(end_reg)
{}
- virtual void Accept(NodeVisitor* visitor);
+ virtual void Accept(NodeVisitor* visitor) override;
int start_register() { return start_reg_; }
- int end_register() { return end_reg_; }
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
+ virtual int end_register() { return end_reg_; }
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
virtual int EatsAtLeast(int still_to_find,
int recursion_depth,
- bool not_at_start);
+ bool not_at_start) override;
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int characters_filled_in,
- bool not_at_start) {
+ bool not_at_start) override {
}
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
private:
int start_reg_;
int end_reg_;
};
class EndNode : public RegExpNode
{
public:
enum Action { ACCEPT, BACKTRACK, NEGATIVE_SUBMATCH_SUCCESS };
explicit EndNode(LifoAlloc* alloc, Action action)
: RegExpNode(alloc), action_(action)
{}
- virtual void Accept(NodeVisitor* visitor);
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
+ virtual void Accept(NodeVisitor* visitor) override;
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
virtual int EatsAtLeast(int still_to_find,
int recursion_depth,
- bool not_at_start) { return 0; }
+ bool not_at_start) override { return 0; }
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int characters_filled_in,
- bool not_at_start)
+ bool not_at_start) override
{
// Returning 0 from EatsAtLeast should ensure we never get here.
MOZ_CRASH("Bad call");
}
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start) {
+ bool not_at_start) override {
// Returning 0 from EatsAtLeast should ensure we never get here.
MOZ_CRASH("Bad call");
}
private:
Action action_;
};
@@ -955,17 +954,17 @@ class NegativeSubmatchSuccess : public E
int clear_capture_start)
: EndNode(alloc, NEGATIVE_SUBMATCH_SUCCESS),
stack_pointer_register_(stack_pointer_reg),
current_position_register_(position_reg),
clear_capture_count_(clear_capture_count),
clear_capture_start_(clear_capture_start)
{}
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
private:
int stack_pointer_register_;
int current_position_register_;
int clear_capture_count_;
int clear_capture_start_;
};
@@ -1020,44 +1019,44 @@ class ChoiceNode : public RegExpNode
alternatives_(*alloc),
table_(nullptr),
not_at_start_(false),
being_calculated_(false)
{
alternatives_.reserve(expected_size);
}
- virtual void Accept(NodeVisitor* visitor);
+ virtual void Accept(NodeVisitor* visitor) override;
void AddAlternative(GuardedAlternative node) {
alternatives_.append(node);
}
GuardedAlternativeVector& alternatives() { return alternatives_; }
DispatchTable* GetTable(bool ignore_case);
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
- virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start);
- int EatsAtLeastHelper(int still_to_find,
- int budget,
- RegExpNode* ignore_this_node,
- bool not_at_start);
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
+ virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start) override;
+ virtual int EatsAtLeastHelper(int still_to_find,
+ int budget,
+ RegExpNode* ignore_this_node,
+ bool not_at_start);
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int characters_filled_in,
- bool not_at_start);
+ bool not_at_start) override;
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
bool being_calculated() { return being_calculated_; }
bool not_at_start() { return not_at_start_; }
void set_not_at_start() { not_at_start_ = true; }
void set_being_calculated(bool b) { being_calculated_ = b; }
virtual bool try_to_emit_quick_check_for_alternative(int i) { return true; }
- virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode);
+ virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode) override;
protected:
int GreedyLoopTextLengthForAlternative(GuardedAlternative* alternative);
GuardedAlternativeVector alternatives_;
private:
friend class Analysis;
void GenerateGuard(RegExpMacroAssembler* macro_assembler,
@@ -1084,62 +1083,62 @@ class NegativeLookaheadChoiceNode : publ
explicit NegativeLookaheadChoiceNode(LifoAlloc* alloc,
GuardedAlternative this_must_fail,
GuardedAlternative then_do_this)
: ChoiceNode(alloc, 2)
{
AddAlternative(this_must_fail);
AddAlternative(then_do_this);
}
- virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start);
+ virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start) override;
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int characters_filled_in,
- bool not_at_start);
+ bool not_at_start) override;
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
// For a negative lookahead we don't emit the quick check for the
// alternative that is expected to fail. This is because quick check code
// starts by loading enough characters for the alternative that takes fewest
// characters, but on a negative lookahead the negative branch did not take
// part in that calculation (EatsAtLeast) so the assumptions don't hold.
- virtual bool try_to_emit_quick_check_for_alternative(int i) { return i != 0; }
- virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode);
+ virtual bool try_to_emit_quick_check_for_alternative(int i) override { return i != 0; }
+ virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode) override;
};
class LoopChoiceNode : public ChoiceNode
{
public:
explicit LoopChoiceNode(LifoAlloc* alloc, bool body_can_be_zero_length)
: ChoiceNode(alloc, 2),
loop_node_(nullptr),
continue_node_(nullptr),
body_can_be_zero_length_(body_can_be_zero_length)
{}
void AddLoopAlternative(GuardedAlternative alt);
- void AddContinueAlternative(GuardedAlternative alt);
- virtual void Emit(RegExpCompiler* compiler, Trace* trace);
- virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start);
+ virtual void AddContinueAlternative(GuardedAlternative alt);
+ virtual void Emit(RegExpCompiler* compiler, Trace* trace) override;
+ virtual int EatsAtLeast(int still_to_find, int budget, bool not_at_start) override;
virtual void GetQuickCheckDetails(QuickCheckDetails* details,
RegExpCompiler* compiler,
int characters_filled_in,
- bool not_at_start);
+ bool not_at_start) override;
virtual bool FillInBMInfo(int offset,
int budget,
BoyerMooreLookahead* bm,
- bool not_at_start);
+ bool not_at_start) override;
RegExpNode* loop_node() { return loop_node_; }
RegExpNode* continue_node() { return continue_node_; }
bool body_can_be_zero_length() { return body_can_be_zero_length_; }
- virtual void Accept(NodeVisitor* visitor);
- virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode);
+ virtual void Accept(NodeVisitor* visitor) override;
+ virtual RegExpNode* FilterLATIN1(int depth, bool ignore_case, bool unicode) override;
private:
// AddAlternative is made private for loop nodes because alternatives
// should not be added freely, we need to keep track of which node
// goes back to the node itself.
void AddAlternative(GuardedAlternative node) {
ChoiceNode::AddAlternative(node);
}
@@ -1515,20 +1514,20 @@ class Analysis : public NodeVisitor
is_latin1_(is_latin1),
unicode_(unicode),
error_message_(nullptr)
{}
void EnsureAnalyzed(RegExpNode* node);
#define DECLARE_VISIT(Type) \
- virtual void Visit##Type(Type##Node* that);
+ virtual void Visit##Type(Type##Node* that) override;
FOR_EACH_NODE_TYPE(DECLARE_VISIT)
#undef DECLARE_VISIT
- virtual void VisitLoopChoice(LoopChoiceNode* that);
+ virtual void VisitLoopChoice(LoopChoiceNode* that) override;
bool has_failed() { return error_message_ != nullptr; }
const char* errorMessage() {
MOZ_ASSERT(error_message_ != nullptr);
return error_message_;
}
void failASCII(const char* error_message) {
error_message_ = error_message;
--- a/js/src/irregexp/RegExpMacroAssembler.h
+++ b/js/src/irregexp/RegExpMacroAssembler.h
@@ -225,63 +225,63 @@ CaseInsensitiveCompareUCStrings(const Ch
class MOZ_STACK_CLASS InterpretedRegExpMacroAssembler final : public RegExpMacroAssembler
{
public:
InterpretedRegExpMacroAssembler(JSContext* cx, LifoAlloc* alloc, size_t numSavedRegisters);
~InterpretedRegExpMacroAssembler();
// Inherited virtual methods.
- RegExpCode GenerateCode(JSContext* cx, bool match_only);
- void AdvanceCurrentPosition(int by);
- void AdvanceRegister(int reg, int by);
- void Backtrack();
- void Bind(jit::Label* label);
- void CheckAtStart(jit::Label* on_at_start);
- void CheckCharacter(unsigned c, jit::Label* on_equal);
- void CheckCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_equal);
- void CheckCharacterGT(char16_t limit, jit::Label* on_greater);
- void CheckCharacterLT(char16_t limit, jit::Label* on_less);
- void CheckGreedyLoop(jit::Label* on_tos_equals_current_position);
- void CheckNotAtStart(jit::Label* on_not_at_start);
- void CheckNotBackReference(int start_reg, jit::Label* on_no_match);
- void CheckNotBackReferenceIgnoreCase(int start_reg, jit::Label* on_no_match, bool unicode);
- void CheckNotCharacter(unsigned c, jit::Label* on_not_equal);
- void CheckNotCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_not_equal);
+ RegExpCode GenerateCode(JSContext* cx, bool match_only) override;
+ void AdvanceCurrentPosition(int by) override;
+ void AdvanceRegister(int reg, int by) override;
+ void Backtrack() override;
+ void Bind(jit::Label* label) override;
+ void CheckAtStart(jit::Label* on_at_start) override;
+ void CheckCharacter(unsigned c, jit::Label* on_equal) override;
+ void CheckCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_equal) override;
+ void CheckCharacterGT(char16_t limit, jit::Label* on_greater) override;
+ void CheckCharacterLT(char16_t limit, jit::Label* on_less) override;
+ void CheckGreedyLoop(jit::Label* on_tos_equals_current_position) override;
+ void CheckNotAtStart(jit::Label* on_not_at_start) override;
+ void CheckNotBackReference(int start_reg, jit::Label* on_no_match) override;
+ void CheckNotBackReferenceIgnoreCase(int start_reg, jit::Label* on_no_match, bool unicode) override;
+ void CheckNotCharacter(unsigned c, jit::Label* on_not_equal) override;
+ void CheckNotCharacterAfterAnd(unsigned c, unsigned and_with, jit::Label* on_not_equal) override;
void CheckNotCharacterAfterMinusAnd(char16_t c, char16_t minus, char16_t and_with,
- jit::Label* on_not_equal);
+ jit::Label* on_not_equal) override;
void CheckCharacterInRange(char16_t from, char16_t to,
- jit::Label* on_in_range);
+ jit::Label* on_in_range) override;
void CheckCharacterNotInRange(char16_t from, char16_t to,
- jit::Label* on_not_in_range);
- void CheckBitInTable(RegExpShared::JitCodeTable table, jit::Label* on_bit_set);
- void JumpOrBacktrack(jit::Label* to);
- void Fail();
- void IfRegisterGE(int reg, int comparand, jit::Label* if_ge);
- void IfRegisterLT(int reg, int comparand, jit::Label* if_lt);
- void IfRegisterEqPos(int reg, jit::Label* if_eq);
+ jit::Label* on_not_in_range) override;
+ void CheckBitInTable(RegExpShared::JitCodeTable table, jit::Label* on_bit_set) override;
+ void JumpOrBacktrack(jit::Label* to) override;
+ void Fail() override;
+ void IfRegisterGE(int reg, int comparand, jit::Label* if_ge) override;
+ void IfRegisterLT(int reg, int comparand, jit::Label* if_lt) override;
+ void IfRegisterEqPos(int reg, jit::Label* if_eq) override;
void LoadCurrentCharacter(int cp_offset, jit::Label* on_end_of_input,
- bool check_bounds = true, int characters = 1);
- void PopCurrentPosition();
- void PopRegister(int register_index);
- void PushCurrentPosition();
- void PushRegister(int register_index, StackCheckFlag check_stack_limit);
- void ReadCurrentPositionFromRegister(int reg);
- void ReadBacktrackStackPointerFromRegister(int reg);
- void SetCurrentPositionFromEnd(int by);
- void SetRegister(int register_index, int to);
- bool Succeed();
- void WriteCurrentPositionToRegister(int reg, int cp_offset);
- void ClearRegisters(int reg_from, int reg_to);
- void WriteBacktrackStackPointerToRegister(int reg);
- void PushBacktrack(jit::Label* label);
- void BindBacktrack(jit::Label* label);
+ bool check_bounds = true, int characters = 1) override;
+ void PopCurrentPosition() override;
+ void PopRegister(int register_index) override;
+ void PushCurrentPosition() override;
+ void PushRegister(int register_index, StackCheckFlag check_stack_limit) override;
+ void ReadCurrentPositionFromRegister(int reg) override;
+ void ReadBacktrackStackPointerFromRegister(int reg) override;
+ void SetCurrentPositionFromEnd(int by) override;
+ void SetRegister(int register_index, int to) override;
+ bool Succeed() override;
+ void WriteCurrentPositionToRegister(int reg, int cp_offset) override;
+ void ClearRegisters(int reg_from, int reg_to) override;
+ void WriteBacktrackStackPointerToRegister(int reg) override;
+ void PushBacktrack(jit::Label* label) override;
+ void BindBacktrack(jit::Label* label) override;
// The byte-code interpreter checks on each push anyway.
- int stack_limit_slack() { return 1; }
+ int stack_limit_slack() override { return 1; }
private:
void Expand();
// Code and bitmap emission.
void EmitOrLink(jit::Label* label);
void Emit32(uint32_t x);
void Emit16(uint32_t x);
--- a/js/src/jit/BaselineIC.h
+++ b/js/src/jit/BaselineIC.h
@@ -36,24 +36,24 @@ class ICWarmUpCounter_Fallback : public
explicit ICWarmUpCounter_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::WarmUpCounter_Fallback, stubCode)
{ }
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::WarmUpCounter_Fallback, Engine::Baseline)
{ }
- ICWarmUpCounter_Fallback* getStub(ICStubSpace* space) {
+ ICWarmUpCounter_Fallback* getStub(ICStubSpace* space) override {
return newStub<ICWarmUpCounter_Fallback>(space, getStubCode());
}
};
};
// TypeUpdate
@@ -68,57 +68,57 @@ class ICTypeUpdate_Fallback : public ICS
explicit ICTypeUpdate_Fallback(JitCode* stubCode)
: ICStub(ICStub::TypeUpdate_Fallback, stubCode)
{}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::TypeUpdate_Fallback, Engine::Baseline)
{ }
- ICTypeUpdate_Fallback* getStub(ICStubSpace* space) {
+ ICTypeUpdate_Fallback* getStub(ICStubSpace* space) override {
return newStub<ICTypeUpdate_Fallback>(space, getStubCode());
}
};
};
class ICTypeUpdate_PrimitiveSet : public TypeCheckPrimitiveSetStub
{
friend class ICStubSpace;
ICTypeUpdate_PrimitiveSet(JitCode* stubCode, uint16_t flags)
: TypeCheckPrimitiveSetStub(TypeUpdate_PrimitiveSet, stubCode, flags)
{}
public:
class Compiler : public TypeCheckPrimitiveSetStub::Compiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, ICTypeUpdate_PrimitiveSet* existingStub, JSValueType type)
: TypeCheckPrimitiveSetStub::Compiler(cx, TypeUpdate_PrimitiveSet,
existingStub, type)
{}
ICTypeUpdate_PrimitiveSet* updateStub() {
TypeCheckPrimitiveSetStub* stub =
this->TypeCheckPrimitiveSetStub::Compiler::updateStub();
if (!stub)
return nullptr;
return stub->toUpdateStub();
}
- ICTypeUpdate_PrimitiveSet* getStub(ICStubSpace* space) {
+ ICTypeUpdate_PrimitiveSet* getStub(ICStubSpace* space) override {
MOZ_ASSERT(!existingStub_);
return newStub<ICTypeUpdate_PrimitiveSet>(space, getStubCode(), flags_);
}
};
};
// Type update stub to handle a singleton object.
class ICTypeUpdate_SingleObject : public ICStub
@@ -136,25 +136,25 @@ class ICTypeUpdate_SingleObject : public
static size_t offsetOfObject() {
return offsetof(ICTypeUpdate_SingleObject, obj_);
}
class Compiler : public ICStubCompiler {
protected:
HandleObject obj_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, HandleObject obj)
: ICStubCompiler(cx, TypeUpdate_SingleObject, Engine::Baseline),
obj_(obj)
{ }
- ICTypeUpdate_SingleObject* getStub(ICStubSpace* space) {
+ ICTypeUpdate_SingleObject* getStub(ICStubSpace* space) override {
return newStub<ICTypeUpdate_SingleObject>(space, getStubCode(), obj_);
}
};
};
// Type update stub to handle a single ObjectGroup.
class ICTypeUpdate_ObjectGroup : public ICStub
{
@@ -171,49 +171,49 @@ class ICTypeUpdate_ObjectGroup : public
static size_t offsetOfGroup() {
return offsetof(ICTypeUpdate_ObjectGroup, group_);
}
class Compiler : public ICStubCompiler {
protected:
HandleObjectGroup group_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, HandleObjectGroup group)
: ICStubCompiler(cx, TypeUpdate_ObjectGroup, Engine::Baseline),
group_(group)
{ }
- ICTypeUpdate_ObjectGroup* getStub(ICStubSpace* space) {
+ ICTypeUpdate_ObjectGroup* getStub(ICStubSpace* space) override {
return newStub<ICTypeUpdate_ObjectGroup>(space, getStubCode(), group_);
}
};
};
class ICTypeUpdate_AnyValue : public ICStub
{
friend class ICStubSpace;
explicit ICTypeUpdate_AnyValue(JitCode* stubCode)
: ICStub(TypeUpdate_AnyValue, stubCode)
{}
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, TypeUpdate_AnyValue, Engine::Baseline)
{}
- ICTypeUpdate_AnyValue* getStub(ICStubSpace* space) {
+ ICTypeUpdate_AnyValue* getStub(ICStubSpace* space) override {
return newStub<ICTypeUpdate_AnyValue>(space, getStubCode());
}
};
};
// ToBool
// JSOP_IFNE
@@ -225,138 +225,138 @@ class ICToBool_Fallback : public ICFallb
: ICFallbackStub(ICStub::ToBool_Fallback, stubCode) {}
public:
static const uint32_t MAX_OPTIMIZED_STUBS = 8;
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToBool_Fallback, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToBool_Fallback>(space, getStubCode());
}
};
};
class ICToBool_Int32 : public ICStub
{
friend class ICStubSpace;
explicit ICToBool_Int32(JitCode* stubCode)
: ICStub(ICStub::ToBool_Int32, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToBool_Int32, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToBool_Int32>(space, getStubCode());
}
};
};
class ICToBool_String : public ICStub
{
friend class ICStubSpace;
explicit ICToBool_String(JitCode* stubCode)
: ICStub(ICStub::ToBool_String, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToBool_String, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToBool_String>(space, getStubCode());
}
};
};
class ICToBool_NullUndefined : public ICStub
{
friend class ICStubSpace;
explicit ICToBool_NullUndefined(JitCode* stubCode)
: ICStub(ICStub::ToBool_NullUndefined, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToBool_NullUndefined, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToBool_NullUndefined>(space, getStubCode());
}
};
};
class ICToBool_Double : public ICStub
{
friend class ICStubSpace;
explicit ICToBool_Double(JitCode* stubCode)
: ICStub(ICStub::ToBool_Double, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToBool_Double, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToBool_Double>(space, getStubCode());
}
};
};
class ICToBool_Object : public ICStub
{
friend class ICStubSpace;
explicit ICToBool_Object(JitCode* stubCode)
: ICStub(ICStub::ToBool_Object, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToBool_Object, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToBool_Object>(space, getStubCode());
}
};
};
// ToNumber
// JSOP_POS
@@ -366,23 +366,23 @@ class ICToNumber_Fallback : public ICFal
explicit ICToNumber_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::ToNumber_Fallback, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::ToNumber_Fallback, Engine::Baseline) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICToNumber_Fallback>(space, getStubCode());
}
};
};
// GetElem
// JSOP_GETELEM
// JSOP_GETELEM_SUPER
@@ -411,31 +411,31 @@ class ICGetElem_Fallback : public ICMoni
bool hadUnoptimizableAccess() const {
return extra_ & EXTRA_UNOPTIMIZABLE_ACCESS;
}
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
bool hasReceiver_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(hasReceiver_) << 17);
}
public:
explicit Compiler(JSContext* cx, bool hasReceiver = false)
: ICStubCompiler(cx, ICStub::GetElem_Fallback, Engine::Baseline),
hasReceiver_(hasReceiver)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICGetElem_Fallback>(space, getStubCode());
}
};
};
// SetElem
// JSOP_SETELEM
// JSOP_INITELEM
@@ -456,24 +456,24 @@ class ICSetElem_Fallback : public ICFall
bool hasDenseAdd() const { return extra_ & HasDenseAddFlag; }
void noteHasTypedArrayOOB() { extra_ |= HasTypedArrayOOBFlag; }
bool hasTypedArrayOOB() const { return extra_ & HasTypedArrayOOBFlag; }
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::SetElem_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICSetElem_Fallback>(space, getStubCode());
}
};
};
// In
// JSOP_IN
class ICIn_Fallback : public ICFallbackStub
@@ -482,24 +482,24 @@ class ICIn_Fallback : public ICFallbackS
explicit ICIn_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::In_Fallback, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::In_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICIn_Fallback>(space, getStubCode());
}
};
};
// HasOwn
// JSOP_HASOWN
class ICHasOwn_Fallback : public ICFallbackStub
@@ -508,24 +508,24 @@ class ICHasOwn_Fallback : public ICFallb
explicit ICHasOwn_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::HasOwn_Fallback, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::HasOwn_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICHasOwn_Fallback>(space, getStubCode());
}
};
};
// GetName
// JSOP_GETNAME
// JSOP_GETGNAME
@@ -544,24 +544,24 @@ class ICGetName_Fallback : public ICMoni
extra_ |= (1u << UNOPTIMIZABLE_ACCESS_BIT);
}
bool hadUnoptimizableAccess() const {
return extra_ & (1u << UNOPTIMIZABLE_ACCESS_BIT);
}
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::GetName_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICGetName_Fallback>(space, getStubCode());
}
};
};
// BindName
// JSOP_BINDNAME
class ICBindName_Fallback : public ICFallbackStub
@@ -570,24 +570,24 @@ class ICBindName_Fallback : public ICFal
explicit ICBindName_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::BindName_Fallback, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::BindName_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBindName_Fallback>(space, getStubCode());
}
};
};
// GetIntrinsic
// JSOP_GETINTRINSIC
class ICGetIntrinsic_Fallback : public ICMonitoredFallbackStub
@@ -596,24 +596,24 @@ class ICGetIntrinsic_Fallback : public I
explicit ICGetIntrinsic_Fallback(JitCode* stubCode)
: ICMonitoredFallbackStub(ICStub::GetIntrinsic_Fallback, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::GetIntrinsic_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICGetIntrinsic_Fallback>(space, getStubCode());
}
};
};
// Stub that loads the constant result of a GETINTRINSIC operation.
class ICGetIntrinsic_Constant : public ICStub
{
@@ -628,27 +628,27 @@ class ICGetIntrinsic_Constant : public I
GCPtrValue& value() {
return value_;
}
static size_t offsetOfValue() {
return offsetof(ICGetIntrinsic_Constant, value_);
}
class Compiler : public ICStubCompiler {
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
HandleValue value_;
public:
Compiler(JSContext* cx, HandleValue value)
: ICStubCompiler(cx, ICStub::GetIntrinsic_Constant, Engine::Baseline),
value_(value)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICGetIntrinsic_Constant>(space, getStubCode(), value_);
}
};
};
// SetProp
// JSOP_SETPROP
// JSOP_SETNAME
@@ -670,25 +670,25 @@ class ICSetProp_Fallback : public ICFall
}
bool hadUnoptimizableAccess() const {
return extra_ & (1u << UNOPTIMIZABLE_ACCESS_BIT);
}
class Compiler : public ICStubCompiler {
protected:
CodeOffset bailoutReturnOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
- void postGenerateStubCode(MacroAssembler& masm, Handle<JitCode*> code);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+ void postGenerateStubCode(MacroAssembler& masm, Handle<JitCode*> code) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::SetProp_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICSetProp_Fallback>(space, getStubCode());
}
};
};
// Call
// JSOP_CALL
// JSOP_CALL_IGNORES_RV
@@ -755,34 +755,34 @@ class ICCall_Fallback : public ICMonitor
}
// Compiler for this stub kind.
class Compiler : public ICCallStubCompiler {
protected:
bool isConstructing_;
bool isSpread_;
CodeOffset bailoutReturnOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
- void postGenerateStubCode(MacroAssembler& masm, Handle<JitCode*> code);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+ void postGenerateStubCode(MacroAssembler& masm, Handle<JitCode*> code) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(isSpread_) << 17) |
(static_cast<int32_t>(isConstructing_) << 18);
}
public:
Compiler(JSContext* cx, bool isConstructing, bool isSpread)
: ICCallStubCompiler(cx, ICStub::Call_Fallback),
isConstructing_(isConstructing),
isSpread_(isSpread)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_Fallback>(space, getStubCode());
}
};
};
class ICCall_Scripted : public ICMonitoredStub
{
friend class ICStubSpace;
@@ -845,19 +845,19 @@ class ICCall_AnyScripted : public ICMoni
class ICCallScriptedCompiler : public ICCallStubCompiler {
protected:
ICStub* firstMonitorStub_;
bool isConstructing_;
bool isSpread_;
RootedFunction callee_;
RootedObject templateObject_;
uint32_t pcOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(isConstructing_) << 17) |
(static_cast<int32_t>(isSpread_) << 18);
}
public:
ICCallScriptedCompiler(JSContext* cx, ICStub* firstMonitorStub,
@@ -878,17 +878,17 @@ class ICCallScriptedCompiler : public IC
firstMonitorStub_(firstMonitorStub),
isConstructing_(isConstructing),
isSpread_(isSpread),
callee_(cx, nullptr),
templateObject_(cx, nullptr),
pcOffset_(pcOffset)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
if (callee_) {
return newStub<ICCall_Scripted>(space, getStubCode(), firstMonitorStub_, callee_,
templateObject_, pcOffset_);
}
return newStub<ICCall_AnyScripted>(space, getStubCode(), firstMonitorStub_, pcOffset_);
}
};
@@ -938,19 +938,19 @@ class ICCall_Native : public ICMonitored
protected:
ICStub* firstMonitorStub_;
bool isConstructing_;
bool ignoresReturnValue_;
bool isSpread_;
RootedFunction callee_;
RootedObject templateObject_;
uint32_t pcOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(isSpread_) << 17) |
(static_cast<int32_t>(isConstructing_) << 18) |
(static_cast<int32_t>(ignoresReturnValue_) << 19);
}
public:
@@ -962,17 +962,17 @@ class ICCall_Native : public ICMonitored
isConstructing_(isConstructing),
ignoresReturnValue_(ignoresReturnValue),
isSpread_(isSpread),
callee_(cx, callee),
templateObject_(cx, templateObject),
pcOffset_(pcOffset)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_Native>(space, getStubCode(), firstMonitorStub_, callee_,
templateObject_, pcOffset_);
}
};
};
class ICCall_ClassHook : public ICMonitoredStub
{
@@ -1016,19 +1016,19 @@ class ICCall_ClassHook : public ICMonito
class Compiler : public ICCallStubCompiler {
protected:
ICStub* firstMonitorStub_;
bool isConstructing_;
const Class* clasp_;
Native native_;
RootedObject templateObject_;
uint32_t pcOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(isConstructing_) << 17);
}
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub,
const Class* clasp, Native native,
@@ -1038,17 +1038,17 @@ class ICCall_ClassHook : public ICMonito
firstMonitorStub_(firstMonitorStub),
isConstructing_(isConstructing),
clasp_(clasp),
native_(native),
templateObject_(cx, templateObject),
pcOffset_(pcOffset)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_ClassHook>(space, getStubCode(), firstMonitorStub_, clasp_,
native_, templateObject_, pcOffset_);
}
};
};
class ICCall_ScriptedApplyArray : public ICMonitoredStub
{
@@ -1077,31 +1077,31 @@ class ICCall_ScriptedApplyArray : public
return offsetof(ICCall_ScriptedApplyArray, pcOffset_);
}
// Compiler for this stub kind.
class Compiler : public ICCallStubCompiler {
protected:
ICStub* firstMonitorStub_;
uint32_t pcOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1);
}
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub, uint32_t pcOffset)
: ICCallStubCompiler(cx, ICStub::Call_ScriptedApplyArray),
firstMonitorStub_(firstMonitorStub),
pcOffset_(pcOffset)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_ScriptedApplyArray>(space, getStubCode(), firstMonitorStub_,
pcOffset_);
}
};
};
class ICCall_ScriptedApplyArguments : public ICMonitoredStub
{
@@ -1125,31 +1125,31 @@ class ICCall_ScriptedApplyArguments : pu
return offsetof(ICCall_ScriptedApplyArguments, pcOffset_);
}
// Compiler for this stub kind.
class Compiler : public ICCallStubCompiler {
protected:
ICStub* firstMonitorStub_;
uint32_t pcOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1);
}
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub, uint32_t pcOffset)
: ICCallStubCompiler(cx, ICStub::Call_ScriptedApplyArguments),
firstMonitorStub_(firstMonitorStub),
pcOffset_(pcOffset)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_ScriptedApplyArguments>(space, getStubCode(), firstMonitorStub_,
pcOffset_);
}
};
};
// Handles calls of the form |fun.call(...)| where fun is a scripted function.
class ICCall_ScriptedFunCall : public ICMonitoredStub
@@ -1172,31 +1172,31 @@ class ICCall_ScriptedFunCall : public IC
return offsetof(ICCall_ScriptedFunCall, pcOffset_);
}
// Compiler for this stub kind.
class Compiler : public ICCallStubCompiler {
protected:
ICStub* firstMonitorStub_;
uint32_t pcOffset_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1);
}
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub, uint32_t pcOffset)
: ICCallStubCompiler(cx, ICStub::Call_ScriptedFunCall),
firstMonitorStub_(firstMonitorStub),
pcOffset_(pcOffset)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_ScriptedFunCall>(space, getStubCode(), firstMonitorStub_,
pcOffset_);
}
};
};
class ICCall_ConstStringSplit : public ICMonitoredStub
{
@@ -1243,35 +1243,35 @@ class ICCall_ConstStringSplit : public I
class Compiler : public ICCallStubCompiler {
protected:
ICStub* firstMonitorStub_;
uint32_t pcOffset_;
RootedString expectedStr_;
RootedString expectedSep_;
RootedArrayObject templateObject_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1);
}
public:
Compiler(JSContext* cx, ICStub* firstMonitorStub, uint32_t pcOffset, HandleString str,
HandleString sep, HandleArrayObject templateObject)
: ICCallStubCompiler(cx, ICStub::Call_ConstStringSplit),
firstMonitorStub_(firstMonitorStub),
pcOffset_(pcOffset),
expectedStr_(cx, str),
expectedSep_(cx, sep),
templateObject_(cx, templateObject)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_ConstStringSplit>(space, getStubCode(), firstMonitorStub_,
pcOffset_, expectedStr_, expectedSep_,
templateObject_);
}
};
};
class ICCall_IsSuspendedGenerator : public ICStub
@@ -1281,23 +1281,23 @@ class ICCall_IsSuspendedGenerator : publ
protected:
explicit ICCall_IsSuspendedGenerator(JitCode* stubCode)
: ICStub(ICStub::Call_IsSuspendedGenerator, stubCode)
{}
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::Call_IsSuspendedGenerator, Engine::Baseline)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCall_IsSuspendedGenerator>(space, getStubCode());
}
};
};
// Stub for performing a TableSwitch, updating the IC's return address to jump
// to whatever point the switch is branching to.
class ICTableSwitch : public ICStub
@@ -1315,49 +1315,49 @@ class ICTableSwitch : public ICStub
: ICStub(TableSwitch, stubCode), table_(table),
min_(min), length_(length), defaultTarget_(defaultTarget)
{}
public:
void fixupJumpTable(JSScript* script, BaselineScript* baseline);
class Compiler : public ICStubCompiler {
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
jsbytecode* pc_;
public:
Compiler(JSContext* cx, jsbytecode* pc)
: ICStubCompiler(cx, ICStub::TableSwitch, Engine::Baseline), pc_(pc)
{}
- ICStub* getStub(ICStubSpace* space);
+ ICStub* getStub(ICStubSpace* space) override;
};
};
// IC for constructing an iterator from an input value.
class ICGetIterator_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
explicit ICGetIterator_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::GetIterator_Fallback, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::GetIterator_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICGetIterator_Fallback>(space, getStubCode());
}
};
};
// IC for testing if there are more values in an iterator.
class ICIteratorMore_Fallback : public ICFallbackStub
{
@@ -1373,24 +1373,24 @@ class ICIteratorMore_Fallback : public I
}
bool hasNonStringResult() const {
MOZ_ASSERT(extra_ <= 1);
return extra_;
}
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::IteratorMore_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICIteratorMore_Fallback>(space, getStubCode());
}
};
};
// IC for testing if there are more values in a native iterator.
class ICIteratorMore_Native : public ICStub
{
@@ -1398,24 +1398,24 @@ class ICIteratorMore_Native : public ICS
explicit ICIteratorMore_Native(JitCode* stubCode)
: ICStub(ICStub::IteratorMore_Native, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::IteratorMore_Native, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICIteratorMore_Native>(space, getStubCode());
}
};
};
// IC for closing an iterator.
class ICIteratorClose_Fallback : public ICFallbackStub
{
@@ -1423,24 +1423,24 @@ class ICIteratorClose_Fallback : public
explicit ICIteratorClose_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::IteratorClose_Fallback, stubCode)
{ }
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::IteratorClose_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICIteratorClose_Fallback>(space, getStubCode());
}
};
};
// InstanceOf
// JSOP_INSTANCEOF
class ICInstanceOf_Fallback : public ICFallbackStub
@@ -1460,24 +1460,24 @@ class ICInstanceOf_Fallback : public ICF
extra_ |= UNOPTIMIZABLE_ACCESS_BIT;
}
bool hadUnoptimizableAccess() const {
return extra_ & UNOPTIMIZABLE_ACCESS_BIT;
}
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::InstanceOf_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICInstanceOf_Fallback>(space, getStubCode());
}
};
};
class ICInstanceOf_Function : public ICStub
{
friend class ICStubSpace;
@@ -1509,27 +1509,27 @@ class ICInstanceOf_Function : public ICS
}
class Compiler : public ICStubCompiler {
RootedShape shape_;
RootedObject prototypeObj_;
uint32_t slot_;
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, Shape* shape, JSObject* prototypeObj, uint32_t slot)
: ICStubCompiler(cx, ICStub::InstanceOf_Function, Engine::Baseline),
shape_(cx, shape),
prototypeObj_(cx, prototypeObj),
slot_(slot)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICInstanceOf_Function>(space, getStubCode(), shape_, prototypeObj_,
slot_);
}
};
};
// TypeOf
// JSOP_TYPEOF
@@ -1542,24 +1542,24 @@ class ICTypeOf_Fallback : public ICFallb
: ICFallbackStub(ICStub::TypeOf_Fallback, stubCode)
{ }
public:
static const uint32_t MAX_OPTIMIZED_STUBS = 6;
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::TypeOf_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICTypeOf_Fallback>(space, getStubCode());
}
};
};
class ICRest_Fallback : public ICFallbackStub
{
friend class ICStubSpace;
@@ -1575,25 +1575,25 @@ class ICRest_Fallback : public ICFallbac
GCPtrArrayObject& templateObject() {
return templateObject_;
}
class Compiler : public ICStubCompiler {
protected:
RootedArrayObject templateObject;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, ArrayObject* templateObject)
: ICStubCompiler(cx, ICStub::Rest_Fallback, Engine::Baseline),
templateObject(cx, templateObject)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICRest_Fallback>(space, getStubCode(), templateObject);
}
};
};
// Stub for JSOP_RETSUB ("returning" from a |finally| block).
class ICRetSub_Fallback : public ICFallbackStub
{
@@ -1603,24 +1603,24 @@ class ICRetSub_Fallback : public ICFallb
: ICFallbackStub(ICStub::RetSub_Fallback, stubCode)
{ }
public:
static const uint32_t MAX_OPTIMIZED_STUBS = 8;
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, ICStub::RetSub_Fallback, Engine::Baseline)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICRetSub_Fallback>(space, getStubCode());
}
};
};
// Optimized JSOP_RETSUB stub. Every stub maps a single pc offset to its
// native code address.
class ICRetSub_Resume : public ICStub
@@ -1644,26 +1644,26 @@ class ICRetSub_Resume : public ICStub
static size_t offsetOfAddr() {
return offsetof(ICRetSub_Resume, addr_);
}
class Compiler : public ICStubCompiler {
uint32_t pcOffset_;
uint8_t* addr_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, uint32_t pcOffset, uint8_t* addr)
: ICStubCompiler(cx, ICStub::RetSub_Resume, Engine::Baseline),
pcOffset_(pcOffset),
addr_(addr)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICRetSub_Resume>(space, getStubCode(), pcOffset_, addr_);
}
};
};
inline bool
IsCacheableDOMProxy(JSObject* obj)
{
--- a/js/src/jit/CodeGenerator.cpp
+++ b/js/src/jit/CodeGenerator.cpp
@@ -81,32 +81,32 @@ class OutOfLineICFallback : public OutOf
public:
OutOfLineICFallback(LInstruction* lir, size_t cacheIndex, size_t cacheInfoIndex)
: lir_(lir),
cacheIndex_(cacheIndex),
cacheInfoIndex_(cacheInfoIndex)
{ }
- void bind(MacroAssembler* masm) {
+ void bind(MacroAssembler* masm) override {
// The binding of the initial jump is done in
// CodeGenerator::visitOutOfLineICFallback.
}
size_t cacheIndex() const {
return cacheIndex_;
}
size_t cacheInfoIndex() const {
return cacheInfoIndex_;
}
LInstruction* lir() const {
return lir_;
}
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineICFallback(this);
}
};
void
CodeGeneratorShared::addIC(LInstruction* lir, size_t cacheIndex)
{
if (cacheIndex == SIZE_MAX) {
@@ -1930,17 +1930,17 @@ class OutOfLineRegExpMatcher : public Ou
{
LRegExpMatcher* lir_;
public:
explicit OutOfLineRegExpMatcher(LRegExpMatcher* lir)
: lir_(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineRegExpMatcher(this);
}
LRegExpMatcher* lir() const {
return lir_;
}
};
@@ -2087,17 +2087,17 @@ class OutOfLineRegExpSearcher : public O
{
LRegExpSearcher* lir_;
public:
explicit OutOfLineRegExpSearcher(LRegExpSearcher* lir)
: lir_(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineRegExpSearcher(this);
}
LRegExpSearcher* lir() const {
return lir_;
}
};
@@ -2235,17 +2235,17 @@ class OutOfLineRegExpTester : public Out
{
LRegExpTester* lir_;
public:
explicit OutOfLineRegExpTester(LRegExpTester* lir)
: lir_(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineRegExpTester(this);
}
LRegExpTester* lir() const {
return lir_;
}
};
@@ -2299,17 +2299,17 @@ class OutOfLineRegExpPrototypeOptimizabl
{
LRegExpPrototypeOptimizable* ins_;
public:
explicit OutOfLineRegExpPrototypeOptimizable(LRegExpPrototypeOptimizable* ins)
: ins_(ins)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineRegExpPrototypeOptimizable(this);
}
LRegExpPrototypeOptimizable* ins() const {
return ins_;
}
};
void
@@ -2360,17 +2360,17 @@ class OutOfLineRegExpInstanceOptimizable
{
LRegExpInstanceOptimizable* ins_;
public:
explicit OutOfLineRegExpInstanceOptimizable(LRegExpInstanceOptimizable* ins)
: ins_(ins)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineRegExpInstanceOptimizable(this);
}
LRegExpInstanceOptimizable* ins() const {
return ins_;
}
};
void
@@ -2685,17 +2685,17 @@ class OutOfLineLambdaArrow : public OutO
public:
LLambdaArrow* lir;
Label entryNoPop_;
explicit OutOfLineLambdaArrow(LLambdaArrow* lir)
: lir(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineLambdaArrow(this);
}
Label* entryNoPop() {
return &entryNoPop_;
}
};
@@ -2860,17 +2860,17 @@ class OutOfLineInterruptCheckImplicit :
public:
LBlock* block;
LInterruptCheck* lir;
OutOfLineInterruptCheckImplicit(LBlock* block, LInterruptCheck* lir)
: block(block), lir(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineInterruptCheckImplicit(this);
}
};
typedef bool (*InterruptCheckFn)(JSContext*);
static const VMFunction InterruptCheckInfo =
FunctionInfo<InterruptCheckFn>(InterruptCheck, "InterruptCheck");
@@ -3716,17 +3716,17 @@ class OutOfLineCallPostWriteBarrier : pu
LInstruction* lir_;
const LAllocation* object_;
public:
OutOfLineCallPostWriteBarrier(LInstruction* lir, const LAllocation* object)
: lir_(lir), object_(object)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineCallPostWriteBarrier(this);
}
LInstruction* lir() const {
return lir_;
}
const LAllocation* object() const {
return object_;
@@ -3928,17 +3928,17 @@ class OutOfLineCallPostWriteElementBarri
public:
OutOfLineCallPostWriteElementBarrier(LInstruction* lir, const LAllocation* object,
const LAllocation* index)
: lir_(lir),
object_(object),
index_(index)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineCallPostWriteElementBarrier(this);
}
LInstruction* lir() const {
return lir_;
}
const LAllocation* object() const {
@@ -4930,17 +4930,17 @@ class CheckOverRecursedFailure : public
{
LInstruction* lir_;
public:
explicit CheckOverRecursedFailure(LInstruction* lir)
: lir_(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitCheckOverRecursedFailure(this);
}
LInstruction* lir() const {
return lir_;
}
};
@@ -5532,17 +5532,17 @@ class OutOfLineNewArray : public OutOfLi
{
LNewArray* lir_;
public:
explicit OutOfLineNewArray(LNewArray* lir)
: lir_(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineNewArray(this);
}
LNewArray* lir() const {
return lir_;
}
};
@@ -5850,17 +5850,17 @@ class OutOfLineNewObject : public OutOfL
{
LNewObject* lir_;
public:
explicit OutOfLineNewObject(LNewObject* lir)
: lir_(lir)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineNewObject(this);
}
LNewObject* lir() const {
return lir_;
}
};
@@ -8517,17 +8517,17 @@ class OutOfLineStoreElementHole : public
public:
explicit OutOfLineStoreElementHole(LInstruction* ins, bool strict)
: ins_(ins), strict_(strict)
{
MOZ_ASSERT(ins->isStoreElementHoleV() || ins->isStoreElementHoleT() ||
ins->isFallibleStoreElementV() || ins->isFallibleStoreElementT());
}
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineStoreElementHole(this);
}
LInstruction* ins() const {
return ins_;
}
Label* rejoinStore() {
return &rejoinStore_;
}
@@ -9969,17 +9969,17 @@ class OutOfLineUnboxFloatingPoint : publ
{
LUnboxFloatingPoint* unboxFloatingPoint_;
public:
explicit OutOfLineUnboxFloatingPoint(LUnboxFloatingPoint* unboxFloatingPoint)
: unboxFloatingPoint_(unboxFloatingPoint)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineUnboxFloatingPoint(this);
}
LUnboxFloatingPoint* unboxFloatingPoint() const {
return unboxFloatingPoint_;
}
};
@@ -10487,17 +10487,17 @@ class OutOfLineTypeOfV : public OutOfLin
{
LTypeOfV* ins_;
public:
explicit OutOfLineTypeOfV(LTypeOfV* ins)
: ins_(ins)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineTypeOfV(this);
}
LTypeOfV* ins() const {
return ins_;
}
};
void
@@ -10980,17 +10980,17 @@ class OutOfLineSwitch : public OutOfLine
{
using LabelsVector = Vector<Label, 0, JitAllocPolicy>;
using CodeLabelsVector = Vector<CodeLabel, 0, JitAllocPolicy>;
LabelsVector labels_;
CodeLabelsVector codeLabels_;
CodeLabel start_;
bool isOutOfLine_;
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineSwitch(this);
}
public:
explicit OutOfLineSwitch(TempAllocator& alloc)
: labels_(alloc),
codeLabels_(alloc),
isOutOfLine_(false)
@@ -11765,17 +11765,17 @@ class OutOfLineIsCallable : public OutOf
Register object_;
Register output_;
public:
OutOfLineIsCallable(Register object, Register output)
: object_(object), output_(output)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineIsCallable(this);
}
Register object() const {
return object_;
}
Register output() const {
return output_;
}
@@ -11915,17 +11915,17 @@ class OutOfLineIsConstructor : public Ou
{
LIsConstructor* ins_;
public:
explicit OutOfLineIsConstructor(LIsConstructor* ins)
: ins_(ins)
{ }
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineIsConstructor(this);
}
LIsConstructor* ins() const {
return ins_;
}
};
void
@@ -12699,17 +12699,17 @@ class OutOfLineNaNToZero : public OutOfL
{
LNaNToZero* lir_;
public:
explicit OutOfLineNaNToZero(LNaNToZero* lir)
: lir_(lir)
{}
- void accept(CodeGenerator* codegen) {
+ void accept(CodeGenerator* codegen) override {
codegen->visitOutOfLineNaNToZero(this);
}
LNaNToZero* lir() const {
return lir_;
}
};
void
--- a/js/src/jit/CodeGenerator.h
+++ b/js/src/jit/CodeGenerator.h
@@ -74,396 +74,396 @@ class CodeGenerator final : public CodeG
public:
MOZ_MUST_USE bool generate();
MOZ_MUST_USE bool generateWasm(wasm::SigIdDesc sigId, wasm::BytecodeOffset trapOffset,
wasm::FuncOffsets* offsets);
MOZ_MUST_USE bool link(JSContext* cx, CompilerConstraintList* constraints);
MOZ_MUST_USE bool linkSharedStubs(JSContext* cx);
- void visitOsiPoint(LOsiPoint* lir);
- void visitGoto(LGoto* lir);
- void visitTableSwitch(LTableSwitch* ins);
- void visitTableSwitchV(LTableSwitchV* ins);
- void visitCloneLiteral(LCloneLiteral* lir);
- void visitParameter(LParameter* lir);
- void visitCallee(LCallee* lir);
- void visitIsConstructing(LIsConstructing* lir);
- void visitStart(LStart* lir);
- void visitReturn(LReturn* ret);
- void visitDefVar(LDefVar* lir);
- void visitDefLexical(LDefLexical* lir);
- void visitDefFun(LDefFun* lir);
- void visitOsrEntry(LOsrEntry* lir);
- void visitOsrEnvironmentChain(LOsrEnvironmentChain* lir);
- void visitOsrValue(LOsrValue* lir);
- void visitOsrReturnValue(LOsrReturnValue* lir);
- void visitOsrArgumentsObject(LOsrArgumentsObject* lir);
- void visitStackArgT(LStackArgT* lir);
- void visitStackArgV(LStackArgV* lir);
- void visitMoveGroup(LMoveGroup* group);
- void visitValueToInt32(LValueToInt32* lir);
- void visitValueToDouble(LValueToDouble* lir);
- void visitValueToFloat32(LValueToFloat32* lir);
- void visitFloat32ToDouble(LFloat32ToDouble* lir);
- void visitDoubleToFloat32(LDoubleToFloat32* lir);
- void visitInt32ToFloat32(LInt32ToFloat32* lir);
- void visitInt32ToDouble(LInt32ToDouble* lir);
+ void visitOsiPoint(LOsiPoint* lir) override;
+ void visitGoto(LGoto* lir) override;
+ void visitTableSwitch(LTableSwitch* ins) override;
+ void visitTableSwitchV(LTableSwitchV* ins) override;
+ void visitCloneLiteral(LCloneLiteral* lir) override;
+ void visitParameter(LParameter* lir) override;
+ void visitCallee(LCallee* lir) override;
+ void visitIsConstructing(LIsConstructing* lir) override;
+ void visitStart(LStart* lir) override;
+ void visitReturn(LReturn* ret) override;
+ void visitDefVar(LDefVar* lir) override;
+ void visitDefLexical(LDefLexical* lir) override;
+ void visitDefFun(LDefFun* lir) override;
+ void visitOsrEntry(LOsrEntry* lir) override;
+ void visitOsrEnvironmentChain(LOsrEnvironmentChain* lir) override;
+ void visitOsrValue(LOsrValue* lir) override;
+ void visitOsrReturnValue(LOsrReturnValue* lir) override;
+ void visitOsrArgumentsObject(LOsrArgumentsObject* lir) override;
+ void visitStackArgT(LStackArgT* lir) override;
+ void visitStackArgV(LStackArgV* lir) override;
+ void visitMoveGroup(LMoveGroup* group) override;
+ void visitValueToInt32(LValueToInt32* lir) override;
+ void visitValueToDouble(LValueToDouble* lir) override;
+ void visitValueToFloat32(LValueToFloat32* lir) override;
+ void visitFloat32ToDouble(LFloat32ToDouble* lir) override;
+ void visitDoubleToFloat32(LDoubleToFloat32* lir) override;
+ void visitInt32ToFloat32(LInt32ToFloat32* lir) override;
+ void visitInt32ToDouble(LInt32ToDouble* lir) override;
void emitOOLTestObject(Register objreg, Label* ifTruthy, Label* ifFalsy, Register scratch);
- void visitTestOAndBranch(LTestOAndBranch* lir);
- void visitTestVAndBranch(LTestVAndBranch* lir);
- void visitFunctionDispatch(LFunctionDispatch* lir);
- void visitObjectGroupDispatch(LObjectGroupDispatch* lir);
- void visitBooleanToString(LBooleanToString* lir);
+ void visitTestOAndBranch(LTestOAndBranch* lir) override;
+ void visitTestVAndBranch(LTestVAndBranch* lir) override;
+ void visitFunctionDispatch(LFunctionDispatch* lir) override;
+ void visitObjectGroupDispatch(LObjectGroupDispatch* lir) override;
+ void visitBooleanToString(LBooleanToString* lir) override;
void emitIntToString(Register input, Register output, Label* ool);
- void visitIntToString(LIntToString* lir);
- void visitDoubleToString(LDoubleToString* lir);
- void visitValueToString(LValueToString* lir);
- void visitValueToObject(LValueToObject* lir);
- void visitValueToObjectOrNull(LValueToObjectOrNull* lir);
- void visitInteger(LInteger* lir);
- void visitInteger64(LInteger64* lir);
- void visitRegExp(LRegExp* lir);
- void visitRegExpMatcher(LRegExpMatcher* lir);
+ void visitIntToString(LIntToString* lir) override;
+ void visitDoubleToString(LDoubleToString* lir) override;
+ void visitValueToString(LValueToString* lir) override;
+ void visitValueToObject(LValueToObject* lir) override;
+ void visitValueToObjectOrNull(LValueToObjectOrNull* lir) override;
+ void visitInteger(LInteger* lir) override;
+ void visitInteger64(LInteger64* lir) override;
+ void visitRegExp(LRegExp* lir) override;
+ void visitRegExpMatcher(LRegExpMatcher* lir) override;
void visitOutOfLineRegExpMatcher(OutOfLineRegExpMatcher* ool);
- void visitRegExpSearcher(LRegExpSearcher* lir);
+ void visitRegExpSearcher(LRegExpSearcher* lir) override;
void visitOutOfLineRegExpSearcher(OutOfLineRegExpSearcher* ool);
- void visitRegExpTester(LRegExpTester* lir);
+ void visitRegExpTester(LRegExpTester* lir) override;
void visitOutOfLineRegExpTester(OutOfLineRegExpTester* ool);
- void visitRegExpPrototypeOptimizable(LRegExpPrototypeOptimizable* lir);
+ void visitRegExpPrototypeOptimizable(LRegExpPrototypeOptimizable* lir) override;
void visitOutOfLineRegExpPrototypeOptimizable(OutOfLineRegExpPrototypeOptimizable* ool);
- void visitRegExpInstanceOptimizable(LRegExpInstanceOptimizable* lir);
+ void visitRegExpInstanceOptimizable(LRegExpInstanceOptimizable* lir) override;
void visitOutOfLineRegExpInstanceOptimizable(OutOfLineRegExpInstanceOptimizable* ool);
- void visitGetFirstDollarIndex(LGetFirstDollarIndex* lir);
- void visitStringReplace(LStringReplace* lir);
+ void visitGetFirstDollarIndex(LGetFirstDollarIndex* lir) override;
+ void visitStringReplace(LStringReplace* lir) override;
void emitSharedStub(ICStub::Kind kind, LInstruction* lir);
- void visitBinarySharedStub(LBinarySharedStub* lir);
- void visitUnarySharedStub(LUnarySharedStub* lir);
- void visitNullarySharedStub(LNullarySharedStub* lir);
- void visitClassConstructor(LClassConstructor* lir);
- void visitLambda(LLambda* lir);
+ void visitBinarySharedStub(LBinarySharedStub* lir) override;
+ void visitUnarySharedStub(LUnarySharedStub* lir) override;
+ void visitNullarySharedStub(LNullarySharedStub* lir) override;
+ void visitClassConstructor(LClassConstructor* lir) override;
+ void visitLambda(LLambda* lir) override;
void visitOutOfLineLambdaArrow(OutOfLineLambdaArrow* ool);
- void visitLambdaArrow(LLambdaArrow* lir);
- void visitLambdaForSingleton(LLambdaForSingleton* lir);
- void visitSetFunName(LSetFunName* lir);
- void visitPointer(LPointer* lir);
- void visitKeepAliveObject(LKeepAliveObject* lir);
- void visitSlots(LSlots* lir);
- void visitLoadSlotT(LLoadSlotT* lir);
- void visitLoadSlotV(LLoadSlotV* lir);
- void visitStoreSlotT(LStoreSlotT* lir);
- void visitStoreSlotV(LStoreSlotV* lir);
- void visitElements(LElements* lir);
- void visitConvertElementsToDoubles(LConvertElementsToDoubles* lir);
- void visitMaybeToDoubleElement(LMaybeToDoubleElement* lir);
- void visitMaybeCopyElementsForWrite(LMaybeCopyElementsForWrite* lir);
- void visitGuardObjectIdentity(LGuardObjectIdentity* guard);
- void visitGuardReceiverPolymorphic(LGuardReceiverPolymorphic* lir);
- void visitGuardUnboxedExpando(LGuardUnboxedExpando* lir);
- void visitLoadUnboxedExpando(LLoadUnboxedExpando* lir);
- void visitTypeBarrierV(LTypeBarrierV* lir);
- void visitTypeBarrierO(LTypeBarrierO* lir);
- void visitMonitorTypes(LMonitorTypes* lir);
+ void visitLambdaArrow(LLambdaArrow* lir) override;
+ void visitLambdaForSingleton(LLambdaForSingleton* lir) override;
+ void visitSetFunName(LSetFunName* lir) override;
+ void visitPointer(LPointer* lir) override;
+ void visitKeepAliveObject(LKeepAliveObject* lir) override;
+ void visitSlots(LSlots* lir) override;
+ void visitLoadSlotT(LLoadSlotT* lir) override;
+ void visitLoadSlotV(LLoadSlotV* lir) override;
+ void visitStoreSlotT(LStoreSlotT* lir) override;
+ void visitStoreSlotV(LStoreSlotV* lir) override;
+ void visitElements(LElements* lir) override;
+ void visitConvertElementsToDoubles(LConvertElementsToDoubles* lir) override;
+ void visitMaybeToDoubleElement(LMaybeToDoubleElement* lir) override;
+ void visitMaybeCopyElementsForWrite(LMaybeCopyElementsForWrite* lir) override;
+ void visitGuardObjectIdentity(LGuardObjectIdentity* guard) override;
+ void visitGuardReceiverPolymorphic(LGuardReceiverPolymorphic* lir) override;
+ void visitGuardUnboxedExpando(LGuardUnboxedExpando* lir) override;
+ void visitLoadUnboxedExpando(LLoadUnboxedExpando* lir) override;
+ void visitTypeBarrierV(LTypeBarrierV* lir) override;
+ void visitTypeBarrierO(LTypeBarrierO* lir) override;
+ void visitMonitorTypes(LMonitorTypes* lir) override;
void emitPostWriteBarrier(const LAllocation* obj);
void emitPostWriteBarrier(Register objreg);
template <class LPostBarrierType>
void visitPostWriteBarrierCommonO(LPostBarrierType* lir, OutOfLineCode* ool);
template <class LPostBarrierType>
void visitPostWriteBarrierCommonV(LPostBarrierType* lir, OutOfLineCode* ool);
- void visitPostWriteBarrierO(LPostWriteBarrierO* lir);
- void visitPostWriteElementBarrierO(LPostWriteElementBarrierO* lir);
- void visitPostWriteBarrierV(LPostWriteBarrierV* lir);
- void visitPostWriteElementBarrierV(LPostWriteElementBarrierV* lir);
+ void visitPostWriteBarrierO(LPostWriteBarrierO* lir) override;
+ void visitPostWriteElementBarrierO(LPostWriteElementBarrierO* lir) override;
+ void visitPostWriteBarrierV(LPostWriteBarrierV* lir) override;
+ void visitPostWriteElementBarrierV(LPostWriteElementBarrierV* lir) override;
void visitOutOfLineCallPostWriteBarrier(OutOfLineCallPostWriteBarrier* ool);
void visitOutOfLineCallPostWriteElementBarrier(OutOfLineCallPostWriteElementBarrier* ool);
- void visitCallNative(LCallNative* call);
+ void visitCallNative(LCallNative* call) override;
void emitCallInvokeFunction(LInstruction* call, Register callereg,
bool isConstructing, bool ignoresReturnValue,
uint32_t argc, uint32_t unusedStack);
- void visitCallGeneric(LCallGeneric* call);
+ void visitCallGeneric(LCallGeneric* call) override;
void emitCallInvokeFunctionShuffleNewTarget(LCallKnown *call,
Register calleeReg,
uint32_t numFormals,
uint32_t unusedStack);
- void visitCallKnown(LCallKnown* call);
+ void visitCallKnown(LCallKnown* call) override;
template<typename T> void emitApplyGeneric(T* apply);
template<typename T> void emitCallInvokeFunction(T* apply, Register extraStackSize);
void emitAllocateSpaceForApply(Register argcreg, Register extraStackSpace, Label* end);
void emitCopyValuesForApply(Register argvSrcBase, Register argvIndex, Register copyreg,
size_t argvSrcOffset, size_t argvDstOffset);
void emitPopArguments(Register extraStackSize);
void emitPushArguments(LApplyArgsGeneric* apply, Register extraStackSpace);
- void visitApplyArgsGeneric(LApplyArgsGeneric* apply);
+ void visitApplyArgsGeneric(LApplyArgsGeneric* apply) override;
void emitPushArguments(LApplyArrayGeneric* apply, Register extraStackSpace);
- void visitApplyArrayGeneric(LApplyArrayGeneric* apply);
- void visitBail(LBail* lir);
- void visitUnreachable(LUnreachable* unreachable);
- void visitEncodeSnapshot(LEncodeSnapshot* lir);
- void visitGetDynamicName(LGetDynamicName* lir);
- void visitCallDirectEval(LCallDirectEval* lir);
- void visitDoubleToInt32(LDoubleToInt32* lir);
- void visitFloat32ToInt32(LFloat32ToInt32* lir);
+ void visitApplyArrayGeneric(LApplyArrayGeneric* apply) override;
+ void visitBail(LBail* lir) override;
+ void visitUnreachable(LUnreachable* unreachable) override;
+ void visitEncodeSnapshot(LEncodeSnapshot* lir) override;
+ void visitGetDynamicName(LGetDynamicName* lir) override;
+ void visitCallDirectEval(LCallDirectEval* lir) override;
+ void visitDoubleToInt32(LDoubleToInt32* lir) override;
+ void visitFloat32ToInt32(LFloat32ToInt32* lir) override;
void visitNewArrayCallVM(LNewArray* lir);
- void visitNewArray(LNewArray* lir);
+ void visitNewArray(LNewArray* lir) override;
void visitOutOfLineNewArray(OutOfLineNewArray* ool);
- void visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite* lir);
- void visitNewArrayDynamicLength(LNewArrayDynamicLength* lir);
- void visitNewIterator(LNewIterator* lir);
- void visitNewTypedArray(LNewTypedArray* lir);
- void visitNewTypedArrayDynamicLength(LNewTypedArrayDynamicLength* lir);
+ void visitNewArrayCopyOnWrite(LNewArrayCopyOnWrite* lir) override;
+ void visitNewArrayDynamicLength(LNewArrayDynamicLength* lir) override;
+ void visitNewIterator(LNewIterator* lir) override;
+ void visitNewTypedArray(LNewTypedArray* lir) override;
+ void visitNewTypedArrayDynamicLength(LNewTypedArrayDynamicLength* lir) override;
void visitNewObjectVMCall(LNewObject* lir);
- void visitNewObject(LNewObject* lir);
+ void visitNewObject(LNewObject* lir) override;
void visitOutOfLineNewObject(OutOfLineNewObject* ool);
- void visitNewTypedObject(LNewTypedObject* lir);
- void visitSimdBox(LSimdBox* lir);
- void visitSimdUnbox(LSimdUnbox* lir);
- void visitNewNamedLambdaObject(LNewNamedLambdaObject* lir);
- void visitNewCallObject(LNewCallObject* lir);
- void visitNewSingletonCallObject(LNewSingletonCallObject* lir);
- void visitNewStringObject(LNewStringObject* lir);
- void visitNewDerivedTypedObject(LNewDerivedTypedObject* lir);
- void visitInitElem(LInitElem* lir);
- void visitInitElemGetterSetter(LInitElemGetterSetter* lir);
- void visitMutateProto(LMutateProto* lir);
- void visitInitPropGetterSetter(LInitPropGetterSetter* lir);
- void visitCreateThis(LCreateThis* lir);
- void visitCreateThisWithProto(LCreateThisWithProto* lir);
- void visitCreateThisWithTemplate(LCreateThisWithTemplate* lir);
- void visitCreateArgumentsObject(LCreateArgumentsObject* lir);
- void visitGetArgumentsObjectArg(LGetArgumentsObjectArg* lir);
- void visitSetArgumentsObjectArg(LSetArgumentsObjectArg* lir);
- void visitReturnFromCtor(LReturnFromCtor* lir);
- void visitComputeThis(LComputeThis* lir);
- void visitArrayLength(LArrayLength* lir);
- void visitSetArrayLength(LSetArrayLength* lir);
- void visitGetNextEntryForIterator(LGetNextEntryForIterator* lir);
- void visitTypedArrayLength(LTypedArrayLength* lir);
- void visitTypedArrayElements(LTypedArrayElements* lir);
- void visitSetDisjointTypedElements(LSetDisjointTypedElements* lir);
- void visitTypedObjectElements(LTypedObjectElements* lir);
- void visitSetTypedObjectOffset(LSetTypedObjectOffset* lir);
- void visitTypedObjectDescr(LTypedObjectDescr* ins);
- void visitStringLength(LStringLength* lir);
- void visitSubstr(LSubstr* lir);
- void visitInitializedLength(LInitializedLength* lir);
- void visitSetInitializedLength(LSetInitializedLength* lir);
- void visitNotO(LNotO* ins);
- void visitNotV(LNotV* ins);
- void visitBoundsCheck(LBoundsCheck* lir);
- void visitBoundsCheckRange(LBoundsCheckRange* lir);
- void visitBoundsCheckLower(LBoundsCheckLower* lir);
- void visitLoadFixedSlotV(LLoadFixedSlotV* ins);
- void visitLoadFixedSlotAndUnbox(LLoadFixedSlotAndUnbox* lir);
- void visitLoadFixedSlotT(LLoadFixedSlotT* ins);
- void visitStoreFixedSlotV(LStoreFixedSlotV* ins);
- void visitStoreFixedSlotT(LStoreFixedSlotT* ins);
+ void visitNewTypedObject(LNewTypedObject* lir) override;
+ void visitSimdBox(LSimdBox* lir) override;
+ void visitSimdUnbox(LSimdUnbox* lir) override;
+ void visitNewNamedLambdaObject(LNewNamedLambdaObject* lir) override;
+ void visitNewCallObject(LNewCallObject* lir) override;
+ void visitNewSingletonCallObject(LNewSingletonCallObject* lir) override;
+ void visitNewStringObject(LNewStringObject* lir) override;
+ void visitNewDerivedTypedObject(LNewDerivedTypedObject* lir) override;
+ void visitInitElem(LInitElem* lir) override;
+ void visitInitElemGetterSetter(LInitElemGetterSetter* lir) override;
+ void visitMutateProto(LMutateProto* lir) override;
+ void visitInitPropGetterSetter(LInitPropGetterSetter* lir) override;
+ void visitCreateThis(LCreateThis* lir) override;
+ void visitCreateThisWithProto(LCreateThisWithProto* lir) override;
+ void visitCreateThisWithTemplate(LCreateThisWithTemplate* lir) override;
+ void visitCreateArgumentsObject(LCreateArgumentsObject* lir) override;
+ void visitGetArgumentsObjectArg(LGetArgumentsObjectArg* lir) override;
+ void visitSetArgumentsObjectArg(LSetArgumentsObjectArg* lir) override;
+ void visitReturnFromCtor(LReturnFromCtor* lir) override;
+ void visitComputeThis(LComputeThis* lir) override;
+ void visitArrayLength(LArrayLength* lir) override;
+ void visitSetArrayLength(LSetArrayLength* lir) override;
+ void visitGetNextEntryForIterator(LGetNextEntryForIterator* lir) override;
+ void visitTypedArrayLength(LTypedArrayLength* lir) override;
+ void visitTypedArrayElements(LTypedArrayElements* lir) override;
+ void visitSetDisjointTypedElements(LSetDisjointTypedElements* lir) override;
+ void visitTypedObjectElements(LTypedObjectElements* lir) override;
+ void visitSetTypedObjectOffset(LSetTypedObjectOffset* lir) override;
+ void visitTypedObjectDescr(LTypedObjectDescr* ins) override;
+ void visitStringLength(LStringLength* lir) override;
+ void visitSubstr(LSubstr* lir) override;
+ void visitInitializedLength(LInitializedLength* lir) override;
+ void visitSetInitializedLength(LSetInitializedLength* lir) override;
+ void visitNotO(LNotO* ins) override;
+ void visitNotV(LNotV* ins) override;
+ void visitBoundsCheck(LBoundsCheck* lir) override;
+ void visitBoundsCheckRange(LBoundsCheckRange* lir) override;
+ void visitBoundsCheckLower(LBoundsCheckLower* lir) override;
+ void visitLoadFixedSlotV(LLoadFixedSlotV* ins) override;
+ void visitLoadFixedSlotAndUnbox(LLoadFixedSlotAndUnbox* lir) override;
+ void visitLoadFixedSlotT(LLoadFixedSlotT* ins) override;
+ void visitStoreFixedSlotV(LStoreFixedSlotV* ins) override;
+ void visitStoreFixedSlotT(LStoreFixedSlotT* ins) override;
void emitGetPropertyPolymorphic(LInstruction* lir, Register obj,
Register scratch, const TypedOrValueRegister& output);
- void visitGetPropertyPolymorphicV(LGetPropertyPolymorphicV* ins);
- void visitGetPropertyPolymorphicT(LGetPropertyPolymorphicT* ins);
+ void visitGetPropertyPolymorphicV(LGetPropertyPolymorphicV* ins) override;
+ void visitGetPropertyPolymorphicT(LGetPropertyPolymorphicT* ins) override;
void emitSetPropertyPolymorphic(LInstruction* lir, Register obj,
Register scratch, const ConstantOrRegister& value);
- void visitSetPropertyPolymorphicV(LSetPropertyPolymorphicV* ins);
- void visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT* ins);
- void visitAbsI(LAbsI* lir);
- void visitAtan2D(LAtan2D* lir);
- void visitHypot(LHypot* lir);
- void visitPowI(LPowI* lir);
- void visitPowD(LPowD* lir);
- void visitPowV(LPowV* lir);
- void visitMathFunctionD(LMathFunctionD* ins);
- void visitMathFunctionF(LMathFunctionF* ins);
- void visitModD(LModD* ins);
- void visitMinMaxI(LMinMaxI* lir);
- void visitBinaryV(LBinaryV* lir);
+ void visitSetPropertyPolymorphicV(LSetPropertyPolymorphicV* ins) override;
+ void visitSetPropertyPolymorphicT(LSetPropertyPolymorphicT* ins) override;
+ void visitAbsI(LAbsI* lir) override;
+ void visitAtan2D(LAtan2D* lir) override;
+ void visitHypot(LHypot* lir) override;
+ void visitPowI(LPowI* lir) override;
+ void visitPowD(LPowD* lir) override;
+ void visitPowV(LPowV* lir) override;
+ void visitMathFunctionD(LMathFunctionD* ins) override;
+ void visitMathFunctionF(LMathFunctionF* ins) override;
+ void visitModD(LModD* ins) override;
+ void visitMinMaxI(LMinMaxI* lir) override;
+ void visitBinaryV(LBinaryV* lir) override;
void emitCompareS(LInstruction* lir, JSOp op, Register left, Register right, Register output);
- void visitCompareS(LCompareS* lir);
- void visitCompareStrictS(LCompareStrictS* lir);
- void visitCompareVM(LCompareVM* lir);
- void visitIsNullOrLikeUndefinedV(LIsNullOrLikeUndefinedV* lir);
- void visitIsNullOrLikeUndefinedT(LIsNullOrLikeUndefinedT* lir);
- void visitIsNullOrLikeUndefinedAndBranchV(LIsNullOrLikeUndefinedAndBranchV* lir);
- void visitIsNullOrLikeUndefinedAndBranchT(LIsNullOrLikeUndefinedAndBranchT* lir);
+ void visitCompareS(LCompareS* lir) override;
+ void visitCompareStrictS(LCompareStrictS* lir) override;
+ void visitCompareVM(LCompareVM* lir) override;
+ void visitIsNullOrLikeUndefinedV(LIsNullOrLikeUndefinedV* lir) override;
+ void visitIsNullOrLikeUndefinedT(LIsNullOrLikeUndefinedT* lir) override;
+ void visitIsNullOrLikeUndefinedAndBranchV(LIsNullOrLikeUndefinedAndBranchV* lir) override;
+ void visitIsNullOrLikeUndefinedAndBranchT(LIsNullOrLikeUndefinedAndBranchT* lir) override;
void emitConcat(LInstruction* lir, Register lhs, Register rhs, Register output);
- void visitConcat(LConcat* lir);
- void visitCharCodeAt(LCharCodeAt* lir);
- void visitFromCharCode(LFromCharCode* lir);
- void visitFromCodePoint(LFromCodePoint* lir);
- void visitStringConvertCase(LStringConvertCase* lir);
- void visitSinCos(LSinCos *lir);
- void visitStringSplit(LStringSplit* lir);
- void visitFunctionEnvironment(LFunctionEnvironment* lir);
- void visitHomeObject(LHomeObject* lir);
- void visitHomeObjectSuperBase(LHomeObjectSuperBase* lir);
- void visitNewLexicalEnvironmentObject(LNewLexicalEnvironmentObject* lir);
- void visitCopyLexicalEnvironmentObject(LCopyLexicalEnvironmentObject* lir);
- void visitCallGetProperty(LCallGetProperty* lir);
- void visitCallGetElement(LCallGetElement* lir);
- void visitCallSetElement(LCallSetElement* lir);
- void visitCallInitElementArray(LCallInitElementArray* lir);
- void visitThrow(LThrow* lir);
- void visitTypeOfV(LTypeOfV* lir);
+ void visitConcat(LConcat* lir) override;
+ void visitCharCodeAt(LCharCodeAt* lir) override;
+ void visitFromCharCode(LFromCharCode* lir) override;
+ void visitFromCodePoint(LFromCodePoint* lir) override;
+ void visitStringConvertCase(LStringConvertCase* lir) override;
+ void visitSinCos(LSinCos *lir) override;
+ void visitStringSplit(LStringSplit* lir) override;
+ void visitFunctionEnvironment(LFunctionEnvironment* lir) override;
+ void visitHomeObject(LHomeObject* lir) override;
+ void visitHomeObjectSuperBase(LHomeObjectSuperBase* lir) override;
+ void visitNewLexicalEnvironmentObject(LNewLexicalEnvironmentObject* lir) override;
+ void visitCopyLexicalEnvironmentObject(LCopyLexicalEnvironmentObject* lir) override;
+ void visitCallGetProperty(LCallGetProperty* lir) override;
+ void visitCallGetElement(LCallGetElement* lir) override;
+ void visitCallSetElement(LCallSetElement* lir) override;
+ void visitCallInitElementArray(LCallInitElementArray* lir) override;
+ void visitThrow(LThrow* lir) override;
+ void visitTypeOfV(LTypeOfV* lir) override;
void visitOutOfLineTypeOfV(OutOfLineTypeOfV* ool);
- void visitToAsync(LToAsync* lir);
- void visitToAsyncGen(LToAsyncGen* lir);
- void visitToAsyncIter(LToAsyncIter* lir);
- void visitToIdV(LToIdV* lir);
+ void visitToAsync(LToAsync* lir) override;
+ void visitToAsyncGen(LToAsyncGen* lir) override;
+ void visitToAsyncIter(LToAsyncIter* lir) override;
+ void visitToIdV(LToIdV* lir) override;
template<typename T> void emitLoadElementT(LLoadElementT* lir, const T& source);
- void visitLoadElementT(LLoadElementT* lir);
- void visitLoadElementV(LLoadElementV* load);
- void visitLoadElementHole(LLoadElementHole* lir);
- void visitLoadUnboxedPointerV(LLoadUnboxedPointerV* lir);
- void visitLoadUnboxedPointerT(LLoadUnboxedPointerT* lir);
- void visitUnboxObjectOrNull(LUnboxObjectOrNull* lir);
+ void visitLoadElementT(LLoadElementT* lir) override;
+ void visitLoadElementV(LLoadElementV* load) override;
+ void visitLoadElementHole(LLoadElementHole* lir) override;
+ void visitLoadUnboxedPointerV(LLoadUnboxedPointerV* lir) override;
+ void visitLoadUnboxedPointerT(LLoadUnboxedPointerT* lir) override;
+ void visitUnboxObjectOrNull(LUnboxObjectOrNull* lir) override;
template <SwitchTableType tableType>
void visitOutOfLineSwitch(OutOfLineSwitch<tableType>* ool);
- void visitLoadElementFromStateV(LLoadElementFromStateV* lir);
- void visitStoreElementT(LStoreElementT* lir);
- void visitStoreElementV(LStoreElementV* lir);
+ void visitLoadElementFromStateV(LLoadElementFromStateV* lir) override;
+ void visitStoreElementT(LStoreElementT* lir) override;
+ void visitStoreElementV(LStoreElementV* lir) override;
template <typename T> void emitStoreElementHoleT(T* lir);
template <typename T> void emitStoreElementHoleV(T* lir);
- void visitStoreElementHoleT(LStoreElementHoleT* lir);
- void visitStoreElementHoleV(LStoreElementHoleV* lir);
- void visitFallibleStoreElementV(LFallibleStoreElementV* lir);
- void visitFallibleStoreElementT(LFallibleStoreElementT* lir);
- void visitStoreUnboxedPointer(LStoreUnboxedPointer* lir);
- void visitConvertUnboxedObjectToNative(LConvertUnboxedObjectToNative* lir);
+ void visitStoreElementHoleT(LStoreElementHoleT* lir) override;
+ void visitStoreElementHoleV(LStoreElementHoleV* lir) override;
+ void visitFallibleStoreElementV(LFallibleStoreElementV* lir) override;
+ void visitFallibleStoreElementT(LFallibleStoreElementT* lir) override;
+ void visitStoreUnboxedPointer(LStoreUnboxedPointer* lir) override;
+ void visitConvertUnboxedObjectToNative(LConvertUnboxedObjectToNative* lir) override;
void emitArrayPopShift(LInstruction* lir, const MArrayPopShift* mir, Register obj,
Register elementsTemp, Register lengthTemp, TypedOrValueRegister out);
- void visitArrayPopShiftV(LArrayPopShiftV* lir);
- void visitArrayPopShiftT(LArrayPopShiftT* lir);
+ void visitArrayPopShiftV(LArrayPopShiftV* lir) override;
+ void visitArrayPopShiftT(LArrayPopShiftT* lir) override;
void emitArrayPush(LInstruction* lir, const MArrayPush* mir, Register obj,
const ConstantOrRegister& value, Register elementsTemp, Register length);
- void visitArrayPushV(LArrayPushV* lir);
- void visitArrayPushT(LArrayPushT* lir);
- void visitArraySlice(LArraySlice* lir);
- void visitArrayJoin(LArrayJoin* lir);
- void visitLoadUnboxedScalar(LLoadUnboxedScalar* lir);
- void visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole* lir);
- void visitStoreUnboxedScalar(LStoreUnboxedScalar* lir);
- void visitStoreTypedArrayElementHole(LStoreTypedArrayElementHole* lir);
- void visitAtomicIsLockFree(LAtomicIsLockFree* lir);
- void visitGuardSharedTypedArray(LGuardSharedTypedArray* lir);
- void visitClampIToUint8(LClampIToUint8* lir);
- void visitClampDToUint8(LClampDToUint8* lir);
- void visitClampVToUint8(LClampVToUint8* lir);
- void visitGetIteratorCache(LGetIteratorCache* lir);
- void visitIteratorMore(LIteratorMore* lir);
- void visitIsNoIterAndBranch(LIsNoIterAndBranch* lir);
- void visitIteratorEnd(LIteratorEnd* lir);
- void visitArgumentsLength(LArgumentsLength* lir);
- void visitGetFrameArgument(LGetFrameArgument* lir);
- void visitSetFrameArgumentT(LSetFrameArgumentT* lir);
- void visitSetFrameArgumentC(LSetFrameArgumentC* lir);
- void visitSetFrameArgumentV(LSetFrameArgumentV* lir);
- void visitRunOncePrologue(LRunOncePrologue* lir);
+ void visitArrayPushV(LArrayPushV* lir) override;
+ void visitArrayPushT(LArrayPushT* lir) override;
+ void visitArraySlice(LArraySlice* lir) override;
+ void visitArrayJoin(LArrayJoin* lir) override;
+ void visitLoadUnboxedScalar(LLoadUnboxedScalar* lir) override;
+ void visitLoadTypedArrayElementHole(LLoadTypedArrayElementHole* lir) override;
+ void visitStoreUnboxedScalar(LStoreUnboxedScalar* lir) override;
+ void visitStoreTypedArrayElementHole(LStoreTypedArrayElementHole* lir) override;
+ void visitAtomicIsLockFree(LAtomicIsLockFree* lir) override;
+ void visitGuardSharedTypedArray(LGuardSharedTypedArray* lir) override;
+ void visitClampIToUint8(LClampIToUint8* lir) override;
+ void visitClampDToUint8(LClampDToUint8* lir) override;
+ void visitClampVToUint8(LClampVToUint8* lir) override;
+ void visitGetIteratorCache(LGetIteratorCache* lir) override;
+ void visitIteratorMore(LIteratorMore* lir) override;
+ void visitIsNoIterAndBranch(LIsNoIterAndBranch* lir) override;
+ void visitIteratorEnd(LIteratorEnd* lir) override;
+ void visitArgumentsLength(LArgumentsLength* lir) override;
+ void visitGetFrameArgument(LGetFrameArgument* lir) override;
+ void visitSetFrameArgumentT(LSetFrameArgumentT* lir) override;
+ void visitSetFrameArgumentC(LSetFrameArgumentC* lir) override;
+ void visitSetFrameArgumentV(LSetFrameArgumentV* lir) override;
+ void visitRunOncePrologue(LRunOncePrologue* lir) override;
void emitRest(LInstruction* lir, Register array, Register numActuals,
Register temp0, Register temp1, unsigned numFormals,
JSObject* templateObject, bool saveAndRestore, Register resultreg);
- void visitRest(LRest* lir);
- void visitCallSetProperty(LCallSetProperty* ins);
- void visitCallDeleteProperty(LCallDeleteProperty* lir);
- void visitCallDeleteElement(LCallDeleteElement* lir);
- void visitBitNotV(LBitNotV* lir);
- void visitBitOpV(LBitOpV* lir);
+ void visitRest(LRest* lir) override;
+ void visitCallSetProperty(LCallSetProperty* ins) override;
+ void visitCallDeleteProperty(LCallDeleteProperty* lir) override;
+ void visitCallDeleteElement(LCallDeleteElement* lir) override;
+ void visitBitNotV(LBitNotV* lir) override;
+ void visitBitOpV(LBitOpV* lir) override;
void emitInstanceOf(LInstruction* ins, JSObject* prototypeObject);
- void visitInCache(LInCache* ins);
- void visitInArray(LInArray* ins);
- void visitInstanceOfO(LInstanceOfO* ins);
- void visitInstanceOfV(LInstanceOfV* ins);
- void visitCallInstanceOf(LCallInstanceOf* ins);
- void visitGetDOMProperty(LGetDOMProperty* lir);
- void visitGetDOMMemberV(LGetDOMMemberV* lir);
- void visitGetDOMMemberT(LGetDOMMemberT* lir);
- void visitSetDOMProperty(LSetDOMProperty* lir);
- void visitCallDOMNative(LCallDOMNative* lir);
- void visitCallGetIntrinsicValue(LCallGetIntrinsicValue* lir);
- void visitCallBindVar(LCallBindVar* lir);
+ void visitInCache(LInCache* ins) override;
+ void visitInArray(LInArray* ins) override;
+ void visitInstanceOfO(LInstanceOfO* ins) override;
+ void visitInstanceOfV(LInstanceOfV* ins) override;
+ void visitCallInstanceOf(LCallInstanceOf* ins) override;
+ void visitGetDOMProperty(LGetDOMProperty* lir) override;
+ void visitGetDOMMemberV(LGetDOMMemberV* lir) override;
+ void visitGetDOMMemberT(LGetDOMMemberT* lir) override;
+ void visitSetDOMProperty(LSetDOMProperty* lir) override;
+ void visitCallDOMNative(LCallDOMNative* lir) override;
+ void visitCallGetIntrinsicValue(LCallGetIntrinsicValue* lir) override;
+ void visitCallBindVar(LCallBindVar* lir) override;
enum CallableOrConstructor {
Callable,
Constructor
};
template <CallableOrConstructor mode>
void emitIsCallableOrConstructor(Register object, Register output, Label* failure);
- void visitIsCallableO(LIsCallableO* lir);
- void visitIsCallableV(LIsCallableV* lir);
+ void visitIsCallableO(LIsCallableO* lir) override;
+ void visitIsCallableV(LIsCallableV* lir) override;
void visitOutOfLineIsCallable(OutOfLineIsCallable* ool);
- void visitIsConstructor(LIsConstructor* lir);
+ void visitIsConstructor(LIsConstructor* lir) override;
void visitOutOfLineIsConstructor(OutOfLineIsConstructor* ool);
- void visitIsArrayO(LIsArrayO* lir);
- void visitIsArrayV(LIsArrayV* lir);
- void visitIsTypedArray(LIsTypedArray* lir);
- void visitIsObject(LIsObject* lir);
- void visitIsObjectAndBranch(LIsObjectAndBranch* lir);
- void visitHasClass(LHasClass* lir);
- void visitObjectClassToString(LObjectClassToString* lir);
- void visitWasmParameter(LWasmParameter* lir);
- void visitWasmParameterI64(LWasmParameterI64* lir);
- void visitWasmReturn(LWasmReturn* ret);
- void visitWasmReturnI64(LWasmReturnI64* ret);
- void visitWasmReturnVoid(LWasmReturnVoid* ret);
- void visitLexicalCheck(LLexicalCheck* ins);
- void visitThrowRuntimeLexicalError(LThrowRuntimeLexicalError* ins);
- void visitGlobalNameConflictsCheck(LGlobalNameConflictsCheck* ins);
- void visitDebugger(LDebugger* ins);
- void visitNewTarget(LNewTarget* ins);
- void visitArrowNewTarget(LArrowNewTarget* ins);
- void visitCheckReturn(LCheckReturn* ins);
- void visitCheckIsObj(LCheckIsObj* ins);
- void visitCheckIsCallable(LCheckIsCallable* ins);
- void visitCheckObjCoercible(LCheckObjCoercible* ins);
- void visitDebugCheckSelfHosted(LDebugCheckSelfHosted* ins);
- void visitNaNToZero(LNaNToZero* ins);
+ void visitIsArrayO(LIsArrayO* lir) override;
+ void visitIsArrayV(LIsArrayV* lir) override;
+ void visitIsTypedArray(LIsTypedArray* lir) override;
+ void visitIsObject(LIsObject* lir) override;
+ void visitIsObjectAndBranch(LIsObjectAndBranch* lir) override;
+ void visitHasClass(LHasClass* lir) override;
+ void visitObjectClassToString(LObjectClassToString* lir) override;
+ void visitWasmParameter(LWasmParameter* lir) override;
+ void visitWasmParameterI64(LWasmParameterI64* lir) override;
+ void visitWasmReturn(LWasmReturn* ret) override;
+ void visitWasmReturnI64(LWasmReturnI64* ret) override;
+ void visitWasmReturnVoid(LWasmReturnVoid* ret) override;
+ void visitLexicalCheck(LLexicalCheck* ins) override;
+ void visitThrowRuntimeLexicalError(LThrowRuntimeLexicalError* ins) override;
+ void visitGlobalNameConflictsCheck(LGlobalNameConflictsCheck* ins) override;
+ void visitDebugger(LDebugger* ins) override;
+ void visitNewTarget(LNewTarget* ins) override;
+ void visitArrowNewTarget(LArrowNewTarget* ins) override;
+ void visitCheckReturn(LCheckReturn* ins) override;
+ void visitCheckIsObj(LCheckIsObj* ins) override;
+ void visitCheckIsCallable(LCheckIsCallable* ins) override;
+ void visitCheckObjCoercible(LCheckObjCoercible* ins) override;
+ void visitDebugCheckSelfHosted(LDebugCheckSelfHosted* ins) override;
+ void visitNaNToZero(LNaNToZero* ins) override;
void visitOutOfLineNaNToZero(OutOfLineNaNToZero* ool);
- void visitFinishBoundFunctionInit(LFinishBoundFunctionInit* lir);
- void visitIsPackedArray(LIsPackedArray* lir);
- void visitGetPrototypeOf(LGetPrototypeOf* lir);
+ void visitFinishBoundFunctionInit(LFinishBoundFunctionInit* lir) override;
+ void visitIsPackedArray(LIsPackedArray* lir) override;
+ void visitGetPrototypeOf(LGetPrototypeOf* lir) override;
- void visitCheckOverRecursed(LCheckOverRecursed* lir);
+ void visitCheckOverRecursed(LCheckOverRecursed* lir) override;
void visitCheckOverRecursedFailure(CheckOverRecursedFailure* ool);
- void visitUnboxFloatingPoint(LUnboxFloatingPoint* lir);
+ void visitUnboxFloatingPoint(LUnboxFloatingPoint* lir) override;
void visitOutOfLineUnboxFloatingPoint(OutOfLineUnboxFloatingPoint* ool);
void visitOutOfLineStoreElementHole(OutOfLineStoreElementHole* ool);
void loadJSScriptForBlock(MBasicBlock* block, Register reg);
void loadOutermostJSScript(Register reg);
void visitOutOfLineICFallback(OutOfLineICFallback* ool);
- void visitGetPropertyCacheV(LGetPropertyCacheV* ins);
- void visitGetPropertyCacheT(LGetPropertyCacheT* ins);
- void visitGetPropSuperCacheV(LGetPropSuperCacheV* ins);
- void visitBindNameCache(LBindNameCache* ins);
+ void visitGetPropertyCacheV(LGetPropertyCacheV* ins) override;
+ void visitGetPropertyCacheT(LGetPropertyCacheT* ins) override;
+ void visitGetPropSuperCacheV(LGetPropSuperCacheV* ins) override;
+ void visitBindNameCache(LBindNameCache* ins) override;
void visitCallSetProperty(LInstruction* ins);
- void visitSetPropertyCache(LSetPropertyCache* ins);
- void visitGetNameCache(LGetNameCache* ins);
- void visitHasOwnCache(LHasOwnCache* ins);
+ void visitSetPropertyCache(LSetPropertyCache* ins) override;
+ void visitGetNameCache(LGetNameCache* ins) override;
+ void visitHasOwnCache(LHasOwnCache* ins) override;
- void visitAssertRangeI(LAssertRangeI* ins);
- void visitAssertRangeD(LAssertRangeD* ins);
- void visitAssertRangeF(LAssertRangeF* ins);
- void visitAssertRangeV(LAssertRangeV* ins);
+ void visitAssertRangeI(LAssertRangeI* ins) override;
+ void visitAssertRangeD(LAssertRangeD* ins) override;
+ void visitAssertRangeF(LAssertRangeF* ins) override;
+ void visitAssertRangeV(LAssertRangeV* ins) override;
- void visitAssertResultV(LAssertResultV* ins);
- void visitAssertResultT(LAssertResultT* ins);
+ void visitAssertResultV(LAssertResultV* ins) override;
+ void visitAssertResultT(LAssertResultT* ins) override;
void emitAssertResultV(const ValueOperand output, const TemporaryTypeSet* typeset);
void emitAssertObjectOrStringResult(Register input, MIRType type, const TemporaryTypeSet* typeset);
- void visitInterruptCheck(LInterruptCheck* lir);
+ void visitInterruptCheck(LInterruptCheck* lir) override;
void visitOutOfLineInterruptCheckImplicit(OutOfLineInterruptCheckImplicit* ins);
- void visitWasmTrap(LWasmTrap* lir);
- void visitWasmLoadTls(LWasmLoadTls* ins);
- void visitWasmBoundsCheck(LWasmBoundsCheck* ins);
- void visitWasmAlignmentCheck(LWasmAlignmentCheck* ins);
- void visitRecompileCheck(LRecompileCheck* ins);
- void visitRotate(LRotate* ins);
+ void visitWasmTrap(LWasmTrap* lir) override;
+ void visitWasmLoadTls(LWasmLoadTls* ins) override;
+ void visitWasmBoundsCheck(LWasmBoundsCheck* ins) override;
+ void visitWasmAlignmentCheck(LWasmAlignmentCheck* ins) override;
+ void visitRecompileCheck(LRecompileCheck* ins) override;
+ void visitRotate(LRotate* ins) override;
- void visitRandom(LRandom* ins);
- void visitSignExtendInt32(LSignExtendInt32* ins);
+ void visitRandom(LRandom* ins) override;
+ void visitSignExtendInt32(LSignExtendInt32* ins) override;
#ifdef DEBUG
void emitDebugForceBailing(LInstruction* lir);
#endif
IonScriptCounts* extractScriptCounts() {
IonScriptCounts* counts = scriptCounts_;
scriptCounts_ = nullptr; // prevent delete in dtor
--- a/js/src/jit/IonCode.h
+++ b/js/src/jit/IonCode.h
@@ -791,17 +791,17 @@ namespace ubi {
template<>
class Concrete<js::jit::JitCode> : TracerConcrete<js::jit::JitCode> {
protected:
explicit Concrete(js::jit::JitCode *ptr) : TracerConcrete<js::jit::JitCode>(ptr) { }
public:
static void construct(void *storage, js::jit::JitCode *ptr) { new (storage) Concrete(ptr); }
- CoarseType coarseType() const final { return CoarseType::Script; }
+ CoarseType coarseType() const final override { return CoarseType::Script; }
Size size(mozilla::MallocSizeOf mallocSizeOf) const override {
Size size = js::gc::Arena::thingSize(get().asTenured().getAllocKind());
size += get().bufferSize();
size += get().headerSize();
return size;
}
--- a/js/src/jit/LIR.h
+++ b/js/src/jit/LIR.h
@@ -778,20 +778,20 @@ class LNode
inline L##name* to##name(); \
inline const L##name* to##name() const;
LIR_OPCODE_LIST(LIROP)
# undef LIROP
virtual void accept(LElementVisitor* visitor) = 0;
#define LIR_HEADER(opcode) \
- Opcode op() const { \
+ Opcode op() const override { \
return LInstruction::LOp_##opcode; \
} \
- void accept(LElementVisitor* visitor) { \
+ void accept(LElementVisitor* visitor) override { \
visitor->setElement(this); \
visitor->visit##opcode(this); \
}
};
class LInstruction
: public LNode
, public TempObject
@@ -915,54 +915,54 @@ class LPhi final : public LNode
LIR_HEADER(Phi)
LPhi(MPhi* ins, LAllocation* inputs)
: inputs_(inputs)
{
setMir(ins);
}
- size_t numDefs() const {
+ size_t numDefs() const override {
return 1;
}
- LDefinition* getDef(size_t index) {
+ LDefinition* getDef(size_t index) override {
MOZ_ASSERT(index == 0);
return &def_;
}
- void setDef(size_t index, const LDefinition& def) {
+ void setDef(size_t index, const LDefinition& def) override {
MOZ_ASSERT(index == 0);
def_ = def;
}
- size_t numOperands() const {
+ size_t numOperands() const override {
return mir_->toPhi()->numOperands();
}
- LAllocation* getOperand(size_t index) {
+ LAllocation* getOperand(size_t index) override {
MOZ_ASSERT(index < numOperands());
return &inputs_[index];
}
- void setOperand(size_t index, const LAllocation& a) {
+ void setOperand(size_t index, const LAllocation& a) override {
MOZ_ASSERT(index < numOperands());
inputs_[index] = a;
}
- size_t numTemps() const {
+ size_t numTemps() const override {
return 0;
}
- LDefinition* getTemp(size_t index) {
+ LDefinition* getTemp(size_t index) override {
MOZ_CRASH("no temps");
}
- void setTemp(size_t index, const LDefinition& temp) {
+ void setTemp(size_t index, const LDefinition& temp) override {
MOZ_CRASH("no temps");
}
- size_t numSuccessors() const {
+ size_t numSuccessors() const override {
return 0;
}
- MBasicBlock* getSuccessor(size_t i) const {
+ MBasicBlock* getSuccessor(size_t i) const override {
MOZ_CRASH("no successors");
}
- void setSuccessor(size_t i, MBasicBlock*) {
+ void setSuccessor(size_t i, MBasicBlock*) override {
MOZ_CRASH("no successors");
}
};
class LMoveGroup;
class LBlock
{
MBasicBlock* block_;
@@ -1186,17 +1186,17 @@ class LVariadicInstruction : public deta
#endif
}
};
template <size_t Defs, size_t Operands, size_t Temps>
class LCallInstructionHelper : public LInstructionHelper<Defs, Operands, Temps>
{
public:
- virtual bool isCall() const {
+ virtual bool isCall() const override {
return true;
}
};
template <size_t Defs, size_t Temps>
class LBinaryCallInstructionHelper : public LCallInstructionHelper<Defs, 2, Temps>
{
public:
--- a/js/src/jit/Lowering.h
+++ b/js/src/jit/Lowering.h
@@ -64,294 +64,294 @@ class LIRGenerator : public LIRGenerator
MOZ_MUST_USE bool lowerCallArguments(MCall* call);
public:
MOZ_MUST_USE bool visitInstruction(MInstruction* ins);
MOZ_MUST_USE bool visitBlock(MBasicBlock* block);
// Visitor hooks are explicit, to give CPU-specific versions a chance to
// intercept without a bunch of explicit gunk in the .cpp.
- void visitCloneLiteral(MCloneLiteral* ins);
- void visitParameter(MParameter* param);
- void visitCallee(MCallee* callee);
- void visitIsConstructing(MIsConstructing* ins);
- void visitGoto(MGoto* ins);
- void visitTableSwitch(MTableSwitch* tableswitch);
- void visitNewArray(MNewArray* ins);
- void visitNewArrayCopyOnWrite(MNewArrayCopyOnWrite* ins);
- void visitNewArrayDynamicLength(MNewArrayDynamicLength* ins);
- void visitNewIterator(MNewIterator* ins);
- void visitNewTypedArray(MNewTypedArray* ins);
- void visitNewTypedArrayDynamicLength(MNewTypedArrayDynamicLength* ins);
- void visitNewObject(MNewObject* ins);
- void visitNewTypedObject(MNewTypedObject* ins);
- void visitNewNamedLambdaObject(MNewNamedLambdaObject* ins);
- void visitNewCallObject(MNewCallObject* ins);
- void visitNewSingletonCallObject(MNewSingletonCallObject* ins);
- void visitNewStringObject(MNewStringObject* ins);
- void visitNewDerivedTypedObject(MNewDerivedTypedObject* ins);
- void visitInitElem(MInitElem* ins);
- void visitInitElemGetterSetter(MInitElemGetterSetter* ins);
- void visitMutateProto(MMutateProto* ins);
- void visitInitPropGetterSetter(MInitPropGetterSetter* ins);
- void visitCheckOverRecursed(MCheckOverRecursed* ins);
- void visitDefVar(MDefVar* ins);
- void visitDefLexical(MDefLexical* ins);
- void visitDefFun(MDefFun* ins);
- void visitCreateThisWithTemplate(MCreateThisWithTemplate* ins);
- void visitCreateThisWithProto(MCreateThisWithProto* ins);
- void visitCreateThis(MCreateThis* ins);
- void visitCreateArgumentsObject(MCreateArgumentsObject* ins);
- void visitGetArgumentsObjectArg(MGetArgumentsObjectArg* ins);
- void visitSetArgumentsObjectArg(MSetArgumentsObjectArg* ins);
- void visitReturnFromCtor(MReturnFromCtor* ins);
- void visitComputeThis(MComputeThis* ins);
- void visitCall(MCall* call);
- void visitApplyArgs(MApplyArgs* apply);
- void visitApplyArray(MApplyArray* apply);
- void visitBail(MBail* bail);
- void visitUnreachable(MUnreachable* unreachable);
- void visitEncodeSnapshot(MEncodeSnapshot* ins);
- void visitAssertFloat32(MAssertFloat32* ins);
- void visitAssertRecoveredOnBailout(MAssertRecoveredOnBailout* ins);
- void visitGetDynamicName(MGetDynamicName* ins);
- void visitCallDirectEval(MCallDirectEval* ins);
- void visitTest(MTest* test);
- void visitGotoWithFake(MGotoWithFake* ins);
- void visitFunctionDispatch(MFunctionDispatch* ins);
- void visitObjectGroupDispatch(MObjectGroupDispatch* ins);
- void visitCompare(MCompare* comp);
- void visitTypeOf(MTypeOf* ins);
- void visitToAsync(MToAsync* ins);
- void visitToAsyncGen(MToAsyncGen* ins);
- void visitToAsyncIter(MToAsyncIter* ins);
- void visitToId(MToId* ins);
- void visitBitNot(MBitNot* ins);
- void visitBitAnd(MBitAnd* ins);
- void visitBitOr(MBitOr* ins);
- void visitBitXor(MBitXor* ins);
- void visitLsh(MLsh* ins);
- void visitRsh(MRsh* ins);
- void visitUrsh(MUrsh* ins);
- void visitSignExtendInt32(MSignExtendInt32* ins);
- void visitRotate(MRotate* ins);
- void visitFloor(MFloor* ins);
- void visitCeil(MCeil* ins);
- void visitRound(MRound* ins);
- void visitNearbyInt(MNearbyInt* ins);
- void visitMinMax(MMinMax* ins);
- void visitAbs(MAbs* ins);
- void visitClz(MClz* ins);
- void visitCtz(MCtz* ins);
- void visitSqrt(MSqrt* ins);
- void visitPopcnt(MPopcnt* ins);
- void visitAtan2(MAtan2* ins);
- void visitHypot(MHypot* ins);
- void visitPow(MPow* ins);
- void visitMathFunction(MMathFunction* ins);
- void visitAdd(MAdd* ins);
- void visitSub(MSub* ins);
- void visitMul(MMul* ins);
- void visitDiv(MDiv* ins);
- void visitMod(MMod* ins);
- void visitConcat(MConcat* ins);
- void visitCharCodeAt(MCharCodeAt* ins);
- void visitFromCharCode(MFromCharCode* ins);
- void visitFromCodePoint(MFromCodePoint* ins);
- void visitStringConvertCase(MStringConvertCase* ins);
- void visitSinCos(MSinCos *ins);
- void visitStringSplit(MStringSplit* ins);
- void visitStart(MStart* start);
- void visitOsrEntry(MOsrEntry* entry);
- void visitNop(MNop* nop);
- void visitLimitedTruncate(MLimitedTruncate* nop);
- void visitOsrValue(MOsrValue* value);
- void visitOsrEnvironmentChain(MOsrEnvironmentChain* object);
- void visitOsrReturnValue(MOsrReturnValue* value);
- void visitOsrArgumentsObject(MOsrArgumentsObject* object);
- void visitToDouble(MToDouble* convert);
- void visitToFloat32(MToFloat32* convert);
- void visitToInt32(MToInt32* convert);
- void visitTruncateToInt32(MTruncateToInt32* truncate);
- void visitWasmTruncateToInt32(MWasmTruncateToInt32* truncate);
- void visitWrapInt64ToInt32(MWrapInt64ToInt32* ins);
- void visitToString(MToString* convert);
- void visitToObject(MToObject* convert);
- void visitToObjectOrNull(MToObjectOrNull* convert);
- void visitRegExp(MRegExp* ins);
- void visitRegExpMatcher(MRegExpMatcher* ins);
- void visitRegExpSearcher(MRegExpSearcher* ins);
- void visitRegExpTester(MRegExpTester* ins);
- void visitRegExpPrototypeOptimizable(MRegExpPrototypeOptimizable* ins);
- void visitRegExpInstanceOptimizable(MRegExpInstanceOptimizable* ins);
- void visitGetFirstDollarIndex(MGetFirstDollarIndex* ins);
- void visitStringReplace(MStringReplace* ins);
- void visitBinarySharedStub(MBinarySharedStub* ins);
- void visitUnarySharedStub(MUnarySharedStub* ins);
- void visitNullarySharedStub(MNullarySharedStub* ins);
- void visitClassConstructor(MClassConstructor* ins);
- void visitLambda(MLambda* ins);
- void visitLambdaArrow(MLambdaArrow* ins);
- void visitSetFunName(MSetFunName* ins);
- void visitNewLexicalEnvironmentObject(MNewLexicalEnvironmentObject* ins);
- void visitCopyLexicalEnvironmentObject(MCopyLexicalEnvironmentObject* ins);
- void visitKeepAliveObject(MKeepAliveObject* ins);
- void visitSlots(MSlots* ins);
- void visitElements(MElements* ins);
- void visitConstantElements(MConstantElements* ins);
- void visitConvertElementsToDoubles(MConvertElementsToDoubles* ins);
- void visitMaybeToDoubleElement(MMaybeToDoubleElement* ins);
- void visitMaybeCopyElementsForWrite(MMaybeCopyElementsForWrite* ins);
- void visitLoadSlot(MLoadSlot* ins);
- void visitLoadFixedSlotAndUnbox(MLoadFixedSlotAndUnbox* ins);
- void visitFunctionEnvironment(MFunctionEnvironment* ins);
- void visitHomeObject(MHomeObject* ins);
- void visitHomeObjectSuperBase(MHomeObjectSuperBase* ins);
- void visitInterruptCheck(MInterruptCheck* ins);
- void visitWasmTrap(MWasmTrap* ins);
- void visitWasmReinterpret(MWasmReinterpret* ins);
- void visitStoreSlot(MStoreSlot* ins);
- void visitFilterTypeSet(MFilterTypeSet* ins);
- void visitTypeBarrier(MTypeBarrier* ins);
- void visitMonitorTypes(MMonitorTypes* ins);
- void visitPostWriteBarrier(MPostWriteBarrier* ins);
- void visitPostWriteElementBarrier(MPostWriteElementBarrier* ins);
- void visitArrayLength(MArrayLength* ins);
- void visitSetArrayLength(MSetArrayLength* ins);
- void visitGetNextEntryForIterator(MGetNextEntryForIterator* ins);
- void visitTypedArrayLength(MTypedArrayLength* ins);
- void visitTypedArrayElements(MTypedArrayElements* ins);
- void visitSetDisjointTypedElements(MSetDisjointTypedElements* ins);
- void visitTypedObjectElements(MTypedObjectElements* ins);
- void visitSetTypedObjectOffset(MSetTypedObjectOffset* ins);
- void visitTypedObjectDescr(MTypedObjectDescr* ins);
- void visitInitializedLength(MInitializedLength* ins);
- void visitSetInitializedLength(MSetInitializedLength* ins);
- void visitNot(MNot* ins);
- void visitBoundsCheck(MBoundsCheck* ins);
- void visitBoundsCheckLower(MBoundsCheckLower* ins);
- void visitLoadElement(MLoadElement* ins);
- void visitLoadElementHole(MLoadElementHole* ins);
- void visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins);
- void visitLoadUnboxedString(MLoadUnboxedString* ins);
- void visitLoadElementFromState(MLoadElementFromState* ins);
- void visitStoreElement(MStoreElement* ins);
- void visitStoreElementHole(MStoreElementHole* ins);
- void visitFallibleStoreElement(MFallibleStoreElement* ins);
- void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins);
- void visitStoreUnboxedString(MStoreUnboxedString* ins);
- void visitConvertUnboxedObjectToNative(MConvertUnboxedObjectToNative* ins);
- void visitEffectiveAddress(MEffectiveAddress* ins);
- void visitArrayPopShift(MArrayPopShift* ins);
- void visitArrayPush(MArrayPush* ins);
- void visitArraySlice(MArraySlice* ins);
- void visitArrayJoin(MArrayJoin* ins);
- void visitLoadUnboxedScalar(MLoadUnboxedScalar* ins);
- void visitLoadTypedArrayElementHole(MLoadTypedArrayElementHole* ins);
- void visitLoadTypedArrayElementStatic(MLoadTypedArrayElementStatic* ins);
- void visitStoreUnboxedScalar(MStoreUnboxedScalar* ins);
- void visitStoreTypedArrayElementHole(MStoreTypedArrayElementHole* ins);
- void visitClampToUint8(MClampToUint8* ins);
- void visitLoadFixedSlot(MLoadFixedSlot* ins);
- void visitStoreFixedSlot(MStoreFixedSlot* ins);
- void visitGetPropSuperCache(MGetPropSuperCache* ins);
- void visitGetPropertyCache(MGetPropertyCache* ins);
- void visitGetPropertyPolymorphic(MGetPropertyPolymorphic* ins);
- void visitSetPropertyPolymorphic(MSetPropertyPolymorphic* ins);
- void visitBindNameCache(MBindNameCache* ins);
- void visitCallBindVar(MCallBindVar* ins);
- void visitGuardObjectIdentity(MGuardObjectIdentity* ins);
- void visitGuardClass(MGuardClass* ins);
- void visitGuardObject(MGuardObject* ins);
- void visitGuardString(MGuardString* ins);
- void visitGuardReceiverPolymorphic(MGuardReceiverPolymorphic* ins);
- void visitGuardUnboxedExpando(MGuardUnboxedExpando* ins);
- void visitLoadUnboxedExpando(MLoadUnboxedExpando* ins);
- void visitPolyInlineGuard(MPolyInlineGuard* ins);
- void visitAssertRange(MAssertRange* ins);
- void visitCallGetProperty(MCallGetProperty* ins);
- void visitDeleteProperty(MDeleteProperty* ins);
- void visitDeleteElement(MDeleteElement* ins);
- void visitGetNameCache(MGetNameCache* ins);
- void visitCallGetIntrinsicValue(MCallGetIntrinsicValue* ins);
- void visitCallGetElement(MCallGetElement* ins);
- void visitCallSetElement(MCallSetElement* ins);
- void visitCallInitElementArray(MCallInitElementArray* ins);
- void visitSetPropertyCache(MSetPropertyCache* ins);
- void visitCallSetProperty(MCallSetProperty* ins);
- void visitGetIteratorCache(MGetIteratorCache* ins);
- void visitIteratorMore(MIteratorMore* ins);
- void visitIsNoIter(MIsNoIter* ins);
- void visitIteratorEnd(MIteratorEnd* ins);
- void visitStringLength(MStringLength* ins);
- void visitArgumentsLength(MArgumentsLength* ins);
- void visitGetFrameArgument(MGetFrameArgument* ins);
- void visitSetFrameArgument(MSetFrameArgument* ins);
- void visitRunOncePrologue(MRunOncePrologue* ins);
- void visitRest(MRest* ins);
- void visitThrow(MThrow* ins);
- void visitInCache(MInCache* ins);
- void visitInArray(MInArray* ins);
- void visitHasOwnCache(MHasOwnCache* ins);
- void visitInstanceOf(MInstanceOf* ins);
- void visitCallInstanceOf(MCallInstanceOf* ins);
- void visitIsCallable(MIsCallable* ins);
- void visitIsConstructor(MIsConstructor* ins);
- void visitIsArray(MIsArray* ins);
- void visitIsTypedArray(MIsTypedArray* ins);
- void visitIsObject(MIsObject* ins);
- void visitHasClass(MHasClass* ins);
- void visitObjectClassToString(MObjectClassToString* ins);
- void visitWasmAddOffset(MWasmAddOffset* ins);
- void visitWasmLoadTls(MWasmLoadTls* ins);
- void visitWasmBoundsCheck(MWasmBoundsCheck* ins);
- void visitWasmAlignmentCheck(MWasmAlignmentCheck* ins);
- void visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins);
- void visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins);
- void visitWasmParameter(MWasmParameter* ins);
- void visitWasmReturn(MWasmReturn* ins);
- void visitWasmReturnVoid(MWasmReturnVoid* ins);
- void visitWasmStackArg(MWasmStackArg* ins);
- void visitWasmCall(MWasmCall* ins);
- void visitSetDOMProperty(MSetDOMProperty* ins);
- void visitGetDOMProperty(MGetDOMProperty* ins);
- void visitGetDOMMember(MGetDOMMember* ins);
- void visitRecompileCheck(MRecompileCheck* ins);
- void visitSimdBox(MSimdBox* ins);
- void visitSimdUnbox(MSimdUnbox* ins);
- void visitSimdUnaryArith(MSimdUnaryArith* ins);
- void visitSimdBinaryComp(MSimdBinaryComp* ins);
- void visitSimdBinaryBitwise(MSimdBinaryBitwise* ins);
- void visitSimdShift(MSimdShift* ins);
- void visitSimdConstant(MSimdConstant* ins);
- void visitSimdConvert(MSimdConvert* ins);
- void visitSimdReinterpretCast(MSimdReinterpretCast* ins);
- void visitSimdAllTrue(MSimdAllTrue* ins);
- void visitSimdAnyTrue(MSimdAnyTrue* ins);
- void visitPhi(MPhi* ins);
- void visitBeta(MBeta* ins);
- void visitObjectState(MObjectState* ins);
- void visitArrayState(MArrayState* ins);
- void visitArgumentState(MArgumentState* ins);
- void visitUnknownValue(MUnknownValue* ins);
- void visitLexicalCheck(MLexicalCheck* ins);
- void visitThrowRuntimeLexicalError(MThrowRuntimeLexicalError* ins);
- void visitGlobalNameConflictsCheck(MGlobalNameConflictsCheck* ins);
- void visitDebugger(MDebugger* ins);
- void visitNewTarget(MNewTarget* ins);
- void visitArrowNewTarget(MArrowNewTarget* ins);
- void visitNaNToZero(MNaNToZero *ins);
- void visitAtomicIsLockFree(MAtomicIsLockFree* ins);
- void visitGuardSharedTypedArray(MGuardSharedTypedArray* ins);
- void visitCheckReturn(MCheckReturn* ins);
- void visitCheckIsObj(MCheckIsObj* ins);
- void visitCheckIsCallable(MCheckIsCallable* ins);
- void visitCheckObjCoercible(MCheckObjCoercible* ins);
- void visitDebugCheckSelfHosted(MDebugCheckSelfHosted* ins);
- void visitFinishBoundFunctionInit(MFinishBoundFunctionInit* ins);
- void visitIsPackedArray(MIsPackedArray* ins);
- void visitGetPrototypeOf(MGetPrototypeOf* ins);
+ void visitCloneLiteral(MCloneLiteral* ins) override;
+ void visitParameter(MParameter* param) override;
+ void visitCallee(MCallee* callee) override;
+ void visitIsConstructing(MIsConstructing* ins) override;
+ void visitGoto(MGoto* ins) override;
+ void visitTableSwitch(MTableSwitch* tableswitch) override;
+ void visitNewArray(MNewArray* ins) override;
+ void visitNewArrayCopyOnWrite(MNewArrayCopyOnWrite* ins) override;
+ void visitNewArrayDynamicLength(MNewArrayDynamicLength* ins) override;
+ void visitNewIterator(MNewIterator* ins) override;
+ void visitNewTypedArray(MNewTypedArray* ins) override;
+ void visitNewTypedArrayDynamicLength(MNewTypedArrayDynamicLength* ins) override;
+ void visitNewObject(MNewObject* ins) override;
+ void visitNewTypedObject(MNewTypedObject* ins) override;
+ void visitNewNamedLambdaObject(MNewNamedLambdaObject* ins) override;
+ void visitNewCallObject(MNewCallObject* ins) override;
+ void visitNewSingletonCallObject(MNewSingletonCallObject* ins) override;
+ void visitNewStringObject(MNewStringObject* ins) override;
+ void visitNewDerivedTypedObject(MNewDerivedTypedObject* ins) override;
+ void visitInitElem(MInitElem* ins) override;
+ void visitInitElemGetterSetter(MInitElemGetterSetter* ins) override;
+ void visitMutateProto(MMutateProto* ins) override;
+ void visitInitPropGetterSetter(MInitPropGetterSetter* ins) override;
+ void visitCheckOverRecursed(MCheckOverRecursed* ins) override;
+ void visitDefVar(MDefVar* ins) override;
+ void visitDefLexical(MDefLexical* ins) override;
+ void visitDefFun(MDefFun* ins) override;
+ void visitCreateThisWithTemplate(MCreateThisWithTemplate* ins) override;
+ void visitCreateThisWithProto(MCreateThisWithProto* ins) override;
+ void visitCreateThis(MCreateThis* ins) override;
+ void visitCreateArgumentsObject(MCreateArgumentsObject* ins) override;
+ void visitGetArgumentsObjectArg(MGetArgumentsObjectArg* ins) override;
+ void visitSetArgumentsObjectArg(MSetArgumentsObjectArg* ins) override;
+ void visitReturnFromCtor(MReturnFromCtor* ins) override;
+ void visitComputeThis(MComputeThis* ins) override;
+ void visitCall(MCall* call) override;
+ void visitApplyArgs(MApplyArgs* apply) override;
+ void visitApplyArray(MApplyArray* apply) override;
+ void visitBail(MBail* bail) override;
+ void visitUnreachable(MUnreachable* unreachable) override;
+ void visitEncodeSnapshot(MEncodeSnapshot* ins) override;
+ void visitAssertFloat32(MAssertFloat32* ins) override;
+ void visitAssertRecoveredOnBailout(MAssertRecoveredOnBailout* ins) override;
+ void visitGetDynamicName(MGetDynamicName* ins) override;
+ void visitCallDirectEval(MCallDirectEval* ins) override;
+ void visitTest(MTest* test) override;
+ void visitGotoWithFake(MGotoWithFake* ins) override;
+ void visitFunctionDispatch(MFunctionDispatch* ins) override;
+ void visitObjectGroupDispatch(MObjectGroupDispatch* ins) override;
+ void visitCompare(MCompare* comp) override;
+ void visitTypeOf(MTypeOf* ins) override;
+ void visitToAsync(MToAsync* ins) override;
+ void visitToAsyncGen(MToAsyncGen* ins) override;
+ void visitToAsyncIter(MToAsyncIter* ins) override;
+ void visitToId(MToId* ins) override;
+ void visitBitNot(MBitNot* ins) override;
+ void visitBitAnd(MBitAnd* ins) override;
+ void visitBitOr(MBitOr* ins) override;
+ void visitBitXor(MBitXor* ins) override;
+ void visitLsh(MLsh* ins) override;
+ void visitRsh(MRsh* ins) override;
+ void visitUrsh(MUrsh* ins) override;
+ void visitSignExtendInt32(MSignExtendInt32* ins) override;
+ void visitRotate(MRotate* ins) override;
+ void visitFloor(MFloor* ins) override;
+ void visitCeil(MCeil* ins) override;
+ void visitRound(MRound* ins) override;
+ void visitNearbyInt(MNearbyInt* ins) override;
+ void visitMinMax(MMinMax* ins) override;
+ void visitAbs(MAbs* ins) override;
+ void visitClz(MClz* ins) override;
+ void visitCtz(MCtz* ins) override;
+ void visitSqrt(MSqrt* ins) override;
+ void visitPopcnt(MPopcnt* ins) override;
+ void visitAtan2(MAtan2* ins) override;
+ void visitHypot(MHypot* ins) override;
+ void visitPow(MPow* ins) override;
+ void visitMathFunction(MMathFunction* ins) override;
+ void visitAdd(MAdd* ins) override;
+ void visitSub(MSub* ins) override;
+ void visitMul(MMul* ins) override;
+ void visitDiv(MDiv* ins) override;
+ void visitMod(MMod* ins) override;
+ void visitConcat(MConcat* ins) override;
+ void visitCharCodeAt(MCharCodeAt* ins) override;
+ void visitFromCharCode(MFromCharCode* ins) override;
+ void visitFromCodePoint(MFromCodePoint* ins) override;
+ void visitStringConvertCase(MStringConvertCase* ins) override;
+ void visitSinCos(MSinCos *ins) override;
+ void visitStringSplit(MStringSplit* ins) override;
+ void visitStart(MStart* start) override;
+ void visitOsrEntry(MOsrEntry* entry) override;
+ void visitNop(MNop* nop) override;
+ void visitLimitedTruncate(MLimitedTruncate* nop) override;
+ void visitOsrValue(MOsrValue* value) override;
+ void visitOsrEnvironmentChain(MOsrEnvironmentChain* object) override;
+ void visitOsrReturnValue(MOsrReturnValue* value) override;
+ void visitOsrArgumentsObject(MOsrArgumentsObject* object) override;
+ void visitToDouble(MToDouble* convert) override;
+ void visitToFloat32(MToFloat32* convert) override;
+ void visitToInt32(MToInt32* convert) override;
+ void visitTruncateToInt32(MTruncateToInt32* truncate) override;
+ void visitWasmTruncateToInt32(MWasmTruncateToInt32* truncate) override;
+ void visitWrapInt64ToInt32(MWrapInt64ToInt32* ins) override;
+ void visitToString(MToString* convert) override;
+ void visitToObject(MToObject* convert) override;
+ void visitToObjectOrNull(MToObjectOrNull* convert) override;
+ void visitRegExp(MRegExp* ins) override;
+ void visitRegExpMatcher(MRegExpMatcher* ins) override;
+ void visitRegExpSearcher(MRegExpSearcher* ins) override;
+ void visitRegExpTester(MRegExpTester* ins) override;
+ void visitRegExpPrototypeOptimizable(MRegExpPrototypeOptimizable* ins) override;
+ void visitRegExpInstanceOptimizable(MRegExpInstanceOptimizable* ins) override;
+ void visitGetFirstDollarIndex(MGetFirstDollarIndex* ins) override;
+ void visitStringReplace(MStringReplace* ins) override;
+ void visitBinarySharedStub(MBinarySharedStub* ins) override;
+ void visitUnarySharedStub(MUnarySharedStub* ins) override;
+ void visitNullarySharedStub(MNullarySharedStub* ins) override;
+ void visitClassConstructor(MClassConstructor* ins) override;
+ void visitLambda(MLambda* ins) override;
+ void visitLambdaArrow(MLambdaArrow* ins) override;
+ void visitSetFunName(MSetFunName* ins) override;
+ void visitNewLexicalEnvironmentObject(MNewLexicalEnvironmentObject* ins) override;
+ void visitCopyLexicalEnvironmentObject(MCopyLexicalEnvironmentObject* ins) override;
+ void visitKeepAliveObject(MKeepAliveObject* ins) override;
+ void visitSlots(MSlots* ins) override;
+ void visitElements(MElements* ins) override;
+ void visitConstantElements(MConstantElements* ins) override;
+ void visitConvertElementsToDoubles(MConvertElementsToDoubles* ins) override;
+ void visitMaybeToDoubleElement(MMaybeToDoubleElement* ins) override;
+ void visitMaybeCopyElementsForWrite(MMaybeCopyElementsForWrite* ins) override;
+ void visitLoadSlot(MLoadSlot* ins) override;
+ void visitLoadFixedSlotAndUnbox(MLoadFixedSlotAndUnbox* ins) override;
+ void visitFunctionEnvironment(MFunctionEnvironment* ins) override;
+ void visitHomeObject(MHomeObject* ins) override;
+ void visitHomeObjectSuperBase(MHomeObjectSuperBase* ins) override;
+ void visitInterruptCheck(MInterruptCheck* ins) override;
+ void visitWasmTrap(MWasmTrap* ins) override;
+ void visitWasmReinterpret(MWasmReinterpret* ins) override;
+ void visitStoreSlot(MStoreSlot* ins) override;
+ void visitFilterTypeSet(MFilterTypeSet* ins) override;
+ void visitTypeBarrier(MTypeBarrier* ins) override;
+ void visitMonitorTypes(MMonitorTypes* ins) override;
+ void visitPostWriteBarrier(MPostWriteBarrier* ins) override;
+ void visitPostWriteElementBarrier(MPostWriteElementBarrier* ins) override;
+ void visitArrayLength(MArrayLength* ins) override;
+ void visitSetArrayLength(MSetArrayLength* ins) override;
+ void visitGetNextEntryForIterator(MGetNextEntryForIterator* ins) override;
+ void visitTypedArrayLength(MTypedArrayLength* ins) override;
+ void visitTypedArrayElements(MTypedArrayElements* ins) override;
+ void visitSetDisjointTypedElements(MSetDisjointTypedElements* ins) override;
+ void visitTypedObjectElements(MTypedObjectElements* ins) override;
+ void visitSetTypedObjectOffset(MSetTypedObjectOffset* ins) override;
+ void visitTypedObjectDescr(MTypedObjectDescr* ins) override;
+ void visitInitializedLength(MInitializedLength* ins) override;
+ void visitSetInitializedLength(MSetInitializedLength* ins) override;
+ void visitNot(MNot* ins) override;
+ void visitBoundsCheck(MBoundsCheck* ins) override;
+ void visitBoundsCheckLower(MBoundsCheckLower* ins) override;
+ void visitLoadElement(MLoadElement* ins) override;
+ void visitLoadElementHole(MLoadElementHole* ins) override;
+ void visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins) override;
+ void visitLoadUnboxedString(MLoadUnboxedString* ins) override;
+ void visitLoadElementFromState(MLoadElementFromState* ins) override;
+ void visitStoreElement(MStoreElement* ins) override;
+ void visitStoreElementHole(MStoreElementHole* ins) override;
+ void visitFallibleStoreElement(MFallibleStoreElement* ins) override;
+ void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins) override;
+ void visitStoreUnboxedString(MStoreUnboxedString* ins) override;
+ void visitConvertUnboxedObjectToNative(MConvertUnboxedObjectToNative* ins) override;
+ void visitEffectiveAddress(MEffectiveAddress* ins) override;
+ void visitArrayPopShift(MArrayPopShift* ins) override;
+ void visitArrayPush(MArrayPush* ins) override;
+ void visitArraySlice(MArraySlice* ins) override;
+ void visitArrayJoin(MArrayJoin* ins) override;
+ void visitLoadUnboxedScalar(MLoadUnboxedScalar* ins) override;
+ void visitLoadTypedArrayElementHole(MLoadTypedArrayElementHole* ins) override;
+ void visitLoadTypedArrayElementStatic(MLoadTypedArrayElementStatic* ins) override;
+ void visitStoreUnboxedScalar(MStoreUnboxedScalar* ins) override;
+ void visitStoreTypedArrayElementHole(MStoreTypedArrayElementHole* ins) override;
+ void visitClampToUint8(MClampToUint8* ins) override;
+ void visitLoadFixedSlot(MLoadFixedSlot* ins) override;
+ void visitStoreFixedSlot(MStoreFixedSlot* ins) override;
+ void visitGetPropSuperCache(MGetPropSuperCache* ins) override;
+ void visitGetPropertyCache(MGetPropertyCache* ins) override;
+ void visitGetPropertyPolymorphic(MGetPropertyPolymorphic* ins) override;
+ void visitSetPropertyPolymorphic(MSetPropertyPolymorphic* ins) override;
+ void visitBindNameCache(MBindNameCache* ins) override;
+ void visitCallBindVar(MCallBindVar* ins) override;
+ void visitGuardObjectIdentity(MGuardObjectIdentity* ins) override;
+ void visitGuardClass(MGuardClass* ins) override;
+ void visitGuardObject(MGuardObject* ins) override;
+ void visitGuardString(MGuardString* ins) override;
+ void visitGuardReceiverPolymorphic(MGuardReceiverPolymorphic* ins) override;
+ void visitGuardUnboxedExpando(MGuardUnboxedExpando* ins) override;
+ void visitLoadUnboxedExpando(MLoadUnboxedExpando* ins) override;
+ void visitPolyInlineGuard(MPolyInlineGuard* ins) override;
+ void visitAssertRange(MAssertRange* ins) override;
+ void visitCallGetProperty(MCallGetProperty* ins) override;
+ void visitDeleteProperty(MDeleteProperty* ins) override;
+ void visitDeleteElement(MDeleteElement* ins) override;
+ void visitGetNameCache(MGetNameCache* ins) override;
+ void visitCallGetIntrinsicValue(MCallGetIntrinsicValue* ins) override;
+ void visitCallGetElement(MCallGetElement* ins) override;
+ void visitCallSetElement(MCallSetElement* ins) override;
+ void visitCallInitElementArray(MCallInitElementArray* ins) override;
+ void visitSetPropertyCache(MSetPropertyCache* ins) override;
+ void visitCallSetProperty(MCallSetProperty* ins) override;
+ void visitGetIteratorCache(MGetIteratorCache* ins) override;
+ void visitIteratorMore(MIteratorMore* ins) override;
+ void visitIsNoIter(MIsNoIter* ins) override;
+ void visitIteratorEnd(MIteratorEnd* ins) override;
+ void visitStringLength(MStringLength* ins) override;
+ void visitArgumentsLength(MArgumentsLength* ins) override;
+ void visitGetFrameArgument(MGetFrameArgument* ins) override;
+ void visitSetFrameArgument(MSetFrameArgument* ins) override;
+ void visitRunOncePrologue(MRunOncePrologue* ins) override;
+ void visitRest(MRest* ins) override;
+ void visitThrow(MThrow* ins) override;
+ void visitInCache(MInCache* ins) override;
+ void visitInArray(MInArray* ins) override;
+ void visitHasOwnCache(MHasOwnCache* ins) override;
+ void visitInstanceOf(MInstanceOf* ins) override;
+ void visitCallInstanceOf(MCallInstanceOf* ins) override;
+ void visitIsCallable(MIsCallable* ins) override;
+ void visitIsConstructor(MIsConstructor* ins) override;
+ void visitIsArray(MIsArray* ins) override;
+ void visitIsTypedArray(MIsTypedArray* ins) override;
+ void visitIsObject(MIsObject* ins) override;
+ void visitHasClass(MHasClass* ins) override;
+ void visitObjectClassToString(MObjectClassToString* ins) override;
+ void visitWasmAddOffset(MWasmAddOffset* ins) override;
+ void visitWasmLoadTls(MWasmLoadTls* ins) override;
+ void visitWasmBoundsCheck(MWasmBoundsCheck* ins) override;
+ void visitWasmAlignmentCheck(MWasmAlignmentCheck* ins) override;
+ void visitWasmLoadGlobalVar(MWasmLoadGlobalVar* ins) override;
+ void visitWasmStoreGlobalVar(MWasmStoreGlobalVar* ins) override;
+ void visitWasmParameter(MWasmParameter* ins) override;
+ void visitWasmReturn(MWasmReturn* ins) override;
+ void visitWasmReturnVoid(MWasmReturnVoid* ins) override;
+ void visitWasmStackArg(MWasmStackArg* ins) override;
+ void visitWasmCall(MWasmCall* ins) override;
+ void visitSetDOMProperty(MSetDOMProperty* ins) override;
+ void visitGetDOMProperty(MGetDOMProperty* ins) override;
+ void visitGetDOMMember(MGetDOMMember* ins) override;
+ void visitRecompileCheck(MRecompileCheck* ins) override;
+ void visitSimdBox(MSimdBox* ins) override;
+ void visitSimdUnbox(MSimdUnbox* ins) override;
+ void visitSimdUnaryArith(MSimdUnaryArith* ins) override;
+ void visitSimdBinaryComp(MSimdBinaryComp* ins) override;
+ void visitSimdBinaryBitwise(MSimdBinaryBitwise* ins) override;
+ void visitSimdShift(MSimdShift* ins) override;
+ void visitSimdConstant(MSimdConstant* ins) override;
+ void visitSimdConvert(MSimdConvert* ins) override;
+ void visitSimdReinterpretCast(MSimdReinterpretCast* ins) override;
+ void visitSimdAllTrue(MSimdAllTrue* ins) override;
+ void visitSimdAnyTrue(MSimdAnyTrue* ins) override;
+ void visitPhi(MPhi* ins) override;
+ void visitBeta(MBeta* ins) override;
+ void visitObjectState(MObjectState* ins) override;
+ void visitArrayState(MArrayState* ins) override;
+ void visitArgumentState(MArgumentState* ins) override;
+ void visitUnknownValue(MUnknownValue* ins) override;
+ void visitLexicalCheck(MLexicalCheck* ins) override;
+ void visitThrowRuntimeLexicalError(MThrowRuntimeLexicalError* ins) override;
+ void visitGlobalNameConflictsCheck(MGlobalNameConflictsCheck* ins) override;
+ void visitDebugger(MDebugger* ins) override;
+ void visitNewTarget(MNewTarget* ins) override;
+ void visitArrowNewTarget(MArrowNewTarget* ins) override;
+ void visitNaNToZero(MNaNToZero *ins) override;
+ void visitAtomicIsLockFree(MAtomicIsLockFree* ins) override;
+ void visitGuardSharedTypedArray(MGuardSharedTypedArray* ins) override;
+ void visitCheckReturn(MCheckReturn* ins) override;
+ void visitCheckIsObj(MCheckIsObj* ins) override;
+ void visitCheckIsCallable(MCheckIsCallable* ins) override;
+ void visitCheckObjCoercible(MCheckObjCoercible* ins) override;
+ void visitDebugCheckSelfHosted(MDebugCheckSelfHosted* ins) override;
+ void visitFinishBoundFunctionInit(MFinishBoundFunctionInit* ins) override;
+ void visitIsPackedArray(MIsPackedArray* ins) override;
+ void visitGetPrototypeOf(MGetPrototypeOf* ins) override;
};
} // namespace jit
} // namespace js
#endif /* jit_Lowering_h */
--- a/js/src/jit/MOpcodes.h
+++ b/js/src/jit/MOpcodes.h
@@ -345,26 +345,26 @@ class MDefinitionVisitor // interface i.
#undef VISIT_INS
};
// MDefinition visitor which raises a Not Yet Implemented error for
// non-overloaded visit functions.
class MDefinitionVisitorDefaultNYI : public MDefinitionVisitor
{
public:
-#define VISIT_INS(op) virtual void visit##op(M##op*) { MOZ_CRASH("NYI: " #op); }
+#define VISIT_INS(op) virtual void visit##op(M##op*) override { MOZ_CRASH("NYI: " #op); }
MIR_OPCODE_LIST(VISIT_INS)
#undef VISIT_INS
};
// MDefinition visitor which ignores non-overloaded visit functions.
class MDefinitionVisitorDefaultNoop : public MDefinitionVisitor
{
public:
-#define VISIT_INS(op) virtual void visit##op(M##op*) { }
+#define VISIT_INS(op) virtual void visit##op(M##op*) override { }
MIR_OPCODE_LIST(VISIT_INS)
#undef VISIT_INS
};
} // namespace jit
} // namespace js
#endif /* jit_MOpcodes_h */
--- a/js/src/jit/MacroAssembler.h
+++ b/js/src/jit/MacroAssembler.h
@@ -298,17 +298,17 @@ class MacroAssembler : public MacroAssem
type_(TypeSet::UnknownType())
{ }
BranchType(Condition cond, Register reg, TypeSet::Type type, Label* jump)
: Branch(cond, reg, jump),
type_(type)
{ }
- void emit(MacroAssembler& masm);
+ void emit(MacroAssembler& masm) override;
};
/*
* Creates a branch based on a GCPtr.
*/
class BranchGCPtr : public Branch
{
ImmGCPtr ptr_;
@@ -319,17 +319,17 @@ class MacroAssembler : public MacroAssem
ptr_(ImmGCPtr(nullptr))
{ }
BranchGCPtr(Condition cond, Register reg, ImmGCPtr ptr, Label* jump)
: Branch(cond, reg, jump),
ptr_(ptr)
{ }
- void emit(MacroAssembler& masm);
+ void emit(MacroAssembler& masm) override;
};
mozilla::Maybe<AutoRooter> autoRooter_;
mozilla::Maybe<JitContext> jitContext_;
mozilla::Maybe<AutoJitContextAlloc> alloc_;
private:
// Labels for handling exceptions and failures.
--- a/js/src/jit/ScalarReplacement.cpp
+++ b/js/src/jit/ScalarReplacement.cpp
@@ -334,34 +334,34 @@ class ObjectMemoryView : public MDefinit
#else
void assertSuccess() {}
#endif
bool oom() const { return oom_; }
public:
void visitResumePoint(MResumePoint* rp);
- void visitObjectState(MObjectState* ins);
- void visitStoreFixedSlot(MStoreFixedSlot* ins);
- void visitLoadFixedSlot(MLoadFixedSlot* ins);
- void visitPostWriteBarrier(MPostWriteBarrier* ins);
- void visitStoreSlot(MStoreSlot* ins);
- void visitLoadSlot(MLoadSlot* ins);
- void visitGuardShape(MGuardShape* ins);
- void visitGuardObjectGroup(MGuardObjectGroup* ins);
- void visitGuardUnboxedExpando(MGuardUnboxedExpando* ins);
- void visitFunctionEnvironment(MFunctionEnvironment* ins);
- void visitLambda(MLambda* ins);
- void visitLambdaArrow(MLambdaArrow* ins);
- void visitStoreUnboxedScalar(MStoreUnboxedScalar* ins);
- void visitLoadUnboxedScalar(MLoadUnboxedScalar* ins);
- void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins);
- void visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins);
- void visitStoreUnboxedString(MStoreUnboxedString* ins);
- void visitLoadUnboxedString(MLoadUnboxedString* ins);
+ void visitObjectState(MObjectState* ins) override;
+ void visitStoreFixedSlot(MStoreFixedSlot* ins) override;
+ void visitLoadFixedSlot(MLoadFixedSlot* ins) override;
+ void visitPostWriteBarrier(MPostWriteBarrier* ins) override;
+ void visitStoreSlot(MStoreSlot* ins) override;
+ void visitLoadSlot(MLoadSlot* ins) override;
+ void visitGuardShape(MGuardShape* ins) override;
+ void visitGuardObjectGroup(MGuardObjectGroup* ins) override;
+ void visitGuardUnboxedExpando(MGuardUnboxedExpando* ins) override;
+ void visitFunctionEnvironment(MFunctionEnvironment* ins) override;
+ void visitLambda(MLambda* ins) override;
+ void visitLambdaArrow(MLambdaArrow* ins) override;
+ void visitStoreUnboxedScalar(MStoreUnboxedScalar* ins) override;
+ void visitLoadUnboxedScalar(MLoadUnboxedScalar* ins) override;
+ void visitStoreUnboxedObjectOrNull(MStoreUnboxedObjectOrNull* ins) override;
+ void visitLoadUnboxedObjectOrNull(MLoadUnboxedObjectOrNull* ins) override;
+ void visitStoreUnboxedString(MStoreUnboxedString* ins) override;
+ void visitLoadUnboxedString(MLoadUnboxedString* ins) override;
private:
void storeOffset(MInstruction* ins, size_t offset, MDefinition* value);
void loadOffset(MInstruction* ins, size_t offset);
void visitObjectGuard(MInstruction* ins, MDefinition* operand);
};
const char* ObjectMemoryView::phaseName = "Scalar Replacement of Object";
@@ -1103,22 +1103,22 @@ class ArrayMemoryView : public MDefiniti
bool oom() const { return oom_; }
private:
bool isArrayStateElements(MDefinition* elements);
void discardInstruction(MInstruction* ins, MDefinition* elements);
public:
void visitResumePoint(MResumePoint* rp);
- void visitArrayState(MArrayState* ins);
- void visitStoreElement(MStoreElement* ins);
- void visitLoadElement(MLoadElement* ins);
- void visitSetInitializedLength(MSetInitializedLength* ins);
- void visitInitializedLength(MInitializedLength* ins);
- void visitArrayLength(MArrayLength* ins);
+ void visitArrayState(MArrayState* ins) override;
+ void visitStoreElement(MStoreElement* ins) override;
+ void visitLoadElement(MLoadElement* ins) override;
+ void visitSetInitializedLength(MSetInitializedLength* ins) override;
+ void visitInitializedLength(MInitializedLength* ins) override;
+ void visitArrayLength(MArrayLength* ins) override;
};
const char* ArrayMemoryView::phaseName = "Scalar Replacement of Array";
ArrayMemoryView::ArrayMemoryView(TempAllocator& alloc, MInstruction* arr)
: alloc_(alloc),
undefinedVal_(nullptr),
length_(nullptr),
--- a/js/src/jit/SharedIC.h
+++ b/js/src/jit/SharedIC.h
@@ -1234,17 +1234,17 @@ class ICMonitoredFallbackStub : public I
// These compilers need access to the JSOp they are compiling for.
class ICMultiStubCompiler : public ICStubCompiler
{
protected:
JSOp op;
// Stub keys for multi-stub kinds are composed of both the kind
// and the op they are compiled for.
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op) << 17);
}
ICMultiStubCompiler(JSContext* cx, ICStub::Kind kind, JSOp op, Engine engine)
: ICStubCompiler(cx, kind, engine), op(op) {}
};
@@ -1301,17 +1301,17 @@ class TypeCheckPrimitiveSetStub : public
return toTypeUpdate_PrimitiveSet();
}
class Compiler : public ICStubCompiler {
protected:
TypeCheckPrimitiveSetStub* existingStub_;
uint16_t flags_;
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(flags_) << 17);
}
public:
Compiler(JSContext* cx, Kind kind, TypeCheckPrimitiveSetStub* existingStub,
JSValueType type)
@@ -1484,32 +1484,32 @@ class ICTypeMonitor_Fallback : public IC
void resetMonitorStubChain(Zone* zone);
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
ICMonitoredFallbackStub* mainFallbackStub_;
uint32_t argumentIndex_;
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, ICMonitoredFallbackStub* mainFallbackStub)
: ICStubCompiler(cx, ICStub::TypeMonitor_Fallback, Engine::Baseline),
mainFallbackStub_(mainFallbackStub),
argumentIndex_(BYTECODE_INDEX)
{ }
Compiler(JSContext* cx, uint32_t argumentIndex)
: ICStubCompiler(cx, ICStub::TypeMonitor_Fallback, Engine::Baseline),
mainFallbackStub_(nullptr),
argumentIndex_(argumentIndex)
{ }
- ICTypeMonitor_Fallback* getStub(ICStubSpace* space) {
+ ICTypeMonitor_Fallback* getStub(ICStubSpace* space) override {
return newStub<ICTypeMonitor_Fallback>(space, getStubCode(), mainFallbackStub_,
argumentIndex_);
}
};
};
class ICTypeMonitor_PrimitiveSet : public TypeCheckPrimitiveSetStub
{
@@ -1517,34 +1517,34 @@ class ICTypeMonitor_PrimitiveSet : publi
ICTypeMonitor_PrimitiveSet(JitCode* stubCode, uint16_t flags)
: TypeCheckPrimitiveSetStub(TypeMonitor_PrimitiveSet, stubCode, flags)
{}
public:
class Compiler : public TypeCheckPrimitiveSetStub::Compiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, ICTypeMonitor_PrimitiveSet* existingStub,
JSValueType type)
: TypeCheckPrimitiveSetStub::Compiler(cx, TypeMonitor_PrimitiveSet, existingStub,
type)
{}
ICTypeMonitor_PrimitiveSet* updateStub() {
TypeCheckPrimitiveSetStub* stub =
this->TypeCheckPrimitiveSetStub::Compiler::updateStub();
if (!stub)
return nullptr;
return stub->toMonitorStub();
}
- ICTypeMonitor_PrimitiveSet* getStub(ICStubSpace* space) {
+ ICTypeMonitor_PrimitiveSet* getStub(ICStubSpace* space) override {
MOZ_ASSERT(!existingStub_);
return newStub<ICTypeMonitor_PrimitiveSet>(space, getStubCode(), flags_);
}
};
};
class ICTypeMonitor_SingleObject : public ICStub
{
@@ -1561,25 +1561,25 @@ class ICTypeMonitor_SingleObject : publi
static size_t offsetOfObject() {
return offsetof(ICTypeMonitor_SingleObject, obj_);
}
class Compiler : public ICStubCompiler {
protected:
HandleObject obj_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, HandleObject obj)
: ICStubCompiler(cx, TypeMonitor_SingleObject, Engine::Baseline),
obj_(obj)
{ }
- ICTypeMonitor_SingleObject* getStub(ICStubSpace* space) {
+ ICTypeMonitor_SingleObject* getStub(ICStubSpace* space) override {
return newStub<ICTypeMonitor_SingleObject>(space, getStubCode(), obj_);
}
};
};
class ICTypeMonitor_ObjectGroup : public ICStub
{
friend class ICStubSpace;
@@ -1595,49 +1595,49 @@ class ICTypeMonitor_ObjectGroup : public
static size_t offsetOfGroup() {
return offsetof(ICTypeMonitor_ObjectGroup, group_);
}
class Compiler : public ICStubCompiler {
protected:
HandleObjectGroup group_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, HandleObjectGroup group)
: ICStubCompiler(cx, TypeMonitor_ObjectGroup, Engine::Baseline),
group_(group)
{ }
- ICTypeMonitor_ObjectGroup* getStub(ICStubSpace* space) {
+ ICTypeMonitor_ObjectGroup* getStub(ICStubSpace* space) override {
return newStub<ICTypeMonitor_ObjectGroup>(space, getStubCode(), group_);
}
};
};
class ICTypeMonitor_AnyValue : public ICStub
{
friend class ICStubSpace;
explicit ICTypeMonitor_AnyValue(JitCode* stubCode)
: ICStub(TypeMonitor_AnyValue, stubCode)
{}
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx)
: ICStubCompiler(cx, TypeMonitor_AnyValue, Engine::Baseline)
{ }
- ICTypeMonitor_AnyValue* getStub(ICStubSpace* space) {
+ ICTypeMonitor_AnyValue* getStub(ICStubSpace* space) override {
return newStub<ICTypeMonitor_AnyValue>(space, getStubCode());
}
};
};
// BinaryArith
// JSOP_ADD, JSOP_SUB, JSOP_MUL, JOP_DIV, JSOP_MOD
// JSOP_BITAND, JSOP_BITXOR, JSOP_BITOR
@@ -1670,23 +1670,23 @@ class ICBinaryArith_Fallback : public IC
}
void noteUnoptimizableOperands() {
extra_ |= UNOPTIMIZABLE_OPERANDS_BIT;
}
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx, Engine engine)
: ICStubCompiler(cx, ICStub::BinaryArith_Fallback, engine) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_Fallback>(space, getStubCode());
}
};
};
class ICBinaryArith_Int32 : public ICStub
{
friend class ICStubSpace;
@@ -1703,56 +1703,56 @@ class ICBinaryArith_Int32 : public ICStu
}
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
JSOp op_;
bool allowDouble_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
// Stub keys shift-stubs need to encode the kind, the JSOp and if we allow doubles.
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op_) << 17) |
(static_cast<int32_t>(allowDouble_) << 25);
}
public:
Compiler(JSContext* cx, JSOp op, Engine engine, bool allowDouble)
: ICStubCompiler(cx, ICStub::BinaryArith_Int32, engine),
op_(op), allowDouble_(allowDouble) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_Int32>(space, getStubCode(), allowDouble_);
}
};
};
class ICBinaryArith_StringConcat : public ICStub
{
friend class ICStubSpace;
explicit ICBinaryArith_StringConcat(JitCode* stubCode)
: ICStub(BinaryArith_StringConcat, stubCode)
{}
public:
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx, Engine engine)
: ICStubCompiler(cx, ICStub::BinaryArith_StringConcat, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_StringConcat>(space, getStubCode());
}
};
};
class ICBinaryArith_StringObjectConcat : public ICStub
{
friend class ICStubSpace;
@@ -1766,31 +1766,31 @@ class ICBinaryArith_StringObjectConcat :
public:
bool lhsIsString() const {
return extra_;
}
class Compiler : public ICStubCompiler {
protected:
bool lhsIsString_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
-
- virtual int32_t getKey() const {
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(lhsIsString_) << 17);
}
public:
Compiler(JSContext* cx, Engine engine, bool lhsIsString)
: ICStubCompiler(cx, ICStub::BinaryArith_StringObjectConcat, engine),
lhsIsString_(lhsIsString)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_StringObjectConcat>(space, getStubCode(),
lhsIsString_);
}
};
};
class ICBinaryArith_Double : public ICStub
{
@@ -1798,24 +1798,24 @@ class ICBinaryArith_Double : public ICSt
explicit ICBinaryArith_Double(JitCode* stubCode)
: ICStub(BinaryArith_Double, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::BinaryArith_Double, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_Double>(space, getStubCode());
}
};
};
class ICBinaryArith_BooleanWithInt32 : public ICStub
{
friend class ICStubSpace;
@@ -1840,19 +1840,19 @@ class ICBinaryArith_BooleanWithInt32 : p
return extra_ & 2;
}
class Compiler : public ICStubCompiler {
protected:
JSOp op_;
bool lhsIsBool_;
bool rhsIsBool_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
-
- virtual int32_t getKey() const {
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op_) << 17) |
(static_cast<int32_t>(lhsIsBool_) << 25) |
(static_cast<int32_t>(rhsIsBool_) << 26);
}
public:
@@ -1860,17 +1860,17 @@ class ICBinaryArith_BooleanWithInt32 : p
: ICStubCompiler(cx, ICStub::BinaryArith_BooleanWithInt32, engine),
op_(op), lhsIsBool_(lhsIsBool), rhsIsBool_(rhsIsBool)
{
MOZ_ASSERT(op_ == JSOP_ADD || op_ == JSOP_SUB || op_ == JSOP_BITOR ||
op_ == JSOP_BITAND || op_ == JSOP_BITXOR);
MOZ_ASSERT(lhsIsBool_ || rhsIsBool_);
}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_BooleanWithInt32>(space, getStubCode(),
lhsIsBool_, rhsIsBool_);
}
};
};
class ICBinaryArith_DoubleWithInt32 : public ICStub
{
@@ -1885,32 +1885,32 @@ class ICBinaryArith_DoubleWithInt32 : pu
public:
bool lhsIsDouble() const {
return extra_;
}
class Compiler : public ICMultiStubCompiler {
protected:
bool lhsIsDouble_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
-
- virtual int32_t getKey() const {
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op) << 17) |
(static_cast<int32_t>(lhsIsDouble_) << 25);
}
public:
Compiler(JSContext* cx, JSOp op, Engine engine, bool lhsIsDouble)
: ICMultiStubCompiler(cx, ICStub::BinaryArith_DoubleWithInt32, op, engine),
lhsIsDouble_(lhsIsDouble)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICBinaryArith_DoubleWithInt32>(space, getStubCode(),
lhsIsDouble_);
}
};
};
// UnaryArith
// JSOP_BITNOT
@@ -1934,72 +1934,72 @@ class ICUnaryArith_Fallback : public ICF
}
void setSawDoubleResult() {
extra_ = 1;
}
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx, Engine engine)
: ICStubCompiler(cx, ICStub::UnaryArith_Fallback, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICUnaryArith_Fallback>(space, getStubCode());
}
};
};
class ICUnaryArith_Int32 : public ICStub
{
friend class ICStubSpace;
explicit ICUnaryArith_Int32(JitCode* stubCode)
: ICStub(UnaryArith_Int32, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::UnaryArith_Int32, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICUnaryArith_Int32>(space, getStubCode());
}
};
};
class ICUnaryArith_Double : public ICStub
{
friend class ICStubSpace;
explicit ICUnaryArith_Double(JitCode* stubCode)
: ICStub(UnaryArith_Double, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::UnaryArith_Double, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICUnaryArith_Double>(space, getStubCode());
}
};
};
// Compare
// JSOP_LT
// JSOP_LE
@@ -2026,70 +2026,70 @@ class ICCompare_Fallback : public ICFall
}
bool hadUnoptimizableAccess() const {
return extra_ & (1u << UNOPTIMIZABLE_ACCESS_BIT);
}
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx, Engine engine)
: ICStubCompiler(cx, ICStub::Compare_Fallback, engine) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Fallback>(space, getStubCode());
}
};
};
class ICCompare_Int32 : public ICStub
{
friend class ICStubSpace;
explicit ICCompare_Int32(JitCode* stubCode)
: ICStub(ICStub::Compare_Int32, stubCode) {}
public:
// Compiler for this stub kind.
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::Compare_Int32, op, engine) {}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Int32>(space, getStubCode());
}
};
};
class ICCompare_Double : public ICStub
{
friend class ICStubSpace;
explicit ICCompare_Double(JitCode* stubCode)
: ICStub(ICStub::Compare_Double, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::Compare_Double, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Double>(space, getStubCode());
}
};
};
class ICCompare_NumberWithUndefined : public ICStub
{
friend class ICStubSpace;
@@ -2102,34 +2102,34 @@ class ICCompare_NumberWithUndefined : pu
public:
bool lhsIsUndefined() {
return extra_;
}
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
bool lhsIsUndefined;
public:
Compiler(JSContext* cx, JSOp op, Engine engine, bool lhsIsUndefined)
: ICMultiStubCompiler(cx, ICStub::Compare_NumberWithUndefined, op, engine),
lhsIsUndefined(lhsIsUndefined)
{}
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op) << 17) |
(static_cast<int32_t>(lhsIsUndefined) << 25);
}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_NumberWithUndefined>(space, getStubCode(),
lhsIsUndefined);
}
};
};
class ICCompare_String : public ICStub
{
@@ -2137,133 +2137,133 @@ class ICCompare_String : public ICStub
explicit ICCompare_String(JitCode* stubCode)
: ICStub(ICStub::Compare_String, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::Compare_String, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_String>(space, getStubCode());
}
};
};
class ICCompare_Symbol : public ICStub
{
friend class ICStubSpace;
explicit ICCompare_Symbol(JitCode* stubCode)
: ICStub(ICStub::Compare_Symbol, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::Compare_Symbol, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Symbol>(space, getStubCode());
}
};
};
class ICCompare_Boolean : public ICStub
{
friend class ICStubSpace;
explicit ICCompare_Boolean(JitCode* stubCode)
: ICStub(ICStub::Compare_Boolean, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::Compare_Boolean, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Boolean>(space, getStubCode());
}
};
};
class ICCompare_Object : public ICStub
{
friend class ICStubSpace;
explicit ICCompare_Object(JitCode* stubCode)
: ICStub(ICStub::Compare_Object, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, JSOp op, Engine engine)
: ICMultiStubCompiler(cx, ICStub::Compare_Object, op, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Object>(space, getStubCode());
}
};
};
class ICCompare_ObjectWithUndefined : public ICStub
{
friend class ICStubSpace;
explicit ICCompare_ObjectWithUndefined(JitCode* stubCode)
: ICStub(ICStub::Compare_ObjectWithUndefined, stubCode)
{}
public:
class Compiler : public ICMultiStubCompiler {
protected:
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
bool lhsIsUndefined;
bool compareWithNull;
public:
Compiler(JSContext* cx, JSOp op, Engine engine, bool lhsIsUndefined, bool compareWithNull)
: ICMultiStubCompiler(cx, ICStub::Compare_ObjectWithUndefined, op, engine),
lhsIsUndefined(lhsIsUndefined),
compareWithNull(compareWithNull)
{}
- virtual int32_t getKey() const {
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op) << 17) |
(static_cast<int32_t>(lhsIsUndefined) << 25) |
(static_cast<int32_t>(compareWithNull) << 26);
}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_ObjectWithUndefined>(space, getStubCode());
}
};
};
class ICCompare_Int32WithBoolean : public ICStub
{
friend class ICStubSpace;
@@ -2279,33 +2279,33 @@ class ICCompare_Int32WithBoolean : publi
return extra_;
}
// Compiler for this stub kind.
class Compiler : public ICStubCompiler {
protected:
JSOp op_;
bool lhsIsInt32_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
-
- virtual int32_t getKey() const {
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(op_) << 17) |
(static_cast<int32_t>(lhsIsInt32_) << 25);
}
public:
Compiler(JSContext* cx, JSOp op, Engine engine, bool lhsIsInt32)
: ICStubCompiler(cx, ICStub::Compare_Int32WithBoolean, engine),
op_(op),
lhsIsInt32_(lhsIsInt32)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICCompare_Int32WithBoolean>(space, getStubCode(), lhsIsInt32_);
}
};
};
// Enum for stubs handling a combination of typed arrays and typed objects.
enum TypedThingLayout {
Layout_TypedArray,
@@ -2347,32 +2347,32 @@ class ICGetProp_Fallback : public ICMoni
bool hasAccessedGetter() const {
return extra_ & (1u << ACCESSED_GETTER_BIT);
}
class Compiler : public ICStubCompiler {
protected:
CodeOffset bailoutReturnOffset_;
bool hasReceiver_;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
- void postGenerateStubCode(MacroAssembler& masm, Handle<JitCode*> code);
-
- virtual int32_t getKey() const {
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
+ void postGenerateStubCode(MacroAssembler& masm, Handle<JitCode*> code) override;
+
+ virtual int32_t getKey() const override {
return static_cast<int32_t>(engine_) |
(static_cast<int32_t>(kind) << 1) |
(static_cast<int32_t>(hasReceiver_) << 17);
}
public:
explicit Compiler(JSContext* cx, Engine engine, bool hasReceiver = false)
: ICStubCompiler(cx, ICStub::GetProp_Fallback, engine),
hasReceiver_(hasReceiver)
{ }
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICGetProp_Fallback>(space, getStubCode());
}
};
};
static inline uint32_t
SimpleTypeDescrKey(SimpleTypeDescr* descr)
{
@@ -2417,25 +2417,25 @@ class ICNewArray_Fallback : public ICFal
ICNewArray_Fallback(JitCode* stubCode, ObjectGroup* templateGroup)
: ICFallbackStub(ICStub::NewArray_Fallback, stubCode),
templateObject_(nullptr), templateGroup_(templateGroup)
{}
public:
class Compiler : public ICStubCompiler {
RootedObjectGroup templateGroup;
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
Compiler(JSContext* cx, ObjectGroup* templateGroup, Engine engine)
: ICStubCompiler(cx, ICStub::NewArray_Fallback, engine),
templateGroup(cx, templateGroup)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICNewArray_Fallback>(space, getStubCode(), templateGroup);
}
};
GCPtrObject& templateObject() {
return templateObject_;
}
@@ -2463,24 +2463,24 @@ class ICNewObject_Fallback : public ICFa
GCPtrObject templateObject_;
explicit ICNewObject_Fallback(JitCode* stubCode)
: ICFallbackStub(ICStub::NewObject_Fallback, stubCode), templateObject_(nullptr)
{}
public:
class Compiler : public ICStubCompiler {
- MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm);
+ MOZ_MUST_USE bool generateStubCode(MacroAssembler& masm) override;
public:
explicit Compiler(JSContext* cx, Engine engine)
: ICStubCompiler(cx, ICStub::NewObject_Fallback, engine)
{}
- ICStub* getStub(ICStubSpace* space) {
+ ICStub* getStub(ICStubSpace* space) override {
return newStub<ICNewObject_Fallback>(space, getStubCode());
}
};
GCPtrObject& templateObject() {
return templateObject_;
}
--- a/js/src/jit/TypePolicy.h
+++ b/js/src/jit/TypePolicy.h
@@ -94,17 +94,17 @@ class ArithPolicy final : public TypePol
SPECIALIZATION_DATA_;
virtual MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* def) override;
};
class AllDoublePolicy final : public TypePolicy
{
public:
EMPTY_DATA_;
- MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* def);
+ MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* def) override;
};
class BitwisePolicy final : public TypePolicy
{
public:
SPECIALIZATION_DATA_;
virtual MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* def) override;
};
@@ -389,29 +389,29 @@ class BoxPolicy final : public TypePolic
// Boxes everything except inputs of type Type.
template <unsigned Op, MIRType Type>
class BoxExceptPolicy final : public TypePolicy
{
public:
EMPTY_DATA_;
static MOZ_MUST_USE bool staticAdjustInputs(TempAllocator& alloc, MInstruction* ins);
- MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* ins) {
+ MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* ins) override {
return staticAdjustInputs(alloc, ins);
}
};
// Box if not a typical property id (string, symbol, int32).
template <unsigned Op>
class CacheIdPolicy final : public TypePolicy
{
public:
EMPTY_DATA_;
static MOZ_MUST_USE bool staticAdjustInputs(TempAllocator& alloc, MInstruction* ins);
- MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* ins) {
+ MOZ_MUST_USE bool adjustInputs(TempAllocator& alloc, MInstruction* ins) override {
return staticAdjustInputs(alloc, ins);
}
};
// Combine multiple policies.
template <class... Policies>
class MixPolicy final : public TypePolicy
{
--- a/js/src/jit/arm/CodeGenerator-arm.cpp
+++ b/js/src/jit/arm/CodeGenerator-arm.cpp
@@ -1096,17 +1096,17 @@ CodeGeneratorARM::toMoveOperand(LAllocat
return MoveOperand(StackPointer, offset);
}
class js::jit::OutOfLineTableSwitch : public OutOfLineCodeBase<CodeGeneratorARM>
{
MTableSwitch* mir_;
Vector<CodeLabel, 8, JitAllocPolicy> codeLabels_;
- void accept(CodeGeneratorARM* codegen) {
+ void accept(CodeGeneratorARM* codegen) override {
codegen->visitOutOfLineTableSwitch(this);
}
public:
OutOfLineTableSwitch(TempAllocator& alloc, MTableSwitch* mir)
: mir_(mir),
codeLabels_(alloc)
{}
--- a/js/src/jit/arm/CodeGenerator-arm.h
+++ b/js/src/jit/arm/CodeGenerator-arm.h
@@ -102,99 +102,99 @@ class CodeGeneratorARM : public CodeGene
void emitWasmUnalignedLoad(T* ins);
template <typename T>
void emitWasmStore(T* ins);
template <typename T>
void emitWasmUnalignedStore(T* ins);
public:
// Instruction visitors.
- virtual void visitMinMaxD(LMinMaxD* ins);
- virtual void visitMinMaxF(LMinMaxF* ins);
- virtual void visitAbsD(LAbsD* ins);
- virtual void visitAbsF(LAbsF* ins);
- virtual void visitSqrtD(LSqrtD* ins);
- virtual void visitSqrtF(LSqrtF* ins);
- virtual void visitAddI(LAddI* ins);
- virtual void visitSubI(LSubI* ins);
- virtual void visitBitNotI(LBitNotI* ins);
- virtual void visitBitOpI(LBitOpI* ins);
+ virtual void visitMinMaxD(LMinMaxD* ins) override;
+ virtual void visitMinMaxF(LMinMaxF* ins) override;
+ virtual void visitAbsD(LAbsD* ins) override;
+ virtual void visitAbsF(LAbsF* ins) override;
+ virtual void visitSqrtD(LSqrtD* ins) override;
+ virtual void visitSqrtF(LSqrtF* ins) override;
+ virtual void visitAddI(LAddI* ins) override;
+ virtual void visitSubI(LSubI* ins) override;
+ virtual void visitBitNotI(LBitNotI* ins) override;
+ virtual void visitBitOpI(LBitOpI* ins) override;
- virtual void visitMulI(LMulI* ins);
+ virtual void visitMulI(LMulI* ins) override;
- virtual void visitDivI(LDivI* ins);
- virtual void visitSoftDivI(LSoftDivI* ins);
- virtual void visitDivPowTwoI(LDivPowTwoI* ins);
- virtual void visitModI(LModI* ins);
- virtual void visitSoftModI(LSoftModI* ins);
- virtual void visitModPowTwoI(LModPowTwoI* ins);
- virtual void visitModMaskI(LModMaskI* ins);
- virtual void visitPowHalfD(LPowHalfD* ins);
- virtual void visitShiftI(LShiftI* ins);
- virtual void visitShiftI64(LShiftI64* ins);
- virtual void visitUrshD(LUrshD* ins);
+ virtual void visitDivI(LDivI* ins) override;
+ virtual void visitSoftDivI(LSoftDivI* ins) override;
+ virtual void visitDivPowTwoI(LDivPowTwoI* ins) override;
+ virtual void visitModI(LModI* ins) override;
+ virtual void visitSoftModI(LSoftModI* ins) override;
+ virtual void visitModPowTwoI(LModPowTwoI* ins) override;
+ virtual void visitModMaskI(LModMaskI* ins) override;
+ virtual void visitPowHalfD(LPowHalfD* ins) override;
+ virtual void visitShiftI(LShiftI* ins) override;
+ virtual void visitShiftI64(LShiftI64* ins) override;
+ virtual void visitUrshD(LUrshD* ins) override;
- virtual void visitClzI(LClzI* ins);
- virtual void visitCtzI(LCtzI* ins);
- virtual void visitPopcntI(LPopcntI* ins);
+ virtual void visitClzI(LClzI* ins) override;
+ virtual void visitCtzI(LCtzI* ins) override;
+ virtual void visitPopcntI(LPopcntI* ins) override;
- virtual void visitTestIAndBranch(LTestIAndBranch* test);
- virtual void visitCompare(LCompare* comp);
- virtual void visitCompareAndBranch(LCompareAndBranch* comp);
- virtual void visitTestDAndBranch(LTestDAndBranch* test);
- virtual void visitTestFAndBranch(LTestFAndBranch* test);
- virtual void visitCompareD(LCompareD* comp);
- virtual void visitCompareF(LCompareF* comp);
- virtual void visitCompareDAndBranch(LCompareDAndBranch* comp);
- virtual void visitCompareFAndBranch(LCompareFAndBranch* comp);
- virtual void visitCompareB(LCompareB* lir);
- virtual void visitCompareBAndBranch(LCompareBAndBranch* lir);
- virtual void visitCompareBitwise(LCompareBitwise* lir);
- virtual void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
- virtual void visitBitAndAndBranch(LBitAndAndBranch* baab);
- virtual void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
- virtual void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
- virtual void visitNotI(LNotI* ins);
- virtual void visitNotD(LNotD* ins);
- virtual void visitNotF(LNotF* ins);
+ virtual void visitTestIAndBranch(LTestIAndBranch* test) override;
+ virtual void visitCompare(LCompare* comp) override;
+ virtual void visitCompareAndBranch(LCompareAndBranch* comp) override;
+ virtual void visitTestDAndBranch(LTestDAndBranch* test) override;
+ virtual void visitTestFAndBranch(LTestFAndBranch* test) override;
+ virtual void visitCompareD(LCompareD* comp) override;
+ virtual void visitCompareF(LCompareF* comp) override;
+ virtual void visitCompareDAndBranch(LCompareDAndBranch* comp) override;
+ virtual void visitCompareFAndBranch(LCompareFAndBranch* comp) override;
+ virtual void visitCompareB(LCompareB* lir) override;
+ virtual void visitCompareBAndBranch(LCompareBAndBranch* lir) override;
+ virtual void visitCompareBitwise(LCompareBitwise* lir) override;
+ virtual void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir) override;
+ virtual void visitBitAndAndBranch(LBitAndAndBranch* baab) override;
+ virtual void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir) override;
+ virtual void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir) override;
+ virtual void visitNotI(LNotI* ins) override;
+ virtual void visitNotD(LNotD* ins) override;
+ virtual void visitNotF(LNotF* ins) override;
- virtual void visitMathD(LMathD* math);
- virtual void visitMathF(LMathF* math);
- virtual void visitFloor(LFloor* lir);
- virtual void visitFloorF(LFloorF* lir);
- virtual void visitCeil(LCeil* lir);
- virtual void visitCeilF(LCeilF* lir);
- virtual void visitRound(LRound* lir);
- virtual void visitRoundF(LRoundF* lir);
- virtual void visitTruncateDToInt32(LTruncateDToInt32* ins);
- virtual void visitTruncateFToInt32(LTruncateFToInt32* ins);
+ virtual void visitMathD(LMathD* math) override;
+ virtual void visitMathF(LMathF* math) override;
+ virtual void visitFloor(LFloor* lir) override;
+ virtual void visitFloorF(LFloorF* lir) override;
+ virtual void visitCeil(LCeil* lir) override;
+ virtual void visitCeilF(LCeilF* lir) override;
+ virtual void visitRound(LRound* lir) override;
+ virtual void visitRoundF(LRoundF* lir) override;
+ virtual void visitTruncateDToInt32(LTruncateDToInt32* ins) override;
+ virtual void visitTruncateFToInt32(LTruncateFToInt32* ins) override;
- virtual void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
- virtual void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
- virtual void visitSignExtendInt64(LSignExtendInt64* ins);
- virtual void visitAddI64(LAddI64* lir);
- virtual void visitSubI64(LSubI64* lir);
- virtual void visitMulI64(LMulI64* lir);
- virtual void visitDivOrModI64(LDivOrModI64* lir);
- virtual void visitUDivOrModI64(LUDivOrModI64* lir);
- virtual void visitCompareI64(LCompareI64* lir);
- virtual void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
- virtual void visitBitOpI64(LBitOpI64* lir);
- virtual void visitRotateI64(LRotateI64* lir);
- virtual void visitWasmStackArgI64(LWasmStackArgI64* lir);
- virtual void visitWasmSelectI64(LWasmSelectI64* lir);
- virtual void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
- virtual void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
- virtual void visitPopcntI64(LPopcntI64* ins);
- virtual void visitClzI64(LClzI64* ins);
- virtual void visitCtzI64(LCtzI64* ins);
- virtual void visitNotI64(LNotI64* ins);
- virtual void visitWasmTruncateToInt64(LWasmTruncateToInt64* ins);
- virtual void visitInt64ToFloatingPointCall(LInt64ToFloatingPointCall* lir);
- virtual void visitTestI64AndBranch(LTestI64AndBranch* lir);
+ virtual void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir) override;
+ virtual void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir) override;
+ virtual void visitSignExtendInt64(LSignExtendInt64* ins) override;
+ virtual void visitAddI64(LAddI64* lir) override;
+ virtual void visitSubI64(LSubI64* lir) override;
+ virtual void visitMulI64(LMulI64* lir) override;
+ virtual void visitDivOrModI64(LDivOrModI64* lir) override;
+ virtual void visitUDivOrModI64(LUDivOrModI64* lir) override;
+ virtual void visitCompareI64(LCompareI64* lir) override;
+ virtual void visitCompareI64AndBranch(LCompareI64AndBranch* lir) override;
+ virtual void visitBitOpI64(LBitOpI64* lir) override;
+ virtual void visitRotateI64(LRotateI64* lir) override;
+ virtual void visitWasmStackArgI64(LWasmStackArgI64* lir) override;
+ virtual void visitWasmSelectI64(LWasmSelectI64* lir) override;
+ virtual void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir) override;
+ virtual void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir) override;
+ virtual void visitPopcntI64(LPopcntI64* ins) override;
+ virtual void visitClzI64(LClzI64* ins) override;
+ virtual void visitCtzI64(LCtzI64* ins) override;
+ virtual void visitNotI64(LNotI64* ins) override;
+ virtual void visitWasmTruncateToInt64(LWasmTruncateToInt64* ins) override;
+ virtual void visitInt64ToFloatingPointCall(LInt64ToFloatingPointCall* lir) override;
+ virtual void visitTestI64AndBranch(LTestI64AndBranch* lir) override;
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
protected:
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToOutValue(LInstruction* ins);
@@ -209,106 +209,106 @@ class CodeGeneratorARM : public CodeGene
Label& done);
void modICommon(MMod* mir, Register lhs, Register rhs, Register output, LSnapshot* snapshot,
Label& done);
public:
CodeGeneratorARM(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
- void visitBox(LBox* box);
- void visitBoxFloatingPoint(LBoxFloatingPoint* box);
- void visitUnbox(LUnbox* unbox);
- void visitValue(LValue* value);
- void visitDouble(LDouble* ins);
- void visitFloat32(LFloat32* ins);
+ void visitBox(LBox* box) override;
+ void visitBoxFloatingPoint(LBoxFloatingPoint* box) override;
+ void visitUnbox(LUnbox* unbox) override;
+ void visitValue(LValue* value) override;
+ void visitDouble(LDouble* ins) override;
+ void visitFloat32(LFloat32* ins) override;
- void visitGuardShape(LGuardShape* guard);
- void visitGuardObjectGroup(LGuardObjectGroup* guard);
- void visitGuardClass(LGuardClass* guard);
+ void visitGuardShape(LGuardShape* guard) override;
+ void visitGuardObjectGroup(LGuardObjectGroup* guard) override;
+ void visitGuardClass(LGuardClass* guard) override;
- void visitNegI(LNegI* lir);
- void visitNegD(LNegD* lir);
- void visitNegF(LNegF* lir);
- void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
- void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
- void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir);
- void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir);
- void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
- void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
- void visitWasmSelect(LWasmSelect* ins);
- void visitWasmReinterpret(LWasmReinterpret* ins);
+ void visitNegI(LNegI* lir) override;
+ void visitNegD(LNegD* lir) override;
+ void visitNegF(LNegF* lir) override;
+ void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins) override;
+ void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins) override;
+ void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir) override;
+ void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir) override;
+ void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir) override;
+ void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir) override;
+ void visitWasmSelect(LWasmSelect* ins) override;
+ void visitWasmReinterpret(LWasmReinterpret* ins) override;
void emitWasmCall(LWasmCallBase* ins);
- void visitWasmLoad(LWasmLoad* ins);
- void visitWasmLoadI64(LWasmLoadI64* ins);
- void visitWasmUnalignedLoad(LWasmUnalignedLoad* ins);
- void visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* ins);
- void visitWasmAddOffset(LWasmAddOffset* ins);
- void visitWasmStore(LWasmStore* ins);
- void visitWasmStoreI64(LWasmStoreI64* ins);
- void visitWasmUnalignedStore(LWasmUnalignedStore* ins);
- void visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* ins);
- void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
- void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
- void visitWasmStackArg(LWasmStackArg* ins);
- void visitWasmTruncateToInt32(LWasmTruncateToInt32* ins);
- void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
- void visitCopySignD(LCopySignD* ins);
- void visitCopySignF(LCopySignF* ins);
+ void visitWasmLoad(LWasmLoad* ins) override;
+ void visitWasmLoadI64(LWasmLoadI64* ins) override;
+ void visitWasmUnalignedLoad(LWasmUnalignedLoad* ins) override;
+ void visitWasmUnalignedLoadI64(LWasmUnalignedLoadI64* ins) override;
+ void visitWasmAddOffset(LWasmAddOffset* ins) override;
+ void visitWasmStore(LWasmStore* ins) override;
+ void visitWasmStoreI64(LWasmStoreI64* ins) override;
+ void visitWasmUnalignedStore(LWasmUnalignedStore* ins) override;
+ void visitWasmUnalignedStoreI64(LWasmUnalignedStoreI64* ins) override;
+ void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins) override;
+ void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins) override;
+ void visitWasmStackArg(LWasmStackArg* ins) override;
+ void visitWasmTruncateToInt32(LWasmTruncateToInt32* ins) override;
+ void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool) override;
+ void visitCopySignD(LCopySignD* ins) override;
+ void visitCopySignF(LCopySignF* ins) override;
- void visitMemoryBarrier(LMemoryBarrier* ins);
+ void visitMemoryBarrier(LMemoryBarrier* ins) override;
void generateInvalidateEpilogue();
void setReturnDoubleRegs(LiveRegisterSet* regs);
// Generating a result.
template<typename S, typename T>
void atomicBinopToTypedIntArray(AtomicOp op, Scalar::Type arrayType, const S& value,
const T& mem, Register flagTemp, Register outTemp,
AnyRegister output);
// Generating no result.
template<typename S, typename T>
void atomicBinopToTypedIntArray(AtomicOp op, Scalar::Type arrayType, const S& value,
const T& mem, Register flagTemp);
- void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir);
- void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* lir);
- void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* lir);
- void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir);
- void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir);
+ void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* lir) override;
+ void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* lir) override;
+ void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* lir) override;
+ void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* lir) override;
+ void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* lir) override;
protected:
- void visitEffectiveAddress(LEffectiveAddress* ins);
- void visitUDiv(LUDiv* ins);
- void visitUMod(LUMod* ins);
- void visitSoftUDivOrMod(LSoftUDivOrMod* ins);
+ void visitEffectiveAddress(LEffectiveAddress* ins) override;
+ void visitUDiv(LUDiv* ins) override;
+ void visitUMod(LUMod* ins) override;
+ void visitSoftUDivOrMod(LSoftUDivOrMod* ins) override;
public:
// Unimplemented SIMD instructions
- void visitSimdSplatX4(LSimdSplatX4* lir) { MOZ_CRASH("NYI"); }
- void visitSimd128Int(LSimd128Int* ins) { MOZ_CRASH("NYI"); }
- void visitSimd128Float(LSimd128Float* ins) { MOZ_CRASH("NYI"); }
- void visitSimdReinterpretCast(LSimdReinterpretCast* ins) { MOZ_CRASH("NYI"); }
- void visitSimdExtractElementI(LSimdExtractElementI* ins) { MOZ_CRASH("NYI"); }
- void visitSimdExtractElementF(LSimdExtractElementF* ins) { MOZ_CRASH("NYI"); }
- void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir) { MOZ_CRASH("NYI"); }
- void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir) { MOZ_CRASH("NYI"); }
- void visitSimdSwizzleI(LSimdSwizzleI* lir) { MOZ_CRASH("NYI"); }
- void visitSimdSwizzleF(LSimdSwizzleF* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) { MOZ_CRASH("NYI"); }
+ void visitSimdSplatX4(LSimdSplatX4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimd128Int(LSimd128Int* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimd128Float(LSimd128Float* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdReinterpretCast(LSimdReinterpretCast* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdExtractElementI(LSimdExtractElementI* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdExtractElementF(LSimdExtractElementF* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdSwizzleI(LSimdSwizzleI* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdSwizzleF(LSimdSwizzleF* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) override { MOZ_CRASH("NYI"); }
};
typedef CodeGeneratorARM CodeGeneratorSpecific;
// An out-of-line bailout thunk.
class OutOfLineBailout : public OutOfLineCodeBase<CodeGeneratorARM>
{
protected: // Silence Clang warning.
@@ -316,17 +316,17 @@ class OutOfLineBailout : public OutOfLin
uint32_t frameSize_;
public:
OutOfLineBailout(LSnapshot* snapshot, uint32_t frameSize)
: snapshot_(snapshot),
frameSize_(frameSize)
{ }
- void accept(CodeGeneratorARM* codegen);
+ void accept(CodeGeneratorARM* codegen) override;
LSnapshot* snapshot() const {
return snapshot_;
}
};
} // namespace jit
} // namespace js
--- a/js/src/jit/arm/LIR-arm.h
+++ b/js/src/jit/arm/LIR-arm.h
@@ -22,17 +22,17 @@ class LBoxFloatingPoint : public LInstru
{
setOperand(0, in);
setTemp(0, temp);
}
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
class LUnbox : public LInstructionHelper<1, 2, 0>
{
public:
LIR_HEADER(Unbox);
@@ -41,17 +41,17 @@ class LUnbox : public LInstructionHelper
return mir_->toUnbox();
}
const LAllocation* payload() {
return getOperand(0);
}
const LAllocation* type() {
return getOperand(1);
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(mir()->type());
}
};
class LUnboxFloatingPoint : public LInstructionHelper<1, 2, 0>
{
MIRType type_;
@@ -68,17 +68,17 @@ class LUnboxFloatingPoint : public LInst
MUnbox* mir() const {
return mir_->toUnbox();
}
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
// Convert a 32-bit unsigned integer to a double.
class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 0>
{
public:
--- a/js/src/jit/arm/Lowering-arm.h
+++ b/js/src/jit/arm/Lowering-arm.h
@@ -83,51 +83,51 @@ class LIRGeneratorARM : public LIRGenera
void lowerModI(MMod* mod);
void lowerDivI64(MDiv* div);
void lowerModI64(MMod* mod);
void lowerUDivI64(MDiv* div);
void lowerUModI64(MMod* mod);
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
void lowerUDiv(MDiv* div);
void lowerUMod(MMod* mod);
- void visitPowHalf(MPowHalf* ins);
- void visitWasmNeg(MWasmNeg* ins);
+ void visitPowHalf(MPowHalf* ins) override;
+ void visitWasmNeg(MWasmNeg* ins) override;
LTableSwitch* newLTableSwitch(const LAllocation& in, const LDefinition& inputCopy,
MTableSwitch* ins);
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
public:
- void visitBox(MBox* box);
- void visitUnbox(MUnbox* unbox);
- void visitReturn(MReturn* ret);
+ void visitBox(MBox* box) override;
+ void visitUnbox(MUnbox* unbox) override;
+ void visitReturn(MReturn* ret) override;
void lowerPhi(MPhi* phi);
- void visitGuardShape(MGuardShape* ins);
- void visitGuardObjectGroup(MGuardObjectGroup* ins);
- void visitWasmSelect(MWasmSelect* ins);
- void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
- void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
- void visitWasmLoad(MWasmLoad* ins);
- void visitWasmStore(MWasmStore* ins);
- void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
- void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
- void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
- void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
- void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
- void visitSubstr(MSubstr* ins);
- void visitRandom(MRandom* ins);
- void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
- void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
- void visitCopySign(MCopySign* ins);
- void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
- void visitSignExtendInt64(MSignExtendInt64* ins);
+ void visitGuardShape(MGuardShape* ins) override;
+ void visitGuardObjectGroup(MGuardObjectGroup* ins) override;
+ void visitWasmSelect(MWasmSelect* ins) override;
+ void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) override;
+ void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) override;
+ void visitWasmLoad(MWasmLoad* ins) override;
+ void visitWasmStore(MWasmStore* ins) override;
+ void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) override;
+ void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) override;
+ void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) override;
+ void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) override;
+ void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) override;
+ void visitSubstr(MSubstr* ins) override;
+ void visitRandom(MRandom* ins) override;
+ void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins) override;
+ void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins) override;
+ void visitCopySign(MCopySign* ins) override;
+ void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) override;
+ void visitSignExtendInt64(MSignExtendInt64* ins) override;
};
typedef LIRGeneratorARM LIRGeneratorSpecific;
} // namespace jit
} // namespace js
#endif /* jit_arm_Lowering_arm_h */
--- a/js/src/jit/arm64/CodeGenerator-arm64.cpp
+++ b/js/src/jit/arm64/CodeGenerator-arm64.cpp
@@ -259,17 +259,17 @@ CodeGeneratorARM64::toMoveOperand(const
MOZ_CRASH("toMoveOperand");
}
class js::jit::OutOfLineTableSwitch : public OutOfLineCodeBase<CodeGeneratorARM64>
{
MTableSwitch* mir_;
Vector<CodeLabel, 8, JitAllocPolicy> codeLabels_;
- void accept(CodeGeneratorARM64* codegen) {
+ void accept(CodeGeneratorARM64* codegen) override {
codegen->visitOutOfLineTableSwitch(this);
}
public:
OutOfLineTableSwitch(TempAllocator& alloc, MTableSwitch* mir)
: mir_(mir),
codeLabels_(alloc)
{ }
@@ -750,9 +750,8 @@ CodeGeneratorARM64::visitAtomicExchangeT
if (lir->index()->isConstant()) {
Address dest(elements, ToInt32(lir->index()) * width);
masm.atomicExchangeToTypedIntArray(arrayType, dest, value, temp, output);
} else {
BaseIndex dest(elements, ToRegister(lir->index()), ScaleFromElemWidth(width));
masm.atomicExchangeToTypedIntArray(arrayType, dest, value, temp, output);
}
}
-
--- a/js/src/jit/arm64/CodeGenerator-arm64.h
+++ b/js/src/jit/arm64/CodeGenerator-arm64.h
@@ -92,71 +92,71 @@ class CodeGeneratorARM64 : public CodeGe
masm.cmpPtr(reg, ImmWord(0));
emitBranch(cond, ifTrue, ifFalse);
}
void emitTableSwitchDispatch(MTableSwitch* mir, Register index, Register base);
public:
// Instruction visitors.
- virtual void visitMinMaxD(LMinMaxD* ins);
- virtual void visitMinMaxF(LMinMaxF* math);
- virtual void visitAbsD(LAbsD* ins);
- virtual void visitAbsF(LAbsF* ins);
- virtual void visitSqrtD(LSqrtD* ins);
- virtual void visitSqrtF(LSqrtF* ins);
- virtual void visitAddI(LAddI* ins);
- virtual void visitSubI(LSubI* ins);
- virtual void visitBitNotI(LBitNotI* ins);
- virtual void visitBitOpI(LBitOpI* ins);
+ virtual void visitMinMaxD(LMinMaxD* ins) override;
+ virtual void visitMinMaxF(LMinMaxF* math) override;
+ virtual void visitAbsD(LAbsD* ins) override;
+ virtual void visitAbsF(LAbsF* ins) override;
+ virtual void visitSqrtD(LSqrtD* ins) override;
+ virtual void visitSqrtF(LSqrtF* ins) override;
+ virtual void visitAddI(LAddI* ins) override;
+ virtual void visitSubI(LSubI* ins) override;
+ virtual void visitBitNotI(LBitNotI* ins) override;
+ virtual void visitBitOpI(LBitOpI* ins) override;
- virtual void visitMulI(LMulI* ins);
+ virtual void visitMulI(LMulI* ins) override;
- virtual void visitDivI(LDivI* ins);
- virtual void visitDivPowTwoI(LDivPowTwoI* ins);
- virtual void visitModI(LModI* ins);
- virtual void visitModPowTwoI(LModPowTwoI* ins);
- virtual void visitModMaskI(LModMaskI* ins);
- virtual void visitPowHalfD(LPowHalfD* ins);
- virtual void visitShiftI(LShiftI* ins);
- virtual void visitUrshD(LUrshD* ins);
+ virtual void visitDivI(LDivI* ins) override;
+ virtual void visitDivPowTwoI(LDivPowTwoI* ins) override;
+ virtual void visitModI(LModI* ins) override;
+ virtual void visitModPowTwoI(LModPowTwoI* ins) override;
+ virtual void visitModMaskI(LModMaskI* ins) override;
+ virtual void visitPowHalfD(LPowHalfD* ins) override;
+ virtual void visitShiftI(LShiftI* ins) override;
+ virtual void visitUrshD(LUrshD* ins) override;
- virtual void visitTestIAndBranch(LTestIAndBranch* test);
- virtual void visitCompare(LCompare* comp);
- virtual void visitCompareAndBranch(LCompareAndBranch* comp);
- virtual void visitTestDAndBranch(LTestDAndBranch* test);
- virtual void visitTestFAndBranch(LTestFAndBranch* test);
- virtual void visitCompareD(LCompareD* comp);
- virtual void visitCompareF(LCompareF* comp);
- virtual void visitCompareDAndBranch(LCompareDAndBranch* comp);
- virtual void visitCompareFAndBranch(LCompareFAndBranch* comp);
- virtual void visitCompareB(LCompareB* lir);
- virtual void visitCompareBAndBranch(LCompareBAndBranch* lir);
- virtual void visitCompareBitwise(LCompareBitwise* lir);
- virtual void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
- virtual void visitBitAndAndBranch(LBitAndAndBranch* baab);
- virtual void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
- virtual void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
- virtual void visitNotI(LNotI* ins);
- virtual void visitNotD(LNotD* ins);
- virtual void visitNotF(LNotF* ins);
+ virtual void visitTestIAndBranch(LTestIAndBranch* test) override;
+ virtual void visitCompare(LCompare* comp) override;
+ virtual void visitCompareAndBranch(LCompareAndBranch* comp) override;
+ virtual void visitTestDAndBranch(LTestDAndBranch* test) override;
+ virtual void visitTestFAndBranch(LTestFAndBranch* test) override;
+ virtual void visitCompareD(LCompareD* comp) override;
+ virtual void visitCompareF(LCompareF* comp) override;
+ virtual void visitCompareDAndBranch(LCompareDAndBranch* comp) override;
+ virtual void visitCompareFAndBranch(LCompareFAndBranch* comp) override;
+ virtual void visitCompareB(LCompareB* lir) override;
+ virtual void visitCompareBAndBranch(LCompareBAndBranch* lir) override;
+ virtual void visitCompareBitwise(LCompareBitwise* lir) override;
+ virtual void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir) override;
+ virtual void visitBitAndAndBranch(LBitAndAndBranch* baab) override;
+ virtual void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir) override;
+ virtual void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir) override;
+ virtual void visitNotI(LNotI* ins) override;
+ virtual void visitNotD(LNotD* ins) override;
+ virtual void visitNotF(LNotF* ins) override;
- virtual void visitMathD(LMathD* math);
- virtual void visitMathF(LMathF* math);
- virtual void visitFloor(LFloor* lir);
- virtual void visitFloorF(LFloorF* lir);
- virtual void visitCeil(LCeil* lir);
- virtual void visitCeilF(LCeilF* lir);
- virtual void visitRound(LRound* lir);
- virtual void visitRoundF(LRoundF* lir);
- virtual void visitTruncateDToInt32(LTruncateDToInt32* ins);
- virtual void visitTruncateFToInt32(LTruncateFToInt32* ins);
+ virtual void visitMathD(LMathD* math) override;
+ virtual void visitMathF(LMathF* math) override;
+ virtual void visitFloor(LFloor* lir) override;
+ virtual void visitFloorF(LFloorF* lir) override;
+ virtual void visitCeil(LCeil* lir) override;
+ virtual void visitCeilF(LCeilF* lir) override;
+ virtual void visitRound(LRound* lir) override;
+ virtual void visitRoundF(LRoundF* lir) override;
+ virtual void visitTruncateDToInt32(LTruncateDToInt32* ins) override;
+ virtual void visitTruncateFToInt32(LTruncateFToInt32* ins) override;
- virtual void visitClzI(LClzI* lir);
- virtual void visitCtzI(LCtzI* lir);
+ virtual void visitClzI(LClzI* lir) override;
+ virtual void visitCtzI(LCtzI* lir) override;
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
protected:
ValueOperand ToValue(LInstruction* ins, size_t pos);
ValueOperand ToOutValue(LInstruction* ins);
ValueOperand ToTempValue(LInstruction* ins, size_t pos);
@@ -168,88 +168,88 @@ class CodeGeneratorARM64 : public CodeGe
Register elements, const LAllocation* index);
void divICommon(MDiv* mir, Register lhs, Register rhs, Register output, LSnapshot* snapshot,
Label& done);
void modICommon(MMod* mir, Register lhs, Register rhs, Register output, LSnapshot* snapshot,
Label& done);
public:
- void visitBox(LBox* box);
- void visitUnbox(LUnbox* unbox);
- void visitValue(LValue* value);
- void visitDouble(LDouble* ins);
- void visitFloat32(LFloat32* ins);
+ void visitBox(LBox* box) override;
+ void visitUnbox(LUnbox* unbox) override;
+ void visitValue(LValue* value) override;
+ void visitDouble(LDouble* ins) override;
+ void visitFloat32(LFloat32* ins) override;
- void visitLoadSlotV(LLoadSlotV* load);
- void visitLoadSlotT(LLoadSlotT* load);
- void visitStoreSlotT(LStoreSlotT* load);
+ void visitLoadSlotV(LLoadSlotV* load) override;
+ void visitLoadSlotT(LLoadSlotT* load) override;
+ void visitStoreSlotT(LStoreSlotT* load) override;
- void visitLoadElementT(LLoadElementT* load);
+ void visitLoadElementT(LLoadElementT* load) override;
- void visitGuardShape(LGuardShape* guard);
- void visitGuardObjectGroup(LGuardObjectGroup* guard);
- void visitGuardClass(LGuardClass* guard);
+ void visitGuardShape(LGuardShape* guard) override;
+ void visitGuardObjectGroup(LGuardObjectGroup* guard) override;
+ void visitGuardClass(LGuardClass* guard) override;
- void visitInterruptCheck(LInterruptCheck* lir);
+ void visitInterruptCheck(LInterruptCheck* lir) override;
- void visitNegI(LNegI* lir);
- void visitNegD(LNegD* lir);
- void visitNegF(LNegF* lir);
- void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
- void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
- void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
- void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
- void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
- void visitWasmStackArg(LWasmStackArg* ins);
+ void visitNegI(LNegI* lir) override;
+ void visitNegD(LNegD* lir) override;
+ void visitNegF(LNegF* lir) override;
+ void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins) override;
+ void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins) override;
+ void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir) override;
+ void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir) override;
+ void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins) override;
+ void visitWasmStackArg(LWasmStackArg* ins) override;
void generateInvalidateEpilogue();
void setReturnDoubleRegs(LiveRegisterSet* regs);
protected:
void postWasmCall(LWasmCall* lir) {
MOZ_CRASH("postWasmCall");
}
- void visitEffectiveAddress(LEffectiveAddress* ins);
- void visitUDiv(LUDiv* ins);
- void visitUMod(LUMod* ins);
+ void visitEffectiveAddress(LEffectiveAddress* ins) override;
+ void visitUDiv(LUDiv* ins) override;
+ void visitUMod(LUMod* ins) override;
public:
// Unimplemented SIMD instructions.
- void visitSimdSplatX4(LSimdSplatX4* lir) { MOZ_CRASH("NYI"); }
- void visitSimd128Int(LSimd128Int* ins) { MOZ_CRASH("NYI"); }
- void visitSimd128Float(LSimd128Float* ins) { MOZ_CRASH("NYI"); }
- void visitSimdExtractElementI(LSimdExtractElementI* ins) { MOZ_CRASH("NYI"); }
- void visitSimdExtractElementF(LSimdExtractElementF* ins) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) { MOZ_CRASH("NYI"); }
- void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) { MOZ_CRASH("NYI"); }
+ void visitSimdSplatX4(LSimdSplatX4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimd128Int(LSimd128Int* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimd128Float(LSimd128Float* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdExtractElementI(LSimdExtractElementI* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdExtractElementF(LSimdExtractElementF* ins) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) override { MOZ_CRASH("NYI"); }
+ void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) override { MOZ_CRASH("NYI"); }
};
typedef CodeGeneratorARM64 CodeGeneratorSpecific;
// An out-of-line bailout thunk.
class OutOfLineBailout : public OutOfLineCodeBase<CodeGeneratorARM64>
{
protected: // Silence Clang warning.
LSnapshot* snapshot_;
public:
OutOfLineBailout(LSnapshot* snapshot)
: snapshot_(snapshot)
{ }
- void accept(CodeGeneratorARM64* codegen);
+ void accept(CodeGeneratorARM64* codegen) override;
LSnapshot* snapshot() const {
return snapshot_;
}
};
} // namespace jit
} // namespace js
--- a/js/src/jit/arm64/LIR-arm64.h
+++ b/js/src/jit/arm64/LIR-arm64.h
@@ -28,17 +28,17 @@ class LUnbox : public LUnboxBase
{
public:
LIR_HEADER(Unbox);
LUnbox(const LAllocation& input)
: LUnboxBase(input)
{ }
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(mir()->type());
}
};
class LUnboxFloatingPoint : public LUnboxBase
{
MIRType type_;
@@ -48,17 +48,17 @@ class LUnboxFloatingPoint : public LUnbo
LUnboxFloatingPoint(const LAllocation& input, MIRType type)
: LUnboxBase(input),
type_(type)
{ }
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
// Convert a 32-bit unsigned integer to a double.
class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 0>
{
public:
--- a/js/src/jit/arm64/Lowering-arm64.h
+++ b/js/src/jit/arm64/Lowering-arm64.h
@@ -82,52 +82,52 @@ class LIRGeneratorARM64 : public LIRGene
void lowerTruncateFToInt32(MTruncateToInt32* ins);
void lowerDivI(MDiv* div);
void lowerModI(MMod* mod);
void lowerDivI64(MDiv* div);
void lowerModI64(MMod* mod);
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
void lowerUDiv(MDiv* div);
void lowerUMod(MMod* mod);
- void visitPowHalf(MPowHalf* ins);
- void visitWasmNeg(MWasmNeg* ins);
- void visitWasmSelect(MWasmSelect* ins);
+ void visitPowHalf(MPowHalf* ins) override;
+ void visitWasmNeg(MWasmNeg* ins) override;
+ void visitWasmSelect(MWasmSelect* ins) override;
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
LTableSwitch* newLTableSwitch(const LAllocation& in,
const LDefinition& inputCopy,
MTableSwitch* ins);
public:
- void visitBox(MBox* box);
- void visitUnbox(MUnbox* unbox);
- void visitReturn(MReturn* ret);
+ void visitBox(MBox* box) override;
+ void visitUnbox(MUnbox* unbox) override;
+ void visitReturn(MReturn* ret) override;
void lowerPhi(MPhi* phi);
- void visitGuardShape(MGuardShape* ins);
- void visitGuardObjectGroup(MGuardObjectGroup* ins);
- void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
- void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
- void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
- void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
- void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
- void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
- void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
- void visitSubstr(MSubstr* ins);
- void visitRandom(MRandom* ins);
- void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
- void visitWasmLoad(MWasmLoad* ins);
- void visitWasmStore(MWasmStore* ins);
- void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
- void visitCopySign(MCopySign* ins);
- void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
- void visitSignExtendInt64(MSignExtendInt64* ins);
+ void visitGuardShape(MGuardShape* ins) override;
+ void visitGuardObjectGroup(MGuardObjectGroup* ins) override;
+ void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) override;
+ void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) override;
+ void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) override;
+ void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) override;
+ void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) override;
+ void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) override;
+ void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) override;
+ void visitSubstr(MSubstr* ins) override;
+ void visitRandom(MRandom* ins) override;
+ void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins) override;
+ void visitWasmLoad(MWasmLoad* ins) override;
+ void visitWasmStore(MWasmStore* ins) override;
+ void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins) override;
+ void visitCopySign(MCopySign* ins) override;
+ void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) override;
+ void visitSignExtendInt64(MSignExtendInt64* ins) override;
};
typedef LIRGeneratorARM64 LIRGeneratorSpecific;
} // namespace jit
} // namespace js
#endif /* jit_arm64_Lowering_arm64_h */
--- a/js/src/jit/arm64/vixl/Debugger-vixl.cpp
+++ b/js/src/jit/arm64/vixl/Debugger-vixl.cpp
@@ -73,36 +73,36 @@ typedef mozilla::Vector<Token*, 0, js::S
// Tokens often hold one value.
template<typename T> class ValueToken : public Token {
public:
explicit ValueToken(T value) : value_(value) {}
ValueToken() {}
T value() const { return value_; }
- virtual uint8_t* ToAddress(Debugger* debugger) const {
+ virtual uint8_t* ToAddress(Debugger* debugger) const override {
USE(debugger);
VIXL_ABORT();
}
protected:
T value_;
};
// Integer registers (X or W) and their aliases.
// Format: wn or xn with 0 <= n < 32 or a name in the aliases list.
class RegisterToken : public ValueToken<const Register> {
public:
explicit RegisterToken(const Register reg)
: ValueToken<const Register>(reg) {}
- virtual bool IsRegister() const { return true; }
- virtual bool CanAddressMemory() const { return value().Is64Bits(); }
- virtual uint8_t* ToAddress(Debugger* debugger) const;
- virtual void Print(FILE* out = stdout) const ;
+ virtual bool IsRegister() const override { return true; }
+ virtual bool CanAddressMemory() const override { return value().Is64Bits(); }
+ virtual uint8_t* ToAddress(Debugger* debugger) const override;
+ virtual void Print(FILE* out = stdout) const override;
const char* Name() const;
static Token* Tokenize(const char* arg);
static RegisterToken* Cast(Token* tok) {
VIXL_ASSERT(tok->IsRegister());
return reinterpret_cast<RegisterToken*>(tok);
}
@@ -114,18 +114,18 @@ class RegisterToken : public ValueToken<
// Floating point registers (D or S).
// Format: sn or dn with 0 <= n < 32.
class FPRegisterToken : public ValueToken<const FPRegister> {
public:
explicit FPRegisterToken(const FPRegister fpreg)
: ValueToken<const FPRegister>(fpreg) {}
- virtual bool IsFPRegister() const { return true; }
- virtual void Print(FILE* out = stdout) const ;
+ virtual bool IsFPRegister() const override { return true; }
+ virtual void Print(FILE* out = stdout) const override;
static Token* Tokenize(const char* arg);
static FPRegisterToken* Cast(Token* tok) {
VIXL_ASSERT(tok->IsFPRegister());
return reinterpret_cast<FPRegisterToken*>(tok);
}
};
@@ -136,55 +136,55 @@ class IdentifierToken : public ValueToke
public:
explicit IdentifierToken(const char* name) {
size_t size = strlen(name) + 1;
value_ = (char*)js_malloc(size);
strncpy(value_, name, size);
}
virtual ~IdentifierToken() { js_free(value_); }
- virtual bool IsIdentifier() const { return true; }
- virtual bool CanAddressMemory() const { return strcmp(value(), "pc") == 0; }
- virtual uint8_t* ToAddress(Debugger* debugger) const;
- virtual void Print(FILE* out = stdout) const;
+ virtual bool IsIdentifier() const override { return true; }
+ virtual bool CanAddressMemory() const override { return strcmp(value(), "pc") == 0; }
+ virtual uint8_t* ToAddress(Debugger* debugger) const override;
+ virtual void Print(FILE* out = stdout) const override;
static Token* Tokenize(const char* arg);
static IdentifierToken* Cast(Token* tok) {
VIXL_ASSERT(tok->IsIdentifier());
return reinterpret_cast<IdentifierToken*>(tok);
}
};
// 64-bit address literal.
// Format: 0x... with up to 16 hexadecimal digits.
class AddressToken : public ValueToken<uint8_t*> {
public:
explicit AddressToken(uint8_t* address) : ValueToken<uint8_t*>(address) {}
- virtual bool IsAddress() const { return true; }
- virtual bool CanAddressMemory() const { return true; }
- virtual uint8_t* ToAddress(Debugger* debugger) const;
- virtual void Print(FILE* out = stdout) const ;
+ virtual bool IsAddress() const override { return true; }
+ virtual bool CanAddressMemory() const override { return true; }
+ virtual uint8_t* ToAddress(Debugger* debugger) const override;
+ virtual void Print(FILE* out = stdout) const override;
static Token* Tokenize(const char* arg);
static AddressToken* Cast(Token* tok) {
VIXL_ASSERT(tok->IsAddress());
return reinterpret_cast<AddressToken*>(tok);
}
};
// 64-bit decimal integer literal.
// Format: n.
class IntegerToken : public ValueToken<int64_t> {
public:
explicit IntegerToken(int64_t value) : ValueToken<int64_t>(value) {}
- virtual bool IsInteger() const { return true; }
- virtual void Print(FILE* out = stdout) const;
+ virtual bool IsInteger() const override { return true; }
+ virtual void Print(FILE* out = stdout) const override;
static Token* Tokenize(const char* arg);
static IntegerToken* Cast(Token* tok) {
VIXL_ASSERT(tok->IsInteger());
return reinterpret_cast<IntegerToken*>(tok);
}
};
@@ -197,69 +197,69 @@ class IntegerToken : public ValueToken<i
// * f: floating point
// * i: instruction
// and n (size) is one of 8, 16, 32 and 64. n should be omitted for
// instructions.
class FormatToken : public Token {
public:
FormatToken() {}
- virtual bool IsFormat() const { return true; }
+ virtual bool IsFormat() const override { return true; }
virtual int SizeOf() const = 0;
virtual char type_code() const = 0;
virtual void PrintData(void* data, FILE* out = stdout) const = 0;
- virtual void Print(FILE* out = stdout) const = 0;
+ virtual void Print(FILE* out = stdout) const override = 0;
- virtual uint8_t* ToAddress(Debugger* debugger) const {
+ virtual uint8_t* ToAddress(Debugger* debugger) const override {
USE(debugger);
VIXL_ABORT();
}
static Token* Tokenize(const char* arg);
static FormatToken* Cast(Token* tok) {
VIXL_ASSERT(tok->IsFormat());
return reinterpret_cast<FormatToken*>(tok);
}
};
template<typename T> class Format : public FormatToken {
public:
Format(const char* fmt, char type_code) : fmt_(fmt), type_code_(type_code) {}
- virtual int SizeOf() const { return sizeof(T); }
- virtual char type_code() const { return type_code_; }
- virtual void PrintData(void* data, FILE* out = stdout) const {
+ virtual int SizeOf() const override { return sizeof(T); }
+ virtual char type_code() const override { return type_code_; }
+ virtual void PrintData(void* data, FILE* out = stdout) const override {
T value;
memcpy(&value, data, sizeof(value));
fprintf(out, fmt_, value);
}
- virtual void Print(FILE* out = stdout) const;
+ virtual void Print(FILE* out = stdout) const override;
private:
const char* fmt_;
char type_code_;
};
// Tokens which don't fit any of the above.
class UnknownToken : public Token {
public:
explicit UnknownToken(const char* arg) {
size_t size = strlen(arg) + 1;
unknown_ = (char*)js_malloc(size);
strncpy(unknown_, arg, size);
}
virtual ~UnknownToken() { js_free(unknown_); }
- virtual uint8_t* ToAddress(Debugger* debugger) const {
+ virtual uint8_t* ToAddress(Debugger* debugger) const override {
USE(debugger);
VIXL_ABORT();
}
- virtual bool IsUnknown() const { return true; }
- virtual void Print(FILE* out = stdout) const;
+ virtual bool IsUnknown() const override { return true; }
+ virtual void Print(FILE* out = stdout) const override;
private:
char* unknown_;
};
// All debugger commands must subclass DebugCommand and implement Run, Print
// and Build. Commands must also define kHelp and kAliases.
@@ -286,49 +286,49 @@ class DebugCommand {
};
// For all commands below see their respective kHelp and kAliases in
// debugger-a64.cc
class HelpCommand : public DebugCommand {
public:
explicit HelpCommand(Token* name) : DebugCommand(name) {}
- virtual bool Run(Debugger* debugger);
+ virtual bool Run(Debugger* debugger) override;
static DebugCommand* Build(TokenVector&& args);
static const char* kHelp;
static const char* kAliases[];
static const char* kArguments;
};
class ContinueCommand : public DebugCommand {
public:
explicit ContinueCommand(Token* name) : DebugCommand(name) {}
- virtual bool Run(Debugger* debugger);
+ virtual bool Run(Debugger* debugger) override;
static DebugCommand* Build(TokenVector&& args);
static const char* kHelp;
static const char* kAliases[];
static const char* kArguments;
};
class StepCommand : public DebugCommand {
public:
StepCommand(Token* name, IntegerToken* count)
: DebugCommand(name), count_(count) {}
virtual ~StepCommand() { js_delete(count_); }
int64_t count() { return count_->value(); }
- virtual bool Run(Debugger* debugger);
- virtual void Print(FILE* out = stdout);
+ virtual bool Run(Debugger* debugger) override;
+ virtual void Print(FILE* out = stdout) override;
static DebugCommand* Build(TokenVector&& args);
static const char* kHelp;
static const char* kAliases[];
static const char* kArguments;
private:
@@ -351,18 +351,18 @@ class PrintCommand : public DebugCommand
: DebugCommand(name), target_(target), format_(format) {}
virtual ~PrintCommand() {
js_delete(target_);
js_delete(format_);
}
Token* target() { return target_; }
FormatToken* format() { return format_; }
- virtual bool Run(Debugger* debugger);
- virtual void Print(FILE* out = stdout);
+ virtual bool Run(Debugger* debugger) override;
+ virtual void Print(FILE* out = stdout) override;
static DebugCommand* Build(TokenVector&& args);
static const char* kHelp;
static const char* kAliases[];
static const char* kArguments;
private:
@@ -381,18 +381,18 @@ class ExamineCommand : public DebugComma
js_delete(target_);
js_delete(format_);
js_delete(count_);
}
Token* target() { return target_; }
FormatToken* format() { return format_; }
IntegerToken* count() { return count_; }
- virtual bool Run(Debugger* debugger);
- virtual void Print(FILE* out = stdout);
+ virtual bool Run(Debugger* debugger) override;
+ virtual void Print(FILE* out = stdout) override;
static DebugCommand* Build(TokenVector&& args);
static const char* kHelp;
static const char* kAliases[];
static const char* kArguments;
private:
@@ -402,30 +402,30 @@ class ExamineCommand : public DebugComma
};
// Commands which name does not match any of the known commnand.
class UnknownCommand : public DebugCommand {
public:
explicit UnknownCommand(TokenVector&& args) : args_(Move(args)) {}
virtual ~UnknownCommand();
- virtual bool Run(Debugger* debugger);
+ virtual bool Run(Debugger* debugger) override;
private:
TokenVector args_;
};
// Commands which name match a known command but the syntax is invalid.
class InvalidCommand : public DebugCommand {
public:
InvalidCommand(TokenVector&& args, int index, const char* cause)
: args_(Move(args)), index_(index), cause_(cause) {}
virtual ~InvalidCommand();
- virtual bool Run(Debugger* debugger);
+ virtual bool Run(Debugger* debugger) override;
private:
TokenVector args_;
int index_;
const char* cause_;
};
const char* HelpCommand::kAliases[] = { "help", NULL };
--- a/js/src/jit/arm64/vixl/Debugger-vixl.h
+++ b/js/src/jit/arm64/vixl/Debugger-vixl.h
@@ -52,18 +52,18 @@ class DebugCommand;
class Token;
class FormatToken;
class Debugger : public Simulator {
public:
explicit Debugger(JSContext* cx, Decoder* decoder, FILE* stream = stdout);
~Debugger();
- virtual void Run();
- virtual void VisitException(const Instruction* instr);
+ virtual void Run() override;
+ virtual void VisitException(const Instruction* instr) override;
int debug_parameters() const { return debug_parameters_; }
void set_debug_parameters(int parameters) {
debug_parameters_ = parameters;
update_pending_request();
}
--- a/js/src/jit/arm64/vixl/Disasm-vixl.h
+++ b/js/src/jit/arm64/vixl/Disasm-vixl.h
@@ -38,17 +38,17 @@ namespace vixl {
class Disassembler: public DecoderVisitor {
public:
Disassembler();
Disassembler(char* text_buffer, int buffer_size);
virtual ~Disassembler();
char* GetOutput();
// Declare all Visitor functions.
- #define DECLARE(A) virtual void Visit##A(const Instruction* instr);
+ #define DECLARE(A) virtual void Visit##A(const Instruction* instr) override;
VISITOR_LIST(DECLARE)
#undef DECLARE
protected:
virtual void ProcessOutput(const Instruction* instr);
// Default output functions. The functions below implement a default way of
// printing elements in the disassembly. A sub-class can override these to
@@ -162,16 +162,16 @@ class Disassembler: public DecoderVisito
};
class PrintDisassembler: public Disassembler {
public:
explicit PrintDisassembler(FILE* stream) : stream_(stream) { }
protected:
- virtual void ProcessOutput(const Instruction* instr);
+ virtual void ProcessOutput(const Instruction* instr) override;
private:
FILE *stream_;
};
} // namespace vixl
#endif // VIXL_A64_DISASM_A64_H
--- a/js/src/jit/arm64/vixl/Instrument-vixl.h
+++ b/js/src/jit/arm64/vixl/Instrument-vixl.h
@@ -79,17 +79,17 @@ class Instrument: public DecoderVisitor
explicit Instrument(const char* datafile = NULL,
uint64_t sample_period = kDefaultInstrumentationSamplingPeriod);
~Instrument();
void Enable();
void Disable();
// Declare all Visitor functions.
- #define DECLARE(A) void Visit##A(const Instruction* instr);
+ #define DECLARE(A) void Visit##A(const Instruction* instr) override;
VISITOR_LIST(DECLARE)
#undef DECLARE
private:
void Update();
void DumpCounters();
void DumpCounterNames();
void DumpEventMarker(unsigned marker);
--- a/js/src/jit/arm64/vixl/Simulator-vixl.h
+++ b/js/src/jit/arm64/vixl/Simulator-vixl.h
@@ -750,17 +750,17 @@ class Simulator : public DecoderVisitor
}
pc_modified_ = false;
}
void ExecuteInstruction();
// Declare all Visitor functions.
- #define DECLARE(A) virtual void Visit##A(const Instruction* instr);
+ #define DECLARE(A) virtual void Visit##A(const Instruction* instr) override;
VISITOR_LIST_THAT_RETURN(DECLARE)
VISITOR_LIST_THAT_DONT_RETURN(DECLARE)
#undef DECLARE
// Integer register accessors.
// Basic accessor: Read the register as the specified type.
--- a/js/src/jit/none/LIR-none.h
+++ b/js/src/jit/none/LIR-none.h
@@ -51,17 +51,17 @@ class LWasmUint32ToFloat32 : public LIns
class LUnbox : public LInstructionHelper<1, 2, 0>
{
public:
MUnbox* mir() const { MOZ_CRASH(); }
const LAllocation* payload() { MOZ_CRASH(); }
const LAllocation* type() { MOZ_CRASH(); }
- const char* extraName() const { MOZ_CRASH(); }
+ const char* extraName() const override { MOZ_CRASH(); }
};
class LDivI : public LBinaryMath<1>
{
public:
LDivI(const LAllocation& , const LAllocation& ,
const LDefinition& ) {
MOZ_CRASH();
}
--- a/js/src/jit/none/Lowering-none.h
+++ b/js/src/jit/none/Lowering-none.h
@@ -65,55 +65,55 @@ class LIRGeneratorNone : public LIRGener
void lowerTruncateFToInt32(MTruncateToInt32*) { MOZ_CRASH(); }
void lowerDivI(MDiv*) { MOZ_CRASH(); }
void lowerModI(MMod*) { MOZ_CRASH(); }
void lowerDivI64(MDiv*) { MOZ_CRASH(); }
void lowerModI64(MMod*) { MOZ_CRASH(); }
void lowerMulI(MMul*, MDefinition*, MDefinition*) { MOZ_CRASH(); }
void lowerUDiv(MDiv*) { MOZ_CRASH(); }
void lowerUMod(MMod*) { MOZ_CRASH(); }
- void visitBox(MBox* box) { MOZ_CRASH(); }
- void visitUnbox(MUnbox* unbox) { MOZ_CRASH(); }
- void visitReturn(MReturn* ret) { MOZ_CRASH(); }
- void visitPowHalf(MPowHalf*) { MOZ_CRASH(); }
- void visitWasmNeg(MWasmNeg*) { MOZ_CRASH(); }
- void visitGuardShape(MGuardShape* ins) { MOZ_CRASH(); }
- void visitGuardObjectGroup(MGuardObjectGroup* ins) { MOZ_CRASH(); }
- void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) { MOZ_CRASH(); }
- void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) { MOZ_CRASH(); }
- void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) { MOZ_CRASH(); }
- void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) { MOZ_CRASH(); }
- void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) { MOZ_CRASH(); }
- void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) { MOZ_CRASH(); }
- void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) { MOZ_CRASH(); }
- void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) { MOZ_CRASH(); }
- void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) { MOZ_CRASH(); }
- void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) { MOZ_CRASH(); }
- void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) { MOZ_CRASH(); }
- void visitWasmSelect(MWasmSelect*) { MOZ_CRASH(); }
- void visitWasmBoundsCheck(MWasmBoundsCheck* ins) { MOZ_CRASH(); }
- void visitWasmLoad(MWasmLoad* ins) { MOZ_CRASH(); }
- void visitWasmStore(MWasmStore* ins) { MOZ_CRASH(); }
+ void visitBox(MBox* box) override { MOZ_CRASH(); }
+ void visitUnbox(MUnbox* unbox) override { MOZ_CRASH(); }
+ void visitReturn(MReturn* ret) override { MOZ_CRASH(); }
+ void visitPowHalf(MPowHalf*) override { MOZ_CRASH(); }
+ void visitWasmNeg(MWasmNeg*) override { MOZ_CRASH(); }
+ void visitGuardShape(MGuardShape* ins) override { MOZ_CRASH(); }
+ void visitGuardObjectGroup(MGuardObjectGroup* ins) override { MOZ_CRASH(); }
+ void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) override { MOZ_CRASH(); }
+ void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) override { MOZ_CRASH(); }
+ void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) override { MOZ_CRASH(); }
+ void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) override { MOZ_CRASH(); }
+ void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) override { MOZ_CRASH(); }
+ void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) override { MOZ_CRASH(); }
+ void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) override { MOZ_CRASH(); }
+ void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) override { MOZ_CRASH(); }
+ void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) override { MOZ_CRASH(); }
+ void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) override { MOZ_CRASH(); }
+ void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) override { MOZ_CRASH(); }
+ void visitWasmSelect(MWasmSelect*) override { MOZ_CRASH(); }
+ void visitWasmBoundsCheck(MWasmBoundsCheck* ins) override { MOZ_CRASH(); }
+ void visitWasmLoad(MWasmLoad* ins) override { MOZ_CRASH(); }
+ void visitWasmStore(MWasmStore* ins) override { MOZ_CRASH(); }
LTableSwitch* newLTableSwitch(LAllocation, LDefinition, MTableSwitch*) { MOZ_CRASH(); }
LTableSwitchV* newLTableSwitchV(MTableSwitch*) { MOZ_CRASH(); }
- void visitSimdSelect(MSimdSelect* ins) { MOZ_CRASH(); }
- void visitSimdSplat(MSimdSplat* ins) { MOZ_CRASH(); }
- void visitSimdSwizzle(MSimdSwizzle* ins) { MOZ_CRASH(); }
- void visitSimdShuffle(MSimdShuffle* ins) { MOZ_CRASH(); }
- void visitSimdValueX4(MSimdValueX4* lir) { MOZ_CRASH(); }
- void visitSubstr(MSubstr*) { MOZ_CRASH(); }
- void visitSimdBinaryArith(js::jit::MSimdBinaryArith*) { MOZ_CRASH(); }
- void visitSimdBinarySaturating(MSimdBinarySaturating* ins) { MOZ_CRASH(); }
- void visitRandom(js::jit::MRandom*) { MOZ_CRASH(); }
- void visitCopySign(js::jit::MCopySign*) { MOZ_CRASH(); }
- void visitWasmTruncateToInt64(MWasmTruncateToInt64*) { MOZ_CRASH(); }
- void visitInt64ToFloatingPoint(MInt64ToFloatingPoint*) { MOZ_CRASH(); }
- void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) { MOZ_CRASH(); }
- void visitSignExtendInt64(MSignExtendInt64* ins) { MOZ_CRASH(); }
+ void visitSimdSelect(MSimdSelect* ins) override { MOZ_CRASH(); }
+ void visitSimdSplat(MSimdSplat* ins) override { MOZ_CRASH(); }
+ void visitSimdSwizzle(MSimdSwizzle* ins) override { MOZ_CRASH(); }
+ void visitSimdShuffle(MSimdShuffle* ins) override { MOZ_CRASH(); }
+ void visitSimdValueX4(MSimdValueX4* lir) override { MOZ_CRASH(); }
+ void visitSubstr(MSubstr*) override { MOZ_CRASH(); }
+ void visitSimdBinaryArith(js::jit::MSimdBinaryArith*) override { MOZ_CRASH(); }
+ void visitSimdBinarySaturating(MSimdBinarySaturating* ins) override { MOZ_CRASH(); }
+ void visitRandom(js::jit::MRandom*) override { MOZ_CRASH(); }
+ void visitCopySign(js::jit::MCopySign*) override { MOZ_CRASH(); }
+ void visitWasmTruncateToInt64(MWasmTruncateToInt64*) override { MOZ_CRASH(); }
+ void visitInt64ToFloatingPoint(MInt64ToFloatingPoint*) override { MOZ_CRASH(); }
+ void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) override { MOZ_CRASH(); }
+ void visitSignExtendInt64(MSignExtendInt64* ins) override { MOZ_CRASH(); }
};
typedef LIRGeneratorNone LIRGeneratorSpecific;
} // namespace jit
} // namespace js
#endif /* jit_none_Lowering_none_h */
--- a/js/src/jit/shared/CodeGenerator-shared.cpp
+++ b/js/src/jit/shared/CodeGenerator-shared.cpp
@@ -1412,17 +1412,17 @@ class OutOfLineTruncateSlow : public Out
OutOfLineTruncateSlow(FloatRegister src, Register dest, bool widenFloatToDouble = false,
wasm::BytecodeOffset bytecodeOffset = wasm::BytecodeOffset())
: src_(src),
dest_(dest),
widenFloatToDouble_(widenFloatToDouble),
bytecodeOffset_(bytecodeOffset)
{ }
- void accept(CodeGeneratorShared* codegen) {
+ void accept(CodeGeneratorShared* codegen) override {
codegen->visitOutOfLineTruncateSlow(this);
}
FloatRegister src() const {
return src_;
}
Register dest() const {
return dest_;
}
--- a/js/src/jit/shared/CodeGenerator-shared.h
+++ b/js/src/jit/shared/CodeGenerator-shared.h
@@ -341,23 +341,23 @@ class CodeGeneratorShared : public LElem
void ensureOsiSpace();
OutOfLineCode* oolTruncateDouble(FloatRegister src, Register dest, MInstruction* mir,
wasm::BytecodeOffset callOffset = wasm::BytecodeOffset());
void emitTruncateDouble(FloatRegister src, Register dest, MTruncateToInt32* mir);
void emitTruncateFloat32(FloatRegister src, Register dest, MTruncateToInt32* mir);
void emitWasmCallBase(LWasmCallBase* ins);
- void visitWasmCall(LWasmCall* ins) { emitWasmCallBase(ins); }
- void visitWasmCallI64(LWasmCallI64* ins) { emitWasmCallBase(ins); }
+ void visitWasmCall(LWasmCall* ins) override { emitWasmCallBase(ins); }
+ void visitWasmCallI64(LWasmCallI64* ins) override { emitWasmCallBase(ins); }
- void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins);
- void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins);
- void visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins);
- void visitWasmStoreGlobalVarI64(LWasmStoreGlobalVarI64* ins);
+ void visitWasmLoadGlobalVar(LWasmLoadGlobalVar* ins) override;
+ void visitWasmStoreGlobalVar(LWasmStoreGlobalVar* ins) override;
+ void visitWasmLoadGlobalVarI64(LWasmLoadGlobalVarI64* ins) override;
+ void visitWasmStoreGlobalVarI64(LWasmStoreGlobalVarI64* ins) override;
void emitPreBarrier(Register base, const LAllocation* index, int32_t offsetAdjustment);
void emitPreBarrier(Address address);
// We don't emit code for trivial blocks, so if we want to branch to the
// given block, and it's trivial, return the ultimate block we should
// actually branch directly to.
MBasicBlock* skipTrivialBlocks(MBasicBlock* block) {
@@ -632,17 +632,17 @@ class OutOfLineCode : public TempObject
}
};
// For OOL paths that want a specific-typed code generator.
template <typename T>
class OutOfLineCodeBase : public OutOfLineCode
{
public:
- virtual void generate(CodeGeneratorShared* codegen) {
+ virtual void generate(CodeGeneratorShared* codegen) override {
accept(static_cast<T*>(codegen));
}
public:
virtual void accept(T* codegen) = 0;
};
// ArgSeq store arguments for OutOfLineCallVM.
@@ -796,17 +796,17 @@ class OutOfLineCallVM : public OutOfLine
OutOfLineCallVM(LInstruction* lir, const VMFunction& fun, const ArgSeq& args,
const StoreOutputTo& out)
: lir_(lir),
fun_(fun),
args_(args),
out_(out)
{ }
- void accept(CodeGeneratorShared* codegen) {
+ void accept(CodeGeneratorShared* codegen) override {
codegen->visitOutOfLineCallVM(this);
}
LInstruction* lir() const { return lir_; }
const VMFunction& function() const { return fun_; }
const ArgSeq& args() const { return args_; }
const StoreOutputTo& out() const { return out_; }
};
@@ -852,17 +852,17 @@ class OutOfLineWasmTruncateCheck : publi
isUnsigned_(mir->isUnsigned()), bytecodeOffset_(mir->bytecodeOffset())
{ }
OutOfLineWasmTruncateCheck(MWasmTruncateToInt64* mir, FloatRegister input)
: fromType_(mir->input()->type()), toType_(MIRType::Int64), input_(input),
isUnsigned_(mir->isUnsigned()), bytecodeOffset_(mir->bytecodeOffset())
{ }
- void accept(CodeGeneratorShared* codegen) {
+ void accept(CodeGeneratorShared* codegen) override {
codegen->visitOutOfLineWasmTruncateCheck(this);
}
FloatRegister input() const { return input_; }
MIRType toType() const { return toType_; }
MIRType fromType() const { return fromType_; }
bool isUnsigned() const { return isUnsigned_; }
wasm::BytecodeOffset bytecodeOffset() const { return bytecodeOffset_; }
--- a/js/src/jit/shared/LIR-shared.h
+++ b/js/src/jit/shared/LIR-shared.h
@@ -28,17 +28,17 @@ class LBox : public LInstructionHelper<B
: type_(type)
{
setOperand(0, payload);
}
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
template <size_t Temps, size_t ExtraUses = 0>
class LBinaryMath : public LInstructionHelper<1, 2 + ExtraUses, Temps>
{
public:
@@ -114,17 +114,17 @@ class LMoveGroup : public LInstructionHe
public:
LIR_HEADER(MoveGroup)
static LMoveGroup* New(TempAllocator& alloc) {
return new(alloc) LMoveGroup(alloc);
}
- void printOperands(GenericPrinter& out);
+ void printOperands(GenericPrinter& out) override;
// Add a move which takes place simultaneously with all others in the group.
bool add(LAllocation from, LAllocation to, LDefinition::Type type);
// Add a move which takes place after existing moves in the group.
bool addAfter(LAllocation from, LAllocation to, LDefinition::Type type);
size_t numMoves() const {
@@ -500,17 +500,17 @@ public:
return getOperand(0);
}
const LAllocation* rhs() {
return getOperand(1);
}
MSimdBinaryComp::Operation operation() const {
return mir_->toSimdBinaryComp()->operation();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MSimdBinaryComp::OperationName(operation());
}
};
// Binary SIMD comparison operation between two Int8x16 operands.
class LSimdBinaryCompIx16 : public LSimdBinaryComp
{
public:
@@ -556,17 +556,17 @@ class LSimdBinaryArith : public LInstruc
}
const LDefinition* temp() {
return getTemp(0);
}
MSimdBinaryArith::Operation operation() const {
return this->mir_->toSimdBinaryArith()->operation();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MSimdBinaryArith::OperationName(operation());
}
};
// Binary SIMD arithmetic operation between two Int8x16 operands
class LSimdBinaryArithIx16 : public LSimdBinaryArith
{
public:
@@ -616,17 +616,17 @@ class LSimdBinarySaturating : public LIn
return this->mir_->toSimdBinarySaturating()->operation();
}
SimdSign signedness() const {
return this->mir_->toSimdBinarySaturating()->signedness();
}
MIRType type() const {
return mir_->type();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MSimdBinarySaturating::OperationName(operation());
}
};
// Unary SIMD arithmetic operation on a SIMD operand
class LSimdUnaryArith : public LInstructionHelper<1, 1, 0>
{
public:
@@ -679,17 +679,17 @@ class LSimdBinaryBitwise : public LInstr
return getOperand(0);
}
const LAllocation* rhs() {
return getOperand(1);
}
MSimdBinaryBitwise::Operation operation() const {
return mir_->toSimdBinaryBitwise()->operation();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MSimdBinaryBitwise::OperationName(operation());
}
MIRType type() const {
return mir_->type();
}
};
// Shift a SIMD vector by a scalar amount.
@@ -711,17 +711,17 @@ class LSimdShift : public LInstructionHe
return getOperand(1);
}
const LDefinition* temp() {
return getTemp(0);
}
MSimdShift::Operation operation() const {
return mir_->toSimdShift()->operation();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MSimdShift::OperationName(operation());
}
MSimdShift* mir() const {
return mir_->toSimdShift();
}
MIRType type() const {
return mir_->type();
}
@@ -840,17 +840,17 @@ class LPointer : public LInstructionHelp
{ }
void* ptr() const {
return ptr_;
}
Kind kind() const {
return kind_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return kind_ == GC_THING ? "GC_THING" : "NON_GC_THING";
}
gc::Cell* gcptr() const {
MOZ_ASSERT(kind() == GC_THING);
return (gc::Cell*) ptr_;
}
};
@@ -1004,17 +1004,17 @@ class LNewArray : public LInstructionHel
{
public:
LIR_HEADER(NewArray)
explicit LNewArray(const LDefinition& temp) {
setTemp(0, temp);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->isVMCall() ? "VMCall" : nullptr;
}
const LDefinition* temp() {
return getTemp(0);
}
MNewArray* mir() const {
@@ -1129,17 +1129,17 @@ class LNewObject : public LInstructionHe
{
public:
LIR_HEADER(NewObject)
explicit LNewObject(const LDefinition& temp) {
setTemp(0, temp);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->isVMCall() ? "VMCall" : nullptr;
}
const LDefinition* temp() {
return getTemp(0);
}
MNewObject* mir() const {
@@ -2444,17 +2444,17 @@ class LTestVAndBranch : public LControlI
setSuccessor(0, ifTruthy);
setSuccessor(1, ifFalsy);
setBoxOperand(Input, input);
setTemp(0, temp0);
setTemp(1, temp1);
setTemp(2, temp2);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->operandMightEmulateUndefined() ? "MightEmulateUndefined" : nullptr;
}
static const size_t Input = 0;
const LDefinition* tempFloat() {
return getTemp(0);
}
@@ -2501,17 +2501,17 @@ class LFunctionDispatch : public LInstru
class LObjectGroupDispatch : public LInstructionHelper<0, 1, 1>
{
// Dispatch is performed based on an ObjectGroup -> block
// map inferred by the MIR.
public:
LIR_HEADER(ObjectGroupDispatch);
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->hasFallback() ? "HasFallback" : "NoFallback";
}
LObjectGroupDispatch(const LAllocation& in, const LDefinition& temp) {
setOperand(0, in);
setTemp(0, temp);
}
@@ -2546,17 +2546,17 @@ class LCompare : public LInstructionHelp
return getOperand(0);
}
const LAllocation* right() {
return getOperand(1);
}
MCompare* mir() {
return mir_->toCompare();
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
};
class LCompareI64 : public LInstructionHelper<1, 2 * INT64_PIECES, 0>
{
JSOp jsop_;
@@ -2574,17 +2574,17 @@ class LCompareI64 : public LInstructionH
}
JSOp jsop() const {
return jsop_;
}
MCompare* mir() {
return mir_->toCompare();
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
};
class LCompareI64AndBranch : public LControlInstructionHelper<2, 2 * INT64_PIECES, 0>
{
MCompare* cmpMir_;
JSOp jsop_;
@@ -2616,17 +2616,17 @@ class LCompareI64AndBranch : public LCon
return getSuccessor(1);
}
MTest* mir() const {
return mir_->toTest();
}
MCompare* cmpMir() const {
return cmpMir_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
};
// Compares two integral values of the same JS type, either integer or object.
// For objects, both operands are in registers.
class LCompareAndBranch : public LControlInstructionHelper<2, 2, 0>
{
@@ -2662,17 +2662,17 @@ class LCompareAndBranch : public LContro
return getOperand(1);
}
MTest* mir() const {
return mir_->toTest();
}
MCompare* cmpMir() const {
return cmpMir_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
};
class LCompareD : public LInstructionHelper<1, 2, 0>
{
public:
LIR_HEADER(CompareD)
@@ -3244,17 +3244,17 @@ class LBitOpI : public LInstructionHelpe
public:
LIR_HEADER(BitOpI)
explicit LBitOpI(JSOp op)
: op_(op)
{ }
- const char* extraName() const {
+ const char* extraName() const override {
if (bitop() == JSOP_URSH && mir_->toUrsh()->bailoutsDisabled())
return "ursh:BailoutsDisabled";
return CodeName[op_];
}
JSOp bitop() const {
return op_;
}
@@ -3269,17 +3269,17 @@ class LBitOpI64 : public LInstructionHel
static const size_t Lhs = 0;
static const size_t Rhs = INT64_PIECES;
explicit LBitOpI64(JSOp op)
: op_(op)
{ }
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[op_];
}
JSOp bitop() const {
return op_;
}
};
@@ -3297,17 +3297,17 @@ class LBitOpV : public LCallInstructionH
setBoxOperand(LhsInput, lhs);
setBoxOperand(RhsInput, rhs);
}
JSOp jsop() const {
return jsop_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
static const size_t LhsInput = 0;
static const size_t RhsInput = BOX_PIECES;
};
// Shift operation, taking two 32-bit integers as inputs and returning
@@ -3326,17 +3326,17 @@ class LShiftI : public LBinaryMath<0>
JSOp bitop() {
return op_;
}
MInstruction* mir() {
return mir_->toInstruction();
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[op_];
}
};
class LShiftI64 : public LInstructionHelper<INT64_PIECES, INT64_PIECES + 1, 0>
{
JSOp op_;
@@ -3353,17 +3353,17 @@ class LShiftI64 : public LInstructionHel
JSOp bitop() {
return op_;
}
MInstruction* mir() {
return mir_->toInstruction();
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[op_];
}
};
// Sign extension
class LSignExtendInt32 : public LInstructionHelper<1, 1, 0>
{
MSignExtendInt32::Mode mode_;
@@ -3446,17 +3446,17 @@ class LMinMaxBase : public LInstructionH
return this->getOperand(1);
}
const LDefinition* output() {
return this->getDef(0);
}
MMinMax* mir() const {
return mir_->toMinMax();
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->isMax() ? "Max" : "Min";
}
};
class LMinMaxI : public LMinMaxBase
{
public:
LIR_HEADER(MinMaxI)
@@ -3812,17 +3812,17 @@ class LMathFunctionD : public LCallInstr
}
const LDefinition* temp() {
return getTemp(0);
}
MMathFunction* mir() const {
return mir_->toMathFunction();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MMathFunction::FunctionName(mir()->function());
}
};
class LMathFunctionF : public LCallInstructionHelper<1, 1, 1>
{
public:
LIR_HEADER(MathFunctionF)
@@ -3832,38 +3832,38 @@ class LMathFunctionF : public LCallInstr
}
const LDefinition* temp() {
return getTemp(0);
}
MMathFunction* mir() const {
return mir_->toMathFunction();
}
- const char* extraName() const {
+ const char* extraName() const override {
return MMathFunction::FunctionName(mir()->function());
}
};
// Adds two integers, returning an integer value.
class LAddI : public LBinaryMath<0>
{
bool recoversInput_;
public:
LIR_HEADER(AddI)
LAddI()
: recoversInput_(false)
{ }
- const char* extraName() const {
+ const char* extraName() const override {
return snapshot() ? "OverflowCheck" : nullptr;
}
- virtual bool recoversInput() const {
+ virtual bool recoversInput() const override {
return recoversInput_;
}
void setRecoversInput() {
recoversInput_ = true;
}
MAdd* mir() const {
return mir_->toAdd();
@@ -3886,21 +3886,21 @@ class LSubI : public LBinaryMath<0>
public:
LIR_HEADER(SubI)
LSubI()
: recoversInput_(false)
{ }
- const char* extraName() const {
+ const char* extraName() const override {
return snapshot() ? "OverflowCheck" : nullptr;
}
- virtual bool recoversInput() const {
+ virtual bool recoversInput() const override {
return recoversInput_;
}
void setRecoversInput() {
recoversInput_ = true;
}
MSub* mir() const {
return mir_->toSub();
}
@@ -3944,17 +3944,17 @@ class LMathD : public LBinaryMath<0>
explicit LMathD(JSOp jsop)
: jsop_(jsop)
{ }
JSOp jsop() const {
return jsop_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
};
// Performs an add, sub, mul, or div on two double values.
class LMathF: public LBinaryMath<0>
{
JSOp jsop_;
@@ -3965,17 +3965,17 @@ class LMathF: public LBinaryMath<0>
explicit LMathF(JSOp jsop)
: jsop_(jsop)
{ }
JSOp jsop() const {
return jsop_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
};
class LModD : public LBinaryMath<1>
{
public:
LIR_HEADER(ModD)
@@ -3983,17 +3983,17 @@ class LModD : public LBinaryMath<1>
LModD(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) {
setOperand(0, lhs);
setOperand(1, rhs);
setTemp(0, temp);
}
const LDefinition* temp() {
return getTemp(0);
}
- bool isCall() const {
+ bool isCall() const override {
return true;
}
MMod* mir() const {
return mir_->toMod();
}
};
// Call a VM function to perform a binary operation.
@@ -4010,17 +4010,17 @@ class LBinaryV : public LCallInstruction
setBoxOperand(LhsInput, lhs);
setBoxOperand(RhsInput, rhs);
}
JSOp jsop() const {
return jsop_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return CodeName[jsop_];
}
static const size_t LhsInput = 0;
static const size_t RhsInput = BOX_PIECES;
};
// Adds two string, returning a string.
@@ -4337,17 +4337,17 @@ class LValueToInt32 : public LInstructio
Mode mode)
: mode_(mode)
{
setBoxOperand(Input, input);
setTemp(0, temp0);
setTemp(1, temp1);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mode() == NORMAL ? "Normal" : "Truncate";
}
static const size_t Input = 0;
Mode mode() const {
return mode_;
}
@@ -5538,17 +5538,17 @@ class LLoadElementV : public LInstructio
public:
LIR_HEADER(LoadElementV)
LLoadElementV(const LAllocation& elements, const LAllocation& index) {
setOperand(0, elements);
setOperand(1, index);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->needsHoleCheck() ? "HoleCheck" : nullptr;
}
const MLoadElement* mir() const {
return mir_->toLoadElement();
}
const LAllocation* elements() {
return getOperand(0);
@@ -5597,17 +5597,17 @@ class LLoadElementHole : public LInstruc
LIR_HEADER(LoadElementHole)
LLoadElementHole(const LAllocation& elements, const LAllocation& index, const LAllocation& initLength) {
setOperand(0, elements);
setOperand(1, index);
setOperand(2, initLength);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->needsHoleCheck() ? "HoleCheck" : nullptr;
}
const MLoadElementHole* mir() const {
return mir_->toLoadElementHole();
}
const LAllocation* elements() {
return getOperand(0);
@@ -5629,17 +5629,17 @@ class LLoadElementT : public LInstructio
public:
LIR_HEADER(LoadElementT)
LLoadElementT(const LAllocation& elements, const LAllocation& index) {
setOperand(0, elements);
setOperand(1, index);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->needsHoleCheck() ? "HoleCheck"
: (mir()->loadDoubles() ? "Doubles" : nullptr);
}
const MLoadElement* mir() const {
return mir_->toLoadElement();
}
const LAllocation* elements() {
@@ -5760,17 +5760,17 @@ class LStoreElementV : public LInstructi
LStoreElementV(const LAllocation& elements, const LAllocation& index,
const LBoxAllocation& value) {
setOperand(0, elements);
setOperand(1, index);
setBoxOperand(Value, value);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->needsHoleCheck() ? "HoleCheck" : nullptr;
}
static const size_t Value = 2;
const MStoreElement* mir() const {
return mir_->toStoreElement();
}
@@ -5792,17 +5792,17 @@ class LStoreElementT : public LInstructi
LIR_HEADER(StoreElementT)
LStoreElementT(const LAllocation& elements, const LAllocation& index, const LAllocation& value) {
setOperand(0, elements);
setOperand(1, index);
setOperand(2, value);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->needsHoleCheck() ? "HoleCheck" : nullptr;
}
const MStoreElement* mir() const {
return mir_->toStoreElement();
}
const LAllocation* elements() {
return getOperand(0);
@@ -5986,17 +5986,17 @@ class LArrayPopShiftV : public LInstruct
LIR_HEADER(ArrayPopShiftV)
LArrayPopShiftV(const LAllocation& object, const LDefinition& temp0, const LDefinition& temp1) {
setOperand(0, object);
setTemp(0, temp0);
setTemp(1, temp1);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->mode() == MArrayPopShift::Pop ? "Pop" : "Shift";
}
const MArrayPopShift* mir() const {
return mir_->toArrayPopShift();
}
const LAllocation* object() {
return getOperand(0);
@@ -6015,17 +6015,17 @@ class LArrayPopShiftT : public LInstruct
LIR_HEADER(ArrayPopShiftT)
LArrayPopShiftT(const LAllocation& object, const LDefinition& temp0, const LDefinition& temp1) {
setOperand(0, object);
setTemp(0, temp0);
setTemp(1, temp1);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->mode() == MArrayPopShift::Pop ? "Pop" : "Shift";
}
const MArrayPopShift* mir() const {
return mir_->toArrayPopShift();
}
const LAllocation* object() {
return getOperand(0);
@@ -6799,17 +6799,17 @@ class LGetPropertyPolymorphicV : public
setOperand(0, obj);
}
const LAllocation* obj() {
return getOperand(0);
}
const MGetPropertyPolymorphic* mir() const {
return mir_->toGetPropertyPolymorphic();
}
- virtual const char* extraName() const {
+ virtual const char* extraName() const override {
return PropertyNameToExtraName(mir()->name());
}
};
// Emit code to load a typed value from an object's slots if its shape matches
// one of the shapes observed by the baseline IC, else bails out.
class LGetPropertyPolymorphicT : public LInstructionHelper<1, 1, 1>
{
@@ -6824,17 +6824,17 @@ class LGetPropertyPolymorphicT : public
return getOperand(0);
}
const LDefinition* temp() {
return getTemp(0);
}
const MGetPropertyPolymorphic* mir() const {
return mir_->toGetPropertyPolymorphic();
}
- virtual const char* extraName() const {
+ virtual const char* extraName() const override {
return PropertyNameToExtraName(mir()->name());
}
};
// Emit code to store a boxed value to an object's slots if its shape matches
// one of the shapes observed by the baseline IC, else bails out.
class LSetPropertyPolymorphicV : public LInstructionHelper<0, 1 + BOX_PIECES, 1>
{
@@ -6889,17 +6889,17 @@ class LSetPropertyPolymorphicT : public
return getTemp(0);
}
MIRType valueType() const {
return valueType_;
}
const MSetPropertyPolymorphic* mir() const {
return mir_->toSetPropertyPolymorphic();
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(valueType_);
}
};
class LBindNameCache : public LInstructionHelper<1, 1, 1>
{
public:
LIR_HEADER(BindNameCache)
@@ -8955,25 +8955,25 @@ class LWasmCall : public LWasmCallBase
LIR_HEADER(WasmCall);
LWasmCall(LAllocation* operands, uint32_t numOperands, bool needsBoundsCheck)
: LWasmCallBase(operands, numOperands, needsBoundsCheck),
def_(LDefinition::BogusTemp())
{}
// LInstruction interface
- size_t numDefs() const {
+ size_t numDefs() const override {
return def_.isBogusTemp() ? 0 : 1;
}
- LDefinition* getDef(size_t index) {
+ LDefinition* getDef(size_t index) override {
MOZ_ASSERT(numDefs() == 1);
MOZ_ASSERT(index == 0);
return &def_;
}
- void setDef(size_t index, const LDefinition& def) {
+ void setDef(size_t index, const LDefinition& def) override {
MOZ_ASSERT(index == 0);
def_ = def;
}
};
class LWasmCallI64 : public LWasmCallBase
{
LDefinition defs_[INT64_PIECES];
@@ -8984,24 +8984,24 @@ class LWasmCallI64 : public LWasmCallBas
LWasmCallI64(LAllocation* operands, uint32_t numOperands, bool needsBoundsCheck)
: LWasmCallBase(operands, numOperands, needsBoundsCheck)
{
for (size_t i = 0; i < numDefs(); i++)
defs_[i] = LDefinition::BogusTemp();
}
// LInstruction interface
- size_t numDefs() const {
+ size_t numDefs() const override {
return INT64_PIECES;
}
- LDefinition* getDef(size_t index) {
+ LDefinition* getDef(size_t index) override {
MOZ_ASSERT(index < numDefs());
return &defs_[index];
}
- void setDef(size_t index, const LDefinition& def) {
+ void setDef(size_t index, const LDefinition& def) override {
MOZ_ASSERT(index < numDefs());
defs_[index] = def;
}
};
class LAssertRangeI : public LInstructionHelper<0, 1, 0>
{
public:
--- a/js/src/jit/x64/CodeGenerator-x64.h
+++ b/js/src/jit/x64/CodeGenerator-x64.h
@@ -30,55 +30,55 @@ class CodeGeneratorX64 : public CodeGene
void wasmStore(const wasm::MemoryAccessDesc& access, const LAllocation* value, Operand dstAddr);
template <typename T> void emitWasmLoad(T* ins);
template <typename T> void emitWasmStore(T* ins);
public:
CodeGeneratorX64(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
- void visitValue(LValue* value);
- void visitBox(LBox* box);
- void visitUnbox(LUnbox* unbox);
- void visitCompareB(LCompareB* lir);
- void visitCompareBAndBranch(LCompareBAndBranch* lir);
- void visitCompareBitwise(LCompareBitwise* lir);
- void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
- void visitCompareI64(LCompareI64* lir);
- void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
- void visitDivOrModI64(LDivOrModI64* lir);
- void visitUDivOrModI64(LUDivOrModI64* lir);
- void visitNotI64(LNotI64* lir);
- void visitClzI64(LClzI64* lir);
- void visitCtzI64(LCtzI64* lir);
- void visitTruncateDToInt32(LTruncateDToInt32* ins);
- void visitTruncateFToInt32(LTruncateFToInt32* ins);
- void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
- void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
- void visitSignExtendInt64(LSignExtendInt64* ins);
- void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir);
- void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir);
- void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
- void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
- void visitWasmLoad(LWasmLoad* ins);
- void visitWasmLoadI64(LWasmLoadI64* ins);
- void visitWasmStore(LWasmStore* ins);
- void visitWasmStoreI64(LWasmStoreI64* ins);
- void visitWasmSelectI64(LWasmSelectI64* ins);
- void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
- void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
- void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
- void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
- void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
- void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
- void visitTestI64AndBranch(LTestI64AndBranch* lir);
+ void visitValue(LValue* value) override;
+ void visitBox(LBox* box) override;
+ void visitUnbox(LUnbox* unbox) override;
+ void visitCompareB(LCompareB* lir) override;
+ void visitCompareBAndBranch(LCompareBAndBranch* lir) override;
+ void visitCompareBitwise(LCompareBitwise* lir) override;
+ void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir) override;
+ void visitCompareI64(LCompareI64* lir) override;
+ void visitCompareI64AndBranch(LCompareI64AndBranch* lir) override;
+ void visitDivOrModI64(LDivOrModI64* lir) override;
+ void visitUDivOrModI64(LUDivOrModI64* lir) override;
+ void visitNotI64(LNotI64* lir) override;
+ void visitClzI64(LClzI64* lir) override;
+ void visitCtzI64(LCtzI64* lir) override;
+ void visitTruncateDToInt32(LTruncateDToInt32* ins) override;
+ void visitTruncateFToInt32(LTruncateFToInt32* ins) override;
+ void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir) override;
+ void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir) override;
+ void visitSignExtendInt64(LSignExtendInt64* ins) override;
+ void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir) override;
+ void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir) override;
+ void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins) override;
+ void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins) override;
+ void visitWasmLoad(LWasmLoad* ins) override;
+ void visitWasmLoadI64(LWasmLoadI64* ins) override;
+ void visitWasmStore(LWasmStore* ins) override;
+ void visitWasmStoreI64(LWasmStoreI64* ins) override;
+ void visitWasmSelectI64(LWasmSelectI64* ins) override;
+ void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins) override;
+ void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins) override;
+ void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir) override;
+ void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir) override;
+ void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir) override;
+ void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir) override;
+ void visitTestI64AndBranch(LTestI64AndBranch* lir) override;
};
typedef CodeGeneratorX64 CodeGeneratorSpecific;
} // namespace jit
} // namespace js
#endif /* jit_x64_CodeGenerator_x64_h */
--- a/js/src/jit/x64/LIR-x64.h
+++ b/js/src/jit/x64/LIR-x64.h
@@ -29,17 +29,17 @@ class LUnboxBase : public LInstructionHe
class LUnbox : public LUnboxBase {
public:
LIR_HEADER(Unbox)
explicit LUnbox(const LAllocation& input)
: LUnboxBase(input)
{ }
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(mir()->type());
}
};
class LUnboxFloatingPoint : public LUnboxBase {
MIRType type_;
public:
@@ -48,17 +48,17 @@ class LUnboxFloatingPoint : public LUnbo
LUnboxFloatingPoint(const LAllocation& input, MIRType type)
: LUnboxBase(input),
type_(type)
{ }
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
// Convert a 32-bit unsigned integer to a double.
class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 0>
{
public:
@@ -130,17 +130,17 @@ class LUDivOrModI64 : public LBinaryMath
setOperand(1, rhs);
setTemp(0, temp);
}
const LDefinition* remainder() {
return getTemp(0);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->isTruncated() ? "Truncated" : nullptr;
}
MBinaryArithInstruction* mir() const {
MOZ_ASSERT(mir_->isDiv() || mir_->isMod());
return static_cast<MBinaryArithInstruction*>(mir_);
}
--- a/js/src/jit/x64/Lowering-x64.h
+++ b/js/src/jit/x64/Lowering-x64.h
@@ -44,38 +44,38 @@ class LIRGeneratorX64 : public LIRGenera
bool needTempForPostBarrier() { return true; }
void lowerDivI64(MDiv* div);
void lowerModI64(MMod* mod);
void lowerUDivI64(MDiv* div);
void lowerUModI64(MMod* mod);
public:
- void visitBox(MBox* box);
- void visitUnbox(MUnbox* unbox);
- void visitReturn(MReturn* ret);
- void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
- void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
- void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
- void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
- void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
- void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
- void visitWasmLoad(MWasmLoad* ins);
- void visitWasmStore(MWasmStore* ins);
- void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
- void visitSubstr(MSubstr* ins);
- void visitRandom(MRandom* ins);
- void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
- void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
- void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
- void visitSignExtendInt64(MSignExtendInt64* ins);
+ void visitBox(MBox* box) override;
+ void visitUnbox(MUnbox* unbox) override;
+ void visitReturn(MReturn* ret) override;
+ void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) override;
+ void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) override;
+ void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) override;
+ void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) override;
+ void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) override;
+ void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) override;
+ void visitWasmLoad(MWasmLoad* ins) override;
+ void visitWasmStore(MWasmStore* ins) override;
+ void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) override;
+ void visitSubstr(MSubstr* ins) override;
+ void visitRandom(MRandom* ins) override;
+ void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins) override;
+ void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins) override;
+ void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) override;
+ void visitSignExtendInt64(MSignExtendInt64* ins) override;
};
typedef LIRGeneratorX64 LIRGeneratorSpecific;
} // namespace jit
} // namespace js
#endif /* jit_x64_Lowering_x64_h */
--- a/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
+++ b/js/src/jit/x86-shared/CodeGenerator-x86-shared.cpp
@@ -741,17 +741,17 @@ class OutOfLineUndoALUOperation : public
{
LInstruction* ins_;
public:
explicit OutOfLineUndoALUOperation(LInstruction* ins)
: ins_(ins)
{ }
- virtual void accept(CodeGeneratorX86Shared* codegen) {
+ virtual void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitOutOfLineUndoALUOperation(this);
}
LInstruction* ins() const {
return ins_;
}
};
void
@@ -862,17 +862,17 @@ class MulNegativeZeroCheck : public OutO
{
LMulI* ins_;
public:
explicit MulNegativeZeroCheck(LMulI* ins)
: ins_(ins)
{ }
- virtual void accept(CodeGeneratorX86Shared* codegen) {
+ virtual void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitMulNegativeZeroCheck(this);
}
LMulI* ins() const {
return ins_;
}
};
void
@@ -984,17 +984,17 @@ class ReturnZero : public OutOfLineCodeB
{
Register reg_;
public:
explicit ReturnZero(Register reg)
: reg_(reg)
{ }
- virtual void accept(CodeGeneratorX86Shared* codegen) {
+ virtual void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitReturnZero(this);
}
Register reg() const {
return reg_;
}
};
void
@@ -1440,17 +1440,17 @@ class ModOverflowCheck : public OutOfLin
LModI* ins_;
Register rhs_;
public:
explicit ModOverflowCheck(LModI* ins, Register rhs)
: ins_(ins), rhs_(rhs)
{ }
- virtual void accept(CodeGeneratorX86Shared* codegen) {
+ virtual void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitModOverflowCheck(this);
}
Label* done() {
return &done_;
}
LModI* ins() const {
return ins_;
}
@@ -1802,17 +1802,17 @@ CodeGeneratorX86Shared::toMoveOperand(LA
return MoveOperand(StackPointer, ToStackOffset(a));
}
class OutOfLineTableSwitch : public OutOfLineCodeBase<CodeGeneratorX86Shared>
{
MTableSwitch* mir_;
CodeLabel jumpLabel_;
- void accept(CodeGeneratorX86Shared* codegen) {
+ void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitOutOfLineTableSwitch(this);
}
public:
explicit OutOfLineTableSwitch(MTableSwitch* mir)
: mir_(mir)
{}
--- a/js/src/jit/x86-shared/CodeGenerator-x86-shared.h
+++ b/js/src/jit/x86-shared/CodeGenerator-x86-shared.h
@@ -40,17 +40,17 @@ class CodeGeneratorX86Shared : public Co
Scalar::Type viewType_;
public:
OutOfLineLoadTypedArrayOutOfBounds(AnyRegister dest, Scalar::Type viewType)
: dest_(dest), viewType_(viewType)
{}
AnyRegister dest() const { return dest_; }
Scalar::Type viewType() const { return viewType_; }
- void accept(CodeGeneratorX86Shared* codegen) {
+ void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitOutOfLineLoadTypedArrayOutOfBounds(this);
}
};
// Additional bounds check for vector Float to Int conversion, when the
// undefined pattern is seen. Might imply a bailout.
class OutOfLineSimdFloatToIntCheck : public OutOfLineCodeBase<CodeGeneratorX86Shared>
{
@@ -65,17 +65,17 @@ class CodeGeneratorX86Shared : public Co
: temp_(temp), input_(input), ins_(ins), bytecodeOffset_(bytecodeOffset)
{}
Register temp() const { return temp_; }
FloatRegister input() const { return input_; }
LInstruction* ins() const { return ins_; }
wasm::BytecodeOffset bytecodeOffset() const { return bytecodeOffset_; }
- void accept(CodeGeneratorX86Shared* codegen) {
+ void accept(CodeGeneratorX86Shared* codegen) override {
codegen->visitOutOfLineSimdFloatToIntCheck(this);
}
};
public:
NonAssertingLabel deoptLabel_;
Operand ToOperand(const LAllocation& a);
@@ -180,142 +180,142 @@ class CodeGeneratorX86Shared : public Co
SimdSign signedness);
void emitSimdExtractLane32x4(FloatRegister input, Register output, unsigned lane);
public:
CodeGeneratorX86Shared(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
// Instruction visitors.
- virtual void visitDouble(LDouble* ins);
- virtual void visitFloat32(LFloat32* ins);
- virtual void visitMinMaxD(LMinMaxD* ins);
- virtual void visitMinMaxF(LMinMaxF* ins);
- virtual void visitAbsD(LAbsD* ins);
- virtual void visitAbsF(LAbsF* ins);
- virtual void visitClzI(LClzI* ins);
- virtual void visitCtzI(LCtzI* ins);
- virtual void visitPopcntI(LPopcntI* ins);
- virtual void visitPopcntI64(LPopcntI64* lir);
- virtual void visitSqrtD(LSqrtD* ins);
- virtual void visitSqrtF(LSqrtF* ins);
- virtual void visitPowHalfD(LPowHalfD* ins);
- virtual void visitAddI(LAddI* ins);
- virtual void visitAddI64(LAddI64* ins);
- virtual void visitSubI(LSubI* ins);
- virtual void visitSubI64(LSubI64* ins);
- virtual void visitMulI(LMulI* ins);
- virtual void visitMulI64(LMulI64* ins);
- virtual void visitDivI(LDivI* ins);
- virtual void visitDivPowTwoI(LDivPowTwoI* ins);
- virtual void visitDivOrModConstantI(LDivOrModConstantI* ins);
- virtual void visitModI(LModI* ins);
- virtual void visitModPowTwoI(LModPowTwoI* ins);
- virtual void visitBitNotI(LBitNotI* ins);
- virtual void visitBitOpI(LBitOpI* ins);
- virtual void visitBitOpI64(LBitOpI64* ins);
- virtual void visitShiftI(LShiftI* ins);
- virtual void visitShiftI64(LShiftI64* ins);
- virtual void visitUrshD(LUrshD* ins);
- virtual void visitTestIAndBranch(LTestIAndBranch* test);
- virtual void visitTestDAndBranch(LTestDAndBranch* test);
- virtual void visitTestFAndBranch(LTestFAndBranch* test);
- virtual void visitCompare(LCompare* comp);
- virtual void visitCompareAndBranch(LCompareAndBranch* comp);
- virtual void visitCompareD(LCompareD* comp);
- virtual void visitCompareDAndBranch(LCompareDAndBranch* comp);
- virtual void visitCompareF(LCompareF* comp);
- virtual void visitCompareFAndBranch(LCompareFAndBranch* comp);
- virtual void visitBitAndAndBranch(LBitAndAndBranch* baab);
- virtual void visitNotI(LNotI* comp);
- virtual void visitNotD(LNotD* comp);
- virtual void visitNotF(LNotF* comp);
- virtual void visitMathD(LMathD* math);
- virtual void visitMathF(LMathF* math);
- virtual void visitFloor(LFloor* lir);
- virtual void visitFloorF(LFloorF* lir);
- virtual void visitCeil(LCeil* lir);
- virtual void visitCeilF(LCeilF* lir);
- virtual void visitRound(LRound* lir);
- virtual void visitRoundF(LRoundF* lir);
- virtual void visitNearbyInt(LNearbyInt* lir);
- virtual void visitNearbyIntF(LNearbyIntF* lir);
- virtual void visitGuardShape(LGuardShape* guard);
- virtual void visitGuardObjectGroup(LGuardObjectGroup* guard);
- virtual void visitGuardClass(LGuardClass* guard);
- virtual void visitEffectiveAddress(LEffectiveAddress* ins);
- virtual void visitUDivOrMod(LUDivOrMod* ins);
- virtual void visitUDivOrModConstant(LUDivOrModConstant *ins);
- virtual void visitWasmStackArg(LWasmStackArg* ins);
- virtual void visitWasmStackArgI64(LWasmStackArgI64* ins);
- virtual void visitWasmSelect(LWasmSelect* ins);
- virtual void visitWasmReinterpret(LWasmReinterpret* lir);
- virtual void visitMemoryBarrier(LMemoryBarrier* ins);
- virtual void visitWasmAddOffset(LWasmAddOffset* lir);
- virtual void visitWasmTruncateToInt32(LWasmTruncateToInt32* lir);
- virtual void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir);
- virtual void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir);
- virtual void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir);
- virtual void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir);
- virtual void visitCopySignD(LCopySignD* lir);
- virtual void visitCopySignF(LCopySignF* lir);
- virtual void visitRotateI64(LRotateI64* lir);
+ virtual void visitDouble(LDouble* ins) override;
+ virtual void visitFloat32(LFloat32* ins) override;
+ virtual void visitMinMaxD(LMinMaxD* ins) override;
+ virtual void visitMinMaxF(LMinMaxF* ins) override;
+ virtual void visitAbsD(LAbsD* ins) override;
+ virtual void visitAbsF(LAbsF* ins) override;
+ virtual void visitClzI(LClzI* ins) override;
+ virtual void visitCtzI(LCtzI* ins) override;
+ virtual void visitPopcntI(LPopcntI* ins) override;
+ virtual void visitPopcntI64(LPopcntI64* lir) override;
+ virtual void visitSqrtD(LSqrtD* ins) override;
+ virtual void visitSqrtF(LSqrtF* ins) override;
+ virtual void visitPowHalfD(LPowHalfD* ins) override;
+ virtual void visitAddI(LAddI* ins) override;
+ virtual void visitAddI64(LAddI64* ins) override;
+ virtual void visitSubI(LSubI* ins) override;
+ virtual void visitSubI64(LSubI64* ins) override;
+ virtual void visitMulI(LMulI* ins) override;
+ virtual void visitMulI64(LMulI64* ins) override;
+ virtual void visitDivI(LDivI* ins) override;
+ virtual void visitDivPowTwoI(LDivPowTwoI* ins) override;
+ virtual void visitDivOrModConstantI(LDivOrModConstantI* ins) override;
+ virtual void visitModI(LModI* ins) override;
+ virtual void visitModPowTwoI(LModPowTwoI* ins) override;
+ virtual void visitBitNotI(LBitNotI* ins) override;
+ virtual void visitBitOpI(LBitOpI* ins) override;
+ virtual void visitBitOpI64(LBitOpI64* ins) override;
+ virtual void visitShiftI(LShiftI* ins) override;
+ virtual void visitShiftI64(LShiftI64* ins) override;
+ virtual void visitUrshD(LUrshD* ins) override;
+ virtual void visitTestIAndBranch(LTestIAndBranch* test) override;
+ virtual void visitTestDAndBranch(LTestDAndBranch* test) override;
+ virtual void visitTestFAndBranch(LTestFAndBranch* test) override;
+ virtual void visitCompare(LCompare* comp) override;
+ virtual void visitCompareAndBranch(LCompareAndBranch* comp) override;
+ virtual void visitCompareD(LCompareD* comp) override;
+ virtual void visitCompareDAndBranch(LCompareDAndBranch* comp) override;
+ virtual void visitCompareF(LCompareF* comp) override;
+ virtual void visitCompareFAndBranch(LCompareFAndBranch* comp) override;
+ virtual void visitBitAndAndBranch(LBitAndAndBranch* baab) override;
+ virtual void visitNotI(LNotI* comp) override;
+ virtual void visitNotD(LNotD* comp) override;
+ virtual void visitNotF(LNotF* comp) override;
+ virtual void visitMathD(LMathD* math) override;
+ virtual void visitMathF(LMathF* math) override;
+ virtual void visitFloor(LFloor* lir) override;
+ virtual void visitFloorF(LFloorF* lir) override;
+ virtual void visitCeil(LCeil* lir) override;
+ virtual void visitCeilF(LCeilF* lir) override;
+ virtual void visitRound(LRound* lir) override;
+ virtual void visitRoundF(LRoundF* lir) override;
+ virtual void visitNearbyInt(LNearbyInt* lir) override;
+ virtual void visitNearbyIntF(LNearbyIntF* lir) override;
+ virtual void visitGuardShape(LGuardShape* guard) override;
+ virtual void visitGuardObjectGroup(LGuardObjectGroup* guard) override;
+ virtual void visitGuardClass(LGuardClass* guard) override;
+ virtual void visitEffectiveAddress(LEffectiveAddress* ins) override;
+ virtual void visitUDivOrMod(LUDivOrMod* ins) override;
+ virtual void visitUDivOrModConstant(LUDivOrModConstant *ins) override;
+ virtual void visitWasmStackArg(LWasmStackArg* ins) override;
+ virtual void visitWasmStackArgI64(LWasmStackArgI64* ins) override;
+ virtual void visitWasmSelect(LWasmSelect* ins) override;
+ virtual void visitWasmReinterpret(LWasmReinterpret* lir) override;
+ virtual void visitMemoryBarrier(LMemoryBarrier* ins) override;
+ virtual void visitWasmAddOffset(LWasmAddOffset* lir) override;
+ virtual void visitWasmTruncateToInt32(LWasmTruncateToInt32* lir) override;
+ virtual void visitAtomicTypedArrayElementBinop(LAtomicTypedArrayElementBinop* lir) override;
+ virtual void visitAtomicTypedArrayElementBinopForEffect(LAtomicTypedArrayElementBinopForEffect* lir) override;
+ virtual void visitCompareExchangeTypedArrayElement(LCompareExchangeTypedArrayElement* lir) override;
+ virtual void visitAtomicExchangeTypedArrayElement(LAtomicExchangeTypedArrayElement* lir) override;
+ virtual void visitCopySignD(LCopySignD* lir) override;
+ virtual void visitCopySignF(LCopySignF* lir) override;
+ virtual void visitRotateI64(LRotateI64* lir) override;
void visitOutOfLineLoadTypedArrayOutOfBounds(OutOfLineLoadTypedArrayOutOfBounds* ool);
- void visitNegI(LNegI* lir);
- void visitNegD(LNegD* lir);
- void visitNegF(LNegF* lir);
+ void visitNegI(LNegI* lir) override;
+ void visitNegD(LNegD* lir) override;
+ void visitNegF(LNegF* lir) override;
- void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool);
+ void visitOutOfLineWasmTruncateCheck(OutOfLineWasmTruncateCheck* ool) override;
// SIMD operators
- void visitSimdValueInt32x4(LSimdValueInt32x4* lir);
- void visitSimdValueFloat32x4(LSimdValueFloat32x4* lir);
- void visitSimdSplatX16(LSimdSplatX16* lir);
- void visitSimdSplatX8(LSimdSplatX8* lir);
- void visitSimdSplatX4(LSimdSplatX4* lir);
- void visitSimd128Int(LSimd128Int* ins);
- void visitSimd128Float(LSimd128Float* ins);
- void visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4* ins);
- void visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4* ins);
- void visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4* ins);
- void visitSimdReinterpretCast(LSimdReinterpretCast* lir);
- void visitSimdExtractElementB(LSimdExtractElementB* lir);
- void visitSimdExtractElementI(LSimdExtractElementI* lir);
- void visitSimdExtractElementU2D(LSimdExtractElementU2D* lir);
- void visitSimdExtractElementF(LSimdExtractElementF* lir);
- void visitSimdInsertElementI(LSimdInsertElementI* lir);
- void visitSimdInsertElementF(LSimdInsertElementF* lir);
- void visitSimdSwizzleI(LSimdSwizzleI* lir);
- void visitSimdSwizzleF(LSimdSwizzleF* lir);
- void visitSimdShuffleX4(LSimdShuffleX4* lir);
- void visitSimdShuffle(LSimdShuffle* lir);
- void visitSimdUnaryArithIx16(LSimdUnaryArithIx16* lir);
- void visitSimdUnaryArithIx8(LSimdUnaryArithIx8* lir);
- void visitSimdUnaryArithIx4(LSimdUnaryArithIx4* lir);
- void visitSimdUnaryArithFx4(LSimdUnaryArithFx4* lir);
- void visitSimdBinaryCompIx16(LSimdBinaryCompIx16* lir);
- void visitSimdBinaryCompIx8(LSimdBinaryCompIx8* lir);
- void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir);
- void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir);
- void visitSimdBinaryArithIx16(LSimdBinaryArithIx16* lir);
- void visitSimdBinaryArithIx8(LSimdBinaryArithIx8* lir);
- void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir);
- void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir);
- void visitSimdBinarySaturating(LSimdBinarySaturating* lir);
- void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir);
- void visitSimdShift(LSimdShift* lir);
- void visitSimdSelect(LSimdSelect* ins);
- void visitSimdAllTrue(LSimdAllTrue* ins);
- void visitSimdAnyTrue(LSimdAnyTrue* ins);
+ void visitSimdValueInt32x4(LSimdValueInt32x4* lir) override;
+ void visitSimdValueFloat32x4(LSimdValueFloat32x4* lir) override;
+ void visitSimdSplatX16(LSimdSplatX16* lir) override;
+ void visitSimdSplatX8(LSimdSplatX8* lir) override;
+ void visitSimdSplatX4(LSimdSplatX4* lir) override;
+ void visitSimd128Int(LSimd128Int* ins) override;
+ void visitSimd128Float(LSimd128Float* ins) override;
+ void visitInt32x4ToFloat32x4(LInt32x4ToFloat32x4* ins) override;
+ void visitFloat32x4ToInt32x4(LFloat32x4ToInt32x4* ins) override;
+ void visitFloat32x4ToUint32x4(LFloat32x4ToUint32x4* ins) override;
+ void visitSimdReinterpretCast(LSimdReinterpretCast* lir) override;
+ void visitSimdExtractElementB(LSimdExtractElementB* lir) override;
+ void visitSimdExtractElementI(LSimdExtractElementI* lir) override;
+ void visitSimdExtractElementU2D(LSimdExtractElementU2D* lir) override;
+ void visitSimdExtractElementF(LSimdExtractElementF* lir) override;
+ void visitSimdInsertElementI(LSimdInsertElementI* lir) override;
+ void visitSimdInsertElementF(LSimdInsertElementF* lir) override;
+ void visitSimdSwizzleI(LSimdSwizzleI* lir) override;
+ void visitSimdSwizzleF(LSimdSwizzleF* lir) override;
+ void visitSimdShuffleX4(LSimdShuffleX4* lir) override;
+ void visitSimdShuffle(LSimdShuffle* lir) override;
+ void visitSimdUnaryArithIx16(LSimdUnaryArithIx16* lir) override;
+ void visitSimdUnaryArithIx8(LSimdUnaryArithIx8* lir) override;
+ void visitSimdUnaryArithIx4(LSimdUnaryArithIx4* lir) override;
+ void visitSimdUnaryArithFx4(LSimdUnaryArithFx4* lir) override;
+ void visitSimdBinaryCompIx16(LSimdBinaryCompIx16* lir) override;
+ void visitSimdBinaryCompIx8(LSimdBinaryCompIx8* lir) override;
+ void visitSimdBinaryCompIx4(LSimdBinaryCompIx4* lir) override;
+ void visitSimdBinaryCompFx4(LSimdBinaryCompFx4* lir) override;
+ void visitSimdBinaryArithIx16(LSimdBinaryArithIx16* lir) override;
+ void visitSimdBinaryArithIx8(LSimdBinaryArithIx8* lir) override;
+ void visitSimdBinaryArithIx4(LSimdBinaryArithIx4* lir) override;
+ void visitSimdBinaryArithFx4(LSimdBinaryArithFx4* lir) override;
+ void visitSimdBinarySaturating(LSimdBinarySaturating* lir) override;
+ void visitSimdBinaryBitwise(LSimdBinaryBitwise* lir) override;
+ void visitSimdShift(LSimdShift* lir) override;
+ void visitSimdSelect(LSimdSelect* ins) override;
+ void visitSimdAllTrue(LSimdAllTrue* ins) override;
+ void visitSimdAnyTrue(LSimdAnyTrue* ins) override;
template <class T, class Reg> void visitSimdGeneralShuffle(LSimdGeneralShuffleBase* lir, Reg temp);
- void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir);
- void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir);
+ void visitSimdGeneralShuffleI(LSimdGeneralShuffleI* lir) override;
+ void visitSimdGeneralShuffleF(LSimdGeneralShuffleF* lir) override;
// Out of line visitors.
void visitOutOfLineBailout(OutOfLineBailout* ool);
void visitOutOfLineUndoALUOperation(OutOfLineUndoALUOperation* ool);
void visitMulNegativeZeroCheck(MulNegativeZeroCheck* ool);
void visitModOverflowCheck(ModOverflowCheck* ool);
void visitReturnZero(ReturnZero* ool);
void visitOutOfLineTableSwitch(OutOfLineTableSwitch* ool);
@@ -341,17 +341,17 @@ class OutOfLineBailout : public OutOfLin
{
LSnapshot* snapshot_;
public:
explicit OutOfLineBailout(LSnapshot* snapshot)
: snapshot_(snapshot)
{ }
- void accept(CodeGeneratorX86Shared* codegen);
+ void accept(CodeGeneratorX86Shared* codegen) override;
LSnapshot* snapshot() const {
return snapshot_;
}
};
} // namespace jit
} // namespace js
--- a/js/src/jit/x86-shared/LIR-x86-shared.h
+++ b/js/src/jit/x86-shared/LIR-x86-shared.h
@@ -16,17 +16,17 @@ class LDivI : public LBinaryMath<1>
LIR_HEADER(DivI)
LDivI(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) {
setOperand(0, lhs);
setOperand(1, rhs);
setTemp(0, temp);
}
- const char* extraName() const {
+ const char* extraName() const override {
if (mir()->isTruncated()) {
if (mir()->canBeNegativeZero()) {
return mir()->canBeNegativeOverflow()
? "Truncate_NegativeZero_NegativeOverflow"
: "Truncate_NegativeZero";
}
return mir()->canBeNegativeOverflow() ? "Truncate_NegativeOverflow" : "Truncate";
}
@@ -113,17 +113,17 @@ class LModI : public LBinaryMath<1>
LIR_HEADER(ModI)
LModI(const LAllocation& lhs, const LAllocation& rhs, const LDefinition& temp) {
setOperand(0, lhs);
setOperand(1, rhs);
setTemp(0, temp);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->isTruncated() ? "Truncated" : nullptr;
}
const LDefinition* remainder() {
return getDef(0);
}
MMod* mir() const {
return mir_->toMod();
@@ -142,17 +142,17 @@ class LUDivOrMod : public LBinaryMath<1>
setOperand(1, rhs);
setTemp(0, temp);
}
const LDefinition* remainder() {
return getTemp(0);
}
- const char* extraName() const {
+ const char* extraName() const override {
return mir()->isTruncated() ? "Truncated" : nullptr;
}
MBinaryArithInstruction* mir() const {
MOZ_ASSERT(mir_->isDiv() || mir_->isMod());
return static_cast<MBinaryArithInstruction*>(mir_);
}
@@ -336,17 +336,17 @@ class LMulI : public LBinaryMath<0, 1>
LIR_HEADER(MulI)
LMulI(const LAllocation& lhs, const LAllocation& rhs, const LAllocation& lhsCopy) {
setOperand(0, lhs);
setOperand(1, rhs);
setOperand(2, lhsCopy);
}
- const char* extraName() const {
+ const char* extraName() const override {
return (mir()->mode() == MMul::Integer)
? "Integer"
: (mir()->canBeNegativeZero() ? "CanBeNegativeZero" : nullptr);
}
MMul* mir() const {
return mir_->toMul();
}
--- a/js/src/jit/x86-shared/Lowering-x86-shared.h
+++ b/js/src/jit/x86-shared/Lowering-x86-shared.h
@@ -18,19 +18,19 @@ class LIRGeneratorX86Shared : public LIR
LIRGeneratorX86Shared(MIRGenerator* gen, MIRGraph& graph, LIRGraph& lirGraph)
: LIRGeneratorShared(gen, graph, lirGraph)
{}
LTableSwitch* newLTableSwitch(const LAllocation& in, const LDefinition& inputCopy,
MTableSwitch* ins);
LTableSwitchV* newLTableSwitchV(MTableSwitch* ins);
- void visitGuardShape(MGuardShape* ins);
- void visitGuardObjectGroup(MGuardObjectGroup* ins);
- void visitPowHalf(MPowHalf* ins);
+ void visitGuardShape(MGuardShape* ins) override;
+ void visitGuardObjectGroup(MGuardObjectGroup* ins) override;
+ void visitPowHalf(MPowHalf* ins) override;
void lowerForShift(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir, MDefinition* lhs,
MDefinition* rhs);
void lowerForALU(LInstructionHelper<1, 1, 0>* ins, MDefinition* mir, MDefinition* input);
void lowerForALU(LInstructionHelper<1, 2, 0>* ins, MDefinition* mir, MDefinition* lhs,
MDefinition* rhs);
template<size_t Temps>
void lowerForShiftInt64(LInstructionHelper<INT64_PIECES, INT64_PIECES + 1, Temps>* ins,
@@ -40,41 +40,41 @@ class LIRGeneratorX86Shared : public LIR
void lowerForFPU(LInstructionHelper<1, 2, Temps>* ins, MDefinition* mir, MDefinition* lhs,
MDefinition* rhs);
void lowerForCompIx4(LSimdBinaryCompIx4* ins, MSimdBinaryComp* mir,
MDefinition* lhs, MDefinition* rhs);
void lowerForCompFx4(LSimdBinaryCompFx4* ins, MSimdBinaryComp* mir,
MDefinition* lhs, MDefinition* rhs);
void lowerForBitAndAndBranch(LBitAndAndBranch* baab, MInstruction* mir,
MDefinition* lhs, MDefinition* rhs);
- void visitWasmNeg(MWasmNeg* ins);
- void visitWasmSelect(MWasmSelect* ins);
+ void visitWasmNeg(MWasmNeg* ins) override;
+ void visitWasmSelect(MWasmSelect* ins) override;
void lowerMulI(MMul* mul, MDefinition* lhs, MDefinition* rhs);
void lowerDivI(MDiv* div);
void lowerModI(MMod* mod);
void lowerUDiv(MDiv* div);
void lowerUMod(MMod* mod);
void lowerUrshD(MUrsh* mir);
void lowerTruncateDToInt32(MTruncateToInt32* ins);
void lowerTruncateFToInt32(MTruncateToInt32* ins);
- void visitSimdInsertElement(MSimdInsertElement* ins);
- void visitSimdExtractElement(MSimdExtractElement* ins);
- void visitSimdBinaryArith(MSimdBinaryArith* ins);
- void visitSimdBinarySaturating(MSimdBinarySaturating* ins);
- void visitSimdSelect(MSimdSelect* ins);
- void visitSimdSplat(MSimdSplat* ins);
- void visitSimdSwizzle(MSimdSwizzle* ins);
- void visitSimdShuffle(MSimdShuffle* ins);
- void visitSimdGeneralShuffle(MSimdGeneralShuffle* ins);
- void visitSimdValueX4(MSimdValueX4* ins);
+ void visitSimdInsertElement(MSimdInsertElement* ins) override;
+ void visitSimdExtractElement(MSimdExtractElement* ins) override;
+ void visitSimdBinaryArith(MSimdBinaryArith* ins) override;
+ void visitSimdBinarySaturating(MSimdBinarySaturating* ins) override;
+ void visitSimdSelect(MSimdSelect* ins) override;
+ void visitSimdSplat(MSimdSplat* ins) override;
+ void visitSimdSwizzle(MSimdSwizzle* ins) override;
+ void visitSimdShuffle(MSimdShuffle* ins) override;
+ void visitSimdGeneralShuffle(MSimdGeneralShuffle* ins) override;
+ void visitSimdValueX4(MSimdValueX4* ins) override;
void lowerCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins,
bool useI386ByteRegisters);
void lowerAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins,
bool useI386ByteRegisters);
void lowerAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins,
bool useI386ByteRegisters);
- void visitCopySign(MCopySign* ins);
+ void visitCopySign(MCopySign* ins) override;
};
} // namespace jit
} // namespace js
#endif /* jit_x86_shared_Lowering_x86_shared_h */
--- a/js/src/jit/x86/CodeGenerator-x86.cpp
+++ b/js/src/jit/x86/CodeGenerator-x86.cpp
@@ -735,34 +735,34 @@ class OutOfLineTruncate : public OutOfLi
{
LTruncateDToInt32* ins_;
public:
explicit OutOfLineTruncate(LTruncateDToInt32* ins)
: ins_(ins)
{ }
- void accept(CodeGeneratorX86* codegen) {
+ void accept(CodeGeneratorX86* codegen) override {
codegen->visitOutOfLineTruncate(this);
}
LTruncateDToInt32* ins() const {
return ins_;
}
};
class OutOfLineTruncateFloat32 : public OutOfLineCodeBase<CodeGeneratorX86>
{
LTruncateFToInt32* ins_;
public:
explicit OutOfLineTruncateFloat32(LTruncateFToInt32* ins)
: ins_(ins)
{ }
- void accept(CodeGeneratorX86* codegen) {
+ void accept(CodeGeneratorX86* codegen) override {
codegen->visitOutOfLineTruncateFloat32(this);
}
LTruncateFToInt32* ins() const {
return ins_;
}
};
} // namespace jit
--- a/js/src/jit/x86/CodeGenerator-x86.h
+++ b/js/src/jit/x86/CodeGenerator-x86.h
@@ -31,66 +31,66 @@ class CodeGeneratorX86 : public CodeGene
template <typename T> void emitWasmLoad(T* ins);
template <typename T> void emitWasmStore(T* ins);
template <typename T> void emitWasmStoreOrExchangeAtomicI64(T* ins, uint32_t offset);
public:
CodeGeneratorX86(MIRGenerator* gen, LIRGraph* graph, MacroAssembler* masm);
public:
- void visitBox(LBox* box);
- void visitBoxFloatingPoint(LBoxFloatingPoint* box);
- void visitUnbox(LUnbox* unbox);
- void visitValue(LValue* value);
- void visitCompareB(LCompareB* lir);
- void visitCompareBAndBranch(LCompareBAndBranch* lir);
- void visitCompareBitwise(LCompareBitwise* lir);
- void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir);
- void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir);
- void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir);
- void visitTruncateDToInt32(LTruncateDToInt32* ins);
- void visitTruncateFToInt32(LTruncateFToInt32* ins);
- void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins);
- void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins);
- void visitWasmLoad(LWasmLoad* ins);
- void visitWasmLoadI64(LWasmLoadI64* ins);
- void visitWasmStore(LWasmStore* ins);
- void visitWasmStoreI64(LWasmStoreI64* ins);
- void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins);
- void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins);
+ void visitBox(LBox* box) override;
+ void visitBoxFloatingPoint(LBoxFloatingPoint* box) override;
+ void visitUnbox(LUnbox* unbox) override;
+ void visitValue(LValue* value) override;
+ void visitCompareB(LCompareB* lir) override;
+ void visitCompareBAndBranch(LCompareBAndBranch* lir) override;
+ void visitCompareBitwise(LCompareBitwise* lir) override;
+ void visitCompareBitwiseAndBranch(LCompareBitwiseAndBranch* lir) override;
+ void visitWasmUint32ToDouble(LWasmUint32ToDouble* lir) override;
+ void visitWasmUint32ToFloat32(LWasmUint32ToFloat32* lir) override;
+ void visitTruncateDToInt32(LTruncateDToInt32* ins) override;
+ void visitTruncateFToInt32(LTruncateFToInt32* ins) override;
+ void visitLoadTypedArrayElementStatic(LLoadTypedArrayElementStatic* ins) override;
+ void visitStoreTypedArrayElementStatic(LStoreTypedArrayElementStatic* ins) override;
+ void visitWasmLoad(LWasmLoad* ins) override;
+ void visitWasmLoadI64(LWasmLoadI64* ins) override;
+ void visitWasmStore(LWasmStore* ins) override;
+ void visitWasmStoreI64(LWasmStoreI64* ins) override;
+ void visitAsmJSLoadHeap(LAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(LAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(LWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(LWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(LWasmAtomicBinopHeap* ins) override;
+ void visitWasmAtomicBinopHeapForEffect(LWasmAtomicBinopHeapForEffect* ins) override;
- void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* ins);
- void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* ins);
- void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* ins);
- void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* ins);
- void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* ins);
+ void visitWasmAtomicLoadI64(LWasmAtomicLoadI64* ins) override;
+ void visitWasmAtomicStoreI64(LWasmAtomicStoreI64* ins) override;
+ void visitWasmCompareExchangeI64(LWasmCompareExchangeI64* ins) override;
+ void visitWasmAtomicExchangeI64(LWasmAtomicExchangeI64* ins) override;
+ void visitWasmAtomicBinopI64(LWasmAtomicBinopI64* ins) override;
void visitOutOfLineTruncate(OutOfLineTruncate* ool);
void visitOutOfLineTruncateFloat32(OutOfLineTruncateFloat32* ool);
- void visitCompareI64(LCompareI64* lir);
- void visitCompareI64AndBranch(LCompareI64AndBranch* lir);
- void visitDivOrModI64(LDivOrModI64* lir);
- void visitUDivOrModI64(LUDivOrModI64* lir);
- void visitWasmSelectI64(LWasmSelectI64* lir);
- void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir);
- void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir);
- void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir);
- void visitSignExtendInt64(LSignExtendInt64* ins);
- void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir);
- void visitClzI64(LClzI64* lir);
- void visitCtzI64(LCtzI64* lir);
- void visitNotI64(LNotI64* lir);
- void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir);
- void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir);
- void visitTestI64AndBranch(LTestI64AndBranch* lir);
+ void visitCompareI64(LCompareI64* lir) override;
+ void visitCompareI64AndBranch(LCompareI64AndBranch* lir) override;
+ void visitDivOrModI64(LDivOrModI64* lir) override;
+ void visitUDivOrModI64(LUDivOrModI64* lir) override;
+ void visitWasmSelectI64(LWasmSelectI64* lir) override;
+ void visitWasmReinterpretFromI64(LWasmReinterpretFromI64* lir) override;
+ void visitWasmReinterpretToI64(LWasmReinterpretToI64* lir) override;
+ void visitExtendInt32ToInt64(LExtendInt32ToInt64* lir) override;
+ void visitSignExtendInt64(LSignExtendInt64* ins) override;
+ void visitWrapInt64ToInt32(LWrapInt64ToInt32* lir) override;
+ void visitClzI64(LClzI64* lir) override;
+ void visitCtzI64(LCtzI64* lir) override;
+ void visitNotI64(LNotI64* lir) override;
+ void visitWasmTruncateToInt64(LWasmTruncateToInt64* lir) override;
+ void visitInt64ToFloatingPoint(LInt64ToFloatingPoint* lir) override;
+ void visitTestI64AndBranch(LTestI64AndBranch* lir) override;
};
typedef CodeGeneratorX86 CodeGeneratorSpecific;
} // namespace jit
} // namespace js
#endif /* jit_x86_CodeGenerator_x86_h */
--- a/js/src/jit/x86/LIR-x86.h
+++ b/js/src/jit/x86/LIR-x86.h
@@ -23,17 +23,17 @@ class LBoxFloatingPoint : public LInstru
MOZ_ASSERT(IsFloatingPointType(type));
setOperand(0, in);
setTemp(0, temp);
}
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
class LUnbox : public LInstructionHelper<1, 2, 0>
{
public:
LIR_HEADER(Unbox);
@@ -42,17 +42,17 @@ class LUnbox : public LInstructionHelper
return mir_->toUnbox();
}
const LAllocation* payload() {
return getOperand(0);
}
const LAllocation* type() {
return getOperand(1);
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(mir()->type());
}
};
class LUnboxFloatingPoint : public LInstructionHelper<1, 2, 0>
{
MIRType type_;
@@ -69,17 +69,17 @@ class LUnboxFloatingPoint : public LInst
MUnbox* mir() const {
return mir_->toUnbox();
}
MIRType type() const {
return type_;
}
- const char* extraName() const {
+ const char* extraName() const override {
return StringFromMIRType(type_);
}
};
// Convert a 32-bit unsigned integer to a double.
class LWasmUint32ToDouble : public LInstructionHelper<1, 1, 1>
{
public:
--- a/js/src/jit/x86/Lowering-x86.h
+++ b/js/src/jit/x86/Lowering-x86.h
@@ -51,38 +51,38 @@ class LIRGeneratorX86 : public LIRGenera
void lowerForMulInt64(LMulI64* ins, MMul* mir, MDefinition* lhs, MDefinition* rhs);
void lowerDivI64(MDiv* div);
void lowerModI64(MMod* mod);
void lowerUDivI64(MDiv* div);
void lowerUModI64(MMod* mod);
public:
- void visitBox(MBox* box);
- void visitUnbox(MUnbox* unbox);
- void visitReturn(MReturn* ret);
- void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins);
- void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins);
- void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins);
- void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins);
- void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins);
- void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins);
- void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins);
- void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins);
- void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins);
- void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins);
- void visitWasmLoad(MWasmLoad* ins);
- void visitWasmStore(MWasmStore* ins);
- void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins);
- void visitSubstr(MSubstr* ins);
- void visitRandom(MRandom* ins);
- void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins);
- void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins);
- void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins);
- void visitSignExtendInt64(MSignExtendInt64* ins);
+ void visitBox(MBox* box) override;
+ void visitUnbox(MUnbox* unbox) override;
+ void visitReturn(MReturn* ret) override;
+ void visitCompareExchangeTypedArrayElement(MCompareExchangeTypedArrayElement* ins) override;
+ void visitAtomicExchangeTypedArrayElement(MAtomicExchangeTypedArrayElement* ins) override;
+ void visitAtomicTypedArrayElementBinop(MAtomicTypedArrayElementBinop* ins) override;
+ void visitWasmUnsignedToDouble(MWasmUnsignedToDouble* ins) override;
+ void visitWasmUnsignedToFloat32(MWasmUnsignedToFloat32* ins) override;
+ void visitAsmJSLoadHeap(MAsmJSLoadHeap* ins) override;
+ void visitAsmJSStoreHeap(MAsmJSStoreHeap* ins) override;
+ void visitWasmCompareExchangeHeap(MWasmCompareExchangeHeap* ins) override;
+ void visitWasmAtomicExchangeHeap(MWasmAtomicExchangeHeap* ins) override;
+ void visitWasmAtomicBinopHeap(MWasmAtomicBinopHeap* ins) override;
+ void visitWasmLoad(MWasmLoad* ins) override;
+ void visitWasmStore(MWasmStore* ins) override;
+ void visitStoreTypedArrayElementStatic(MStoreTypedArrayElementStatic* ins) override;
+ void visitSubstr(MSubstr* ins) override;
+ void visitRandom(MRandom* ins) override;
+ void visitWasmTruncateToInt64(MWasmTruncateToInt64* ins) override;
+ void visitInt64ToFloatingPoint(MInt64ToFloatingPoint* ins) override;
+ void visitExtendInt32ToInt64(MExtendInt32ToInt64* ins) override;
+ void visitSignExtendInt64(MSignExtendInt64* ins) override;
void lowerPhi(MPhi* phi);
static bool allowTypedElementHoleCheck() {
return true;
}
static bool allowStaticTypedArrayAccesses() {
return true;
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -3744,19 +3744,19 @@ class JS_FRIEND_API(ReadOnlyCompileOptio
public:
// Read-only accessors for non-POD options. The proper way to set these
// depends on the derived type.
bool mutedErrors() const { return mutedErrors_; }
const char* filename() const { return filename_; }
const char* introducerFilename() const { return introducerFilename_; }
const char16_t* sourceMapURL() const { return sourceMapURL_; }
- virtual JSObject* element() const = 0;
- virtual JSString* elementAttributeName() const = 0;
- virtual JSScript* introductionScript() const = 0;
+ virtual JSObject* element() const override = 0;
+ virtual JSString* elementAttributeName() const override = 0;
+ virtual JSScript* introductionScript() const override = 0;
// POD options.
unsigned lineno;
unsigned column;
// The offset within the ScriptSource's full uncompressed text of the first
// character we're presenting for compilation with this CompileOptions.
//
// When we compile a LazyScript, we pass the compiler only the substring of
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -2478,19 +2478,19 @@ namespace ubi {
template<>
class Concrete<js::LazyScript> : TracerConcrete<js::LazyScript> {
protected:
explicit Concrete(js::LazyScript *ptr) : TracerConcrete<js::LazyScript>(ptr) { }
public:
static void construct(void *storage, js::LazyScript *ptr) { new (storage) Concrete(ptr); }
- CoarseType coarseType() const final { return CoarseType::Script; }
+ CoarseType coarseType() const final override { return CoarseType::Script; }
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
- const char* scriptFilename() const final;
+ const char* scriptFilename() const final override;
const char16_t* typeName() const override { return concreteTypeName; }
static const char16_t concreteTypeName[];
};
} // namespace ubi
} // namespace JS
#endif /* jsscript_h */
--- a/js/src/jsweakmap.h
+++ b/js/src/jsweakmap.h
@@ -369,17 +369,17 @@ class ObjectValueMap : public WeakMap<He
MovableCellHasher<HeapPtr<JSObject*>>>
{
public:
ObjectValueMap(JSContext* cx, JSObject* obj)
: WeakMap<HeapPtr<JSObject*>, HeapPtr<Value>,
MovableCellHasher<HeapPtr<JSObject*>>>(cx, obj)
{}
- virtual bool findZoneEdges();
+ bool findZoneEdges() override;
};
// Generic weak map for mapping objects to other objects.
class ObjectWeakMap
{
ObjectValueMap map;
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -5320,17 +5320,18 @@ GetSelfHostedValue(JSContext* cx, unsign
class ShellSourceHook: public SourceHook {
// The function we should call to lazily retrieve source code.
PersistentRootedFunction fun;
public:
ShellSourceHook(JSContext* cx, JSFunction& fun) : fun(cx, &fun) {}
- bool load(JSContext* cx, const char* filename, char16_t** src, size_t* length) {
+ bool load(JSContext* cx, const char* filename, char16_t** src,
+ size_t* length) override {
RootedString str(cx, JS_NewStringCopyZ(cx, filename));
if (!str)
return false;
RootedValue filenameValue(cx, StringValue(str));
RootedValue result(cx);
if (!Call(cx, UndefinedHandleValue, fun, HandleValueArray(filenameValue), &result))
return false;
--- a/js/src/shell/jsoptparse.h
+++ b/js/src/shell/jsoptparse.h
@@ -101,17 +101,17 @@ struct ValuedOption : public Option
const char* metavar;
ValuedOption(OptionKind kind, char shortflag, const char* longflag, const char* help,
const char* metavar)
: Option(kind, shortflag, longflag, help), metavar(metavar)
{}
virtual ~ValuedOption() = 0;
- virtual bool isValued() const { return true; }
+ virtual bool isValued() const override { return true; }
};
inline ValuedOption::~ValuedOption() {}
struct StringOption : public ValuedOption
{
const char* value;
@@ -147,17 +147,17 @@ struct MultiStringOption : public Valued
Vector<StringArg, 0, SystemAllocPolicy> strings;
MultiStringOption(char shortflag, const char* longflag, const char* help, const char* metavar)
: ValuedOption(OptionKindMultiString, shortflag, longflag, help, metavar)
{}
virtual ~MultiStringOption() {}
- virtual bool isVariadic() const { return true; }
+ virtual bool isVariadic() const override { return true; }
};
} /* namespace detail */
class MultiStringRange
{
typedef detail::StringArg StringArg;
const StringArg* cur;
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -2388,21 +2388,21 @@ class MOZ_RAII ExecutionObservableCompar
}
bool init() { return compartments_.init() && zones_.init(); }
bool add(JSCompartment* comp) { return compartments_.put(comp) && zones_.put(comp->zone()); }
typedef HashSet<JSCompartment*>::Range CompartmentRange;
const HashSet<JSCompartment*>* compartments() const { return &compartments_; }
- const HashSet<Zone*>* zones() const { return &zones_; }
- bool shouldRecompileOrInvalidate(JSScript* script) const {
+ const HashSet<Zone*>* zones() const override { return &zones_; }
+ bool shouldRecompileOrInvalidate(JSScript* script) const override {
return script->hasBaselineScript() && compartments_.has(script->compartment());
}
- bool shouldMarkAsDebuggee(FrameIter& iter) const {
+ bool shouldMarkAsDebuggee(FrameIter& iter) const override {
// AbstractFramePtr can't refer to non-remateralized Ion frames or
// non-debuggee wasm frames, so if iter refers to one such, we know we
// don't match.
return iter.hasUsableAbstractFramePtr() && compartments_.has(iter.compartment());
}
MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER
};
@@ -2418,28 +2418,28 @@ class MOZ_RAII ExecutionObservableFrame
public:
explicit ExecutionObservableFrame(AbstractFramePtr frame
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: frame_(frame)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
- Zone* singleZone() const {
+ Zone* singleZone() const override {
// We never inline across compartments, let alone across zones, so
// frames_'s script's zone is the only one of interest.
return frame_.script()->compartment()->zone();
}
- JSScript* singleScriptForZoneInvalidation() const {
+ JSScript* singleScriptForZoneInvalidation() const override {
MOZ_CRASH("ExecutionObservableFrame shouldn't need zone-wide invalidation.");
return nullptr;
}
- bool shouldRecompileOrInvalidate(JSScript* script) const {
+ bool shouldRecompileOrInvalidate(JSScript* script) const override {
// Normally, *this represents exactly one script: the one frame_ is
// running.
//
// However, debug-mode OSR uses *this for both invalidating Ion frames,
// and recompiling the Baseline scripts that those Ion frames will bail
// out into. Suppose frame_ is an inline frame, executing a copy of its
// JSScript, S_inner, that has been inlined into the IonScript of some
// other JSScript, S_outer. We must match S_outer, to decide which Ion
@@ -2454,17 +2454,17 @@ class MOZ_RAII ExecutionObservableFrame
if (frame_.hasScript() && script == frame_.script())
return true;
return frame_.isRematerializedFrame() &&
script == frame_.asRematerializedFrame()->outerScript();
}
- bool shouldMarkAsDebuggee(FrameIter& iter) const {
+ bool shouldMarkAsDebuggee(FrameIter& iter) const override {
// AbstractFramePtr can't refer to non-remateralized Ion frames or
// non-debuggee wasm frames, so if iter refers to one such, we know we
// don't match.
//
// We never use this 'has' overload for frame invalidation, only for
// frame debuggee marking; so this overload doesn't need a parallel to
// the just-so inlining logic above.
return iter.hasUsableAbstractFramePtr() && iter.abstractFramePtr() == frame_;
@@ -2480,22 +2480,22 @@ class MOZ_RAII ExecutionObservableScript
public:
ExecutionObservableScript(JSContext* cx, JSScript* script
MOZ_GUARD_OBJECT_NOTIFIER_PARAM)
: script_(cx, script)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
}
- Zone* singleZone() const { return script_->compartment()->zone(); }
- JSScript* singleScriptForZoneInvalidation() const { return script_; }
- bool shouldRecompileOrInvalidate(JSScript* script) const {
+ Zone* singleZone() const override { return script_->compartment()->zone(); }
+ JSScript* singleScriptForZoneInvalidation() const override { return script_; }
+ bool shouldRecompileOrInvalidate(JSScript* script) const override {
return script->hasBaselineScript() && script == script_;
}
- bool shouldMarkAsDebuggee(FrameIter& iter) const {
+ bool shouldMarkAsDebuggee(FrameIter& iter) const override {
// AbstractFramePtr can't refer to non-remateralized Ion frames, and
// while a non-rematerialized Ion frame may indeed be running script_,
// we cannot mark them as debuggees until they bail out.
//
// Upon bailing out, any newly constructed Baseline frames that came
// from Ion frames with scripts that are isDebuggee() is marked as
// debuggee. This is correct in that the only other way a frame may be
// marked as debuggee is via Debugger.Frame reflection, which would
--- a/js/src/vm/Debugger.h
+++ b/js/src/vm/Debugger.h
@@ -156,17 +156,17 @@ class DebuggerWeakMap : private WeakMap<
bool hasKeyInZone(JS::Zone* zone) {
CountMap::Ptr p = zoneCounts.lookup(zone);
MOZ_ASSERT_IF(p.found(), p->value() > 0);
return p.found();
}
private:
/* Override sweep method to also update our edge cache. */
- void sweep() {
+ void sweep() override {
MOZ_ASSERT(CurrentThreadIsPerformingGC());
for (Enum e(*static_cast<Base*>(this)); !e.empty(); e.popFront()) {
if (gc::IsAboutToBeFinalized(&e.front().mutableKey())) {
decZoneCount(e.front().key()->zoneFromAnyThread());
e.removeFront();
}
}
Base::assertEntriesNotAboutToBeFinalized();
--- a/js/src/vm/MatchPairs.h
+++ b/js/src/vm/MatchPairs.h
@@ -122,17 +122,17 @@ class ScopedMatchPairs : public MatchPai
public:
/* Constructs an implicit LifoAllocScope. */
explicit ScopedMatchPairs(LifoAlloc* lifoAlloc)
: lifoScope_(lifoAlloc)
{ }
protected:
- bool allocOrExpandArray(size_t pairCount);
+ bool allocOrExpandArray(size_t pairCount) override;
};
/*
* MatchPairs allocated into permanent storage, for RegExpStatics.
* The Vector of MatchPairs is reusable by Vector expansion.
*/
class VectorMatchPairs : public MatchPairs
{
@@ -140,14 +140,14 @@ class VectorMatchPairs : public MatchPai
public:
VectorMatchPairs() {
vec_.clear();
}
protected:
friend class RegExpStatics;
- bool allocOrExpandArray(size_t pairCount);
+ bool allocOrExpandArray(size_t pairCount) override;
};
} /* namespace js */
#endif /* vm_MatchPairs_h */
--- a/js/src/vm/Printer.cpp
+++ b/js/src/vm/Printer.cpp
@@ -31,17 +31,17 @@ class GenericPrinterPrintfTarget : publi
{
public:
explicit GenericPrinterPrintfTarget(js::GenericPrinter& p)
: printer(p)
{
}
- bool append(const char* sp, size_t len) {
+ bool append(const char* sp, size_t len) override {
return printer.put(sp, len);
}
private:
js::GenericPrinter& printer;
};
--- a/js/src/vm/RegExpShared.h
+++ b/js/src/vm/RegExpShared.h
@@ -367,17 +367,17 @@ class Concrete<js::RegExpShared> : Trace
protected:
explicit Concrete(js::RegExpShared* ptr) : TracerConcrete<js::RegExpShared>(ptr) { }
public:
static void construct(void* storage, js::RegExpShared* ptr) {
new (storage) Concrete(ptr);
}
- CoarseType coarseType() const final { return CoarseType::Other; }
+ CoarseType coarseType() const final override { return CoarseType::Other; }
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
const char16_t* typeName() const override { return concreteTypeName; }
static const char16_t concreteTypeName[];
};
} // namespace ubi
--- a/js/src/vm/SavedStacks.cpp
+++ b/js/src/vm/SavedStacks.cpp
@@ -216,17 +216,17 @@ class MOZ_STACK_CLASS SavedFrame::AutoLo
typedef Vector<Lookup, ASYNC_STACK_MAX_FRAME_COUNT> LookupVector;
inline LookupVector* operator->() { return &lookups; }
inline HandleLookup operator[](size_t i) { return HandleLookup(lookups[i]); }
private:
LookupVector lookups;
- virtual void trace(JSTracer* trc) {
+ virtual void trace(JSTracer* trc) override {
for (size_t i = 0; i < lookups.length(); i++)
lookups[i].trace(trc);
}
};
/* static */ bool
SavedFrame::HashPolicy::hasHash(const Lookup& l)
{
--- a/js/src/vm/Scope.h
+++ b/js/src/vm/Scope.h
@@ -1564,17 +1564,17 @@ class Concrete<js::Scope> : TracerConcre
protected:
explicit Concrete(js::Scope* ptr) : TracerConcrete<js::Scope>(ptr) { }
public:
static void construct(void* storage, js::Scope* ptr) {
new (storage) Concrete(ptr);
}
- CoarseType coarseType() const final { return CoarseType::Script; }
+ CoarseType coarseType() const final override { return CoarseType::Script; }
Size size(mozilla::MallocSizeOf mallocSizeOf) const override;
const char16_t* typeName() const override { return concreteTypeName; }
static const char16_t concreteTypeName[];
};
} // namespace ubi
--- a/js/src/vm/Shape.h
+++ b/js/src/vm/Shape.h
@@ -1215,17 +1215,17 @@ StackBaseShape::StackBaseShape(Shape* sh
class MOZ_RAII AutoRooterGetterSetter
{
class Inner final : private JS::CustomAutoRooter
{
public:
inline Inner(JSContext* cx, uint8_t attrs, GetterOp* pgetter_, SetterOp* psetter_);
private:
- virtual void trace(JSTracer* trc);
+ virtual void trace(JSTracer* trc) override;
uint8_t attrs;
GetterOp* pgetter;
SetterOp* psetter;
};
public:
inline AutoRooterGetterSetter(JSContext* cx, uint8_t attrs,
--- a/js/src/vm/TypeInference.cpp
+++ b/js/src/vm/TypeInference.cpp
@@ -1170,61 +1170,61 @@ class CompilerConstraintInstance : publi
{
T data;
public:
CompilerConstraintInstance<T>(LifoAlloc* alloc, const HeapTypeSetKey& property, const T& data)
: CompilerConstraint(alloc, property), data(data)
{}
- bool generateTypeConstraint(JSContext* cx, RecompileInfo recompileInfo);
+ bool generateTypeConstraint(JSContext* cx, RecompileInfo recompileInfo) override;
};
// Constraint generated from a CompilerConstraint when linking the compilation.
template <typename T>
class TypeCompilerConstraint : public TypeConstraint
{
// Compilation which this constraint may invalidate.
RecompileInfo compilation;
T data;
public:
TypeCompilerConstraint<T>(RecompileInfo compilation, const T& data)
: compilation(compilation), data(data)
{}
- const char* kind() { return data.kind(); }
-
- void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) {
+ const char* kind() override { return data.kind(); }
+
+ void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) override {
if (data.invalidateOnNewType(type))
cx->zone()->types.addPendingRecompile(cx, compilation);
}
- void newPropertyState(JSContext* cx, TypeSet* source) {
+ void newPropertyState(JSContext* cx, TypeSet* source) override {
if (data.invalidateOnNewPropertyState(source))
cx->zone()->types.addPendingRecompile(cx, compilation);
}
- void newObjectState(JSContext* cx, ObjectGroup* group) {
+ void newObjectState(JSContext* cx, ObjectGroup* group) override {
// Note: Once the object has unknown properties, no more notifications
// will be sent on changes to its state, so always invalidate any
// associated compilations.
if (group->unknownProperties() || data.invalidateOnNewObjectState(group))
cx->zone()->types.addPendingRecompile(cx, compilation);
}
- bool sweep(TypeZone& zone, TypeConstraint** res) {
+ bool sweep(TypeZone& zone, TypeConstraint** res) override {
if (data.shouldSweep() || compilation.shouldSweep(zone))
return false;
*res = zone.typeLifoAlloc().new_<TypeCompilerConstraint<T> >(compilation, data);
return true;
}
- JSCompartment* maybeCompartment() {
+ JSCompartment* maybeCompartment() override {
return data.maybeCompartment();
}
};
template <typename T>
bool
CompilerConstraintInstance<T>::generateTypeConstraint(JSContext* cx, RecompileInfo recompileInfo)
{
@@ -1384,34 +1384,34 @@ class TypeConstraintFreezeStack : public
{
JSScript* script_;
public:
explicit TypeConstraintFreezeStack(JSScript* script)
: script_(script)
{}
- const char* kind() { return "freezeStack"; }
-
- void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) {
+ const char* kind() override { return "freezeStack"; }
+
+ void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) override {
/*
* Unlike TypeConstraintFreeze, triggering this constraint once does
* not disable it on future changes to the type set.
*/
cx->zone()->types.addPendingRecompile(cx, script_);
}
- bool sweep(TypeZone& zone, TypeConstraint** res) {
+ bool sweep(TypeZone& zone, TypeConstraint** res) override {
if (IsAboutToBeFinalizedUnbarriered(&script_))
return false;
*res = zone.typeLifoAlloc().new_<TypeConstraintFreezeStack>(script_);
return true;
}
- JSCompartment* maybeCompartment() {
+ JSCompartment* maybeCompartment() override {
return script_->compartment();
}
};
} /* anonymous namespace */
bool
js::FinishCompilation(JSContext* cx, HandleScript script, CompilerConstraintList* constraints,
@@ -2015,17 +2015,19 @@ class ConstraintDataFreezePropertyState
NON_DATA,
NON_WRITABLE
} which;
explicit ConstraintDataFreezePropertyState(Which which)
: which(which)
{}
- const char* kind() { return (which == NON_DATA) ? "freezeNonDataProperty" : "freezeNonWritableProperty"; }
+ const char* kind() {
+ return (which == NON_DATA) ? "freezeNonDataProperty" : "freezeNonWritableProperty";
+ }
bool invalidateOnNewType(TypeSet::Type type) { return false; }
bool invalidateOnNewPropertyState(TypeSet* property) {
return (which == NON_DATA)
? property->nonDataProperty()
: property->nonWritableProperty();
}
bool invalidateOnNewObjectState(ObjectGroup* group) { return false; }
@@ -3138,38 +3140,38 @@ class TypeConstraintClearDefiniteGetterS
{
public:
ObjectGroup* group;
explicit TypeConstraintClearDefiniteGetterSetter(ObjectGroup* group)
: group(group)
{}
- const char* kind() { return "clearDefiniteGetterSetter"; }
-
- void newPropertyState(JSContext* cx, TypeSet* source) {
+ const char* kind() override { return "clearDefiniteGetterSetter"; }
+
+ void newPropertyState(JSContext* cx, TypeSet* source) override {
/*
* Clear out the newScript shape and definite property information from
* an object if the source type set could be a setter or could be
* non-writable.
*/
if (source->nonDataProperty() || source->nonWritableProperty())
group->clearNewScript(cx);
}
- void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) {}
-
- bool sweep(TypeZone& zone, TypeConstraint** res) {
+ void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) override {}
+
+ bool sweep(TypeZone& zone, TypeConstraint** res) override {
if (IsAboutToBeFinalizedUnbarriered(&group))
return false;
*res = zone.typeLifoAlloc().new_<TypeConstraintClearDefiniteGetterSetter>(group);
return true;
}
- JSCompartment* maybeCompartment() {
+ JSCompartment* maybeCompartment() override {
return group->compartment();
}
};
bool
js::AddClearDefiniteGetterSetterForPrototypeChain(JSContext* cx, ObjectGroup* group, HandleId id)
{
/*
@@ -3204,31 +3206,31 @@ class TypeConstraintClearDefiniteSingle
{
public:
ObjectGroup* group;
explicit TypeConstraintClearDefiniteSingle(ObjectGroup* group)
: group(group)
{}
- const char* kind() { return "clearDefiniteSingle"; }
-
- void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) {
+ const char* kind() override { return "clearDefiniteSingle"; }
+
+ void newType(JSContext* cx, TypeSet* source, TypeSet::Type type) override {
if (source->baseFlags() || source->getObjectCount() > 1)
group->clearNewScript(cx);
}
- bool sweep(TypeZone& zone, TypeConstraint** res) {
+ bool sweep(TypeZone& zone, TypeConstraint** res) override {
if (IsAboutToBeFinalizedUnbarriered(&group))
return false;
*res = zone.typeLifoAlloc().new_<TypeConstraintClearDefiniteSingle>(group);
return true;
}
- JSCompartment* maybeCompartment() {
+ JSCompartment* maybeCompartment() override {
return group->compartment();
}
};
bool
js::AddClearDefiniteFunctionUsesInScript(JSContext* cx, ObjectGroup* group,
JSScript* script, JSScript* calleeScript)
{
--- a/js/src/vm/UbiNodeCensus.cpp
+++ b/js/src/vm/UbiNodeCensus.cpp
@@ -141,17 +141,17 @@ class BucketCount : public CountType {
{ }
void destructCount(CountBase& countBase) override {
Count& count = static_cast<Count&>(countBase);
count.~Count();
}
CountBasePtr makeCount() override { return CountBasePtr(js_new<Count>(*this)); }
- void traceCount(CountBase& countBase, JSTracer* trc) final { }
+ void traceCount(CountBase& countBase, JSTracer* trc) final override { }
bool count(CountBase& countBase, mozilla::MallocSizeOf mallocSizeOf, const Node& node) override;
bool report(JSContext* cx, CountBase& countBase, MutableHandleValue report) override;
};
bool
BucketCount::count(CountBase& countBase, mozilla::MallocSizeOf mallocSizeOf, const Node& node)
{
Count& count = static_cast<Count&>(countBase);
--- a/js/src/wasm/WasmBaselineCompile.cpp
+++ b/js/src/wasm/WasmBaselineCompile.cpp
@@ -2171,17 +2171,17 @@ class BaseCompiler final : public BaseCo
// - Operations that need specific registers: multiply, quotient,
// remainder, will tend to sync because the registers we need
// will tend to be allocated. We may be able to avoid that by
// prioritizing registers differently (takeLast instead of
// takeFirst) but we may also be able to allocate an unused
// register on demand to free up one we need, thus avoiding the
// sync. That type of fix would go into needI32().
- void sync() final {
+ void sync() final override {
size_t start = 0;
size_t lim = stk_.length();
for (size_t i = lim; i > 0; i--) {
// Memory opcodes are first in the enum, single check against MemLast is fine.
if (stk_[i - 1].kind() <= Stk::MemLast) {
start = i;
break;
@@ -3593,17 +3593,17 @@ class BaseCompiler final : public BaseCo
public:
OutOfLineTruncateF32OrF64ToI32(AnyReg src, RegI32 dest, bool isUnsigned, BytecodeOffset off)
: src(src),
dest(dest),
isUnsigned(isUnsigned),
off(off)
{}
- virtual void generate(MacroAssembler* masm) {
+ virtual void generate(MacroAssembler* masm) override {
bool isFloat = src.tag == AnyReg::F32;
FloatRegister fsrc = isFloat ? static_cast<FloatRegister>(src.f32())
: static_cast<FloatRegister>(src.f64());
#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
if (isFloat)
masm->outOfLineWasmTruncateFloat32ToInt32(fsrc, isUnsigned, off, rejoin());
else
masm->outOfLineWasmTruncateDoubleToInt32(fsrc, isUnsigned, off, rejoin());
@@ -3665,17 +3665,17 @@ class BaseCompiler final : public BaseCo
public:
OutOfLineTruncateCheckF32OrF64ToI64(AnyReg src, bool isUnsigned, BytecodeOffset off)
: src(src),
isUnsigned(isUnsigned),
off(off)
{}
- virtual void generate(MacroAssembler* masm) {
+ virtual void generate(MacroAssembler* masm) override {
#if defined(JS_CODEGEN_X86) || defined(JS_CODEGEN_X64)
if (src.tag == AnyReg::F32)
masm->outOfLineWasmTruncateFloat32ToInt64(src.f32(), isUnsigned, off, rejoin());
else if (src.tag == AnyReg::F64)
masm->outOfLineWasmTruncateDoubleToInt64(src.f64(), isUnsigned, off, rejoin());
else
MOZ_CRASH("unexpected type");
#elif defined(JS_CODEGEN_ARM)
--- a/js/xpconnect/loader/ScriptPreloader.h
+++ b/js/xpconnect/loader/ScriptPreloader.h
@@ -181,17 +181,17 @@ private:
return a->mLoadTime < b->mLoadTime;
}
};
struct StatusMatcher final : public Matcher<CachedScript*>
{
explicit StatusMatcher(ScriptStatus status) : mStatus(status) {}
- virtual bool Matches(CachedScript* script)
+ virtual bool Matches(CachedScript* script) override
{
return script->Status() == mStatus;
}
const ScriptStatus mStatus;
};
void FreeData()
--- a/js/xpconnect/loader/mozJSSubScriptLoader.cpp
+++ b/js/xpconnect/loader/mozJSSubScriptLoader.cpp
@@ -47,17 +47,17 @@ public:
: OptionsBase(cx, options)
, target(cx)
, charset(VoidString())
, ignoreCache(false)
, async(false)
, wantReturnValue(false)
{ }
- virtual bool Parse() {
+ virtual bool Parse() override {
return ParseObject("target", &target) &&
ParseString("charset", charset) &&
ParseBoolean("ignoreCache", &ignoreCache) &&
ParseBoolean("async", &async) &&
ParseBoolean("wantReturnValue", &wantReturnValue);
}
RootedObject target;
--- a/js/xpconnect/src/ExportHelpers.cpp
+++ b/js/xpconnect/src/ExportHelpers.cpp
@@ -69,17 +69,17 @@ public:
~StackScopedCloneData()
{
Clear();
}
JSObject* CustomReadHandler(JSContext* aCx,
JSStructuredCloneReader* aReader,
uint32_t aTag,
- uint32_t aData)
+ uint32_t aData) override
{
if (aTag == SCTAG_REFLECTOR) {
MOZ_ASSERT(!aData);
size_t idx;
if (!JS_ReadBytes(aReader, &idx, sizeof(size_t)))
return nullptr;
@@ -137,17 +137,17 @@ public:
}
MOZ_ASSERT_UNREACHABLE("Encountered garbage in the clone stream!");
return nullptr;
}
bool CustomWriteHandler(JSContext* aCx,
JSStructuredCloneWriter* aWriter,
- JS::Handle<JSObject*> aObj)
+ JS::Handle<JSObject*> aObj) override
{
{
JS::Rooted<JSObject*> obj(aCx, aObj);
Blob* blob = nullptr;
if (NS_SUCCEEDED(UNWRAP_OBJECT(Blob, &obj, blob))) {
BlobImpl* blobImpl = blob->Impl();
MOZ_ASSERT(blobImpl);
--- a/js/xpconnect/src/XPCJSRuntime.cpp
+++ b/js/xpconnect/src/XPCJSRuntime.cpp
@@ -2809,17 +2809,17 @@ ReadSourceFromFilename(JSContext* cx, co
return NS_OK;
}
// The JS engine calls this object's 'load' member function when it needs
// the source for a chrome JS function. See the comment in the XPCJSRuntime
// constructor.
class XPCJSSourceHook: public js::SourceHook {
- bool load(JSContext* cx, const char* filename, char16_t** src, size_t* length) {
+ bool load(JSContext* cx, const char* filename, char16_t** src, size_t* length) override {
*src = nullptr;
*length = 0;
if (!nsContentUtils::IsSystemCaller(cx))
return true;
if (!filename)
return true;
--- a/js/xpconnect/src/xpcprivate.h
+++ b/js/xpconnect/src/xpcprivate.h
@@ -383,17 +383,17 @@ class XPCJSContext final : public mozill
{
public:
static void InitTLS();
static XPCJSContext* NewXPCJSContext(XPCJSContext* aPrimaryContext);
static XPCJSContext* Get();
XPCJSRuntime* Runtime() const;
- mozilla::CycleCollectedJSRuntime* CreateRuntime(JSContext* aCx) override;
+ virtual mozilla::CycleCollectedJSRuntime* CreateRuntime(JSContext* aCx) override;
XPCCallContext* GetCallContext() const {return mCallContext;}
XPCCallContext* SetCallContext(XPCCallContext* ccx)
{XPCCallContext* old = mCallContext; mCallContext = ccx; return old;}
jsid GetResolveName() const {return mResolveName;}
jsid SetResolveName(jsid name)
{jsid old = mResolveName; mResolveName = name; return old;}
@@ -2486,25 +2486,25 @@ class TypedAutoMarkingPtr : public AutoM
T* get() const { return mPtr; }
operator T*() const { return mPtr; }
T* operator->() const { return mPtr; }
TypedAutoMarkingPtr<T>& operator =(T* ptr) { mPtr = ptr; return *this; }
protected:
- virtual void TraceJS(JSTracer* trc)
+ virtual void TraceJS(JSTracer* trc) override
{
if (mPtr) {
mPtr->TraceJS(trc);
mPtr->AutoTrace(trc);
}
}
- virtual void MarkAfterJSFinalize()
+ virtual void MarkAfterJSFinalize() override
{
if (mPtr)
mPtr->Mark();
}
private:
T* mPtr;
};
@@ -2752,17 +2752,17 @@ public:
, isContentXBLScope(false)
, invisibleToDebugger(false)
, discardSource(false)
, metadata(cx)
, userContextId(0)
, originAttributes(cx)
{ }
- virtual bool Parse();
+ virtual bool Parse() override;
bool wantXrays;
bool allowWaivers;
bool wantComponents;
bool wantExportHelpers;
bool isWebExtensionContentScript;
bool waiveInterposition;
JS::RootedObject proto;
@@ -2786,31 +2786,31 @@ protected:
class MOZ_STACK_CLASS CreateObjectInOptions : public OptionsBase {
public:
explicit CreateObjectInOptions(JSContext* cx = xpc_GetSafeJSContext(),
JSObject* options = nullptr)
: OptionsBase(cx, options)
, defineAs(cx, JSID_VOID)
{ }
- virtual bool Parse() { return ParseId("defineAs", &defineAs); }
+ virtual bool Parse() override { return ParseId("defineAs", &defineAs); }
JS::RootedId defineAs;
};
class MOZ_STACK_CLASS ExportFunctionOptions : public OptionsBase {
public:
explicit ExportFunctionOptions(JSContext* cx = xpc_GetSafeJSContext(),
JSObject* options = nullptr)
: OptionsBase(cx, options)
, defineAs(cx, JSID_VOID)
, allowCrossOriginArguments(false)
{ }
- virtual bool Parse() {
+ virtual bool Parse() override {
return ParseId("defineAs", &defineAs) &&
ParseBoolean("allowCrossOriginArguments", &allowCrossOriginArguments);
}
JS::RootedId defineAs;
bool allowCrossOriginArguments;
};
@@ -2831,34 +2831,34 @@ public:
unsigned attrs = JSPROP_READONLY | JSPROP_PERMANENT;
val = JS::BooleanValue(allowCrossOriginArguments);
if (!JS_DefineProperty(cx, obj, "allowCrossOriginArguments", val, attrs))
return nullptr;
return obj;
}
- virtual bool Parse() {
+ virtual bool Parse() override {
return ParseBoolean("allowCrossOriginArguments", &allowCrossOriginArguments);
}
bool allowCrossOriginArguments;
};
class MOZ_STACK_CLASS StackScopedCloneOptions : public OptionsBase {
public:
explicit StackScopedCloneOptions(JSContext* cx = xpc_GetSafeJSContext(),
JSObject* options = nullptr)
: OptionsBase(cx, options)
, wrapReflectors(false)
, cloneFunctions(false)
, deepFreeze(false)
{ }
- virtual bool Parse() {
+ virtual bool Parse() override {
return ParseBoolean("wrapReflectors", &wrapReflectors) &&
ParseBoolean("cloneFunctions", &cloneFunctions) &&
ParseBoolean("deepFreeze", &deepFreeze);
}
// When a reflector is encountered, wrap it rather than aborting the clone.
bool wrapReflectors;
--- a/layout/base/nsIPresShell.h
+++ b/layout/base/nsIPresShell.h
@@ -998,17 +998,17 @@ public:
*/
virtual void ReconstructFrames() = 0;
/**
* Notify that a content node's state has changed
*/
virtual void ContentStateChanged(nsIDocument* aDocument,
nsIContent* aContent,
- mozilla::EventStates aStateMask) = 0;
+ mozilla::EventStates aStateMask) override = 0;
/**
* See if reflow verification is enabled. To enable reflow verification add
* "verifyreflow:1" to your MOZ_LOG environment variable (any non-zero
* debug level will work). Or, call SetVerifyReflowEnable with true.
*/
static bool GetVerifyReflowEnable();
--- a/layout/base/nsPresContext.cpp
+++ b/layout/base/nsPresContext.cpp
@@ -2350,17 +2350,17 @@ public:
CounterStyleCleaner(nsRefreshDriver* aRefreshDriver,
CounterStyleManager* aCounterStyleManager)
: mRefreshDriver(aRefreshDriver)
, mCounterStyleManager(aCounterStyleManager)
{
}
virtual ~CounterStyleCleaner() {}
- void DidRefresh() final
+ void DidRefresh() final override
{
mRefreshDriver->RemovePostRefreshObserver(this);
mCounterStyleManager->CleanRetiredStyles();
delete this;
}
private:
RefPtr<nsRefreshDriver> mRefreshDriver;
--- a/layout/forms/nsSelectsAreaFrame.cpp
+++ b/layout/forms/nsSelectsAreaFrame.cpp
@@ -69,21 +69,21 @@ void nsDisplayOptionEventGrabber::HitTes
}
}
class nsOptionEventGrabberWrapper : public nsDisplayWrapper
{
public:
nsOptionEventGrabberWrapper() {}
virtual nsDisplayItem* WrapList(nsDisplayListBuilder* aBuilder,
- nsIFrame* aFrame, nsDisplayList* aList) {
+ nsIFrame* aFrame, nsDisplayList* aList) override {
return new (aBuilder) nsDisplayOptionEventGrabber(aBuilder, aFrame, aList);
}
virtual nsDisplayItem* WrapItem(nsDisplayListBuilder* aBuilder,
- nsDisplayItem* aItem) {
+ nsDisplayItem* aItem) override {
return new (aBuilder) nsDisplayOptionEventGrabber(aBuilder, aItem->Frame(), aItem);
}
};
static nsListControlFrame* GetEnclosingListFrame(nsIFrame* aSelectsAreaFrame)
{
nsIFrame* frame = aSelectsAreaFrame->GetParent();
while (frame) {
--- a/layout/generic/nsGfxScrollFrame.cpp
+++ b/layout/generic/nsGfxScrollFrame.cpp
@@ -2022,17 +2022,17 @@ public:
: nsExpirationTracker<ScrollFrameHelper,4>(TIMEOUT_MS,
"ScrollFrameActivityTracker",
aEventTarget)
{}
~ScrollFrameActivityTracker() {
AgeAllGenerations();
}
- virtual void NotifyExpired(ScrollFrameHelper *aObject) {
+ virtual void NotifyExpired(ScrollFrameHelper *aObject) override {
RemoveObject(aObject);
aObject->MarkNotRecentlyScrolled();
}
};
static ScrollFrameActivityTracker *gScrollFrameActivityTracker = nullptr;
// There are situations when a scroll frame is destroyed and then re-created
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -3164,28 +3164,28 @@ public:
NS_ASSERTION(mTextRun, "Textrun not initialized!");
}
// Call this after construction if you're not going to reflow the text
void InitializeForDisplay(bool aTrimAfter);
void InitializeForMeasure();
- void GetSpacing(Range aRange, Spacing* aSpacing) const;
- gfxFloat GetHyphenWidth() const;
- void GetHyphenationBreaks(Range aRange, HyphenType* aBreakBefore) const;
- StyleHyphens GetHyphensOption() const {
+ void GetSpacing(Range aRange, Spacing* aSpacing) const override;
+ gfxFloat GetHyphenWidth() const override;
+ void GetHyphenationBreaks(Range aRange, HyphenType* aBreakBefore) const override;
+ StyleHyphens GetHyphensOption() const override {
return mTextStyle->mHyphens;
}
- already_AddRefed<DrawTarget> GetDrawTarget() const {
+ already_AddRefed<DrawTarget> GetDrawTarget() const override {
return CreateReferenceDrawTarget(GetFrame());
}
- uint32_t GetAppUnitsPerDevUnit() const {
+ uint32_t GetAppUnitsPerDevUnit() const override {
return mTextRun->GetAppUnitsPerDevUnit();
}
void GetSpacingInternal(Range aRange, Spacing* aSpacing, bool aIgnoreTabs) const;
/**
* Compute the justification information in given DOM range, return
* justification info and assignments if requested.
--- a/layout/generic/nsTextFrame.h
+++ b/layout/generic/nsTextFrame.h
@@ -76,21 +76,21 @@ public:
void Init(nsIContent* aContent,
nsContainerFrame* aParent,
nsIFrame* aPrevInFlow) override;
void DestroyFrom(nsIFrame* aDestructRoot, PostDestroyData& aPostDestroyData) override;
nsresult GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor) override;
- nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) final;
+ nsresult CharacterDataChanged(CharacterDataChangeInfo* aInfo) final override;
nsTextFrame* GetPrevContinuation() const override { return nullptr; }
- nsTextFrame* GetNextContinuation() const final { return mNextContinuation; }
- void SetNextContinuation(nsIFrame* aNextContinuation) final
+ nsTextFrame* GetNextContinuation() const final override { return mNextContinuation; }
+ void SetNextContinuation(nsIFrame* aNextContinuation) final override
{
NS_ASSERTION(!aNextContinuation || Type() == aNextContinuation->Type(),
"setting a next continuation with incorrect type!");
NS_ASSERTION(
!nsSplittableFrame::IsInNextContinuationChain(aNextContinuation, this),
"creating a loop in continuation chain!");
mNextContinuation = static_cast<nsTextFrame*>(aNextContinuation);
if (aNextContinuation)
@@ -106,17 +106,17 @@ public:
nsTextFrame* GetNextInFlow() const
{
return mNextContinuation &&
(mNextContinuation->GetStateBits() &
NS_FRAME_IS_FLUID_CONTINUATION)
? mNextContinuation
: nullptr;
}
- void SetNextInFlow(nsIFrame* aNextInFlow) final
+ void SetNextInFlow(nsIFrame* aNextInFlow) final override
{
NS_ASSERTION(!aNextInFlow || Type() == aNextInFlow->Type(),
"setting a next in flow with incorrect type!");
NS_ASSERTION(
!nsSplittableFrame::IsInNextContinuationChain(aNextInFlow, this),
"creating a loop in continuation chain!");
mNextContinuation = static_cast<nsTextFrame*>(aNextInFlow);
if (mNextContinuation &&
@@ -127,25 +127,25 @@ public:
GetContent()->DeleteProperty(nsGkAtoms::flowlength);
GetContent()->UnsetFlags(NS_HAS_FLOWLENGTH_PROPERTY);
}
}
if (aNextInFlow) {
aNextInFlow->AddStateBits(NS_FRAME_IS_FLUID_CONTINUATION);
}
}
- nsTextFrame* LastInFlow() const final;
- nsTextFrame* LastContinuation() const final;
+ nsTextFrame* LastInFlow() const final override;
+ nsTextFrame* LastContinuation() const final override;
- nsSplittableType GetSplittableType() const final
+ nsSplittableType GetSplittableType() const final override
{
return NS_FRAME_SPLITTABLE;
}
- bool IsFrameOfType(uint32_t aFlags) const final
+ bool IsFrameOfType(uint32_t aFlags) const final override
{
// Set the frame state bit for text frames to mark them as replaced.
// XXX kipp: temporary
return nsFrame::IsFrameOfType(
aFlags & ~(nsIFrame::eReplaced | nsIFrame::eLineParticipant));
}
bool ShouldSuppressLineBreak() const
@@ -233,17 +233,17 @@ public:
bool inHint,
int32_t* outFrameContentOffset,
nsIFrame** outChildFrame) override;
bool IsVisibleInSelection(nsISelection* aSelection) override;
bool IsEmpty() override;
bool IsSelfEmpty() override { return IsEmpty(); }
- nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const final;
+ nscoord GetLogicalBaseline(mozilla::WritingMode aWritingMode) const final override;
bool HasSignificantTerminalNewline() const override;
/**
* Returns true if this text frame is logically adjacent to the end of the
* line.
*/
bool IsAtEndOfLine() const;
--- a/layout/generic/nsTextRunTransformations.h
+++ b/layout/generic/nsTextRunTransformations.h
@@ -139,34 +139,34 @@ public:
if (mOwnsFactory) {
delete mFactory;
}
}
void SetCapitalization(uint32_t aStart, uint32_t aLength,
bool* aCapitalization);
virtual bool SetPotentialLineBreaks(Range aRange,
- const uint8_t* aBreakBefore);
+ const uint8_t* aBreakBefore) override;
/**
* Called after SetCapitalization and SetPotentialLineBreaks
* are done and before we request any data from the textrun. Also always
* called after a Create.
*/
void FinishSettingProperties(mozilla::gfx::DrawTarget* aRefDrawTarget,
gfxMissingFontRecorder* aMFR)
{
if (mNeedsRebuild) {
mNeedsRebuild = false;
mFactory->RebuildTextRun(this, aRefDrawTarget, aMFR);
}
}
// override the gfxTextRun impls to account for additional members here
- virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) MOZ_MUST_OVERRIDE;
- virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) MOZ_MUST_OVERRIDE;
+ virtual size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) override;
+ virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) override;
nsTransformingTextRunFactory *mFactory;
nsTArray<RefPtr<nsTransformedCharStyle>> mStyles;
nsTArray<bool> mCapitalize;
nsString mString;
bool mOwnsFactory;
bool mNeedsRebuild;
--- a/layout/painting/ActiveLayerTracker.cpp
+++ b/layout/painting/ActiveLayerTracker.cpp
@@ -119,17 +119,17 @@ public:
aEventTarget)
, mDestroying(false)
{}
~LayerActivityTracker() {
mDestroying = true;
AgeAllGenerations();
}
- virtual void NotifyExpired(LayerActivity* aObject);
+ virtual void NotifyExpired(LayerActivity* aObject) override;
public:
WeakFrame mCurrentScrollHandlerFrame;
private:
bool mDestroying;
};
--- a/layout/printing/DrawEventRecorder.h
+++ b/layout/printing/DrawEventRecorder.h
@@ -58,17 +58,17 @@ public:
}
}
void Seek(PRInt32 aOffset, PRSeekWhence aWhence) {
Flush();
PR_Seek(mFd, aOffset, aWhence);
}
- void write(const char* aData, size_t aSize) {
+ void write(const char* aData, size_t aSize) override {
// See comment in Close().
if (IsOpen()) {
// If we're writing more data than could ever fit in our buffer, flush the
// buffer and write directly.
if (aSize > kBufferSize) {
Flush();
PR_Write(mFd, static_cast<const void*>(aData), aSize);
// If our write could fit in our buffer, but doesn't because the buffer is
@@ -83,17 +83,17 @@ public:
WriteToBuffer(aData + length, aSize - length);
// Write fits in the buffer.
} else {
WriteToBuffer(aData, aSize);
}
}
}
- void read(char* aOut, size_t aSize) {
+ void read(char* aOut, size_t aSize) override {
Flush();
PRInt32 res = PR_Read(mFd, static_cast<void*>(aOut), aSize);
mGood = res >= 0 && ((size_t)res == aSize);
}
bool good() {
return mGood;
}
--- a/layout/printing/PrintTranslator.h
+++ b/layout/printing/PrintTranslator.h
@@ -32,153 +32,153 @@ using gfx::NativeFontResource;
class PrintTranslator final : public Translator
{
public:
explicit PrintTranslator(nsDeviceContext* aDeviceContext);
bool TranslateRecording(PRFileDescStream& aRecording);
- DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final
+ DrawTarget* LookupDrawTarget(ReferencePtr aRefPtr) final override
{
DrawTarget* result = mDrawTargets.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- Path* LookupPath(ReferencePtr aRefPtr) final
+ Path* LookupPath(ReferencePtr aRefPtr) final override
{
Path* result = mPaths.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final
+ SourceSurface* LookupSourceSurface(ReferencePtr aRefPtr) final override
{
SourceSurface* result = mSourceSurfaces.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final
+ FilterNode* LookupFilterNode(ReferencePtr aRefPtr) final override
{
FilterNode* result = mFilterNodes.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final
+ GradientStops* LookupGradientStops(ReferencePtr aRefPtr) final override
{
GradientStops* result = mGradientStops.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final
+ ScaledFont* LookupScaledFont(ReferencePtr aRefPtr) final override
{
ScaledFont* result = mScaledFonts.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) final
+ UnscaledFont* LookupUnscaledFont(ReferencePtr aRefPtr) final override
{
UnscaledFont* result = mUnscaledFonts.GetWeak(aRefPtr);
MOZ_ASSERT(result);
return result;
}
- NativeFontResource* LookupNativeFontResource(uint64_t aKey) final
+ NativeFontResource* LookupNativeFontResource(uint64_t aKey) final override
{
NativeFontResource* result = mNativeFontResources.GetWeak(aKey);
MOZ_ASSERT(result);
return result;
}
- void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final
+ void AddDrawTarget(ReferencePtr aRefPtr, DrawTarget *aDT) final override
{
mDrawTargets.Put(aRefPtr, aDT);
}
- void AddPath(ReferencePtr aRefPtr, Path *aPath) final
+ void AddPath(ReferencePtr aRefPtr, Path *aPath) final override
{
mPaths.Put(aRefPtr, aPath);
}
- void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final
+ void AddSourceSurface(ReferencePtr aRefPtr, SourceSurface *aSurface) final override
{
mSourceSurfaces.Put(aRefPtr, aSurface);
}
- void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final
+ void AddFilterNode(ReferencePtr aRefPtr, FilterNode *aFilter) final override
{
mFilterNodes.Put(aRefPtr, aFilter);
}
- void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final
+ void AddGradientStops(ReferencePtr aRefPtr, GradientStops *aStops) final override
{
mGradientStops.Put(aRefPtr, aStops);
}
- void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final
+ void AddScaledFont(ReferencePtr aRefPtr, ScaledFont *aScaledFont) final override
{
mScaledFonts.Put(aRefPtr, aScaledFont);
}
- void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont* aUnscaledFont) final
+ void AddUnscaledFont(ReferencePtr aRefPtr, UnscaledFont* aUnscaledFont) final override
{
mUnscaledFonts.Put(aRefPtr, aUnscaledFont);
}
void AddNativeFontResource(uint64_t aKey,
- NativeFontResource *aScaledFontResouce) final
+ NativeFontResource *aScaledFontResouce) final override
{
mNativeFontResources.Put(aKey, aScaledFontResouce);
}
- void RemoveDrawTarget(ReferencePtr aRefPtr) final
+ void RemoveDrawTarget(ReferencePtr aRefPtr) final override
{
mDrawTargets.Remove(aRefPtr);
}
- void RemovePath(ReferencePtr aRefPtr) final
+ void RemovePath(ReferencePtr aRefPtr) final override
{
mPaths.Remove(aRefPtr);
}
- void RemoveSourceSurface(ReferencePtr aRefPtr) final
+ void RemoveSourceSurface(ReferencePtr aRefPtr) final override
{
mSourceSurfaces.Remove(aRefPtr);
}
- void RemoveFilterNode(ReferencePtr aRefPtr) final
+ void RemoveFilterNode(ReferencePtr aRefPtr) final override
{
mFilterNodes.Remove(aRefPtr);
}
- void RemoveGradientStops(ReferencePtr aRefPtr) final
+ void RemoveGradientStops(ReferencePtr aRefPtr) final override
{
mGradientStops.Remove(aRefPtr);
}
- void RemoveScaledFont(ReferencePtr aRefPtr) final
+ void RemoveScaledFont(ReferencePtr aRefPtr) final override
{
mScaledFonts.Remove(aRefPtr);
}
- void RemoveUnscaledFont(ReferencePtr aRefPtr) final
+ void RemoveUnscaledFont(ReferencePtr aRefPtr) final override
{
mUnscaledFonts.Remove(aRefPtr);
}
already_AddRefed<DrawTarget> CreateDrawTarget(ReferencePtr aRefPtr,
const gfx::IntSize &aSize,
- gfx::SurfaceFormat aFormat) final;
+ gfx::SurfaceFormat aFormat) final override;
- mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final { return mBaseDT; }
+ mozilla::gfx::DrawTarget* GetReferenceDrawTarget() final override { return mBaseDT; }
private:
RefPtr<nsDeviceContext> mDeviceContext;
RefPtr<DrawTarget> mBaseDT;
nsRefPtrHashtable<nsPtrHashKey<void>, DrawTarget> mDrawTargets;
nsRefPtrHashtable<nsPtrHashKey<void>, Path> mPaths;
nsRefPtrHashtable<nsPtrHashKey<void>, SourceSurface> mSourceSurfaces;
--- a/layout/printing/ipc/RemotePrintJobChild.h
+++ b/layout/printing/ipc/RemotePrintJobChild.h
@@ -22,32 +22,32 @@ class RemotePrintJobChild final : public
, public nsIWebProgressListener
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSIWEBPROGRESSLISTENER
RemotePrintJobChild();
- void ActorDestroy(ActorDestroyReason aWhy) final;
+ void ActorDestroy(ActorDestroyReason aWhy) final override;
nsresult InitializePrint(const nsString& aDocumentTitle,
const nsString& aPrintToFile,
const int32_t& aStartPage,
const int32_t& aEndPage);
mozilla::ipc::IPCResult RecvPrintInitializationResult(
const nsresult& aRv,
- const FileDescriptor& aFd) final;
+ const FileDescriptor& aFd) final override;
void ProcessPage();
- mozilla::ipc::IPCResult RecvPageProcessed(const FileDescriptor& aFd) final;
+ mozilla::ipc::IPCResult RecvPageProcessed(const FileDescriptor& aFd) final override;
- mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final;
+ mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final override;
void SetPagePrintTimer(nsPagePrintTimer* aPagePrintTimer);
void SetPrintJob(nsPrintJob* aPrintJob);
PRFileDesc* GetNextPageFD();
private:
--- a/layout/printing/ipc/RemotePrintJobParent.h
+++ b/layout/printing/ipc/RemotePrintJobParent.h
@@ -24,38 +24,38 @@ class PrintTranslator;
namespace mozilla {
namespace layout {
class RemotePrintJobParent final : public PRemotePrintJobParent
{
public:
explicit RemotePrintJobParent(nsIPrintSettings* aPrintSettings);
- void ActorDestroy(ActorDestroyReason aWhy) final;
+ void ActorDestroy(ActorDestroyReason aWhy) final override;
mozilla::ipc::IPCResult RecvInitializePrint(const nsString& aDocumentTitle,
const nsString& aPrintToFile,
const int32_t& aStartPage,
- const int32_t& aEndPage) final;
+ const int32_t& aEndPage) final override;
- mozilla::ipc::IPCResult RecvProcessPage() final;
+ mozilla::ipc::IPCResult RecvProcessPage() final override;
- mozilla::ipc::IPCResult RecvFinalizePrint() final;
+ mozilla::ipc::IPCResult RecvFinalizePrint() final override;
- mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final;
+ mozilla::ipc::IPCResult RecvAbortPrint(const nsresult& aRv) final override;
mozilla::ipc::IPCResult RecvStateChange(const long& aStateFlags,
- const nsresult& aStatus) final;
+ const nsresult& aStatus) final override;
mozilla::ipc::IPCResult RecvProgressChange(const long& aCurSelfProgress,
const long& aMaxSelfProgress,
const long& aCurTotalProgress,
- const long& aMaxTotalProgress) final;
+ const long& aMaxTotalProgress) final override;
- mozilla::ipc::IPCResult RecvStatusChange(const nsresult& aStatus) final;
+ mozilla::ipc::IPCResult RecvStatusChange(const nsresult& aStatus) final override;
/**
* Register a progress listener to receive print progress updates.
*
* @param aListener the progress listener to register. Must not be null.
*/
void RegisterListener(nsIWebProgressListener* aListener);
--- a/layout/style/CSSFontFeatureValuesRule.h
+++ b/layout/style/CSSFontFeatureValuesRule.h
@@ -19,24 +19,24 @@ namespace dom {
class CSSFontFeatureValuesRule : public css::Rule
, public nsIDOMCSSFontFeatureValuesRule
{
public:
NS_DECL_ISUPPORTS_INHERITED
virtual bool IsCCLeaf() const override;
- int32_t GetType() const final { return Rule::FONT_FEATURE_VALUES_RULE; }
+ int32_t GetType() const final override { return Rule::FONT_FEATURE_VALUES_RULE; }
using Rule::GetType;
virtual already_AddRefed<mozilla::css::Rule> Clone() const override = 0;
using nsIDOMCSSFontFeatureValuesRule::SetFontFamily;
using nsIDOMCSSFontFeatureValuesRule::SetValueText;
// WebIDL interfaces
- uint16_t Type() const final { return nsIDOMCSSRule::FONT_FEATURE_VALUES_RULE; }
+ uint16_t Type() const final override { return nsIDOMCSSRule::FONT_FEATURE_VALUES_RULE; }
virtual void GetCssTextImpl(nsAString& aCssText) const override = 0;
// The XPCOM GetFontFamily is fine
void SetFontFamily(const nsAString& aFamily, mozilla::ErrorResult& aRv);
// The XPCOM GetValueText is fine
void SetValueText(const nsAString& aFamily, mozilla::ErrorResult& aRv);
virtual size_t
SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
--- a/layout/style/CSSImportRule.h
+++ b/layout/style/CSSImportRule.h
@@ -17,30 +17,30 @@ class CSSImportRule : public css::Rule
, public nsIDOMCSSImportRule
{
protected:
using Rule::Rule;
virtual ~CSSImportRule() {}
public:
NS_DECL_ISUPPORTS_INHERITED
- bool IsCCLeaf() const final;
+ bool IsCCLeaf() const final override;
- int32_t GetType() const final { return css::Rule::IMPORT_RULE; }
+ int32_t GetType() const final override { return css::Rule::IMPORT_RULE; }
using Rule::GetType;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
const override = 0;
// nsIDOMCSSImportRule interface
- NS_IMETHOD GetMedia(nsIDOMMediaList** aMedia) final;
- NS_IMETHOD GetStyleSheet(nsIDOMCSSStyleSheet** aStyleSheet) final;
+ NS_IMETHOD GetMedia(nsIDOMMediaList** aMedia) final override;
+ NS_IMETHOD GetStyleSheet(nsIDOMCSSStyleSheet** aStyleSheet) final override;
// WebIDL interface
- uint16_t Type() const final { return nsIDOMCSSRule::IMPORT_RULE; }
+ uint16_t Type() const final override { return nsIDOMCSSRule::IMPORT_RULE; }
// The XPCOM GetHref is fine, since it never fails.
virtual dom::MediaList* GetMedia() const = 0;
virtual StyleSheet* GetStyleSheet() const = 0;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
};
--- a/layout/style/CSSKeyframeRule.h
+++ b/layout/style/CSSKeyframeRule.h
@@ -18,30 +18,30 @@ class CSSKeyframeRule : public css::Rule
{
protected:
using css::Rule::Rule;
virtual ~CSSKeyframeRule() {}
public:
NS_DECL_ISUPPORTS_INHERITED
- int32_t GetType() const final { return Rule::KEYFRAME_RULE; }
+ int32_t GetType() const final override { return Rule::KEYFRAME_RULE; }
using Rule::GetType;
bool IsCCLeaf() const override { return Rule::IsCCLeaf(); }
// nsIDOMCSSKeyframeRule
- NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) final;
+ NS_IMETHOD GetStyle(nsIDOMCSSStyleDeclaration** aStyle) final override;
// WebIDL interface
- uint16_t Type() const final { return nsIDOMCSSRule::KEYFRAME_RULE; }
+ uint16_t Type() const final override { return nsIDOMCSSRule::KEYFRAME_RULE; }
// The XPCOM GetKeyText is fine.
// The XPCOM SetKeyText is fine.
virtual nsICSSDeclaration* Style() = 0;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
- JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
+ JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final override;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_CSSKeyframeRule_h
--- a/layout/style/CSSKeyframesRule.h
+++ b/layout/style/CSSKeyframesRule.h
@@ -20,37 +20,37 @@ class CSSKeyframesRule : public css::Gro
{
protected:
using css::GroupRule::GroupRule;
virtual ~CSSKeyframesRule() {}
public:
NS_DECL_ISUPPORTS_INHERITED
- int32_t GetType() const final { return Rule::KEYFRAMES_RULE; }
+ int32_t GetType() const final override { return Rule::KEYFRAMES_RULE; }
using Rule::GetType;
// nsIDOMCSSKeyframesRule interface
- NS_IMETHOD GetCssRules(nsIDOMCSSRuleList** aRuleList) final;
+ NS_IMETHOD GetCssRules(nsIDOMCSSRuleList** aRuleList) final override;
NS_IMETHOD FindRule(const nsAString& aKey,
- nsIDOMCSSKeyframeRule** aResult) final;
+ nsIDOMCSSKeyframeRule** aResult) final override;
// WebIDL interface
- uint16_t Type() const final { return nsIDOMCSSRule::KEYFRAMES_RULE; }
+ uint16_t Type() const final override { return nsIDOMCSSRule::KEYFRAMES_RULE; }
// The XPCOM GetName is OK
// The XPCOM SetName is OK
virtual CSSRuleList* CssRules() = 0;
// The XPCOM appendRule is OK, since it never throws
using nsIDOMCSSKeyframesRule::DeleteRule;
virtual CSSKeyframeRule* FindRule(const nsAString& aKey) = 0;
bool UseForPresentation(nsPresContext* aPresContext,
- nsMediaQueryResultCacheKey& aKey) final;
+ nsMediaQueryResultCacheKey& aKey) final override;
size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
- JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
+ JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final override;
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_CSSKeyframesRule_h
--- a/layout/style/CSSMediaRule.h
+++ b/layout/style/CSSMediaRule.h
@@ -36,17 +36,17 @@ public:
// nsIDOMCSSMediaRule interface
NS_DECL_NSIDOMCSSMEDIARULE
// WebIDL interface
uint16_t Type() const override { return nsIDOMCSSRule::MEDIA_RULE; }
// Our XPCOM GetConditionText is OK
void SetConditionText(const nsAString& aConditionText,
- ErrorResult& aRv) final;
+ ErrorResult& aRv) final override;
virtual MediaList* Media() = 0;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
};
} // namespace dom
} // namespace mozilla
--- a/layout/style/CSSMozDocumentRule.h
+++ b/layout/style/CSSMozDocumentRule.h
@@ -43,17 +43,17 @@ public:
NS_DECL_NSIDOMCSSMOZDOCUMENTRULE
// WebIDL interface
uint16_t Type() const final override {
return nsIDOMCSSRule::DOCUMENT_RULE;
}
// Our XPCOM GetConditionText is OK
void SetConditionText(const nsAString& aConditionText,
- ErrorResult& aRv) final;
+ ErrorResult& aRv) final override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
};
} // namespace dom
} // namespace mozilla
--- a/layout/style/CSSNamespaceRule.h
+++ b/layout/style/CSSNamespaceRule.h
@@ -16,42 +16,42 @@ namespace mozilla {
namespace dom {
class CSSNamespaceRule : public css::Rule
{
protected:
using Rule::Rule;
public:
- bool IsCCLeaf() const final {
+ bool IsCCLeaf() const final override {
return Rule::IsCCLeaf();
}
- int32_t GetType() const final {
+ int32_t GetType() const final override {
return Rule::NAMESPACE_RULE;
}
using Rule::GetType;
virtual nsAtom* GetPrefix() const = 0;
virtual void GetURLSpec(nsString& aURLSpec) const = 0;
// WebIDL interfaces
- uint16_t Type() const final {
+ uint16_t Type() const final override {
return nsIDOMCSSRule::NAMESPACE_RULE;
}
void GetNamespaceURI(nsString& aNamespaceURI) {
GetURLSpec(aNamespaceURI);
}
void GetPrefix(DOMString& aPrefix) {
aPrefix.SetKnownLiveAtom(GetPrefix(), DOMString::eTreatNullAsEmpty);
}
- size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const = 0;
+ size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
JSObject* WrapObject(JSContext* aCx,
- JS::Handle<JSObject*> aGivenProto) final {
+ JS::Handle<JSObject*> aGivenProto) final override {
return CSSNamespaceRuleBinding::Wrap(aCx, this, aGivenProto);
}
};
} // namespace dom
} // namespace mozilla
#endif // mozilla_dom_CSSNamespaceRule_h
--- a/layout/style/CSSPageRule.h
+++ b/layout/style/CSSPageRule.h
@@ -26,21 +26,21 @@ protected:
public:
NS_DECL_ISUPPORTS_INHERITED
// nsIDOMCSSPageRule interface
NS_DECL_NSIDOMCSSPAGERULE
virtual bool IsCCLeaf() const override = 0;
- int32_t GetType() const final { return Rule::PAGE_RULE; }
+ int32_t GetType() const final override { return Rule::PAGE_RULE; }
using Rule::GetType;
// WebIDL interfaces
- uint16_t Type() const final { return nsIDOMCSSRule::PAGE_RULE; }
+ uint16_t Type() const final override { return nsIDOMCSSRule::PAGE_RULE; }
virtual void GetCssTextImpl(nsAString& aCssText) const override = 0;
virtual nsICSSDeclaration* Style() = 0;
virtual size_t
SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const override = 0;
JSObject*
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
--- a/layout/style/CSSStyleSheet.h
+++ b/layout/style/CSSStyleSheet.h
@@ -113,17 +113,17 @@ public:
nsXMLNameSpaceMap* GetNameSpaceMap() const {
return Inner()->mNameSpaceMap;
}
already_AddRefed<StyleSheet> Clone(StyleSheet* aCloneParent,
dom::CSSImportRule* aCloneOwnerRule,
nsIDocument* aCloneDocument,
- nsINode* aCloneOwningNode) const final;
+ nsINode* aCloneOwningNode) const final override;
nsresult AddRuleProcessor(nsCSSRuleProcessor* aProcessor);
nsresult DropRuleProcessor(nsCSSRuleProcessor* aProcessor);
// nsICSSLoaderObserver interface
NS_IMETHOD StyleSheetLoaded(StyleSheet* aSheet, bool aWasAlternate,
nsresult aStatus) override;
--- a/layout/style/CSSSupportsRule.h
+++ b/layout/style/CSSSupportsRule.h
@@ -34,17 +34,17 @@ public:
// nsIDOMCSSSupportsRule interface
NS_DECL_NSIDOMCSSSUPPORTSRULE
// WebIDL interface
uint16_t Type() const override { return nsIDOMCSSRule::SUPPORTS_RULE; }
// Our XPCOM GetConditionText is OK
void SetConditionText(const nsAString& aConditionText,
- ErrorResult& aRv) final;
+ ErrorResult& aRv) final override;
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
};
} // namespace dom
} // namespace mozilla
--- a/layout/style/CounterStyleManager.cpp
+++ b/layout/style/CounterStyleManager.cpp
@@ -576,17 +576,17 @@ class BuiltinCounterStyle : public Count
{
public:
constexpr BuiltinCounterStyle(int32_t aStyle, nsStaticAtom** aName)
: CounterStyle(aStyle)
, mName(aName)
{
}
- virtual nsStaticAtom* GetStyleName() const final;
+ virtual nsStaticAtom* GetStyleName() const final override;
virtual void GetPrefix(nsAString& aResult) override;
virtual void GetSuffix(nsAString& aResult) override;
virtual void GetSpokenCounterText(CounterValue aOrdinal,
WritingMode aWritingMode,
nsAString& aResult,
bool& aIsBullet) override;
virtual bool IsBullet() override;
--- a/layout/style/FontFace.cpp
+++ b/layout/style/FontFace.cpp
@@ -30,17 +30,17 @@ namespace dom {
* An object that wraps a FontFace object and exposes its ArrayBuffer
* or ArrayBufferView data in a form the user font set can consume.
*/
class FontFaceBufferSource : public gfxFontFaceBufferSource
{
public:
explicit FontFaceBufferSource(FontFace* aFontFace)
: mFontFace(aFontFace) {}
- virtual void TakeBuffer(uint8_t*& aBuffer, uint32_t& aLength);
+ virtual void TakeBuffer(uint8_t*& aBuffer, uint32_t& aLength) override;
private:
RefPtr<FontFace> mFontFace;
};
void
FontFaceBufferSource::TakeBuffer(uint8_t*& aBuffer, uint32_t& aLength)
{
--- a/layout/style/ImportRule.h
+++ b/layout/style/ImportRule.h
@@ -52,22 +52,22 @@ public:
#endif
virtual already_AddRefed<Rule> Clone() const override;
void SetSheet(CSSStyleSheet*);
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
// nsIDOMCSSImportRule interface
- NS_IMETHOD GetHref(nsAString& aHref) final;
+ NS_IMETHOD GetHref(nsAString& aHref) final override;
// WebIDL interface
void GetCssTextImpl(nsAString& aCssText) const override;
- dom::MediaList* GetMedia() const final;
- StyleSheet* GetStyleSheet() const final;
+ dom::MediaList* GetMedia() const final override;
+ StyleSheet* GetStyleSheet() const final override;
private:
nsString mURLSpec;
RefPtr<nsMediaList> mMedia;
RefPtr<CSSStyleSheet> mChildSheet;
};
} // namespace css
--- a/layout/style/MediaList.h
+++ b/layout/style/MediaList.h
@@ -45,17 +45,17 @@ public:
*/
static already_AddRefed<MediaList> Create(StyleBackendType,
const nsAString& aMedia,
CallerType aCallerType =
CallerType::NonSystem);
virtual already_AddRefed<MediaList> Clone() = 0;
- JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
+ JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final override;
nsISupports* GetParentObject() const { return nullptr; }
virtual void GetText(nsAString& aMediaText) = 0;
virtual void SetText(const nsAString& aMediaText) = 0;
virtual bool Matches(nsPresContext* aPresContext) const = 0;
#ifdef DEBUG
virtual bool IsServo() const = 0;
--- a/layout/style/NameSpaceRule.h
+++ b/layout/style/NameSpaceRule.h
@@ -39,23 +39,23 @@ public:
NS_DECL_ISUPPORTS_INHERITED
#ifdef DEBUG
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
#endif
virtual already_AddRefed<Rule> Clone() const override;
- nsAtom* GetPrefix() const final { return mPrefix; }
- void GetURLSpec(nsString& aURLSpec) const final { aURLSpec = mURLSpec; }
+ nsAtom* GetPrefix() const final override { return mPrefix; }
+ void GetURLSpec(nsString& aURLSpec) const final override { aURLSpec = mURLSpec; }
// WebIDL interface
void GetCssTextImpl(nsAString& aCssText) const override;
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
private:
RefPtr<nsAtom> mPrefix;
nsString mURLSpec;
};
NS_DEFINE_STATIC_IID_ACCESSOR(NameSpaceRule, NS_CSS_NAMESPACE_RULE_IMPL_CID)
--- a/layout/style/ServoCSSRuleList.h
+++ b/layout/style/ServoCSSRuleList.h
@@ -33,20 +33,20 @@ public:
ServoStyleSheet* aDirectOwnerStyleSheet);
css::GroupRule* GetParentRule() const { return mParentRule; }
void SetParentRule(css::GroupRule* aParentRule);
void SetStyleSheet(StyleSheet* aSheet);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoCSSRuleList, dom::CSSRuleList)
- ServoStyleSheet* GetParentObject() final { return mStyleSheet; }
+ ServoStyleSheet* GetParentObject() final override { return mStyleSheet; }
- css::Rule* IndexedGetter(uint32_t aIndex, bool& aFound) final;
- uint32_t Length() final { return mRules.Length(); }
+ css::Rule* IndexedGetter(uint32_t aIndex, bool& aFound) final override;
+ uint32_t Length() final override { return mRules.Length(); }
void DropReference();
css::Rule* GetRule(uint32_t aIndex);
nsresult InsertRule(const nsAString& aRule, uint32_t aIndex);
nsresult DeleteRule(uint32_t aIndex);
uint16_t GetDOMCSSRuleType(uint32_t aIndex) const;
--- a/layout/style/ServoDocumentRule.h
+++ b/layout/style/ServoDocumentRule.h
@@ -19,19 +19,19 @@ class ServoDocumentRule final : public d
public:
ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
already_AddRefed<css::Rule> Clone() const override;
bool UseForPresentation(nsPresContext* aPresContext,
- nsMediaQueryResultCacheKey& aKey) final;
+ nsMediaQueryResultCacheKey& aKey) final override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
RawServoDocumentRule* Raw() const { return mRawRule; }
// nsIDOMCSSConditionRule interface
NS_DECL_NSIDOMCSSCONDITIONRULE
// WebIDL interface
--- a/layout/style/ServoFontFeatureValuesRule.h
+++ b/layout/style/ServoFontFeatureValuesRule.h
@@ -26,22 +26,22 @@ public:
// nsIDOMCSSFontFeatureValuesRule interface
NS_DECL_NSIDOMCSSFONTFEATUREVALUESRULE
// WebIDL interface
void GetCssTextImpl(nsAString& aCssText) const override;
// Methods of mozilla::css::Rule
- already_AddRefed<css::Rule> Clone() const final;
+ already_AddRefed<css::Rule> Clone() const final override;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
- const final;
+ const final override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
private:
~ServoFontFeatureValuesRule();
RefPtr<RawServoFontFeatureValuesRule> mRawRule;
};
--- a/layout/style/ServoImportRule.h
+++ b/layout/style/ServoImportRule.h
@@ -26,28 +26,28 @@ public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoImportRule, dom::CSSImportRule)
// unhide since nsIDOMCSSImportRule has its own GetStyleSheet and GetMedia
using dom::CSSImportRule::GetStyleSheet;
using dom::CSSImportRule::GetMedia;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
- already_AddRefed<css::Rule> Clone() const final;
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ already_AddRefed<css::Rule> Clone() const final override;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
// nsIDOMCSSImportRule interface
- NS_IMETHOD GetHref(nsAString& aHref) final;
+ NS_IMETHOD GetHref(nsAString& aHref) final override;
// WebIDL interface
void GetCssTextImpl(nsAString& aCssText) const override;
- dom::MediaList* GetMedia() const final;
- StyleSheet* GetStyleSheet() const final;
+ dom::MediaList* GetMedia() const final override;
+ StyleSheet* GetStyleSheet() const final override;
private:
~ServoImportRule();
RefPtr<RawServoImportRule> mRawRule;
RefPtr<ServoStyleSheet> mChildSheet;
};
--- a/layout/style/ServoKeyframeRule.cpp
+++ b/layout/style/ServoKeyframeRule.cpp
@@ -24,66 +24,66 @@ public:
mDecls = new ServoDeclarationBlock(
Servo_Keyframe_GetStyle(aRule->Raw()).Consume());
}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(
ServoKeyframeDeclaration, nsICSSDeclaration)
- NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final
+ NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final override
{
NS_IF_ADDREF(*aParent = mRule);
return NS_OK;
}
void DropReference() {
mRule = nullptr;
mDecls->SetOwningRule(nullptr);
}
- DeclarationBlock* GetCSSDeclaration(Operation aOperation) final
+ DeclarationBlock* GetCSSDeclaration(Operation aOperation) final override
{
return mDecls;
}
- nsresult SetCSSDeclaration(DeclarationBlock* aDecls) final
+ nsresult SetCSSDeclaration(DeclarationBlock* aDecls) final override
{
if (!mRule) {
return NS_OK;
}
mRule->UpdateRule([this, aDecls]() {
if (mDecls != aDecls) {
mDecls->SetOwningRule(nullptr);
mDecls = aDecls->AsServo();
mDecls->SetOwningRule(mRule);
Servo_Keyframe_SetStyle(mRule->Raw(), mDecls->Raw());
}
});
return NS_OK;
}
void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
- nsIPrincipal* aSubjectPrincipal) final
+ nsIPrincipal* aSubjectPrincipal) final override
{
MOZ_ASSERT_UNREACHABLE("GetCSSParsingEnvironment "
"shouldn't be calling for a Servo rule");
GetCSSParsingEnvironmentForRule(mRule, aCSSParseEnv);
}
ServoCSSParsingEnvironment GetServoCSSParsingEnvironment(
- nsIPrincipal* aSubjectPrincipal) const final
+ nsIPrincipal* aSubjectPrincipal) const final override
{
return GetServoCSSParsingEnvironmentForRule(mRule);
}
- nsIDocument* DocToUpdate() final { return nullptr; }
+ nsIDocument* DocToUpdate() final override { return nullptr; }
- nsINode* GetParentObject() final
+ nsINode* GetParentObject() final override
{
return mRule ? mRule->GetDocument() : nullptr;
}
- DocGroup* GetDocGroup() const final
+ DocGroup* GetDocGroup() const final override
{
if (!mRule) {
return nullptr;
}
nsIDocument* document = mRule->GetDocument();
return document ? document->GetDocGroup() : nullptr;
}
--- a/layout/style/ServoKeyframeRule.h
+++ b/layout/style/ServoKeyframeRule.h
@@ -22,33 +22,33 @@ public:
uint32_t aLine, uint32_t aColumn)
: CSSKeyframeRule(aLine, aColumn)
, mRaw(aRaw) {}
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoKeyframeRule,
dom::CSSKeyframeRule)
- bool IsCCLeaf() const final;
+ bool IsCCLeaf() const final override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
- already_AddRefed<mozilla::css::Rule> Clone() const final;
+ already_AddRefed<mozilla::css::Rule> Clone() const final override;
RawServoKeyframe* Raw() const { return mRaw; }
// nsIDOMCSSKeyframeRule interface
- NS_IMETHOD GetKeyText(nsAString& aKeyText) final;
- NS_IMETHOD SetKeyText(const nsAString& aKeyText) final;
+ NS_IMETHOD GetKeyText(nsAString& aKeyText) final override;
+ NS_IMETHOD SetKeyText(const nsAString& aKeyText) final override;
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
- nsICSSDeclaration* Style() final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
+ nsICSSDeclaration* Style() final override;
- size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
+ size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final override;
private:
virtual ~ServoKeyframeRule();
friend class ServoKeyframeDeclaration;
template<typename Func>
void UpdateRule(Func aCallback);
--- a/layout/style/ServoKeyframesRule.cpp
+++ b/layout/style/ServoKeyframesRule.cpp
@@ -44,34 +44,34 @@ public:
mStyleSheet = aSheet;
for (css::Rule* rule : mRules) {
if (rule) {
rule->SetStyleSheet(aSheet);
}
}
}
- ServoStyleSheet* GetParentObject() final { return mStyleSheet; }
+ ServoStyleSheet* GetParentObject() final override { return mStyleSheet; }
ServoKeyframeRule* GetRule(uint32_t aIndex) {
if (!mRules[aIndex]) {
uint32_t line = 0, column = 0;
RefPtr<RawServoKeyframe> rule =
Servo_KeyframesRule_GetKeyframeAt(mRawRule, aIndex,
&line, &column).Consume();
ServoKeyframeRule* ruleObj =
new ServoKeyframeRule(rule.forget(), line, column);
mRules.ReplaceObjectAt(ruleObj, aIndex);
ruleObj->SetStyleSheet(mStyleSheet);
ruleObj->SetParentRule(mParentRule);
}
return static_cast<ServoKeyframeRule*>(mRules[aIndex]);
}
- ServoKeyframeRule* IndexedGetter(uint32_t aIndex, bool& aFound) final
+ ServoKeyframeRule* IndexedGetter(uint32_t aIndex, bool& aFound) final override
{
if (aIndex >= mRules.Length()) {
aFound = false;
return nullptr;
}
aFound = true;
return GetRule(aIndex);
}
@@ -79,17 +79,17 @@ public:
void AppendRule() {
mRules.AppendObject(nullptr);
}
void RemoveRule(uint32_t aIndex) {
mRules.RemoveObjectAt(aIndex);
}
- uint32_t Length() final { return mRules.Length(); }
+ uint32_t Length() final override { return mRules.Length(); }
void DropReference()
{
mStyleSheet = nullptr;
mParentRule = nullptr;
for (css::Rule* rule : mRules) {
if (rule) {
rule->SetStyleSheet(nullptr);
--- a/layout/style/ServoKeyframesRule.h
+++ b/layout/style/ServoKeyframesRule.h
@@ -18,37 +18,37 @@ class ServoKeyframesRule final : public
{
public:
ServoKeyframesRule(RefPtr<RawServoKeyframesRule> aRawRule,
uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoKeyframesRule,
dom::CSSKeyframesRule)
- bool IsCCLeaf() const final;
+ bool IsCCLeaf() const final override;
- already_AddRefed<css::Rule> Clone() const final;
+ already_AddRefed<css::Rule> Clone() const final override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
- void SetStyleSheet(StyleSheet* aSheet) final;
+ void SetStyleSheet(StyleSheet* aSheet) final override;
// nsIDOMCSSKeyframesRule interface
- NS_IMETHOD GetName(nsAString& aName) final;
- NS_IMETHOD SetName(const nsAString& aName) final;
- NS_IMETHOD AppendRule(const nsAString& aRule) final;
- NS_IMETHOD DeleteRule(const nsAString& aKey) final;
+ NS_IMETHOD GetName(nsAString& aName) final override;
+ NS_IMETHOD SetName(const nsAString& aName) final override;
+ NS_IMETHOD AppendRule(const nsAString& aRule) final override;
+ NS_IMETHOD DeleteRule(const nsAString& aKey) final override;
using nsIDOMCSSKeyframesRule::FindRule;
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
- dom::CSSRuleList* CssRules() final;
- dom::CSSKeyframeRule* FindRule(const nsAString& aKey) final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
+ dom::CSSRuleList* CssRules() final override;
+ dom::CSSKeyframeRule* FindRule(const nsAString& aKey) final override;
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
private:
uint32_t FindRuleIndexForKey(const nsAString& aKey);
template<typename Func>
void UpdateRule(Func aCallback);
virtual ~ServoKeyframesRule();
--- a/layout/style/ServoMediaList.h
+++ b/layout/style/ServoMediaList.h
@@ -17,36 +17,36 @@ namespace mozilla {
class ServoMediaList final : public dom::MediaList
{
public:
explicit ServoMediaList(already_AddRefed<RawServoMediaList> aRawList)
: mRawList(aRawList) {}
ServoMediaList(const nsAString& aMedia, dom::CallerType);
ServoMediaList();
- already_AddRefed<dom::MediaList> Clone() final;
+ already_AddRefed<dom::MediaList> Clone() final override;
- void GetText(nsAString& aMediaText) final;
- void SetText(const nsAString& aMediaText) final;
+ void GetText(nsAString& aMediaText) final override;
+ void SetText(const nsAString& aMediaText) final override;
- uint32_t Length() final;
+ uint32_t Length() final override;
void IndexedGetter(uint32_t aIndex, bool& aFound,
- nsAString& aReturn) final;
+ nsAString& aReturn) final override;
- bool Matches(nsPresContext*) const final;
+ bool Matches(nsPresContext*) const final override;
#ifdef DEBUG
- bool IsServo() const final { return true; }
+ bool IsServo() const final override { return true; }
#endif
RawServoMediaList& RawList() { return *mRawList; }
protected:
- nsresult Delete(const nsAString& aOldMedium) final;
- nsresult Append(const nsAString& aNewMedium) final;
+ nsresult Delete(const nsAString& aOldMedium) final override;
+ nsresult Append(const nsAString& aNewMedium) final override;
void SetTextInternal(const nsAString& aMediaText, dom::CallerType);
~ServoMediaList() {}
private:
RefPtr<RawServoMediaList> mRawList;
};
--- a/layout/style/ServoMediaRule.h
+++ b/layout/style/ServoMediaRule.h
@@ -22,20 +22,20 @@ public:
ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule,
uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServoMediaRule, dom::CSSMediaRule)
already_AddRefed<css::Rule> Clone() const override;
bool UseForPresentation(nsPresContext* aPresContext,
- nsMediaQueryResultCacheKey& aKey) final;
+ nsMediaQueryResultCacheKey& aKey) final override;
void SetStyleSheet(StyleSheet* aSheet) override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
RawServoMediaRule* Raw() const { return mRawRule; }
// nsIDOMCSSConditionRule interface
NS_DECL_NSIDOMCSSCONDITIONRULE
// WebIDL interface
--- a/layout/style/ServoNamespaceRule.h
+++ b/layout/style/ServoNamespaceRule.h
@@ -20,27 +20,27 @@ public:
: CSSNamespaceRule(aLine, aColumn)
, mRawRule(Move(aRule))
{
}
NS_DECL_ISUPPORTS_INHERITED
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
- already_AddRefed<Rule> Clone() const final;
+ already_AddRefed<Rule> Clone() const final override;
- nsAtom* GetPrefix() const final;
- void GetURLSpec(nsString& aURLSpec) const final;
+ nsAtom* GetPrefix() const final override;
+ void GetURLSpec(nsString& aURLSpec) const final override;
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
- size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
+ size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final override;
private:
~ServoNamespaceRule();
RefPtr<RawServoNamespaceRule> mRawRule;
};
} // namespace mozilla
--- a/layout/style/ServoPageRule.h
+++ b/layout/style/ServoPageRule.h
@@ -23,28 +23,28 @@ class DocGroup;
class ServoDeclarationBlock;
class ServoPageRule;
class ServoPageRuleDeclaration final : public nsDOMCSSDeclaration
{
public:
NS_DECL_ISUPPORTS_INHERITED
- NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final;
- nsINode* GetParentObject() final;
- DocGroup* GetDocGroup() const final;
+ NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final override;
+ nsINode* GetParentObject() final override;
+ DocGroup* GetDocGroup() const final override;
protected:
- DeclarationBlock* GetCSSDeclaration(Operation aOperation) final;
- nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final;
- nsIDocument* DocToUpdate() final;
+ DeclarationBlock* GetCSSDeclaration(Operation aOperation) final override;
+ nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final override;
+ nsIDocument* DocToUpdate() final override;
void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
- nsIPrincipal* aSubjectPrincipal) final;
+ nsIPrincipal* aSubjectPrincipal) final override;
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
private:
// For accessing the constructor.
friend class ServoPageRule;
explicit ServoPageRuleDeclaration(
already_AddRefed<RawServoDeclarationBlock> aDecls);
~ServoPageRuleDeclaration();
@@ -60,30 +60,31 @@ class ServoPageRule final : public dom::
public:
ServoPageRule(RefPtr<RawServoPageRule> aRawRule,
uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(
ServoPageRule, dom::CSSPageRule
)
- bool IsCCLeaf() const final;
+ bool IsCCLeaf() const final override;
RawServoPageRule* Raw() const { return mRawRule; }
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
- nsICSSDeclaration* Style() final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
+ nsICSSDeclaration* Style() final override;
// Methods of mozilla::css::Rule
- already_AddRefed<css::Rule> Clone() const final;
+ already_AddRefed<css::Rule> Clone() const final override;
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf)
- const final;
+ const final override;
+
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
private:
virtual ~ServoPageRule();
// For computing the offset of mDecls.
friend class ServoPageRuleDeclaration;
--- a/layout/style/ServoStyleRule.h
+++ b/layout/style/ServoStyleRule.h
@@ -27,28 +27,28 @@ class DocGroup;
class ServoDeclarationBlock;
class ServoStyleRule;
class ServoStyleRuleDeclaration final : public nsDOMCSSDeclaration
{
public:
NS_DECL_ISUPPORTS_INHERITED
- NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final;
- nsINode* GetParentObject() final;
- mozilla::dom::DocGroup* GetDocGroup() const final;
+ NS_IMETHOD GetParentRule(nsIDOMCSSRule** aParent) final override;
+ nsINode* GetParentObject() final override;
+ mozilla::dom::DocGroup* GetDocGroup() const final override;
protected:
- DeclarationBlock* GetCSSDeclaration(Operation aOperation) final;
- nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final;
- nsIDocument* DocToUpdate() final;
+ DeclarationBlock* GetCSSDeclaration(Operation aOperation) final override;
+ nsresult SetCSSDeclaration(DeclarationBlock* aDecl) final override;
+ nsIDocument* DocToUpdate() final override;
void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
- nsIPrincipal* aSubjectPrincipal) final;
+ nsIPrincipal* aSubjectPrincipal) final override;
ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
private:
// For accessing the constructor.
friend class ServoStyleRule;
explicit ServoStyleRuleDeclaration(
already_AddRefed<RawServoDeclarationBlock> aDecls);
~ServoStyleRuleDeclaration();
@@ -65,17 +65,17 @@ class ServoStyleRule final : public Bind
{
public:
ServoStyleRule(already_AddRefed<RawServoStyleRule> aRawRule,
uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(ServoStyleRule,
css::Rule)
- bool IsCCLeaf() const final MOZ_MUST_OVERRIDE;
+ bool IsCCLeaf() const final override;
NS_DECL_NSIDOMCSSSTYLERULE
MOZ_DECLARE_WEAKREFERENCE_TYPENAME(ServoStyleRule)
// nsICSSStyleRuleDOMWrapper
NS_IMETHOD GetCSSStyleRule(BindingStyleRule **aResult) override;
uint32_t GetSelectorCount() override;
@@ -85,29 +85,29 @@ public:
uint64_t* aSpecificity) override;
nsresult SelectorMatchesElement(dom::Element* aElement,
uint32_t aSelectorIndex,
const nsAString& aPseudo,
bool* aMatches) override;
NotNull<DeclarationBlock*> GetDeclarationBlock() const override;
// WebIDL interface
- uint16_t Type() const final;
- void GetCssTextImpl(nsAString& aCssText) const final;
- nsICSSDeclaration* Style() final;
+ uint16_t Type() const final override;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
+ nsICSSDeclaration* Style() final override;
RawServoStyleRule* Raw() const { return mRawRule; }
// Methods of mozilla::css::Rule
- int32_t GetType() const final { return css::Rule::STYLE_RULE; }
+ int32_t GetType() const final override { return css::Rule::STYLE_RULE; }
using Rule::GetType;
- already_AddRefed<Rule> Clone() const final;
- size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final;
+ already_AddRefed<Rule> Clone() const final override;
+ size_t SizeOfIncludingThis(MallocSizeOf aMallocSizeOf) const final override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
private:
~ServoStyleRule() {}
// For computing the offset of mDecls.
friend class ServoStyleRuleDeclaration;
--- a/layout/style/ServoStyleSheet.h
+++ b/layout/style/ServoStyleSheet.h
@@ -107,21 +107,21 @@ public:
URLExtraData* URLData() const { return Inner()->mURLData; }
void DidDirty() override {}
already_AddRefed<StyleSheet> Clone(StyleSheet* aCloneParent,
dom::CSSImportRule* aCloneOwnerRule,
nsIDocument* aCloneDocument,
- nsINode* aCloneOwningNode) const final;
+ nsINode* aCloneOwningNode) const final override;
// nsICSSLoaderObserver interface
NS_IMETHOD StyleSheetLoaded(StyleSheet* aSheet, bool aWasAlternate,
- nsresult aStatus) final;
+ nsresult aStatus) final override;
// Internal GetCssRules method which do not have security check and
// completelness check.
ServoCSSRuleList* GetCssRulesInternal();
// Returns the stylesheet's Servo origin as an OriginFlags value.
OriginFlags GetOrigin();
--- a/layout/style/ServoSupportsRule.h
+++ b/layout/style/ServoSupportsRule.h
@@ -19,19 +19,19 @@ class ServoSupportsRule final : public d
public:
ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
uint32_t aLine, uint32_t aColumn);
NS_DECL_ISUPPORTS_INHERITED
already_AddRefed<css::Rule> Clone() const override;
bool UseForPresentation(nsPresContext* aPresContext,
- nsMediaQueryResultCacheKey& aKey) final;
+ nsMediaQueryResultCacheKey& aKey) final override;
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
RawServoSupportsRule* Raw() const { return mRawRule; }
// nsIDOMCSSConditionRule interface
NS_DECL_NSIDOMCSSCONDITIONRULE
// WebIDL interface
--- a/layout/style/StyleRule.cpp
+++ b/layout/style/StyleRule.cpp
@@ -1064,17 +1064,17 @@ public:
explicit DOMCSSDeclarationImpl(css::StyleRule *aRule);
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
virtual DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
virtual nsresult SetCSSDeclaration(DeclarationBlock* aDecl) override;
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
nsIPrincipal* aSubjectPrincipal) override;
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
virtual nsIDocument* DocToUpdate() override;
// Override |AddRef| and |Release| for being owned by StyleRule. Also, we
// need to forward QI for cycle collection things to StyleRule.
NS_DECL_ISUPPORTS_INHERITED
virtual nsINode *GetParentObject() override
{
--- a/layout/style/StyleSheet.h
+++ b/layout/style/StyleSheet.h
@@ -231,34 +231,35 @@ public:
nsIPrincipal& aSubjectPrincipal,
ErrorResult& aRv);
void DeleteRule(uint32_t aIndex,
nsIPrincipal& aSubjectPrincipal,
ErrorResult& aRv);
// WebIDL miscellaneous bits
inline dom::ParentObject GetParentObject() const;
- JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) final;
+ JSObject* WrapObject(JSContext* aCx,
+ JS::Handle<JSObject*> aGivenProto) final override;
// nsIDOMStyleSheet interface
- NS_IMETHOD GetType(nsAString& aType) final;
- NS_IMETHOD GetDisabled(bool* aDisabled) final;
- NS_IMETHOD SetDisabled(bool aDisabled) final;
- NS_IMETHOD GetOwnerNode(nsIDOMNode** aOwnerNode) final;
- NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet** aParentStyleSheet) final;
- NS_IMETHOD GetHref(nsAString& aHref) final;
- NS_IMETHOD GetTitle(nsAString& aTitle) final;
- NS_IMETHOD GetMedia(nsIDOMMediaList** aMedia) final;
+ NS_IMETHOD GetType(nsAString& aType) final override;
+ NS_IMETHOD GetDisabled(bool* aDisabled) final override;
+ NS_IMETHOD SetDisabled(bool aDisabled) final override;
+ NS_IMETHOD GetOwnerNode(nsIDOMNode** aOwnerNode) final override;
+ NS_IMETHOD GetParentStyleSheet(nsIDOMStyleSheet** aParentStyleSheet) final override;
+ NS_IMETHOD GetHref(nsAString& aHref) final override;
+ NS_IMETHOD GetTitle(nsAString& aTitle) final override;
+ NS_IMETHOD GetMedia(nsIDOMMediaList** aMedia) final override;
// nsIDOMCSSStyleSheet
- NS_IMETHOD GetOwnerRule(nsIDOMCSSRule** aOwnerRule) final;
- NS_IMETHOD GetCssRules(nsIDOMCSSRuleList** aCssRules) final;
+ NS_IMETHOD GetOwnerRule(nsIDOMCSSRule** aOwnerRule) final override;
+ NS_IMETHOD GetCssRules(nsIDOMCSSRuleList** aCssRules) final override;
NS_IMETHOD InsertRule(const nsAString& aRule, uint32_t aIndex,
- uint32_t* aReturn) final;
- NS_IMETHOD DeleteRule(uint32_t aIndex) final;
+ uint32_t* aReturn) final override;
+ NS_IMETHOD DeleteRule(uint32_t aIndex) final override;
// Changes to sheets should be inside of a WillDirty-DidDirty pair.
// However, the calls do not need to be matched; it's ok to call
// WillDirty and then make no change and skip the DidDirty call.
void WillDirty();
virtual void DidDirty() {}
// Called when a rule changes from CSSOM.
--- a/layout/style/nsCSSRules.h
+++ b/layout/style/nsCSSRules.h
@@ -170,41 +170,41 @@ public:
mFamilyList(aCopy.mFamilyList),
mFeatureValues(aCopy.mFeatureValues)
{
}
NS_DECL_ISUPPORTS_INHERITED
#ifdef DEBUG
- void List(FILE* out = stdout, int32_t aIndent = 0) const final;
+ void List(FILE* out = stdout, int32_t aIndent = 0) const final override;
#endif
- already_AddRefed<mozilla::css::Rule> Clone() const final;
+ already_AddRefed<mozilla::css::Rule> Clone() const final override;
// nsIDOMCSSFontFeatureValuesRule interface
NS_DECL_NSIDOMCSSFONTFEATUREVALUESRULE
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
mozilla::SharedFontList* GetFamilyList() const { return mFamilyList; }
void SetFamilyList(mozilla::SharedFontList* aFamilyList)
{
mFamilyList = aFamilyList;
}
void AddValueList(int32_t aVariantAlternate,
nsTArray<gfxFontFeatureValueSet::ValueList>& aValueList);
const nsTArray<gfxFontFeatureValueSet::FeatureValues>& GetFeatureValues()
{
return mFeatureValues;
}
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
protected:
~nsCSSFontFeatureValuesRule() {}
RefPtr<mozilla::SharedFontList> mFamilyList;
nsTArray<gfxFontFeatureValueSet::FeatureValues> mFeatureValues;
};
@@ -217,17 +217,17 @@ public:
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
void DropReference() { mRule = nullptr; }
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
nsIPrincipal* aSubjectPrincipal) override;
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
virtual nsIDocument* DocToUpdate() override;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSKeyframeStyleDeclaration,
nsICSSDeclaration)
virtual nsINode* GetParentObject() override;
virtual mozilla::dom::DocGroup* GetDocGroup() const override;
@@ -263,22 +263,22 @@ public:
virtual bool IsCCLeaf() const override;
#ifdef DEBUG
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
#endif
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
// nsIDOMCSSKeyframeRule interface
- NS_IMETHOD GetKeyText(nsAString& aKeyText) final;
- NS_IMETHOD SetKeyText(const nsAString& aKeyText) final;
+ NS_IMETHOD GetKeyText(nsAString& aKeyText) final override;
+ NS_IMETHOD SetKeyText(const nsAString& aKeyText) final override;
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
- nsICSSDeclaration* Style() final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
+ nsICSSDeclaration* Style() final override;
const nsTArray<float>& GetKeys() const { return mKeys; }
mozilla::css::Declaration* Declaration() { return mDeclaration; }
void ChangeDeclaration(mozilla::css::Declaration* aDeclaration);
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
@@ -308,26 +308,26 @@ public:
// Rule methods
#ifdef DEBUG
virtual void List(FILE* out = stdout, int32_t aIndent = 0) const override;
#endif
virtual already_AddRefed<mozilla::css::Rule> Clone() const override;
// nsIDOMCSSKeyframesRule interface
- NS_IMETHOD GetName(nsAString& aName) final;
- NS_IMETHOD SetName(const nsAString& aName) final;
- NS_IMETHOD AppendRule(const nsAString& aRule) final;
- NS_IMETHOD DeleteRule(const nsAString& aKey) final;
+ NS_IMETHOD GetName(nsAString& aName) final override;
+ NS_IMETHOD SetName(const nsAString& aName) final override;
+ NS_IMETHOD AppendRule(const nsAString& aRule) final override;
+ NS_IMETHOD DeleteRule(const nsAString& aKey) final override;
using nsIDOMCSSKeyframesRule::FindRule;
// WebIDL interface
- void GetCssTextImpl(nsAString& aCssText) const final;
- mozilla::dom::CSSRuleList* CssRules() final { return GroupRule::CssRules(); }
- nsCSSKeyframeRule* FindRule(const nsAString& aKey) final;
+ void GetCssTextImpl(nsAString& aCssText) const final override;
+ mozilla::dom::CSSRuleList* CssRules() final override { return GroupRule::CssRules(); }
+ nsCSSKeyframeRule* FindRule(const nsAString& aKey) final override;
const nsAtom* GetName() const { return mName; }
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
private:
uint32_t FindRuleIndexForKey(const nsAString& aKey);
@@ -343,17 +343,17 @@ public:
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
void DropReference() { mRule = nullptr; }
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock* aDecl) override;
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
nsIPrincipal* aSubjectPrincipal) override;
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
virtual nsIDocument* DocToUpdate() override;
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_AMBIGUOUS(nsCSSPageStyleDeclaration,
nsICSSDeclaration)
virtual nsINode *GetParentObject() override;
virtual mozilla::dom::DocGroup* GetDocGroup() const override;
--- a/layout/style/nsComputedDOMStyle.h
+++ b/layout/style/nsComputedDOMStyle.h
@@ -142,17 +142,17 @@ public:
// on a nsComputedDOMStyle object, but must be defined to avoid
// compile errors.
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation) override;
virtual nsresult SetCSSDeclaration(mozilla::DeclarationBlock*) override;
virtual nsIDocument* DocToUpdate() override;
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
nsIPrincipal* aSubjectPrincipal) override;
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
static already_AddRefed<nsROCSSPrimitiveValue>
MatrixToCSSValue(const mozilla::gfx::Matrix4x4& aMatrix);
static void RegisterPrefChangeCallbacks();
static void UnregisterPrefChangeCallbacks();
// nsIMutationObserver
--- a/layout/style/nsDOMCSSAttrDeclaration.h
+++ b/layout/style/nsDOMCSSAttrDeclaration.h
@@ -30,17 +30,17 @@ public:
nsICSSDeclaration)
// If GetCSSDeclaration returns non-null, then the decl it returns
// is owned by our current style rule.
virtual mozilla::DeclarationBlock* GetCSSDeclaration(Operation aOperation) override;
virtual void GetCSSParsingEnvironment(CSSParsingEnvironment& aCSSParseEnv,
nsIPrincipal* aSubjectPrincipal) override;
nsDOMCSSDeclaration::ServoCSSParsingEnvironment
- GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final;
+ GetServoCSSParsingEnvironment(nsIPrincipal* aSubjectPrincipal) const final override;
NS_IMETHOD GetParentRule(nsIDOMCSSRule **aParent) override;
virtual nsINode* GetParentObject() override;
virtual DocGroup* GetDocGroup() const override;
NS_IMETHOD SetPropertyValue(const nsCSSPropertyID aPropID,
const nsAString& aValue,
nsIPrincipal* aSubjectPrincipal) override;
--- a/layout/style/nsMediaList.h
+++ b/layout/style/nsMediaList.h
@@ -247,48 +247,48 @@ private:
nsTArray<nsMediaExpression> mExpressions;
};
class nsMediaList final : public mozilla::dom::MediaList
{
public:
nsMediaList();
- void GetText(nsAString& aMediaText) final;
- void SetText(const nsAString& aMediaText) final;
+ void GetText(nsAString& aMediaText) final override;
+ void SetText(const nsAString& aMediaText) final override;
- bool Matches(nsPresContext* aPresContext) const final {
+ bool Matches(nsPresContext* aPresContext) const final override {
return Matches(aPresContext, nullptr);
}
// Does this query apply to the presentation?
// If |aKey| is non-null, add cache information to it.
bool Matches(nsPresContext* aPresContext,
nsMediaQueryResultCacheKey* aKey) const;
#ifdef DEBUG
- bool IsServo() const final { return false; }
+ bool IsServo() const final override { return false; }
#endif
void AppendQuery(nsAutoPtr<nsMediaQuery>& aQuery) {
// Takes ownership of aQuery
mArray.AppendElement(aQuery.forget());
}
- already_AddRefed<mozilla::dom::MediaList> Clone() final;
+ already_AddRefed<mozilla::dom::MediaList> Clone() final override;
nsMediaQuery* MediumAt(int32_t aIndex) { return mArray[aIndex]; }
void Clear() { mArray.Clear(); }
// WebIDL
- uint32_t Length() final { return mArray.Length(); }
+ uint32_t Length() final override { return mArray.Length(); }
void IndexedGetter(uint32_t aIndex, bool& aFound,
- nsAString& aReturn) final;
+ nsAString& aReturn) final override;
protected:
~nsMediaList();
- nsresult Delete(const nsAString & aOldMedium) final;
- nsresult Append(const nsAString & aOldMedium) final;
+ nsresult Delete(const nsAString & aOldMedium) final override;
+ nsresult Append(const nsAString & aOldMedium) final override;
InfallibleTArray<nsAutoPtr<nsMediaQuery> > mArray;
};
#endif /* !defined(nsMediaList_h_) */
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2100,17 +2100,17 @@ public:
: mozilla::Runnable("StyleImageRequestCleanupTask")
, mModeFlags(aModeFlags)
, mRequestProxy(aRequestProxy)
, mImageValue(aImageValue)
, mImageTracker(aImageTracker)
{
}
- NS_IMETHOD Run() final
+ NS_IMETHOD Run() final override
{
MOZ_ASSERT(!mRequestProxy || NS_IsMainThread(),
"If mRequestProxy is non-null, we need to run on main thread!");
if (!mRequestProxy) {
return NS_OK;
}
@@ -2283,17 +2283,17 @@ const mozilla::Maybe<nsSize>&
CachedBorderImageData::GetCachedSVGViewportSize()
{
return mCachedSVGViewportSize;
}
struct PurgeCachedImagesTask : mozilla::Runnable
{
PurgeCachedImagesTask() : mozilla::Runnable("PurgeCachedImagesTask") {}
- NS_IMETHOD Run() final
+ NS_IMETHOD Run() final override
{
mSubImages.Clear();
return NS_OK;
}
nsCOMArray<imgIContainer> mSubImages;
};
--- a/layout/xul/nsBox.h
+++ b/layout/xul/nsBox.h
@@ -38,17 +38,17 @@ public:
virtual nsresult GetXULMargin(nsMargin& aMargin) override;
virtual Valignment GetXULVAlign() const override { return vAlign_Top; }
virtual Halignment GetXULHAlign() const override { return hAlign_Left; }
virtual nsresult XULRelayoutChildAtOrdinal(nsIFrame* aChild) override;
#ifdef DEBUG_LAYOUT
- NS_IMETHOD GetDebugBoxAt(const nsPoint& aPoint, nsIFrame** aBox);
+ NS_IMETHOD GetDebugBoxAt(const nsPoint& aPoint, nsIFrame** aBox) override;
virtual nsresult GetXULDebug(bool& aDebug) override;
virtual nsresult SetXULDebug(nsBoxLayoutState& aState, bool aDebug) override;
virtual nsresult XULDumpBox(FILE* out) override;
void PropagateDebug(nsBoxLayoutState& aState);
#endif
nsBox(ClassID aID);
--- a/layout/xul/nsGroupBoxFrame.cpp
+++ b/layout/xul/nsGroupBoxFrame.cpp
@@ -60,17 +60,17 @@ public:
class nsGroupBoxInnerFrame : public nsBoxFrame {
public:
nsGroupBoxInnerFrame(nsIPresShell* aShell, nsStyleContext* aContext):
nsBoxFrame(aShell, aContext) {}
#ifdef DEBUG_FRAME_DUMP
- NS_IMETHOD GetFrameName(nsString& aResult) const {
+ NS_IMETHOD GetFrameName(nsString& aResult) const override {
return MakeFrameName("GroupBoxFrameInner", aResult);
}
#endif
// we are always flexible
virtual bool GetDefaultFlex(int32_t& aFlex) { aFlex = 1; return true; }
};
--- a/media/mtransport/runnable_utils.h
+++ b/media/mtransport/runnable_utils.h
@@ -50,17 +50,17 @@ RunOnThreadInternal(nsIEventTarget *thre
return runnable_ref->Run();
}
template<RunnableResult result>
class runnable_args_base : public Runnable {
public:
runnable_args_base() : Runnable("media-runnable_args_base") {}
- NS_IMETHOD Run() = 0;
+ NS_IMETHOD Run() override = 0;
};
template<typename R>
struct RunnableFunctionCallHelper
{
template<typename FunType, typename... Args, size_t... Indices>
static R apply(FunType func, Tuple<Args...>& args, IndexSequence<Indices...>)
@@ -112,17 +112,17 @@ class runnable_args_func : public detail
{
public:
// |explicit| to pacify static analysis when there are no |args|.
template<typename... Arguments>
explicit runnable_args_func(FunType f, Arguments&&... args)
: mFunc(f), mArgs(Forward<Arguments>(args)...)
{}
- NS_IMETHOD Run() {
+ NS_IMETHOD Run() override {
detail::RunnableFunctionCallHelper<void>::apply(mFunc, mArgs, typename IndexSequenceFor<Args...>::Type());
return NS_OK;
}
private:
FunType mFunc;
Tuple<Args...> mArgs;
};
@@ -138,17 +138,17 @@ template<typename Ret, typename FunType,
class runnable_args_func_ret : public detail::runnable_args_base<detail::ReturnsResult>
{
public:
template<typename... Arguments>
runnable_args_func_ret(Ret* ret, FunType f, Arguments&&... args)
: mReturn(ret), mFunc(f), mArgs(Forward<Arguments>(args)...)
{}
- NS_IMETHOD Run() {
+ NS_IMETHOD Run() override {
*mReturn = detail::RunnableFunctionCallHelper<Ret>::apply(mFunc, mArgs, typename IndexSequenceFor<Args...>::Type());
return NS_OK;
}
private:
Ret* mReturn;
FunType mFunc;
Tuple<Args...> mArgs;
@@ -165,17 +165,17 @@ template<typename Class, typename M, typ
class runnable_args_memfn : public detail::runnable_args_base<detail::NoResult>
{
public:
template<typename... Arguments>
runnable_args_memfn(Class obj, M method, Arguments&&... args)
: mObj(obj), mMethod(method), mArgs(Forward<Arguments>(args)...)
{}
- NS_IMETHOD Run() {
+ NS_IMETHOD Run() override {
detail::RunnableMethodCallHelper<void>::apply(mObj, mMethod, mArgs, typename IndexSequenceFor<Args...>::Type());
return NS_OK;
}
private:
Class mObj;
M mMethod;
Tuple<Args...> mArgs;
@@ -192,17 +192,17 @@ template<typename Ret, typename Class, t
class runnable_args_memfn_ret : public detail::runnable_args_base<detail::ReturnsResult>
{
public:
template<typename... Arguments>
runnable_args_memfn_ret(Ret* ret, Class obj, M method, Arguments... args)
: mReturn(ret), mObj(obj), mMethod(method), mArgs(Forward<Arguments>(args)...)
{}
- NS_IMETHOD Run() {
+ NS_IMETHOD Run() override {
*mReturn = detail::RunnableMethodCallHelper<Ret>::apply(mObj, mMethod, mArgs, typename IndexSequenceFor<Args...>::Type());
return NS_OK;
}
private:
Ret* mReturn;
Class mObj;
M mMethod;
@@ -240,17 +240,17 @@ RUN_ON_THREAD(nsIEventTarget *thread, de
#define ASSERT_ON_THREAD(t)
#endif
template <class T>
class DispatchedRelease : public detail::runnable_args_base<detail::NoResult> {
public:
explicit DispatchedRelease(already_AddRefed<T>& ref) : ref_(ref) {}
- NS_IMETHOD Run() {
+ NS_IMETHOD Run() override {
ref_ = nullptr;
return NS_OK;
}
private:
RefPtr<T> ref_;
};
template <typename T>
--- a/media/mtransport/sigslot.h
+++ b/media/mtransport/sigslot.h
@@ -489,34 +489,34 @@ namespace sigslot {
while(it != itEnd)
{
(*it)->slot_duplicate(&hs, this);
m_senders.insert(*it);
++it;
}
}
- void signal_connect(_signal_base_interface* sender)
+ void signal_connect(_signal_base_interface* sender) override
{
lock_block<mt_policy> lock(this);
m_senders.insert(sender);
}
- void signal_disconnect(_signal_base_interface* sender)
+ void signal_disconnect(_signal_base_interface* sender) override
{
lock_block<mt_policy> lock(this);
m_senders.erase(sender);
}
virtual ~has_slots()
{
disconnect_all();
}
- void disconnect_all()
+ void disconnect_all() override
{
lock_block<mt_policy> lock(this);
const_iterator it = m_senders.begin();
const_iterator itEnd = m_senders.end();
while(it != itEnd)
{
(*it)->slot_disconnect(this);
@@ -689,17 +689,17 @@ namespace sigslot {
{
(*it)->getdest()->signal_connect(this);
m_connected_slots.push_back((*it)->clone());
++it;
}
}
- void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget)
+ void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
if((*it)->getdest() == oldtarget)
@@ -774,17 +774,17 @@ namespace sigslot {
pclass->signal_disconnect(this);
return;
}
++it;
}
}
- void slot_disconnect(has_slots_interface* pslot)
+ void slot_disconnect(has_slots_interface* pslot) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
typename connections_list::iterator itNext = it;
@@ -828,17 +828,17 @@ namespace sigslot {
{
(*it)->getdest()->signal_connect(this);
m_connected_slots.push_back((*it)->clone());
++it;
}
}
- void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget)
+ void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
if((*it)->getdest() == oldtarget)
@@ -913,17 +913,17 @@ namespace sigslot {
pclass->signal_disconnect(this);
return;
}
++it;
}
}
- void slot_disconnect(has_slots_interface* pslot)
+ void slot_disconnect(has_slots_interface* pslot) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
typename connections_list::iterator itNext = it;
@@ -966,17 +966,17 @@ namespace sigslot {
{
(*it)->getdest()->signal_connect(this);
m_connected_slots.push_back((*it)->clone());
++it;
}
}
- void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget)
+ void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
if((*it)->getdest() == oldtarget)
@@ -1051,17 +1051,17 @@ namespace sigslot {
pclass->signal_disconnect(this);
return;
}
++it;
}
}
- void slot_disconnect(has_slots_interface* pslot)
+ void slot_disconnect(has_slots_interface* pslot) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
typename connections_list::iterator itNext = it;
@@ -1104,17 +1104,17 @@ namespace sigslot {
{
(*it)->getdest()->signal_connect(this);
m_connected_slots.push_back((*it)->clone());
++it;
}
}
- void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget)
+ void slot_duplicate(const has_slots_interface* oldtarget, has_slots_interface* newtarget) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
if((*it)->getdest() == oldtarget)
@@ -1189,17 +1189,17 @@ namespace sigslot {
pclass->signal_disconnect(this);
return;
}
++it;
}
}
- void slot_disconnect(has_slots_interface* pslot)
+ void slot_disconnect(has_slots_interface* pslot) override
{
lock_block<mt_policy> lock(this);
typename connections_list::iterator it = m_connected_slots.begin();
typename connections_list::iterator itEnd = m_connected_slots.end();
while(it != itEnd)
{
typename connections_list::iterator itNext = it;
@@ -1841,32 +1841,32 @@ namespace sigslot {
m_pobject = pobject;
m_pmemfun = pmemfun;
}
virtual ~_connection1()
{
}
- virtual _connection_base1<arg1_type, mt_policy>* clone()
+ virtual _connection_base1<arg1_type, mt_policy>* clone() override
{
return new _connection1<dest_type, arg1_type, mt_policy>(*this);
}
- virtual _connection_base1<arg1_type, mt_policy>* duplicate(has_slots_interface* pnewdest)
+ virtual _connection_base1<arg1_type, mt_policy>* duplicate(has_slots_interface* pnewdest) override
{
return new _connection1<dest_type, arg1_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
}
- virtual void emit(arg1_type a1)
+ virtual void emit(arg1_type a1) override
{
(m_pobject->*m_pmemfun)(a1);
}
- virtual has_slots_interface* getdest() const
+ virtual has_slots_interface* getdest() const override
{
return m_pobject;
}
private:
dest_type* m_pobject;
void (dest_type::* m_pmemfun)(arg1_type);
};
@@ -1887,32 +1887,32 @@ namespace sigslot {
m_pobject = pobject;
m_pmemfun = pmemfun;
}
virtual ~_connection2()
{
}
- virtual _connection_base2<arg1_type, arg2_type, mt_policy>* clone()
+ virtual _connection_base2<arg1_type, arg2_type, mt_policy>* clone() override
{
return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>(*this);
}
- virtual _connection_base2<arg1_type, arg2_type, mt_policy>* duplicate(has_slots_interface* pnewdest)
+ virtual _connection_base2<arg1_type, arg2_type, mt_policy>* duplicate(has_slots_interface* pnewdest) override
{
return new _connection2<dest_type, arg1_type, arg2_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
}
- virtual void emit(arg1_type a1, arg2_type a2)
+ virtual void emit(arg1_type a1, arg2_type a2) override
{
(m_pobject->*m_pmemfun)(a1, a2);
}
- virtual has_slots_interface* getdest() const
+ virtual has_slots_interface* getdest() const override
{
return m_pobject;
}
private:
dest_type* m_pobject;
void (dest_type::* m_pmemfun)(arg1_type, arg2_type);
};
@@ -1933,32 +1933,32 @@ namespace sigslot {
m_pobject = pobject;
m_pmemfun = pmemfun;
}
virtual ~_connection3()
{
}
- virtual _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>* clone()
+ virtual _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>* clone() override
{
return new _connection3<dest_type, arg1_type, arg2_type, arg3_type, mt_policy>(*this);
}
- virtual _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>* duplicate(has_slots_interface* pnewdest)
+ virtual _connection_base3<arg1_type, arg2_type, arg3_type, mt_policy>* duplicate(has_slots_interface* pnewdest) override
{
return new _connection3<dest_type, arg1_type, arg2_type, arg3_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
}
- virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3)
+ virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3) override
{
(m_pobject->*m_pmemfun)(a1, a2, a3);
}
- virtual has_slots_interface* getdest() const
+ virtual has_slots_interface* getdest() const override
{
return m_pobject;
}
private:
dest_type* m_pobject;
void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type);
};
@@ -1981,33 +1981,33 @@ namespace sigslot {
m_pobject = pobject;
m_pmemfun = pmemfun;
}
virtual ~_connection4()
{
}
- virtual _connection_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>* clone()
+ virtual _connection_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>* clone() override
{
return new _connection4<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>(*this);
}
- virtual _connection_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>* duplicate(has_slots_interface* pnewdest)
+ virtual _connection_base4<arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>* duplicate(has_slots_interface* pnewdest) override
{
return new _connection4<dest_type, arg1_type, arg2_type, arg3_type, arg4_type, mt_policy>((dest_type *)pnewdest, m_pmemfun);
}
virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3,
- arg4_type a4)
+ arg4_type a4) override
{
(m_pobject->*m_pmemfun)(a1, a2, a3, a4);
}
- virtual has_slots_interface* getdest() const
+ virtual has_slots_interface* getdest() const override
{
return m_pobject;
}
private:
dest_type* m_pobject;
void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type,
arg4_type);
--- a/media/mtransport/test/buffered_stun_socket_unittest.cpp
+++ b/media/mtransport/test/buffered_stun_socket_unittest.cpp
@@ -45,17 +45,17 @@ class BufferedStunSocketTest : public Mt
: MtransportTest(),
dummy_(nullptr),
test_socket_(nullptr) { }
~BufferedStunSocketTest() {
nr_socket_destroy(&test_socket_);
}
- void SetUp() {
+ void SetUp() override {
MtransportTest::SetUp();
RefPtr<DummySocket> dummy(new DummySocket());
int r = nr_socket_buffered_stun_create(
dummy->get_nr_socket(),
kStunMessageLen,
TURN_TCP_FRAMING,
--- a/media/mtransport/test/dummysocket.h
+++ b/media/mtransport/test/dummysocket.h
@@ -53,69 +53,68 @@ class DummySocket : public NrSocketBase
write_buffer_(nullptr),
readable_(UINT_MAX),
read_buffer_(nullptr),
cb_(nullptr),
cb_arg_(nullptr),
self_(nullptr) {}
// the nr_socket APIs
- virtual int create(nr_transport_addr *addr) {
+ virtual int create(nr_transport_addr *addr) override {
return 0;
}
virtual int sendto(const void *msg, size_t len,
- int flags, nr_transport_addr *to) {
+ int flags, nr_transport_addr *to) override {
MOZ_CRASH();
return 0;
}
virtual int recvfrom(void * buf, size_t maxlen,
size_t *len, int flags,
- nr_transport_addr *from) {
+ nr_transport_addr *from) override {
MOZ_CRASH();
return 0;
}
- virtual int getaddr(nr_transport_addr *addrp) {
+ virtual int getaddr(nr_transport_addr *addrp) override {
MOZ_CRASH();
return 0;
}
- virtual void close() {
+ virtual void close() override {
}
- virtual int connect(nr_transport_addr *addr) {
+ virtual int connect(nr_transport_addr *addr) override {
nr_transport_addr_copy(&connect_addr_, addr);
return 0;
}
- virtual int listen(int backlog) {
+ virtual int listen(int backlog) override {
return 0;
}
- virtual int accept(nr_transport_addr *addrp, nr_socket **sockp) {
+ virtual int accept(nr_transport_addr *addrp, nr_socket **sockp) override {
return 0;
}
-
- virtual int write(const void *msg, size_t len, size_t *written) {
+ virtual int write(const void *msg, size_t len, size_t *written) override {
size_t to_write = std::min(len, writable_);
if (to_write) {
UniquePtr<DataBuffer> msgbuf(new DataBuffer(static_cast<const uint8_t *>(msg), to_write));
write_buffer_ = merge(Move(write_buffer_), Move(msgbuf));
}
*written = to_write;
return 0;
}
- virtual int read(void* buf, size_t maxlen, size_t *len) {
+ virtual int read(void* buf, size_t maxlen, size_t *len) override {
if (!read_buffer_.get()) {
return R_WOULDBLOCK;
}
size_t to_read = std::min(read_buffer_->len(),
std::min(maxlen, readable_));
memcpy(buf, read_buffer_->data(), to_read);
@@ -130,32 +129,31 @@ class DummySocket : public NrSocketBase
return 0;
}
// Implementations of the async_event APIs.
// These are no-ops because we handle scheduling manually
// for test purposes.
virtual int async_wait(int how, NR_async_cb cb, void *cb_arg,
- char *function, int line) {
+ char *function, int line) override {
EXPECT_EQ(nullptr, cb_);
cb_ = cb;
cb_arg_ = cb_arg;
return 0;
}
- virtual int cancel(int how) {
+ virtual int cancel(int how) override {
cb_ = nullptr;
cb_arg_ = nullptr;
return 0;
}
-
// Read/Manipulate the current state.
void CheckWriteBuffer(const uint8_t *data, size_t len) {
if (!len) {
EXPECT_EQ(nullptr, write_buffer_.get());
} else {
EXPECT_NE(nullptr, write_buffer_.get());
ASSERT_EQ(len, write_buffer_->len());
ASSERT_EQ(0, memcmp(data, write_buffer_->data(), len));
@@ -203,17 +201,17 @@ class DummySocket : public NrSocketBase
return self_;
}
nr_transport_addr *get_connect_addr() {
return &connect_addr_;
}
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DummySocket);
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(DummySocket, override);
private:
~DummySocket() {}
DISALLOW_COPY_ASSIGN(DummySocket);
size_t writable_; // Amount we allow someone to write.
UniquePtr<DataBuffer> write_buffer_;
@@ -225,9 +223,8 @@ class DummySocket : public NrSocketBase
nr_socket *self_;
nr_transport_addr connect_addr_;
};
} //namespace mozilla
#endif
-
--- a/media/mtransport/test/gtest_ringbuffer_dumper.h
+++ b/media/mtransport/test/gtest_ringbuffer_dumper.h
@@ -44,40 +44,37 @@ class RingbufferDumper : public ::testin
// Get an unlimited number of log lines, with no filter
RLogConnector::GetInstance()->GetAny(0, &logs);
for (auto l = logs.begin(); l != logs.end(); ++l) {
std::cout << *l << std::endl;
}
ClearRingBuffer_s();
}
- virtual void OnTestStart(const ::testing::TestInfo& testInfo) {
+ virtual void OnTestStart(const ::testing::TestInfo& testInfo) override {
mozilla::SyncRunnable::DispatchToThread(
test_utils_->sts_target(),
WrapRunnable(this, &RingbufferDumper::ClearRingBuffer_s));
}
- virtual void OnTestEnd(const ::testing::TestInfo& testInfo) {
+ virtual void OnTestEnd(const ::testing::TestInfo& testInfo) override {
mozilla::SyncRunnable::DispatchToThread(
test_utils_->sts_target(),
WrapRunnable(this, &RingbufferDumper::DestroyRingBuffer_s));
}
// Called after a failed assertion or a SUCCEED() invocation.
- virtual void OnTestPartResult(const ::testing::TestPartResult& testResult) {
+ virtual void OnTestPartResult(const ::testing::TestPartResult& testResult) override {
if (testResult.failed()) {
// Dump (and empty) the RLogConnector
mozilla::SyncRunnable::DispatchToThread(
test_utils_->sts_target(),
WrapRunnable(this, &RingbufferDumper::DumpRingBuffer_s));
}
}
private:
MtransportTestUtils *test_utils_;
};
} // namespace test
#endif // gtest_ringbuffer_dumper_h__
-
-
-
--- a/media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
+++ b/media/webrtc/signaling/src/common/browser_logging/WebRtcLog.cpp
@@ -32,17 +32,17 @@ NS_NAMED_LITERAL_CSTRING(default_log_nam
#endif
static mozilla::LazyLogModule sWebRtcLog("webrtc_trace");
static mozilla::LazyLogModule sLogAEC("AEC");
class WebRtcTraceCallback: public webrtc::TraceCallback
{
public:
- void Print(webrtc::TraceLevel level, const char* message, int length)
+ void Print(webrtc::TraceLevel level, const char* message, int length) override
{
MOZ_LOG(sWebRtcLog, LogLevel::Debug, ("%s", message));
}
};
class LogSinkImpl : public rtc::LogSink
{
public:
--- a/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
+++ b/media/webrtc/signaling/src/media-conduit/WebrtcGmpVideoCodec.h
@@ -451,17 +451,17 @@ private:
public:
explicit InitDoneCallback(const RefPtr<WebrtcGmpVideoDecoder>& aDecoder,
const RefPtr<GmpInitDoneRunnable>& aInitDone)
: mDecoder(aDecoder),
mInitDone(aInitDone)
{
}
- virtual void Done(GMPVideoDecoderProxy* aGMP, GMPVideoHost* aHost)
+ virtual void Done(GMPVideoDecoderProxy* aGMP, GMPVideoHost* aHost) override
{
std::string errorOut;
int32_t result = mDecoder->GmpInitDone(aGMP, aHost, &errorOut);
mInitDone->Dispatch(result, errorOut);
}
private:
--- a/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
+++ b/media/webrtc/signaling/src/mediapipeline/MediaPipeline.h
@@ -190,18 +190,18 @@ public:
, mStsThread(aPipeline->mStsThread)
{
}
void Attach(MediaPipeline* pipeline) { mPipeline = pipeline; }
void Detach() { mPipeline = nullptr; }
MediaPipeline* Pipeline() const { return mPipeline; }
- virtual nsresult SendRtpPacket(const uint8_t* aData, size_t aLen);
- virtual nsresult SendRtcpPacket(const uint8_t* aData, size_t aLen);
+ virtual nsresult SendRtpPacket(const uint8_t* aData, size_t aLen) override;
+ virtual nsresult SendRtcpPacket(const uint8_t* aData, size_t aLen) override;
private:
nsresult SendRtpRtcpPacket_s(nsAutoPtr<DataBuffer> aData, bool aIsRtp);
// Creates a cycle, which we break with Detach
RefPtr<MediaPipeline> mPipeline;
const nsCOMPtr<nsIEventTarget> mStsThread;
};
--- a/media/webrtc/signaling/src/sdp/SdpAttribute.h
+++ b/media/webrtc/signaling/src/sdp/SdpAttribute.h
@@ -1752,17 +1752,17 @@ public:
explicit SdpMultiStringAttribute(AttributeType type) : SdpAttribute(type) {}
void
PushEntry(const std::string& entry)
{
mValues.push_back(entry);
}
- virtual void Serialize(std::ostream& os) const;
+ virtual void Serialize(std::ostream& os) const override;
std::vector<std::string> mValues;
};
// otherwise identical to SdpMultiStringAttribute, this is used for
// ice-options and other places where the value is serialized onto
// a single line with space separating tokens
class SdpOptionsAttribute : public SdpAttribute
@@ -1773,17 +1773,17 @@ public:
void
PushEntry(const std::string& entry)
{
mValues.push_back(entry);
}
void Load(const std::string& value);
- virtual void Serialize(std::ostream& os) const;
+ virtual void Serialize(std::ostream& os) const override;
std::vector<std::string> mValues;
};
// Used for attributes that take no value (eg; a=ice-lite)
class SdpFlagAttribute : public SdpAttribute
{
public:
--- a/media/webrtc/trunk/webrtc/modules/desktop_capture/mock_desktop_capturer_callback.h
+++ b/media/webrtc/trunk/webrtc/modules/desktop_capture/mock_desktop_capturer_callback.h
@@ -22,17 +22,17 @@ class MockDesktopCapturerCallback : publ
public:
MockDesktopCapturerCallback();
~MockDesktopCapturerCallback() override;
MOCK_METHOD2(OnCaptureResultPtr,
void(DesktopCapturer::Result result,
std::unique_ptr<DesktopFrame>* frame));
void OnCaptureResult(DesktopCapturer::Result result,
- std::unique_ptr<DesktopFrame> frame) final;
+ std::unique_ptr<DesktopFrame> frame) final override;
private:
RTC_DISALLOW_COPY_AND_ASSIGN(MockDesktopCapturerCallback);
};
} // namespace webrtc
#endif // WEBRTC_MODULES_DESKTOP_CAPTURE_MOCK_DESKTOP_CAPTURER_CALLBACK_H_
--- a/memory/replace/dmd/test/SmokeDMD.cpp
+++ b/memory/replace/dmd/test/SmokeDMD.cpp
@@ -38,17 +38,17 @@ public:
fprintf(stderr, "SmokeDMD: can't create %s file: %s\n",
aFilename, strerror(errno));
exit(1);
}
}
~FpWriteFunc() { fclose(mFp); }
- void Write(const char* aStr) { fputs(aStr, mFp); }
+ void Write(const char* aStr) override { fputs(aStr, mFp); }
private:
FILE* mFp;
};
// This stops otherwise-unused variables from being optimized away.
static void
UseItOrLoseIt(void* aPtr, int aSeven)
--- a/mfbt/tests/TestJSONWriter.cpp
+++ b/mfbt/tests/TestJSONWriter.cpp
@@ -18,17 +18,17 @@ using mozilla::MakeUnique;
struct StringWriteFunc : public JSONWriteFunc
{
const static size_t kLen = 100000;
char mBuf[kLen];
char* mPtr;
StringWriteFunc() : mPtr(mBuf) {}
- void Write(const char* aStr)
+ void Write(const char* aStr) override
{
char* last = mPtr + strlen(aStr); // where the nul will be added
// If you change this test and this assertion fails, just make kLen bigger.
MOZ_RELEASE_ASSERT(last < mBuf + kLen);
sprintf(mPtr, "%s", aStr);
mPtr = last;
}
--- a/netwerk/base/PrivateBrowsingChannel.h
+++ b/netwerk/base/PrivateBrowsingChannel.h
@@ -24,41 +24,41 @@ class PrivateBrowsingChannel : public ns
{
public:
PrivateBrowsingChannel() :
mPrivateBrowsingOverriden(false),
mPrivateBrowsing(false)
{
}
- NS_IMETHOD SetPrivate(bool aPrivate)
+ NS_IMETHOD SetPrivate(bool aPrivate) override
{
// Make sure that we don't have a load context
// This is a fatal error in debug builds, and a runtime error in release
// builds.
nsCOMPtr<nsILoadContext> loadContext;
NS_QueryNotificationCallbacks(static_cast<Channel*>(this), loadContext);
MOZ_ASSERT(!loadContext);
if (loadContext) {
return NS_ERROR_FAILURE;
}
mPrivateBrowsingOverriden = true;
mPrivateBrowsing = aPrivate;
return NS_OK;
}
- NS_IMETHOD GetIsChannelPrivate(bool *aResult)
+ NS_IMETHOD GetIsChannelPrivate(bool *aResult) override
{
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mPrivateBrowsing;
return NS_OK;
}
- NS_IMETHOD IsPrivateModeOverriden(bool* aValue, bool *aResult)
+ NS_IMETHOD IsPrivateModeOverriden(bool* aValue, bool *aResult) override
{
NS_ENSURE_ARG_POINTER(aValue);
NS_ENSURE_ARG_POINTER(aResult);
*aResult = mPrivateBrowsingOverriden;
if (mPrivateBrowsingOverriden) {
*aValue = mPrivateBrowsing;
}
return NS_OK;
--- a/netwerk/base/nsPACMan.h
+++ b/netwerk/base/nsPACMan.h
@@ -68,17 +68,17 @@ public:
void Complete(nsresult status, const nsCString &pacString);
void UseAlternatePACFile(const nsCString &pacURL);
nsCString mSpec;
nsCString mScheme;
nsCString mHost;
int32_t mPort;
- NS_IMETHOD Run(void); /* Runnable */
+ NS_IMETHOD Run(void) override; /* Runnable */
private:
nsPACMan *mPACMan; // weak reference
private:
RefPtr<nsPACManCallback> mCallback;
bool mOnMainThreadOnly;
};
--- a/netwerk/base/nsSecCheckWrapChannel.h
+++ b/netwerk/base/nsSecCheckWrapChannel.h
@@ -79,21 +79,21 @@ protected:
/* We define a separate class here to make it clear that we're overriding
* Get/SetLoadInfo as well as AsyncOpen2() and Open2(), rather that using
* the forwarded implementations provided by NS_FORWARD_NSICHANNEL"
*/
class nsSecCheckWrapChannel : public nsSecCheckWrapChannelBase
{
public:
- NS_IMETHOD GetLoadInfo(nsILoadInfo **aLoadInfo);
- NS_IMETHOD SetLoadInfo(nsILoadInfo *aLoadInfo);
+ NS_IMETHOD GetLoadInfo(nsILoadInfo **aLoadInfo) override;
+ NS_IMETHOD SetLoadInfo(nsILoadInfo *aLoadInfo) override;
- NS_IMETHOD AsyncOpen2(nsIStreamListener *aListener);
- NS_IMETHOD Open2(nsIInputStream** aStream);
+ NS_IMETHOD AsyncOpen2(nsIStreamListener *aListener) override;
+ NS_IMETHOD Open2(nsIInputStream** aStream) override;
nsSecCheckWrapChannel(nsIChannel* aChannel, nsILoadInfo* aLoadInfo);
static already_AddRefed<nsIChannel> MaybeWrap(nsIChannel* aChannel,
nsILoadInfo* aLoadInfo);
protected:
virtual ~nsSecCheckWrapChannel();
--- a/netwerk/base/nsURLParsers.h
+++ b/netwerk/base/nsURLParsers.h
@@ -113,12 +113,12 @@ public:
class nsStdURLParser : public nsAuthURLParser
{
virtual ~nsStdURLParser() {}
public:
void ParseAfterScheme(const char *spec, int32_t specLen,
uint32_t *authPos, int32_t *authLen,
- uint32_t *pathPos, int32_t *pathLen);
+ uint32_t *pathPos, int32_t *pathLen) override;
};
#endif // nsURLParsers_h__
--- a/netwerk/cache/nsCacheService.cpp
+++ b/netwerk/cache/nsCacheService.cpp
@@ -233,17 +233,17 @@ class nsSetSmartSizeEvent: public Runnab
{
public:
explicit nsSetSmartSizeEvent(int32_t smartSize)
: mozilla::Runnable("nsSetSmartSizeEvent")
, mSmartSize(smartSize)
{
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
NS_ASSERTION(NS_IsMainThread(),
"Setting smart size data off the main thread");
// Main thread may have already called nsCacheService::Shutdown
if (!nsCacheService::IsInitialized())
return NS_ERROR_NOT_AVAILABLE;
--- a/netwerk/cache/nsCacheUtils.h
+++ b/netwerk/cache/nsCacheUtils.h
@@ -16,17 +16,17 @@ class nsIThread;
/**
* A class with utility methods for shutting down nsIThreads easily.
*/
class nsShutdownThread : public mozilla::Runnable {
public:
explicit nsShutdownThread(nsIThread *aThread);
~nsShutdownThread();
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
/**
* Shutdown ensures that aThread->Shutdown() is called on a main thread
*/
static nsresult Shutdown(nsIThread *aThread);
/**
* BlockingShutdown ensures that by the time it returns, aThread->Shutdown() has
--- a/netwerk/cache/nsDiskCacheDevice.cpp
+++ b/netwerk/cache/nsDiskCacheDevice.cpp
@@ -117,17 +117,17 @@ public:
: mCacheMap(cacheMap)
, mBindery(cacheBindery)
, mTargetSize(targetSize)
, mClientID(clientID)
{
mClientIDSize = clientID ? strlen(clientID) : 0;
}
- virtual int32_t VisitRecord(nsDiskCacheRecord * mapRecord);
+ virtual int32_t VisitRecord(nsDiskCacheRecord * mapRecord) override;
private:
nsDiskCacheMap * mCacheMap;
nsDiskCacheBindery * mBindery;
uint32_t mTargetSize;
const char * mClientID;
uint32_t mClientIDSize;
};
@@ -862,17 +862,17 @@ class EntryInfoVisitor : public nsDiskCa
{
public:
EntryInfoVisitor(nsDiskCacheMap * cacheMap,
nsICacheVisitor * visitor)
: mCacheMap(cacheMap)
, mVisitor(visitor)
{}
- virtual int32_t VisitRecord(nsDiskCacheRecord * mapRecord)
+ virtual int32_t VisitRecord(nsDiskCacheRecord * mapRecord) override
{
// XXX optimization: do we have this record in memory?
// read in the entry (metadata)
nsDiskCacheEntry * diskEntry = mCacheMap->ReadDiskCacheEntry(mapRecord);
if (!diskEntry) {
return kVisitNextRecord;
}
--- a/netwerk/cache/nsDiskCacheDevice.h
+++ b/netwerk/cache/nsDiskCacheDevice.h
@@ -20,43 +20,43 @@
class nsDiskCacheMap;
class nsDiskCacheDevice final : public nsCacheDevice {
public:
nsDiskCacheDevice();
virtual ~nsDiskCacheDevice();
- virtual nsresult Init();
- virtual nsresult Shutdown();
+ virtual nsresult Init() override;
+ virtual nsresult Shutdown() override;
- virtual const char * GetDeviceID(void);
- virtual nsCacheEntry * FindEntry(nsCString * key, bool *collision);
- virtual nsresult DeactivateEntry(nsCacheEntry * entry);
- virtual nsresult BindEntry(nsCacheEntry * entry);
- virtual void DoomEntry( nsCacheEntry * entry );
+ virtual const char * GetDeviceID(void) override;
+ virtual nsCacheEntry * FindEntry(nsCString * key, bool *collision) override;
+ virtual nsresult DeactivateEntry(nsCacheEntry * entry) override;
+ virtual nsresult BindEntry(nsCacheEntry * entry) override;
+ virtual void DoomEntry( nsCacheEntry * entry ) override;
virtual nsresult OpenInputStreamForEntry(nsCacheEntry * entry,
nsCacheAccessMode mode,
uint32_t offset,
- nsIInputStream ** result);
+ nsIInputStream ** result) override;
virtual nsresult OpenOutputStreamForEntry(nsCacheEntry * entry,
nsCacheAccessMode mode,
uint32_t offset,
- nsIOutputStream ** result);
+ nsIOutputStream ** result) override;
virtual nsresult GetFileForEntry(nsCacheEntry * entry,
- nsIFile ** result);
+ nsIFile ** result) override;
- virtual nsresult OnDataSizeChange(nsCacheEntry * entry, int32_t deltaSize);
+ virtual nsresult OnDataSizeChange(nsCacheEntry * entry, int32_t deltaSize) override;
- virtual nsresult Visit(nsICacheVisitor * visitor);
+ virtual nsresult Visit(nsICacheVisitor * visitor) override;
- virtual nsresult EvictEntries(const char * clientID);
+ virtual nsresult EvictEntries(const char * clientID) override;
bool EntryIsTooBig(int64_t entrySize);
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf);
/**
* Preference accessors
*/
--- a/netwerk/cache/nsMemoryCacheDevice.h
+++ b/netwerk/cache/nsMemoryCacheDevice.h
@@ -18,44 +18,45 @@ class nsMemoryCacheDeviceInfo;
* nsMemoryCacheDevice
******************************************************************************/
class nsMemoryCacheDevice : public nsCacheDevice
{
public:
nsMemoryCacheDevice();
virtual ~nsMemoryCacheDevice();
- virtual nsresult Init();
- virtual nsresult Shutdown();
+ virtual nsresult Init() override;
+ virtual nsresult Shutdown() override;
- virtual const char * GetDeviceID(void);
+ virtual const char * GetDeviceID(void) override;
- virtual nsresult BindEntry( nsCacheEntry * entry );
- virtual nsCacheEntry * FindEntry( nsCString * key, bool *collision );
- virtual void DoomEntry( nsCacheEntry * entry );
- virtual nsresult DeactivateEntry( nsCacheEntry * entry );
+ virtual nsresult BindEntry( nsCacheEntry * entry ) override;
+ virtual nsCacheEntry * FindEntry( nsCString * key, bool *collision ) override;
+ virtual void DoomEntry( nsCacheEntry * entry ) override;
+ virtual nsresult DeactivateEntry( nsCacheEntry * entry ) override;
virtual nsresult OpenInputStreamForEntry(nsCacheEntry * entry,
nsCacheAccessMode mode,
uint32_t offset,
- nsIInputStream ** result);
+ nsIInputStream ** result) override;
virtual nsresult OpenOutputStreamForEntry(nsCacheEntry * entry,
nsCacheAccessMode mode,
uint32_t offset,
- nsIOutputStream ** result);
+ nsIOutputStream ** result) override;
virtual nsresult GetFileForEntry( nsCacheEntry * entry,
- nsIFile ** result );
-
- virtual nsresult OnDataSizeChange( nsCacheEntry * entry, int32_t deltaSize );
+ nsIFile ** result ) override;
- virtual nsresult Visit( nsICacheVisitor * visitor );
+ virtual nsresult OnDataSizeChange( nsCacheEntry * entry,
+ int32_t deltaSize ) override;
- virtual nsresult EvictEntries(const char * clientID);
+ virtual nsresult Visit( nsICacheVisitor * visitor ) override;
+
+ virtual nsresult EvictEntries(const char * clientID) override;
nsresult EvictPrivateEntries();
void SetCapacity(int32_t capacity);
void SetMaxEntrySize(int32_t maxSizeInKilobytes);
bool EntryIsTooBig(int64_t entrySize);
size_t TotalSize();
--- a/netwerk/cache2/CacheIndexContextIterator.h
+++ b/netwerk/cache2/CacheIndexContextIterator.h
@@ -15,17 +15,17 @@ namespace net {
class CacheIndexContextIterator : public CacheIndexIterator
{
public:
CacheIndexContextIterator(CacheIndex *aIndex, bool aAddNew,
nsILoadContextInfo *aInfo);
virtual ~CacheIndexContextIterator();
private:
- virtual void AddRecord(CacheIndexRecord *aRecord);
+ virtual void AddRecord(CacheIndexRecord *aRecord) override;
virtual void AddRecords(const nsTArray<CacheIndexRecord *> &aRecords);
nsCOMPtr<nsILoadContextInfo> mInfo;
};
} // namespace net
} // namespace mozilla
--- a/netwerk/protocol/data/nsDataChannel.h
+++ b/netwerk/protocol/data/nsDataChannel.h
@@ -15,14 +15,15 @@ class nsIInputStream;
class nsDataChannel : public nsBaseChannel
{
public:
explicit nsDataChannel(nsIURI *uri) {
SetURI(uri);
}
protected:
- virtual MOZ_MUST_USE nsresult OpenContentStream(bool async,
- nsIInputStream **result,
- nsIChannel** channel);
+ virtual MOZ_MUST_USE
+ nsresult OpenContentStream(bool async,
+ nsIInputStream **result,
+ nsIChannel** channel) override;
};
#endif /* nsDataChannel_h___ */
--- a/netwerk/protocol/ftp/FTPChannelChild.cpp
+++ b/netwerk/protocol/ftp/FTPChannelChild.cpp
@@ -254,17 +254,18 @@ public:
, mChannelStatus(aChannelStatus)
, mContentLength(aContentLength)
, mContentType(aContentType)
, mLastModified(aLastModified)
, mEntityID(aEntityID)
, mURI(aURI)
{
}
- void Run()
+
+ void Run() override
{
mChild->DoOnStartRequest(mChannelStatus, mContentLength, mContentType,
mLastModified, mEntityID, mURI);
}
private:
nsresult mChannelStatus;
int64_t mContentLength;
@@ -360,17 +361,18 @@ public:
const uint32_t& aCount)
: NeckoTargetChannelEvent<FTPChannelChild>(aChild)
, mChannelStatus(aChannelStatus)
, mData(aData)
, mOffset(aOffset)
, mCount(aCount)
{
}
- void Run()
+
+ void Run() override
{
mChild->DoOnDataAvailable(mChannelStatus, mData, mOffset, mCount);
}
private:
nsresult mChannelStatus;
nsCString mData;
uint64_t mOffset;
@@ -402,17 +404,17 @@ class MaybeDivertOnDataFTPEvent : public
const nsCString& data,
const uint64_t& offset,
const uint32_t& count)
: NeckoTargetChannelEvent<FTPChannelChild>(child)
, mData(data)
, mOffset(offset)
, mCount(count) {}
- void Run()
+ void Run() override
{
mChild->MaybeDivertOnData(mData, mOffset, mCount);
}
private:
nsCString mData;
uint64_t mOffset;
uint32_t mCount;
@@ -487,17 +489,18 @@ public:
const nsCString &aErrorMsg,
bool aUseUTF8)
: NeckoTargetChannelEvent<FTPChannelChild>(aChild)
, mChannelStatus(aChannelStatus)
, mErrorMsg(aErrorMsg)
, mUseUTF8(aUseUTF8)
{
}
- void Run()
+
+ void Run() override
{
mChild->DoOnStopRequest(mChannelStatus, mErrorMsg, mUseUTF8);
}
private:
nsresult mChannelStatus;
nsCString mErrorMsg;
bool mUseUTF8;
@@ -548,17 +551,17 @@ private:
class MaybeDivertOnStopFTPEvent : public NeckoTargetChannelEvent<FTPChannelChild>
{
public:
MaybeDivertOnStopFTPEvent(FTPChannelChild* child,
const nsresult& aChannelStatus)
: NeckoTargetChannelEvent<FTPChannelChild>(child)
, mChannelStatus(aChannelStatus) {}
- void Run()
+ void Run() override
{
mChild->MaybeDivertOnStop(mChannelStatus);
}
private:
nsresult mChannelStatus;
};
@@ -630,17 +633,18 @@ FTPChannelChild::DoOnStopRequest(const n
}
class FTPFailedAsyncOpenEvent : public NeckoTargetChannelEvent<FTPChannelChild>
{
public:
FTPFailedAsyncOpenEvent(FTPChannelChild* aChild, nsresult aStatus)
: NeckoTargetChannelEvent<FTPChannelChild>(aChild)
, mStatus(aStatus) {}
- void Run() { mChild->DoFailedAsyncOpen(mStatus); }
+
+ void Run() override { mChild->DoFailedAsyncOpen(mStatus); }
private:
nsresult mStatus;
};
mozilla::ipc::IPCResult
FTPChannelChild::RecvFailedAsyncOpen(const nsresult& statusCode)
{
@@ -679,17 +683,17 @@ class FTPFlushedForDiversionEvent : publ
{
public:
explicit FTPFlushedForDiversionEvent(FTPChannelChild* aChild)
: NeckoTargetChannelEvent<FTPChannelChild>(aChild)
{
MOZ_RELEASE_ASSERT(aChild);
}
- void Run()
+ void Run() override
{
mChild->FlushedForDiversion();
}
};
mozilla::ipc::IPCResult
FTPChannelChild::RecvFlushedForDiversion()
{
@@ -729,17 +733,17 @@ FTPChannelChild::RecvDivertMessages()
return IPC_OK();
}
class FTPDeleteSelfEvent : public NeckoTargetChannelEvent<FTPChannelChild>
{
public:
explicit FTPDeleteSelfEvent(FTPChannelChild* aChild)
: NeckoTargetChannelEvent<FTPChannelChild>(aChild) {}
- void Run() { mChild->DoDeleteSelf(); }
+ void Run() override { mChild->DoDeleteSelf(); }
};
mozilla::ipc::IPCResult
FTPChannelChild::RecvDeleteSelf()
{
mEventQ->RunOrEnqueue(new FTPDeleteSelfEvent(this));
return IPC_OK();
}
@@ -950,9 +954,8 @@ FTPChannelChild::SetupNeckoTarget()
return;
}
gNeckoChild->SetEventTargetForActor(this, mNeckoTarget);
}
} // namespace net
} // namespace mozilla
-
--- a/netwerk/protocol/ftp/FTPChannelParent.cpp
+++ b/netwerk/protocol/ftp/FTPChannelParent.cpp
@@ -249,17 +249,17 @@ public:
const uint32_t& count)
: mParent(aParent)
, mData(data)
, mOffset(offset)
, mCount(count)
{
}
- void Run()
+ void Run() override
{
mParent->DivertOnDataAvailable(mData, mOffset, mCount);
}
private:
FTPChannelParent* mParent;
nsCString mData;
uint64_t mOffset;
@@ -336,17 +336,18 @@ class FTPDivertStopRequestEvent : public
public:
FTPDivertStopRequestEvent(FTPChannelParent* aParent,
const nsresult& statusCode)
: mParent(aParent)
, mStatusCode(statusCode)
{
}
- void Run() {
+ void Run() override
+ {
mParent->DivertOnStopRequest(mStatusCode);
}
private:
FTPChannelParent* mParent;
nsresult mStatusCode;
};
@@ -394,17 +395,18 @@ FTPChannelParent::DivertOnStopRequest(co
class FTPDivertCompleteEvent : public MainThreadChannelEvent
{
public:
explicit FTPDivertCompleteEvent(FTPChannelParent* aParent)
: mParent(aParent)
{
}
- void Run() {
+ void Run() override
+ {
mParent->DivertComplete();
}
private:
FTPChannelParent* mParent;
};
mozilla::ipc::IPCResult
@@ -916,9 +918,8 @@ FTPChannelParent::SetErrorMsg(const char
mErrorMsg = aMsg;
mUseUTF8 = aUseUTF8;
return NS_OK;
}
//---------------------
} // namespace net
} // namespace mozilla
-
--- a/netwerk/protocol/http/HttpChannelChild.cpp
+++ b/netwerk/protocol/http/HttpChannelChild.cpp
@@ -366,17 +366,17 @@ class AssociateApplicationCacheEvent : p
public:
AssociateApplicationCacheEvent(HttpChannelChild* aChild,
const nsCString &aGroupID,
const nsCString &aClientID)
: NeckoTargetChannelEvent<HttpChannelChild>(aChild)
, groupID(aGroupID)
, clientID(aClientID) {}
- void Run() { mChild->AssociateApplicationCache(groupID, clientID); }
+ void Run() override { mChild->AssociateApplicationCache(groupID, clientID); }
private:
nsCString groupID;
nsCString clientID;
};
mozilla::ipc::IPCResult
HttpChannelChild::RecvAssociateApplicationCache(const nsCString &groupID,
@@ -436,17 +436,17 @@ class StartRequestEvent : public NeckoTa
, mSecurityInfoSerialization(aSecurityInfoSerialization)
, mSelfAddr(aSelfAddr)
, mPeerAddr(aPeerAddr)
, mCacheKey(aCacheKey)
, mAltDataType(altDataType)
, mAltDataLen(altDataLen)
{}
- void Run()
+ void Run() override
{
LOG(("StartRequestEvent [this=%p]\n", mChild));
mChild->OnStartRequest(mChannelStatus, mResponseHead, mUseResponseHead,
mRequestHeaders, mIsFromCache, mCacheEntryAvailable,
mCacheEntryId, mCacheFetchCount,
mCacheExpirationTime, mCachedCharset,
mSecurityInfoSerialization, mSelfAddr, mPeerAddr,
mCacheKey, mAltDataType, mAltDataLen);
@@ -734,23 +734,23 @@ class TransportAndDataEvent : public Cha
const uint32_t& count)
: mChild(child)
, mChannelStatus(channelStatus)
, mTransportStatus(transportStatus)
, mData(data)
, mOffset(offset)
, mCount(count) {}
- void Run()
+ void Run() override
{
mChild->OnTransportAndData(mChannelStatus, mTransportStatus,
mOffset, mCount, mData);
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
MOZ_ASSERT(mChild);
nsCOMPtr<nsIEventTarget> target = mChild->GetODATarget();
return target.forget();
}
private:
HttpChannelChild* mChild;
nsresult mChannelStatus;
@@ -784,17 +784,17 @@ class MaybeDivertOnDataHttpEvent : publi
const nsCString& data,
const uint64_t& offset,
const uint32_t& count)
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mData(data)
, mOffset(offset)
, mCount(count) {}
- void Run()
+ void Run() override
{
mChild->MaybeDivertOnData(mData, mOffset, mCount);
}
private:
nsCString mData;
uint64_t mOffset;
uint32_t mCount;
@@ -981,17 +981,17 @@ class StopRequestEvent : public NeckoTar
const nsresult& channelStatus,
const ResourceTimingStruct& timing,
const nsHttpHeaderArray& aResponseTrailers)
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mChannelStatus(channelStatus)
, mTiming(timing)
, mResponseTrailers(aResponseTrailers) {}
- void Run() { mChild->OnStopRequest(mChannelStatus, mTiming, mResponseTrailers); }
+ void Run() override { mChild->OnStopRequest(mChannelStatus, mTiming, mResponseTrailers); }
private:
nsresult mChannelStatus;
ResourceTimingStruct mTiming;
nsHttpHeaderArray mResponseTrailers;
};
void
@@ -1013,17 +1013,17 @@ class MaybeDivertOnStopHttpEvent : publi
{
public:
MaybeDivertOnStopHttpEvent(HttpChannelChild* child,
const nsresult& channelStatus)
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mChannelStatus(channelStatus)
{}
- void Run()
+ void Run() override
{
mChild->MaybeDivertOnStop(mChannelStatus);
}
private:
nsresult mChannelStatus;
};
@@ -1252,17 +1252,17 @@ class ProgressEvent : public NeckoTarget
public:
ProgressEvent(HttpChannelChild* child,
const int64_t& progress,
const int64_t& progressMax)
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mProgress(progress)
, mProgressMax(progressMax) {}
- void Run() { mChild->OnProgress(mProgress, mProgressMax); }
+ void Run() override { mChild->OnProgress(mProgress, mProgressMax); }
private:
int64_t mProgress, mProgressMax;
};
void
HttpChannelChild::ProcessOnProgress(const int64_t& aProgress,
const int64_t& aProgressMax)
@@ -1301,17 +1301,17 @@ HttpChannelChild::OnProgress(const int64
class StatusEvent : public NeckoTargetChannelEvent<HttpChannelChild>
{
public:
StatusEvent(HttpChannelChild* child,
const nsresult& status)
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mStatus(status) {}
- void Run() { mChild->OnStatus(mStatus); }
+ void Run() override { mChild->OnStatus(mStatus); }
private:
nsresult mStatus;
};
void
HttpChannelChild::ProcessOnStatus(const nsresult& aStatus)
{
@@ -1349,17 +1349,17 @@ HttpChannelChild::OnStatus(const nsresul
class FailedAsyncOpenEvent : public NeckoTargetChannelEvent<HttpChannelChild>
{
public:
FailedAsyncOpenEvent(HttpChannelChild* child, const nsresult& status)
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mStatus(status) {}
- void Run() { mChild->FailedAsyncOpen(mStatus); }
+ void Run() override { mChild->FailedAsyncOpen(mStatus); }
private:
nsresult mStatus;
};
mozilla::ipc::IPCResult
HttpChannelChild::RecvFailedAsyncOpen(const nsresult& status)
{
@@ -1445,17 +1445,17 @@ HttpChannelChild::DoNotifyListenerCleanu
MaybeCallSynthesizedCallback();
}
class DeleteSelfEvent : public NeckoTargetChannelEvent<HttpChannelChild>
{
public:
explicit DeleteSelfEvent(HttpChannelChild* child)
: NeckoTargetChannelEvent<HttpChannelChild>(child) {}
- void Run() { mChild->DeleteSelf(); }
+ void Run() override { mChild->DeleteSelf(); }
};
mozilla::ipc::IPCResult
HttpChannelChild::RecvDeleteSelf()
{
LOG(("HttpChannelChild::RecvDeleteSelf [this=%p]\n", this));
mEventQ->RunOrEnqueue(new DeleteSelfEvent(this));
return IPC_OK();
@@ -1597,17 +1597,17 @@ class Redirect1Event : public NeckoTarge
: NeckoTargetChannelEvent<HttpChannelChild>(child)
, mRegistrarId(registrarId)
, mNewURI(newURI)
, mRedirectFlags(redirectFlags)
, mResponseHead(responseHead)
, mSecurityInfoSerialization(securityInfoSerialization)
, mChannelId(channelId) {}
- void Run()
+ void Run() override
{
mChild->Redirect1Begin(mRegistrarId, mNewURI, mRedirectFlags,
mResponseHead, mSecurityInfoSerialization,
mChannelId);
}
private:
uint32_t mRegistrarId;
@@ -1804,17 +1804,17 @@ HttpChannelChild::OverrideSecurityInfoFo
MOZ_ASSERT(NS_SUCCEEDED(rv));
}
class Redirect3Event : public NeckoTargetChannelEvent<HttpChannelChild>
{
public:
explicit Redirect3Event(HttpChannelChild* child)
: NeckoTargetChannelEvent<HttpChannelChild>(child) {}
- void Run() { mChild->Redirect3Complete(nullptr); }
+ void Run() override { mChild->Redirect3Complete(nullptr); }
};
mozilla::ipc::IPCResult
HttpChannelChild::RecvRedirect3Complete()
{
LOG(("HttpChannelChild::RecvRedirect3Complete [this=%p]\n", this));
mEventQ->RunOrEnqueue(new Redirect3Event(this));
return IPC_OK();
@@ -1824,17 +1824,17 @@ class HttpFlushedForDiversionEvent : pub
{
public:
explicit HttpFlushedForDiversionEvent(HttpChannelChild* aChild)
: NeckoTargetChannelEvent<HttpChannelChild>(aChild)
{
MOZ_RELEASE_ASSERT(aChild);
}
- void Run()
+ void Run() override
{
mChild->FlushedForDiversion();
}
};
void
HttpChannelChild::ProcessFlushedForDiversion()
{
@@ -3649,17 +3649,18 @@ public:
CancelEvent(HttpChannelChild* aChild, nsresult aRv)
: NeckoTargetChannelEvent<HttpChannelChild>(aChild)
, mRv(aRv)
{
MOZ_ASSERT(!NS_IsMainThread());
MOZ_ASSERT(aChild);
}
- void Run() {
+ void Run() override
+ {
MOZ_ASSERT(NS_IsMainThread());
mChild->Cancel(mRv);
}
private:
const nsresult mRv;
};
--- a/netwerk/protocol/http/HttpChannelParent.cpp
+++ b/netwerk/protocol/http/HttpChannelParent.cpp
@@ -401,17 +401,17 @@ public:
InvokeAsyncOpen(const nsMainThreadPtrHandle<nsIInterfaceRequestor>& aChannel,
nsresult aStatus)
: Runnable("net::InvokeAsyncOpen")
, mChannel(aChannel)
, mStatus(aStatus)
{
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
RefPtr<HttpChannelParent> channel = do_QueryObject(mChannel.get());
channel->TryInvokeAsyncOpen(mStatus);
return NS_OK;
}
};
struct UploadStreamClosure {
@@ -1152,17 +1152,17 @@ public:
const uint32_t& count)
: mParent(aParent)
, mData(data)
, mOffset(offset)
, mCount(count)
{
}
- void Run()
+ void Run() override
{
mParent->DivertOnDataAvailable(mData, mOffset, mCount);
}
private:
HttpChannelParent* mParent;
nsCString mData;
uint64_t mOffset;
@@ -1243,17 +1243,18 @@ class DivertStopRequestEvent : public Ma
public:
DivertStopRequestEvent(HttpChannelParent* aParent,
const nsresult& statusCode)
: mParent(aParent)
, mStatusCode(statusCode)
{
}
- void Run() {
+ void Run() override
+ {
mParent->DivertOnStopRequest(mStatusCode);
}
private:
HttpChannelParent* mParent;
nsresult mStatusCode;
};
@@ -1302,17 +1303,18 @@ HttpChannelParent::DivertOnStopRequest(c
class DivertCompleteEvent : public MainThreadChannelEvent
{
public:
explicit DivertCompleteEvent(HttpChannelParent* aParent)
: mParent(aParent)
{
}
- void Run() {
+ void Run() override
+ {
mParent->DivertComplete();
}
private:
HttpChannelParent* mParent;
};
mozilla::ipc::IPCResult
--- a/netwerk/protocol/http/nsHttpConnectionInfo.h
+++ b/netwerk/protocol/http/nsHttpConnectionInfo.h
@@ -177,15 +177,15 @@ private:
bool mEndToEndSSL;
bool mUsingConnect; // if will use CONNECT with http proxy
nsCString mNPNToken;
OriginAttributes mOriginAttributes;
uint32_t mTlsFlags;
// for RefPtr
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsHttpConnectionInfo)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsHttpConnectionInfo, override)
};
} // namespace net
} // namespace mozilla
#endif // nsHttpConnectionInfo_h__
--- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp
@@ -210,17 +210,17 @@ nsHttpConnectionMgr::Init(uint16_t maxUr
return EnsureSocketThreadTarget();
}
class BoolWrapper : public ARefBase
{
public:
BoolWrapper() : mBool(false) {}
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BoolWrapper)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BoolWrapper, override)
public: // intentional!
bool mBool;
private:
virtual ~BoolWrapper() {}
};
@@ -460,17 +460,17 @@ nsHttpConnectionMgr::DoShiftReloadConnec
return PostEvent(&nsHttpConnectionMgr::OnMsgDoShiftReloadConnectionCleanup,
0, aCI);
}
class SpeculativeConnectArgs : public ARefBase
{
public:
SpeculativeConnectArgs() { mOverridesOK = false; }
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SpeculativeConnectArgs)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SpeculativeConnectArgs, override)
public: // intentional!
RefPtr<NullHttpTransaction> mTrans;
bool mOverridesOK;
uint32_t mParallelSpeculativeConnectLimit;
bool mIgnoreIdle;
bool mIsFromPredictor;
@@ -557,17 +557,17 @@ nsHttpConnectionMgr::ReclaimConnection(n
class nsCompleteUpgradeData : public ARefBase
{
public:
nsCompleteUpgradeData(nsAHttpConnection *aConn,
nsIHttpUpgradeListener *aListener)
: mConn(aConn)
, mUpgradeListener(aListener) { }
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsCompleteUpgradeData)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(nsCompleteUpgradeData, override)
RefPtr<nsAHttpConnection> mConn;
nsCOMPtr<nsIHttpUpgradeListener> mUpgradeListener;
private:
virtual ~nsCompleteUpgradeData() { }
};
nsresult
@@ -2926,17 +2926,17 @@ nsHttpConnectionMgr::ActivateTimeoutTick
mTimeoutTickArmed = true;
mTimeoutTick->Init(this, 1000, nsITimer::TYPE_REPEATING_SLACK);
}
class UINT64Wrapper : public ARefBase
{
public:
explicit UINT64Wrapper(uint64_t aUint64) : mUint64(aUint64) {}
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(UINT64Wrapper)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(UINT64Wrapper, override)
uint64_t GetValue()
{
return mUint64;
}
private:
uint64_t mUint64;
virtual ~UINT64Wrapper() = default;
--- a/netwerk/protocol/http/nsHttpConnectionMgr.h
+++ b/netwerk/protocol/http/nsHttpConnectionMgr.h
@@ -499,17 +499,17 @@ private:
class PendingTransactionInfo : public ARefBase
{
public:
explicit PendingTransactionInfo(nsHttpTransaction * trans)
: mTransaction(trans)
{}
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PendingTransactionInfo)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(PendingTransactionInfo, override)
void PrintDiagnostics(nsCString &log);
public: // meant to be public.
RefPtr<nsHttpTransaction> mTransaction;
nsWeakPtr mHalfOpen;
nsWeakPtr mActiveConn;
private:
--- a/netwerk/protocol/http/nsHttpTransaction.h
+++ b/netwerk/protocol/http/nsHttpTransaction.h
@@ -214,17 +214,17 @@ private:
const char *, uint32_t,
uint32_t, uint32_t *);
static MOZ_MUST_USE nsresult WritePipeSegment(nsIOutputStream *, void *,
char *, uint32_t, uint32_t,
uint32_t *);
bool TimingEnabled() const { return mCaps & NS_HTTP_TIMING_ENABLED; }
- bool ResponseTimeoutEnabled() const final;
+ bool ResponseTimeoutEnabled() const final override;
void DisableSpdy() override;
void ReuseConnectionOnRestartOK(bool reuseOk) override { mReuseOnRestart = reuseOk; }
// Called right after we parsed the response head. Checks for connection based
// authentication schemes in reponse headers for WWW and Proxy authentication.
// If such is found in any of them, NS_HTTP_STICKY_CONNECTION is set in mCaps.
// We need the sticky flag be set early to keep the connection from very start
--- a/netwerk/protocol/res/SubstitutingProtocolHandler.h
+++ b/netwerk/protocol/res/SubstitutingProtocolHandler.h
@@ -118,17 +118,17 @@ private:
bool mEnforceFileOrJar;
};
// SubstitutingURL : overrides nsStandardURL::GetFile to provide nsIFile resolution
class SubstitutingURL : public nsStandardURL
{
public:
SubstitutingURL() : nsStandardURL(true) {}
- virtual nsStandardURL* StartClone();
- virtual MOZ_MUST_USE nsresult EnsureFile();
- NS_IMETHOD GetClassIDNoAlloc(nsCID *aCID);
+ virtual nsStandardURL* StartClone() override;
+ virtual MOZ_MUST_USE nsresult EnsureFile() override;
+ NS_IMETHOD GetClassIDNoAlloc(nsCID *aCID) override;
};
} // namespace net
} // namespace mozilla
#endif /* SubstitutingProtocolHandler_h___ */
--- a/netwerk/protocol/websocket/WebSocketChannelChild.cpp
+++ b/netwerk/protocol/websocket/WebSocketChannelChild.cpp
@@ -166,28 +166,28 @@ class EventTargetDispatcher : public Cha
{
public:
EventTargetDispatcher(ChannelEvent* aChannelEvent,
nsIEventTarget* aEventTarget)
: mChannelEvent(aChannelEvent)
, mEventTarget(aEventTarget)
{}
- void Run()
+ void Run() override
{
if (mEventTarget) {
mEventTarget->Dispatch(new WrappedChannelEvent(mChannelEvent.forget()),
NS_DISPATCH_NORMAL);
return;
}
mChannelEvent->Run();
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
nsCOMPtr<nsIEventTarget> target = mEventTarget;
if (!target) {
target = GetMainThreadEventTarget();
}
return target.forget();
}
@@ -206,22 +206,22 @@ class StartEvent : public ChannelEvent
bool aEncrypted)
: mChild(aChild)
, mProtocol(aProtocol)
, mExtensions(aExtensions)
, mEffectiveURL(aEffectiveURL)
, mEncrypted(aEncrypted)
{}
- void Run()
+ void Run() override
{
mChild->OnStart(mProtocol, mExtensions, mEffectiveURL, mEncrypted);
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
return do_AddRef(GetCurrentThreadEventTarget());
}
private:
RefPtr<WebSocketChannelChild> mChild;
nsCString mProtocol;
nsCString mExtensions;
@@ -270,22 +270,22 @@ class StopEvent : public ChannelEvent
{
public:
StopEvent(WebSocketChannelChild* aChild,
const nsresult& aStatusCode)
: mChild(aChild)
, mStatusCode(aStatusCode)
{}
- void Run()
+ void Run() override
{
mChild->OnStop(mStatusCode);
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
return do_AddRef(GetCurrentThreadEventTarget());
}
private:
RefPtr<WebSocketChannelChild> mChild;
nsresult mStatusCode;
};
@@ -322,26 +322,26 @@ class MessageEvent : public ChannelEvent
MessageEvent(WebSocketChannelChild* aChild,
const nsCString& aMessage,
bool aBinary)
: mChild(aChild)
, mMessage(aMessage)
, mBinary(aBinary)
{}
- void Run()
+ void Run() override
{
if (!mBinary) {
mChild->OnMessageAvailable(mMessage);
} else {
mChild->OnBinaryMessageAvailable(mMessage);
}
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
return do_AddRef(GetCurrentThreadEventTarget());
}
private:
RefPtr<WebSocketChannelChild> mChild;
nsCString mMessage;
bool mBinary;
@@ -404,22 +404,22 @@ class AcknowledgeEvent : public ChannelE
{
public:
AcknowledgeEvent(WebSocketChannelChild* aChild,
const uint32_t& aSize)
: mChild(aChild)
, mSize(aSize)
{}
- void Run()
+ void Run() override
{
mChild->OnAcknowledge(mSize);
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
return do_AddRef(GetCurrentThreadEventTarget());
}
private:
RefPtr<WebSocketChannelChild> mChild;
uint32_t mSize;
};
@@ -456,22 +456,22 @@ class ServerCloseEvent : public ChannelE
ServerCloseEvent(WebSocketChannelChild* aChild,
const uint16_t aCode,
const nsCString &aReason)
: mChild(aChild)
, mCode(aCode)
, mReason(aReason)
{}
- void Run()
+ void Run() override
{
mChild->OnServerClose(mCode, mReason);
}
- already_AddRefed<nsIEventTarget> GetEventTarget()
+ already_AddRefed<nsIEventTarget> GetEventTarget() override
{
return do_AddRef(GetCurrentThreadEventTarget());
}
private:
RefPtr<WebSocketChannelChild> mChild;
uint16_t mCode;
nsCString mReason;
--- a/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
+++ b/netwerk/protocol/wyciwyg/WyciwygChannelChild.cpp
@@ -152,18 +152,21 @@ public:
const nsCString& charset,
const nsCString& securityInfo)
: NeckoTargetChannelEvent<WyciwygChannelChild>(child)
, mStatusCode(statusCode)
, mContentLength(contentLength)
, mSource(source)
, mCharset(charset)
, mSecurityInfo(securityInfo) {}
- void Run() { mChild->OnStartRequest(mStatusCode, mContentLength, mSource,
- mCharset, mSecurityInfo); }
+
+ void Run() override { mChild->OnStartRequest(mStatusCode, mContentLength,
+ mSource, mCharset,
+ mSecurityInfo); }
+
private:
nsresult mStatusCode;
int64_t mContentLength;
int32_t mSource;
nsCString mCharset;
nsCString mSecurityInfo;
};
@@ -214,17 +217,19 @@ class WyciwygDataAvailableEvent
{
public:
WyciwygDataAvailableEvent(WyciwygChannelChild* child,
const nsCString& data,
const uint64_t& offset)
: NeckoTargetChannelEvent<WyciwygChannelChild>(child)
, mData(data)
, mOffset(offset) {}
- void Run() { mChild->OnDataAvailable(mData, mOffset); }
+
+ void Run() override { mChild->OnDataAvailable(mData, mOffset); }
+
private:
nsCString mData;
uint64_t mOffset;
};
mozilla::ipc::IPCResult
WyciwygChannelChild::RecvOnDataAvailable(const nsCString& data,
const uint64_t& offset)
@@ -275,17 +280,19 @@ WyciwygChannelChild::OnDataAvailable(con
class WyciwygStopRequestEvent
: public NeckoTargetChannelEvent<WyciwygChannelChild>
{
public:
WyciwygStopRequestEvent(WyciwygChannelChild* child,
const nsresult& statusCode)
: NeckoTargetChannelEvent<WyciwygChannelChild>(child)
, mStatusCode(statusCode) {}
- void Run() { mChild->OnStopRequest(mStatusCode); }
+
+ void Run() override { mChild->OnStopRequest(mStatusCode); }
+
private:
nsresult mStatusCode;
};
mozilla::ipc::IPCResult
WyciwygChannelChild::RecvOnStopRequest(const nsresult& statusCode)
{
mEventQ->RunOrEnqueue(new WyciwygStopRequestEvent(this, statusCode));
@@ -327,17 +334,18 @@ WyciwygChannelChild::OnStopRequest(const
class WyciwygCancelEvent : public NeckoTargetChannelEvent<WyciwygChannelChild>
{
public:
WyciwygCancelEvent(WyciwygChannelChild* child, const nsresult& status)
: NeckoTargetChannelEvent<WyciwygChannelChild>(child)
, mStatus(status) {}
- void Run() { mChild->CancelEarly(mStatus); }
+ void Run() override { mChild->CancelEarly(mStatus); }
+
private:
nsresult mStatus;
};
mozilla::ipc::IPCResult
WyciwygChannelChild::RecvCancelEarly(const nsresult& statusCode)
{
mEventQ->RunOrEnqueue(new WyciwygCancelEvent(this, statusCode));
--- a/netwerk/streamconv/converters/nsUnknownDecoder.h
+++ b/netwerk/streamconv/converters/nsUnknownDecoder.h
@@ -157,16 +157,15 @@ protected:
* Class that detects whether a data stream is text or binary. This reuses
* most of nsUnknownDecoder except the actual content-type determination logic
* -- our overridden DetermineContentType simply calls LastDitchSniff and sets
* the type to APPLICATION_GUESS_FROM_EXT if the data is detected as binary.
*/
class nsBinaryDetector : public nsUnknownDecoder
{
protected:
- virtual void DetermineContentType(nsIRequest* aRequest);
+ virtual void DetermineContentType(nsIRequest* aRequest) override;
};
#define NS_BINARYDETECTOR_CATEGORYENTRY \
{ NS_CONTENT_SNIFFER_CATEGORY, "Binary Detector", NS_BINARYDETECTOR_CONTRACTID }
#endif /* nsUnknownDecoder_h__ */
-
--- a/parser/html/nsHtml5SVGLoadDispatcher.h
+++ b/parser/html/nsHtml5SVGLoadDispatcher.h
@@ -10,12 +10,12 @@
class nsHtml5SVGLoadDispatcher : public mozilla::Runnable
{
private:
nsCOMPtr<nsIContent> mElement;
nsCOMPtr<nsIDocument> mDocument;
public:
explicit nsHtml5SVGLoadDispatcher(nsIContent* aElement);
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
};
#endif // nsHtml5SVGLoadDispatcher_h
--- a/parser/html/nsHtml5Speculation.h
+++ b/parser/html/nsHtml5Speculation.h
@@ -42,18 +42,18 @@ class nsHtml5Speculation final : public
{
return mSnapshot;
}
/**
* Flush the operations from the tree operations from the argument
* queue unconditionally.
*/
- virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue);
-
+ virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue) override;
+
void FlushToSink(nsAHtml5TreeOpSink* aSink);
private:
/**
* The first buffer in the pending UTF-16 buffer queue
*/
RefPtr<nsHtml5OwningUTF16Buffer> mBuffer;
--- a/parser/html/nsHtml5StreamParser.cpp
+++ b/parser/html/nsHtml5StreamParser.cpp
@@ -874,17 +874,17 @@ class MaybeRunCollector : public Runnabl
{
public:
explicit MaybeRunCollector(nsIDocShell* aDocShell)
: Runnable("MaybeRunCollector")
, mDocShell(aDocShell)
{
}
- NS_IMETHOD Run()
+ NS_IMETHOD Run() override
{
nsJSContext::MaybeRunNextCollectorSlice(mDocShell, JS::gcreason::HTML_PARSER);
return NS_OK;
}
nsCOMPtr<nsIDocShell> mDocShell;
};
--- a/parser/html/nsHtml5TreeOpStage.h
+++ b/parser/html/nsHtml5TreeOpStage.h
@@ -17,18 +17,18 @@ class nsHtml5TreeOpStage : public nsAHtm
nsHtml5TreeOpStage();
virtual ~nsHtml5TreeOpStage();
/**
* Flush the operations from the tree operations from the argument
* queue unconditionally.
*/
- virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue);
-
+ virtual void MoveOpsFrom(nsTArray<nsHtml5TreeOperation>& aOpQueue) override;
+
/**
* Retrieve the staged operations and speculative loads into the arguments.
*/
void MoveOpsAndSpeculativeLoadsTo(nsTArray<nsHtml5TreeOperation>& aOpQueue,
nsTArray<nsHtml5SpeculativeLoad>& aSpeculativeLoadQueue);
/**
* Move the speculative loads from the argument into the staging queue.
--- a/rdf/base/nsCompositeDataSource.cpp
+++ b/rdf/base/nsCompositeDataSource.cpp
@@ -316,20 +316,20 @@ CompositeEnumeratorImpl::GetNext(nsISupp
class CompositeArcsInOutEnumeratorImpl : public CompositeEnumeratorImpl
{
public:
enum Type { eArcsIn, eArcsOut };
virtual ~CompositeArcsInOutEnumeratorImpl();
virtual nsresult
- GetEnumerator(nsIRDFDataSource* aDataSource, nsISimpleEnumerator** aResult);
+ GetEnumerator(nsIRDFDataSource* aDataSource, nsISimpleEnumerator** aResult) override;
virtual nsresult
- HasNegation(nsIRDFDataSource* aDataSource, nsIRDFNode* aNode, bool* aResult);
+ HasNegation(nsIRDFDataSource* aDataSource, nsIRDFNode* aNode, bool* aResult) override;
CompositeArcsInOutEnumeratorImpl(CompositeDataSourceImpl* aCompositeDataSource,
nsIRDFNode* aNode,
Type aType,
bool aAllowNegativeAssertions,
bool aCoalesceDuplicateArcs);
private:
@@ -386,20 +386,20 @@ CompositeArcsInOutEnumeratorImpl::HasNeg
//
// CompositeAssertionEnumeratorImpl
//
class CompositeAssertionEnumeratorImpl : public CompositeEnumeratorImpl
{
public:
virtual nsresult
- GetEnumerator(nsIRDFDataSource* aDataSource, nsISimpleEnumerator** aResult);
+ GetEnumerator(nsIRDFDataSource* aDataSource, nsISimpleEnumerator** aResult) override;
virtual nsresult
- HasNegation(nsIRDFDataSource* aDataSource, nsIRDFNode* aNode, bool* aResult);
+ HasNegation(nsIRDFDataSource* aDataSource, nsIRDFNode* aNode, bool* aResult) override;
CompositeAssertionEnumeratorImpl(CompositeDataSourceImpl* aCompositeDataSource,
nsIRDFResource* aSource,
nsIRDFResource* aProperty,
nsIRDFNode* aTarget,
bool aTruthValue,
bool aAllowNegativeAssertions,
bool aCoalesceDuplicateArcs);
--- a/security/manager/ssl/DataStorage.cpp
+++ b/security/manager/ssl/DataStorage.cpp
@@ -42,17 +42,17 @@ class DataStorageMemoryReporter final :
{
MOZ_DEFINE_MALLOC_SIZE_OF(MallocSizeOf)
~DataStorageMemoryReporter() = default;
public:
NS_DECL_ISUPPORTS
NS_IMETHOD CollectReports(nsIHandleReportCallback* aHandleReport,
- nsISupports* aData, bool aAnonymize) final
+ nsISupports* aData, bool aAnonymize) final override
{
nsTArray<nsString> fileNames;
DataStorage::GetAllFileNames(fileNames);
for (const auto& file: fileNames) {
RefPtr<DataStorage> ds = DataStorage::GetFromRawFileName(file);
size_t amount = ds->SizeOfIncludingThis(MallocSizeOf);
nsPrintfCString path("explicit/data-storage/%s",
NS_ConvertUTF16toUTF8(file).get());
--- a/security/manager/ssl/SSLServerCertVerification.cpp
+++ b/security/manager/ssl/SSLServerCertVerification.cpp
@@ -258,17 +258,17 @@ class CertErrorRunnable : public SyncRun
mCollectedErrors(collectedErrors),
mErrorCodeTrust(errorCodeTrust),
mErrorCodeMismatch(errorCodeMismatch),
mErrorCodeTime(errorCodeTime),
mProviderFlags(providerFlags)
{
}
- virtual void RunOnTargetThread();
+ virtual void RunOnTargetThread() override;
RefPtr<SSLServerCertVerificationResult> mResult; // out
private:
SSLServerCertVerificationResult* CheckCertOverrides();
nsresult OverrideAllowedForHost(/*out*/ bool& overrideAllowed);
const void* const mFdForLogging; // may become an invalid pointer; do not dereference
const nsCOMPtr<nsIX509Cert> mCert;
const RefPtr<nsNSSSocketInfo> mInfoObject;
--- a/security/manager/ssl/SharedSSLState.cpp
+++ b/security/manager/ssl/SharedSSLState.cpp
@@ -28,17 +28,17 @@ namespace {
static Atomic<bool> sCertOverrideSvcExists(false);
class MainThreadClearer : public SyncRunnableBase
{
public:
MainThreadClearer() : mShouldClearSessionCache(false) {}
- void RunOnTargetThread() {
+ void RunOnTargetThread() override {
// In some cases it's possible to cause PSM/NSS to initialize while XPCOM shutdown
// is in progress. We want to avoid this, since they do not handle the situation well,
// hence the flags to avoid instantiating the services if they don't already exist.
bool certOverrideSvcExists = sCertOverrideSvcExists.exchange(false);
if (certOverrideSvcExists) {
sCertOverrideSvcExists = true;
nsCOMPtr<nsICertOverrideService> icos = do_GetService(NS_CERTOVERRIDE_CONTRACTID);
--- a/security/manager/ssl/nsNSSCallbacks.cpp
+++ b/security/manager/ssl/nsNSSCallbacks.cpp
@@ -61,17 +61,17 @@ const uint32_t KEA_NOT_SUPPORTED = 1;
} // namespace
class nsHTTPDownloadEvent : public Runnable {
public:
nsHTTPDownloadEvent();
~nsHTTPDownloadEvent();
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
RefPtr<nsNSSHttpRequestSession> mRequestSession;
RefPtr<nsHTTPListener> mListener;
bool mResponsibleForDoneSignal;
TimeStamp mStartTime;
};
--- a/security/manager/ssl/nsNSSIOLayer.cpp
+++ b/security/manager/ssl/nsNSSIOLayer.cpp
@@ -1085,17 +1085,17 @@ class SSLErrorRunnable : public SyncRunn
::mozilla::psm::SSLErrorMessageType errtype,
PRErrorCode errorCode)
: mInfoObject(infoObject)
, mErrType(errtype)
, mErrorCode(errorCode)
{
}
- virtual void RunOnTargetThread()
+ virtual void RunOnTargetThread() override
{
nsHandleSSLError(mInfoObject, mErrType, mErrorCode);
}
RefPtr<nsNSSSocketInfo> mInfoObject;
::mozilla::psm::SSLErrorMessageType mErrType;
const PRErrorCode mErrorCode;
};
@@ -2143,17 +2143,17 @@ public:
{
}
SECStatus mRV; // out
PRErrorCode mErrorCodeToReport; // out
CERTCertificate** const mPRetCert; // in/out
SECKEYPrivateKey** const mPRetKey; // in/out
protected:
- virtual void RunOnTargetThread();
+ virtual void RunOnTargetThread() override;
private:
CERTDistNames* const mCANames; // in
nsNSSSocketInfo* const mSocketInfo; // in
CERTCertificate* const mServerCert; // in
};
// This callback function is used to pull client certificate
// information upon server request
--- a/security/sandbox/chromium/sandbox/win/src/sandbox_policy_base.h
+++ b/security/sandbox/chromium/sandbox/win/src/sandbox_policy_base.h
@@ -37,17 +37,17 @@ class PolicyBase final : public TargetPo
PolicyBase();
// TargetPolicy:
void AddRef() override;
void Release() override;
ResultCode SetTokenLevel(TokenLevel initial, TokenLevel lockdown) override;
TokenLevel GetInitialTokenLevel() const override;
TokenLevel GetLockdownTokenLevel() const override;
- void SetDoNotUseRestrictingSIDs() final;
+ void SetDoNotUseRestrictingSIDs() final override;
ResultCode SetJobLevel(JobLevel job_level, uint32_t ui_exceptions) override;
JobLevel GetJobLevel() const override;
ResultCode SetJobMemoryLimit(size_t memory_limit) override;
ResultCode SetAlternateDesktop(bool alternate_winstation) override;
base::string16 GetAlternateDesktop() const override;
ResultCode CreateAlternateDesktop(bool alternate_winstation) override;
void DestroyAlternateDesktop() override;
ResultCode SetIntegrityLevel(IntegrityLevel integrity_level) override;
--- a/storage/Variant.h
+++ b/storage/Variant.h
@@ -343,31 +343,31 @@ struct variant_blob_traits<uint8_t[], tr
/**
* nullptr type
*/
class NullVariant : public Variant_base
{
public:
- NS_IMETHOD GetDataType(uint16_t *_type)
+ NS_IMETHOD GetDataType(uint16_t *_type) override
{
NS_ENSURE_ARG_POINTER(_type);
*_type = nsIDataType::VTYPE_EMPTY;
return NS_OK;
}
- NS_IMETHOD GetAsAUTF8String(nsACString &_str)
+ NS_IMETHOD GetAsAUTF8String(nsACString &_str) override
{
// Return a void string.
_str.SetIsVoid(true);
return NS_OK;
}
- NS_IMETHOD GetAsAString(nsAString &_str)
+ NS_IMETHOD GetAsAString(nsAString &_str) override
{
// Return a void string.
_str.SetIsVoid(true);
return NS_OK;
}
};
////////////////////////////////////////////////////////////////////////////////
@@ -382,50 +382,50 @@ class Variant final : public Variant_bas
}
public:
explicit Variant(const typename variant_storage_traits<DataType, Adopting>::ConstructorType aData)
{
variant_storage_traits<DataType, Adopting>::storage_conversion(aData, &mData);
}
- NS_IMETHOD GetDataType(uint16_t *_type)
+ NS_IMETHOD GetDataType(uint16_t *_type) override
{
*_type = variant_traits<DataType>::type();
return NS_OK;
}
- NS_IMETHOD GetAsInt32(int32_t *_integer)
+ NS_IMETHOD GetAsInt32(int32_t *_integer) override
{
return variant_integer_traits<DataType, Adopting>::asInt32(mData, _integer);
}
- NS_IMETHOD GetAsInt64(int64_t *_integer)
+ NS_IMETHOD GetAsInt64(int64_t *_integer) override
{
return variant_integer_traits<DataType, Adopting>::asInt64(mData, _integer);
}
- NS_IMETHOD GetAsDouble(double *_double)
+ NS_IMETHOD GetAsDouble(double *_double) override
{
return variant_float_traits<DataType, Adopting>::asDouble(mData, _double);
}
- NS_IMETHOD GetAsAUTF8String(nsACString &_str)
+ NS_IMETHOD GetAsAUTF8String(nsACString &_str) override
{
return variant_text_traits<DataType, Adopting>::asUTF8String(mData, _str);
}
- NS_IMETHOD GetAsAString(nsAString &_str)
+ NS_IMETHOD GetAsAString(nsAString &_str) override
{
return variant_text_traits<DataType, Adopting>::asString(mData, _str);
}
NS_IMETHOD GetAsArray(uint16_t *_type,
nsIID *,
uint32_t *_size,
- void **_data)
+ void **_data) override
{
return variant_blob_traits<DataType, Adopting>::asArray(mData, _type, _size, _data);
}
private:
typename variant_storage_traits<DataType, Adopting>::StorageType mData;
};
--- a/storage/mozStorageBindingParams.h
+++ b/storage/mozStorageBindingParams.h
@@ -90,20 +90,20 @@ private:
*
* We support *either* binding by name or binding by index. Trying to do both
* results in only binding by name at sqlite3_stmt bind time.
*/
class AsyncBindingParams : public BindingParams
{
public:
NS_IMETHOD BindByName(const nsACString & aName,
- nsIVariant *aValue);
- NS_IMETHOD BindByIndex(uint32_t aIndex, nsIVariant *aValue);
+ nsIVariant *aValue) override;
+ NS_IMETHOD BindByIndex(uint32_t aIndex, nsIVariant *aValue) override;
- virtual already_AddRefed<mozIStorageError> bind(sqlite3_stmt * aStatement);
+ virtual already_AddRefed<mozIStorageError> bind(sqlite3_stmt * aStatement) override;
explicit AsyncBindingParams(mozIStorageBindingParamsArray *aOwningArray);
virtual ~AsyncBindingParams() {}
private:
nsInterfaceHashtable<nsCStringHashKey, nsIVariant> mNamedParameters;
};
--- a/toolkit/components/filewatcher/NativeFileWatcherWin.cpp
+++ b/toolkit/components/filewatcher/NativeFileWatcherWin.cpp
@@ -264,17 +264,17 @@ class NativeFileWatcherIOTask : public R
public:
explicit NativeFileWatcherIOTask(HANDLE aIOCompletionPort)
: Runnable("NativeFileWatcherIOTask")
, mIOCompletionPort(aIOCompletionPort)
, mShuttingDown(false)
{
}
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
nsresult AddPathRunnableMethod(PathRunnablesParametersWrapper* aWrappedParameters);
nsresult RemovePathRunnableMethod(PathRunnablesParametersWrapper* aWrappedParameters);
nsresult DeactivateRunnableMethod();
private:
// Maintain 2 indexes - one by resource path, one by resource |HANDLE|.
// Since |HANDLE| is basically a typedef to void*, we use nsVoidPtrHashKey to
// compute the hashing key. We need 2 indexes in order to quickly look up the
--- a/toolkit/components/places/Helpers.h
+++ b/toolkit/components/places/Helpers.h
@@ -238,17 +238,17 @@ bool GetHiddenState(bool aIsRedirect,
class AsyncStatementCallbackNotifier : public AsyncStatementCallback
{
public:
explicit AsyncStatementCallbackNotifier(const char* aTopic)
: mTopic(aTopic)
{
}
- NS_IMETHOD HandleCompletion(uint16_t aReason);
+ NS_IMETHOD HandleCompletion(uint16_t aReason) override;
private:
const char* mTopic;
};
/**
* Used to notify a topic to system observers on async execute completion.
*/
@@ -257,17 +257,17 @@ class AsyncStatementTelemetryTimer : pub
public:
explicit AsyncStatementTelemetryTimer(Telemetry::HistogramID aHistogramId,
TimeStamp aStart = TimeStamp::Now())
: mHistogramId(aHistogramId)
, mStart(aStart)
{
}
- NS_IMETHOD HandleCompletion(uint16_t aReason);
+ NS_IMETHOD HandleCompletion(uint16_t aReason) override;
private:
const Telemetry::HistogramID mHistogramId;
const TimeStamp mStart;
};
} // namespace places
} // namespace mozilla
--- a/toolkit/components/places/nsFaviconService.cpp
+++ b/toolkit/components/places/nsFaviconService.cpp
@@ -49,17 +49,17 @@ using namespace mozilla::places;
/**
* Used to notify a topic to system observers on async execute completion.
* Will throw on error.
*/
class ExpireFaviconsStatementCallbackNotifier : public AsyncStatementCallback
{
public:
ExpireFaviconsStatementCallbackNotifier();
- NS_IMETHOD HandleCompletion(uint16_t aReason);
+ NS_IMETHOD HandleCompletion(uint16_t aReason) override;
};
namespace {
/**
* Extracts and filters native sizes from the given container, based on the
* list of sizes we are supposed to retain.
* All calculation is done considering square sizes and the largest side.
--- a/toolkit/components/places/nsNavBookmarks.cpp
+++ b/toolkit/components/places/nsNavBookmarks.cpp
@@ -84,17 +84,17 @@ public:
(void)URIBinder::Bind(stmt, NS_LITERAL_CSTRING("page_url"),
mData.bookmark.url);
nsCOMPtr<mozIStoragePendingStatement> pendingStmt;
(void)stmt->ExecuteAsync(this, getter_AddRefs(pendingStmt));
}
}
}
- NS_IMETHOD HandleResult(mozIStorageResultSet* aResultSet)
+ NS_IMETHOD HandleResult(mozIStorageResultSet* aResultSet) override
{
nsCOMPtr<mozIStorageRow> row;
while (NS_SUCCEEDED(aResultSet->GetNextRow(getter_AddRefs(row))) && row) {
// Skip tags, for the use-cases of this async getter they are useless.
int64_t grandParentId = -1, tagsFolderId = -1;
nsresult rv = row->GetInt64(5, &grandParentId);
NS_ENSURE_SUCCESS(rv, rv);
rv = mBookmarksSvc->GetTagsFolder(&tagsFolderId);
--- a/toolkit/components/places/nsNavHistory.cpp
+++ b/toolkit/components/places/nsNavHistory.cpp
@@ -1045,17 +1045,17 @@ namespace {
class InvalidateAllFrecenciesCallback : public AsyncStatementCallback
{
public:
InvalidateAllFrecenciesCallback()
{
}
- NS_IMETHOD HandleCompletion(uint16_t aReason)
+ NS_IMETHOD HandleCompletion(uint16_t aReason) override
{
if (aReason == REASON_FINISHED) {
nsNavHistory *navHistory = nsNavHistory::GetHistoryService();
NS_ENSURE_STATE(navHistory);
navHistory->NotifyManyFrecenciesChanged();
}
return NS_OK;
}
@@ -3054,17 +3054,17 @@ namespace {
class DecayFrecencyCallback : public AsyncStatementTelemetryTimer
{
public:
DecayFrecencyCallback()
: AsyncStatementTelemetryTimer(Telemetry::PLACES_IDLE_FRECENCY_DECAY_TIME_MS)
{
}
- NS_IMETHOD HandleCompletion(uint16_t aReason)
+ NS_IMETHOD HandleCompletion(uint16_t aReason) override
{
(void)AsyncStatementTelemetryTimer::HandleCompletion(aReason);
if (aReason == REASON_FINISHED) {
nsNavHistory *navHistory = nsNavHistory::GetHistoryService();
NS_ENSURE_STATE(navHistory);
navHistory->NotifyManyFrecenciesChanged();
}
return NS_OK;
@@ -4393,17 +4393,17 @@ namespace {
class FixInvalidFrecenciesCallback : public AsyncStatementCallbackNotifier
{
public:
FixInvalidFrecenciesCallback()
: AsyncStatementCallbackNotifier(TOPIC_FRECENCY_UPDATED)
{
}
- NS_IMETHOD HandleCompletion(uint16_t aReason)
+ NS_IMETHOD HandleCompletion(uint16_t aReason) override
{
nsresult rv = AsyncStatementCallbackNotifier::HandleCompletion(aReason);
NS_ENSURE_SUCCESS(rv, rv);
if (aReason == REASON_FINISHED) {
nsNavHistory *navHistory = nsNavHistory::GetHistoryService();
NS_ENSURE_STATE(navHistory);
navHistory->NotifyManyFrecenciesChanged();
}
--- a/toolkit/components/places/nsNavHistoryResult.h
+++ b/toolkit/components/places/nsNavHistoryResult.h
@@ -759,13 +759,13 @@ private:
// nsNavHistorySeparatorResultNode
//
// Separator result nodes do not hold any data.
class nsNavHistorySeparatorResultNode : public nsNavHistoryResultNode
{
public:
nsNavHistorySeparatorResultNode();
- NS_IMETHOD GetType(uint32_t* type)
+ NS_IMETHOD GetType(uint32_t* type) override
{ *type = nsNavHistoryResultNode::RESULT_TYPE_SEPARATOR; return NS_OK; }
};
#endif // nsNavHistoryResult_h_
--- a/toolkit/components/printingui/ipc/PrintingParent.h
+++ b/toolkit/components/printingui/ipc/PrintingParent.h
@@ -28,48 +28,48 @@ class PrintingParent final : public PPri
{
public:
NS_INLINE_DECL_REFCOUNTING(PrintingParent)
virtual mozilla::ipc::IPCResult
RecvShowProgress(PBrowserParent* parent,
PPrintProgressDialogParent* printProgressDialog,
PRemotePrintJobParent* remotePrintJob,
- const bool& isForPrinting);
+ const bool& isForPrinting) override;
virtual mozilla::ipc::IPCResult
RecvShowPrintDialog(PPrintSettingsDialogParent* aDialog,
PBrowserParent* aParent,
- const PrintData& aData);
+ const PrintData& aData) override;
virtual mozilla::ipc::IPCResult
RecvSavePrintSettings(const PrintData& data,
const bool& usePrinterNamePrefix,
const uint32_t& flags,
- nsresult* rv);
+ nsresult* rv) override;
virtual PPrintProgressDialogParent*
- AllocPPrintProgressDialogParent();
+ AllocPPrintProgressDialogParent() override;
virtual bool
- DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor);
+ DeallocPPrintProgressDialogParent(PPrintProgressDialogParent* aActor) override;
virtual PPrintSettingsDialogParent*
- AllocPPrintSettingsDialogParent();
+ AllocPPrintSettingsDialogParent() override;
virtual bool
- DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor);
+ DeallocPPrintSettingsDialogParent(PPrintSettingsDialogParent* aActor) override;
virtual PRemotePrintJobParent*
- AllocPRemotePrintJobParent();
+ AllocPRemotePrintJobParent() override;
virtual bool
- DeallocPRemotePrintJobParent(PRemotePrintJobParent* aActor);
+ DeallocPRemotePrintJobParent(PRemotePrintJobParent* aActor) override;
virtual void
- ActorDestroy(ActorDestroyReason aWhy);
+ ActorDestroy(ActorDestroyReason aWhy) override;
MOZ_IMPLICIT PrintingParent();
/**
* Serialize nsIPrintSettings to PrintData ready for sending to a child
* process. A RemotePrintJob will be created and added to the PrintData.
* An optional progress listener can be given, which will be registered
* with the RemotePrintJob, so that progress can be tracked in the parent.
--- a/toolkit/components/telemetry/ScalarInfo.h
+++ b/toolkit/components/telemetry/ScalarInfo.h
@@ -56,15 +56,15 @@ struct ScalarInfo : BaseScalarInfo {
uint32_t aDataset,
mozilla::Telemetry::Common::RecordedProcessType aRecordInProcess,
bool aKeyed)
: BaseScalarInfo(aKind, aDataset, aRecordInProcess, aKeyed)
, name_offset(aNameOffset)
, expiration_offset(aExpirationOffset)
{}
- const char *name() const;
- const char *expiration() const;
+ const char *name() const override;
+ const char *expiration() const override;
};
} // namespace
#endif // TelemetryScalarInfo_h__
--- a/toolkit/components/telemetry/TelemetryScalar.cpp
+++ b/toolkit/components/telemetry/TelemetryScalar.cpp
@@ -146,18 +146,18 @@ struct DynamicScalarInfo : BaseScalarInf
aKeyed)
, mDynamicName(aName)
, mDynamicExpiration(aExpired)
{}
// The following functions will read the stored text
// instead of looking it up in the statically generated
// tables.
- const char *name() const;
- const char *expiration() const;
+ const char *name() const override;
+ const char *expiration() const override;
};
const char *
DynamicScalarInfo::name() const
{
return mDynamicName.get();
}
@@ -305,24 +305,24 @@ ScalarBase::HandleUnsupported() const
class ScalarUnsigned : public ScalarBase
{
public:
using ScalarBase::SetValue;
ScalarUnsigned() : mStorage(0) {};
~ScalarUnsigned() override = default;
- ScalarResult SetValue(nsIVariant* aValue) final;
- void SetValue(uint32_t aValue) final;
- ScalarResult AddValue(nsIVariant* aValue) final;
- void AddValue(uint32_t aValue) final;
- ScalarResult SetMaximum(nsIVariant* aValue) final;
- void SetMaximum(uint32_t aValue) final;
- nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ ScalarResult SetValue(nsIVariant* aValue) final override;
+ void SetValue(uint32_t aValue) final override;
+ ScalarResult AddValue(nsIVariant* aValue) final override;
+ void AddValue(uint32_t aValue) final override;
+ ScalarResult SetMaximum(nsIVariant* aValue) final override;
+ void SetMaximum(uint32_t aValue) final override;
+ nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final override;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
private:
uint32_t mStorage;
ScalarResult CheckInput(nsIVariant* aValue);
// Prevent copying.
ScalarUnsigned(const ScalarUnsigned& aOther) = delete;
@@ -445,20 +445,20 @@ ScalarUnsigned::CheckInput(nsIVariant* a
class ScalarString : public ScalarBase
{
public:
using ScalarBase::SetValue;
ScalarString() : mStorage(EmptyString()) {};
~ScalarString() override = default;
- ScalarResult SetValue(nsIVariant* aValue) final;
- ScalarResult SetValue(const nsAString& aValue) final;
- nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ ScalarResult SetValue(nsIVariant* aValue) final override;
+ ScalarResult SetValue(const nsAString& aValue) final override;
+ nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final override;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
private:
nsString mStorage;
// Prevent copying.
ScalarString(const ScalarString& aOther) = delete;
void operator=(const ScalarString& aOther) = delete;
};
@@ -526,20 +526,20 @@ ScalarString::SizeOfIncludingThis(mozill
class ScalarBoolean : public ScalarBase
{
public:
using ScalarBase::SetValue;
ScalarBoolean() : mStorage(false) {};
~ScalarBoolean() override = default;
- ScalarResult SetValue(nsIVariant* aValue) final;
- void SetValue(bool aValue) final;
- nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final;
- size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final;
+ ScalarResult SetValue(nsIVariant* aValue) final override;
+ void SetValue(bool aValue) final override;
+ nsresult GetValue(nsCOMPtr<nsIVariant>& aResult) const final override;
+ size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const final override;
private:
bool mStorage;
// Prevent copying.
ScalarBoolean(const ScalarBoolean& aOther) = delete;
void operator=(const ScalarBoolean& aOther) = delete;
};
--- a/toolkit/crashreporter/InjectCrashReporter.h
+++ b/toolkit/crashreporter/InjectCrashReporter.h
@@ -11,17 +11,17 @@
namespace mozilla {
class InjectCrashRunnable : public Runnable
{
public:
explicit InjectCrashRunnable(DWORD pid);
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
private:
DWORD mPID;
nsString mInjectorPath;
};
} // Namespace mozilla
--- a/toolkit/crashreporter/nsExceptionHandler.cpp
+++ b/toolkit/crashreporter/nsExceptionHandler.cpp
@@ -300,17 +300,17 @@ static nsIThread* sMinidumpWriterThread;
#ifdef MOZ_CRASHREPORTER_INJECTOR
static nsIThread* sInjectorThread;
class ReportInjectedCrash : public Runnable
{
public:
explicit ReportInjectedCrash(uint32_t pid) : Runnable("ReportInjectedCrash"), mPID(pid) { }
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
private:
uint32_t mPID;
};
#endif // MOZ_CRASHREPORTER_INJECTOR
// Crashreporter annotations that we don't send along in subprocess reports.
static const char* kSubprocessBlacklist[] = {
--- a/toolkit/crashreporter/test/nsTestCrasher.cpp
+++ b/toolkit/crashreporter/test/nsTestCrasher.cpp
@@ -22,17 +22,17 @@ class A
{
public:
virtual void f() = 0;
A() { fcn( this ); }
};
class B : A
{
- void f() { }
+ void f() override { }
public:
void use() { }
};
void fcn( A* p )
{
p->f();
}
--- a/toolkit/xre/nsNativeAppSupportCocoa.mm
+++ b/toolkit/xre/nsNativeAppSupportCocoa.mm
@@ -57,19 +57,19 @@ GetNativeWindowPointerFromDOMWindow(mozI
}
class nsNativeAppSupportCocoa : public nsNativeAppSupportBase
{
public:
nsNativeAppSupportCocoa() :
mCanShowUI(false) { }
- NS_IMETHOD Start(bool* aRetVal);
- NS_IMETHOD ReOpen();
- NS_IMETHOD Enable();
+ NS_IMETHOD Start(bool* aRetVal) override;
+ NS_IMETHOD ReOpen() override;
+ NS_IMETHOD Enable() override;
private:
bool mCanShowUI;
};
NS_IMETHODIMP
nsNativeAppSupportCocoa::Enable()
{
--- a/toolkit/xre/nsNativeAppSupportUnix.cpp
+++ b/toolkit/xre/nsNativeAppSupportUnix.cpp
@@ -133,19 +133,19 @@ public:
{
// this goes out of scope after "web-workers-shutdown" async shutdown phase
// so it's safe to disconnect here (i.e. the application won't lose data)
DisconnectFromSM();
};
void DisconnectFromSM();
#endif
- NS_IMETHOD Start(bool* aRetVal);
- NS_IMETHOD Stop(bool *aResult);
- NS_IMETHOD Enable();
+ NS_IMETHOD Start(bool* aRetVal) override;
+ NS_IMETHOD Stop(bool *aResult) override;
+ NS_IMETHOD Enable() override;
private:
#if MOZ_X11
static void SaveYourselfCB(SmcConn smc_conn, SmPointer client_data,
int save_style, Bool shutdown, int interact_style,
Bool fast);
static void DieCB(SmcConn smc_conn, SmPointer client_data);
static void InteractCB(SmcConn smc_conn, SmPointer client_data);
--- a/toolkit/xre/nsNativeAppSupportWin.cpp
+++ b/toolkit/xre/nsNativeAppSupportWin.cpp
@@ -271,20 +271,20 @@ private:
class nsNativeAppSupportWin : public nsNativeAppSupportBase,
public nsIObserver
{
public:
NS_DECL_NSIOBSERVER
NS_DECL_ISUPPORTS_INHERITED
// Overrides of base implementation.
- NS_IMETHOD Start( bool *aResult );
- NS_IMETHOD Stop( bool *aResult );
- NS_IMETHOD Quit();
- NS_IMETHOD Enable();
+ NS_IMETHOD Start( bool *aResult ) override;
+ NS_IMETHOD Stop( bool *aResult ) override;
+ NS_IMETHOD Quit() override;
+ NS_IMETHOD Enable() override;
// The "old" Start method (renamed).
NS_IMETHOD StartDDE();
// Utility function to handle a Win32-specific command line
// option: "--console", which dynamically creates a Windows
// console.
void CheckConsole();
private:
--- a/tools/profiler/gecko/ProfilerIOInterposeObserver.h
+++ b/tools/profiler/gecko/ProfilerIOInterposeObserver.h
@@ -14,17 +14,17 @@ namespace mozilla {
* This class is the observer that calls into the profiler whenever
* main thread I/O occurs.
*/
class ProfilerIOInterposeObserver final : public IOInterposeObserver
{
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ProfilerIOInterposeObserver)
public:
- virtual void Observe(Observation& aObservation);
+ virtual void Observe(Observation& aObservation) override;
protected:
virtual ~ProfilerIOInterposeObserver() {}
};
} // namespace mozilla
#endif // PROFILERIOINTERPOSEOBSERVER_H
--- a/tools/profiler/gecko/ThreadResponsiveness.cpp
+++ b/tools/profiler/gecko/ThreadResponsiveness.cpp
@@ -67,17 +67,17 @@ public:
}
mTimer->InitWithCallback(this, 16, nsITimer::TYPE_ONE_SHOT);
}
return NS_OK;
}
// Main thread only
- NS_IMETHOD Notify(nsITimer* aTimer) final
+ NS_IMETHOD Notify(nsITimer* aTimer) final override
{
SystemGroup::Dispatch(TaskCategory::Other,
do_AddRef(this));
return NS_OK;
}
// Can be called on any thread.
void Terminate() {
--- a/tools/profiler/gecko/nsProfiler.cpp
+++ b/tools/profiler/gecko/nsProfiler.cpp
@@ -160,17 +160,17 @@ nsProfiler::GetProfile(double aSinceTime
}
namespace {
struct StringWriteFunc : public JSONWriteFunc
{
nsAString& mBuffer; // This struct must not outlive this buffer
explicit StringWriteFunc(nsAString& buffer) : mBuffer(buffer) {}
- void Write(const char* aStr)
+ void Write(const char* aStr) override
{
mBuffer.Append(NS_ConvertUTF8toUTF16(aStr));
}
};
}
NS_IMETHODIMP
nsProfiler::GetSharedLibraries(JSContext* aCx,
@@ -660,9 +660,8 @@ nsProfiler::FinishGathering()
void
nsProfiler::ResetGathering()
{
mPromiseHolder.reset();
mPendingProfiles = 0;
mGathering = false;
mWriter.reset();
}
-
--- a/tools/profiler/lul/LulDwarf.cpp
+++ b/tools/profiler/lul/LulDwarf.cpp
@@ -331,61 +331,61 @@ class CallFrameInfo::Rule {
virtual CFIRTag getTag() const = 0;
};
// Rule: the value the register had in the caller cannot be recovered.
class CallFrameInfo::UndefinedRule: public CallFrameInfo::Rule {
public:
UndefinedRule() { }
~UndefinedRule() { }
- CFIRTag getTag() const { return CFIR_UNDEFINED_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_UNDEFINED_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->UndefinedRule(address, reg);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_UNDEFINED_RULE) return false;
return true;
}
- Rule *Copy() const { return new UndefinedRule(*this); }
+ Rule *Copy() const override { return new UndefinedRule(*this); }
};
// Rule: the register's value is the same as that it had in the caller.
class CallFrameInfo::SameValueRule: public CallFrameInfo::Rule {
public:
SameValueRule() { }
~SameValueRule() { }
- CFIRTag getTag() const { return CFIR_SAME_VALUE_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_SAME_VALUE_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->SameValueRule(address, reg);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_SAME_VALUE_RULE) return false;
return true;
}
- Rule *Copy() const { return new SameValueRule(*this); }
+ Rule *Copy() const override { return new SameValueRule(*this); }
};
// Rule: the register is saved at OFFSET from BASE_REGISTER. BASE_REGISTER
// may be CallFrameInfo::Handler::kCFARegister.
class CallFrameInfo::OffsetRule: public CallFrameInfo::Rule {
public:
OffsetRule(int base_register, long offset)
: base_register_(base_register), offset_(offset) { }
~OffsetRule() { }
- CFIRTag getTag() const { return CFIR_OFFSET_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_OFFSET_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->OffsetRule(address, reg, base_register_, offset_);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_OFFSET_RULE) return false;
const OffsetRule *our_rhs = static_cast<const OffsetRule *>(&rhs);
return (base_register_ == our_rhs->base_register_ &&
offset_ == our_rhs->offset_);
}
- Rule *Copy() const { return new OffsetRule(*this); }
+ Rule *Copy() const override { return new OffsetRule(*this); }
// We don't actually need SetBaseRegister or SetOffset here, since they
// are only ever applied to CFA rules, for DW_CFA_def_cfa_offset, and it
// doesn't make sense to use OffsetRule for computing the CFA: it
// computes the address at which a register is saved, not a value.
private:
int base_register_;
long offset_;
};
@@ -393,91 +393,91 @@ class CallFrameInfo::OffsetRule: public
// Rule: the value the register had in the caller is the value of
// BASE_REGISTER plus offset. BASE_REGISTER may be
// CallFrameInfo::Handler::kCFARegister.
class CallFrameInfo::ValOffsetRule: public CallFrameInfo::Rule {
public:
ValOffsetRule(int base_register, long offset)
: base_register_(base_register), offset_(offset) { }
~ValOffsetRule() { }
- CFIRTag getTag() const { return CFIR_VAL_OFFSET_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_VAL_OFFSET_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->ValOffsetRule(address, reg, base_register_, offset_);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_VAL_OFFSET_RULE) return false;
const ValOffsetRule *our_rhs = static_cast<const ValOffsetRule *>(&rhs);
return (base_register_ == our_rhs->base_register_ &&
offset_ == our_rhs->offset_);
}
- Rule *Copy() const { return new ValOffsetRule(*this); }
- void SetBaseRegister(unsigned reg) { base_register_ = reg; }
- void SetOffset(long long offset) { offset_ = offset; }
+ Rule *Copy() const override { return new ValOffsetRule(*this); }
+ void SetBaseRegister(unsigned reg) override { base_register_ = reg; }
+ void SetOffset(long long offset) override { offset_ = offset; }
private:
int base_register_;
long offset_;
};
// Rule: the register has been saved in another register REGISTER_NUMBER_.
class CallFrameInfo::RegisterRule: public CallFrameInfo::Rule {
public:
explicit RegisterRule(int register_number)
: register_number_(register_number) { }
~RegisterRule() { }
- CFIRTag getTag() const { return CFIR_REGISTER_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_REGISTER_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->RegisterRule(address, reg, register_number_);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_REGISTER_RULE) return false;
const RegisterRule *our_rhs = static_cast<const RegisterRule *>(&rhs);
return (register_number_ == our_rhs->register_number_);
}
- Rule *Copy() const { return new RegisterRule(*this); }
+ Rule *Copy() const override { return new RegisterRule(*this); }
private:
int register_number_;
};
// Rule: EXPRESSION evaluates to the address at which the register is saved.
class CallFrameInfo::ExpressionRule: public CallFrameInfo::Rule {
public:
explicit ExpressionRule(const string &expression)
: expression_(expression) { }
~ExpressionRule() { }
- CFIRTag getTag() const { return CFIR_EXPRESSION_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_EXPRESSION_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->ExpressionRule(address, reg, expression_);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_EXPRESSION_RULE) return false;
const ExpressionRule *our_rhs = static_cast<const ExpressionRule *>(&rhs);
return (expression_ == our_rhs->expression_);
}
- Rule *Copy() const { return new ExpressionRule(*this); }
+ Rule *Copy() const override { return new ExpressionRule(*this); }
private:
string expression_;
};
// Rule: EXPRESSION evaluates to the previous value of the register.
class CallFrameInfo::ValExpressionRule: public CallFrameInfo::Rule {
public:
explicit ValExpressionRule(const string &expression)
: expression_(expression) { }
~ValExpressionRule() { }
- CFIRTag getTag() const { return CFIR_VAL_EXPRESSION_RULE; }
- bool Handle(Handler *handler, uint64 address, int reg) const {
+ CFIRTag getTag() const override { return CFIR_VAL_EXPRESSION_RULE; }
+ bool Handle(Handler *handler, uint64 address, int reg) const override {
return handler->ValExpressionRule(address, reg, expression_);
}
- bool operator==(const Rule &rhs) const {
+ bool operator==(const Rule &rhs) const override {
if (rhs.getTag() != CFIR_VAL_EXPRESSION_RULE) return false;
const ValExpressionRule *our_rhs =
static_cast<const ValExpressionRule *>(&rhs);
return (expression_ == our_rhs->expression_);
}
- Rule *Copy() const { return new ValExpressionRule(*this); }
+ Rule *Copy() const override { return new ValExpressionRule(*this); }
private:
string expression_;
};
// A map from register numbers to rules.
class CallFrameInfo::RuleMap {
public:
RuleMap() : cfa_rule_(NULL) { }
--- a/tools/profiler/lul/LulDwarfExt.h
+++ b/tools/profiler/lul/LulDwarfExt.h
@@ -1237,29 +1237,29 @@ class DwarfCFIToModule: public CallFrame
/*OUT*/Summariser* summ)
: summ_(summ), usu_(usu), num_dw_regs_(num_dw_regs),
reporter_(reporter), reader_(reader), return_address_(-1) {
}
virtual ~DwarfCFIToModule() {}
virtual bool Entry(size_t offset, uint64 address, uint64 length,
uint8 version, const std::string &augmentation,
- unsigned return_address);
- virtual bool UndefinedRule(uint64 address, int reg);
- virtual bool SameValueRule(uint64 address, int reg);
+ unsigned return_address) override;
+ virtual bool UndefinedRule(uint64 address, int reg) override;
+ virtual bool SameValueRule(uint64 address, int reg) override;
virtual bool OffsetRule(uint64 address, int reg,
- int base_register, long offset);
+ int base_register, long offset) override;
virtual bool ValOffsetRule(uint64 address, int reg,
- int base_register, long offset);
- virtual bool RegisterRule(uint64 address, int reg, int base_register);
+ int base_register, long offset) override;
+ virtual bool RegisterRule(uint64 address, int reg, int base_register) override;
virtual bool ExpressionRule(uint64 address, int reg,
- const std::string &expression);
+ const std::string &expression) override;
virtual bool ValExpressionRule(uint64 address, int reg,
- const std::string &expression);
- virtual bool End();
+ const std::string &expression) override;
+ virtual bool End() override;
private:
// Return the name to use for register I.
const UniqueString* RegisterName(int i);
// The Summariser to which we should give entries
Summariser* summ_;
--- a/uriloader/exthandler/mac/nsLocalHandlerAppMac.h
+++ b/uriloader/exthandler/mac/nsLocalHandlerAppMac.h
@@ -14,13 +14,13 @@ class nsLocalHandlerAppMac : public nsLo
nsLocalHandlerAppMac(const char16_t *aName, nsIFile *aExecutable)
: nsLocalHandlerApp(aName, aExecutable) {}
nsLocalHandlerAppMac(const nsAString & aName, nsIFile *aExecutable)
: nsLocalHandlerApp(aName, aExecutable) {}
virtual ~nsLocalHandlerAppMac() { }
- NS_IMETHOD LaunchWithURI(nsIURI* aURI, nsIInterfaceRequestor* aWindowContext);
- NS_IMETHOD GetName(nsAString& aName);
+ NS_IMETHOD LaunchWithURI(nsIURI* aURI, nsIInterfaceRequestor* aWindowContext) override;
+ NS_IMETHOD GetName(nsAString& aName) override;
};
#endif /*NSLOCALHANDLERAPPMAC_H_*/
--- a/uriloader/exthandler/mac/nsMIMEInfoMac.h
+++ b/uriloader/exthandler/mac/nsMIMEInfoMac.h
@@ -9,26 +9,24 @@
class nsMIMEInfoMac : public nsMIMEInfoImpl {
public:
explicit nsMIMEInfoMac(const char* aMIMEType = "") : nsMIMEInfoImpl(aMIMEType) {}
explicit nsMIMEInfoMac(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {}
nsMIMEInfoMac(const nsACString& aType, HandlerClass aClass) :
nsMIMEInfoImpl(aType, aClass) {}
- NS_IMETHOD LaunchWithFile(nsIFile* aFile);
+ NS_IMETHOD LaunchWithFile(nsIFile* aFile) override;
protected:
- virtual MOZ_MUST_USE nsresult LoadUriInternal(nsIURI *aURI);
+ virtual MOZ_MUST_USE nsresult LoadUriInternal(nsIURI *aURI) override;
#ifdef DEBUG
- virtual MOZ_MUST_USE nsresult LaunchDefaultWithFile(nsIFile* aFile) {
+ virtual MOZ_MUST_USE nsresult LaunchDefaultWithFile(nsIFile* aFile) override {
NS_NOTREACHED("do not call this method, use LaunchWithFile");
return NS_ERROR_UNEXPECTED;
}
#endif
static MOZ_MUST_USE nsresult OpenApplicationWithURI(nsIFile *aApplication,
const nsCString& aURI);
-
- NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription);
-
+
+ NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) override;
};
-
#endif
--- a/uriloader/exthandler/mac/nsOSHelperAppService.h
+++ b/uriloader/exthandler/mac/nsOSHelperAppService.h
@@ -18,31 +18,31 @@
class nsOSHelperAppService : public nsExternalHelperAppService
{
public:
nsOSHelperAppService();
virtual ~nsOSHelperAppService();
// override nsIExternalProtocolService methods
- NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval);
-
+ NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override;
+
// method overrides --> used to hook the mime service into internet config....
- NS_IMETHOD GetFromTypeAndExtension(const nsACString& aType, const nsACString& aFileExt, nsIMIMEInfo ** aMIMEInfo);
- already_AddRefed<nsIMIMEInfo> GetMIMEInfoFromOS(const nsACString& aMIMEType, const nsACString& aFileExt, bool * aFound);
+ NS_IMETHOD GetFromTypeAndExtension(const nsACString& aType, const nsACString& aFileExt, nsIMIMEInfo ** aMIMEInfo) override;
+ already_AddRefed<nsIMIMEInfo> GetMIMEInfoFromOS(const nsACString& aMIMEType, const nsACString& aFileExt, bool * aFound) override;
NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString &aScheme,
bool *found,
- nsIHandlerInfo **_retval);
+ nsIHandlerInfo **_retval) override;
// GetFileTokenForPath must be implemented by each platform.
// platformAppPath --> a platform specific path to an application that we got out of the
// rdf data source. This can be a mac file spec, a unix path or a windows path depending on the platform
// aFile --> an nsIFile representation of that platform application path.
- virtual MOZ_MUST_USE nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile);
+ virtual MOZ_MUST_USE nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile) override;
MOZ_MUST_USE nsresult OSProtocolHandlerExists(const char * aScheme,
- bool * aHandlerExists);
+ bool * aHandlerExists) override;
private:
uint32_t mPermissions;
};
#endif // nsOSHelperAppService_h__
--- a/uriloader/exthandler/nsMIMEInfoImpl.h
+++ b/uriloader/exthandler/nsMIMEInfoImpl.h
@@ -161,36 +161,36 @@ class nsMIMEInfoImpl : public nsMIMEInfo
public:
explicit nsMIMEInfoImpl(const char *aMIMEType = "") : nsMIMEInfoBase(aMIMEType) {}
explicit nsMIMEInfoImpl(const nsACString& aMIMEType) : nsMIMEInfoBase(aMIMEType) {}
nsMIMEInfoImpl(const nsACString& aType, HandlerClass aClass) :
nsMIMEInfoBase(aType, aClass) {}
virtual ~nsMIMEInfoImpl() {}
// nsIMIMEInfo methods
- NS_IMETHOD GetHasDefaultHandler(bool *_retval);
- NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription);
+ NS_IMETHOD GetHasDefaultHandler(bool *_retval) override;
+ NS_IMETHOD GetDefaultDescription(nsAString& aDefaultDescription) override;
// additional methods
/**
* Sets the default application. Supposed to be only called by the OS Helper
* App Services; the default application is immutable after it is first set.
*/
void SetDefaultApplication(nsIFile* aApp) { if (!mDefaultApplication) mDefaultApplication = aApp; }
protected:
// nsMIMEInfoBase methods
/**
* The base class implementation is to use LaunchWithIProcess in combination
* with mDefaultApplication. Subclasses can override that behaviour.
*/
- virtual nsresult LaunchDefaultWithFile(nsIFile* aFile);
+ virtual nsresult LaunchDefaultWithFile(nsIFile* aFile) override;
/**
* Loads the URI with the OS default app. This should be overridden by each
* OS's implementation.
*/
- virtual nsresult LoadUriInternal(nsIURI *aURI) = 0;
+ virtual nsresult LoadUriInternal(nsIURI *aURI) override = 0;
nsCOMPtr<nsIFile> mDefaultApplication; ///< default application associated with this type.
};
#endif //__nsmimeinfoimpl_h___
--- a/uriloader/exthandler/uikit/nsLocalHandlerAppUIKit.h
+++ b/uriloader/exthandler/uikit/nsLocalHandlerAppUIKit.h
@@ -21,12 +21,12 @@ public:
: nsLocalHandlerApp(aName, aExecutable)
{}
nsLocalHandlerAppUIKit(const nsAString& aName, nsIFile* aExecutable)
: nsLocalHandlerApp(aName, aExecutable)
{}
- NS_IMETHOD LaunchWithURI(nsIURI* aURI, nsIInterfaceRequestor* aWindowContext);
+ NS_IMETHOD LaunchWithURI(nsIURI* aURI, nsIInterfaceRequestor* aWindowContext) override;
};
#endif /* nslocalhandlerappuikit_h_ */
--- a/uriloader/exthandler/uikit/nsMIMEInfoUIKit.h
+++ b/uriloader/exthandler/uikit/nsMIMEInfoUIKit.h
@@ -14,17 +14,17 @@ class nsMIMEInfoUIKit final : public nsM
public:
explicit nsMIMEInfoUIKit(const nsACString& aMIMEType)
: nsMIMEInfoImpl(aMIMEType)
{}
nsMIMEInfoUIKit(const nsACString& aType, HandlerClass aClass)
: nsMIMEInfoImpl(aType, aClass)
{}
- NS_IMETHOD LaunchWithFile(nsIFile* aFile);
+ NS_IMETHOD LaunchWithFile(nsIFile* aFile) override;
protected:
virtual nsresult LoadUriInternal(nsIURI* aURI);
#ifdef DEBUG
virtual nsresult LaunchDefaultWithFile(nsIFile* aFile)
{
NS_NOTREACHED("do not call this method, use LaunchWithFile");
return NS_ERROR_UNEXPECTED;
--- a/uriloader/exthandler/unix/nsMIMEInfoUnix.h
+++ b/uriloader/exthandler/unix/nsMIMEInfoUnix.h
@@ -14,19 +14,19 @@ class nsMIMEInfoUnix : public nsMIMEInfo
public:
explicit nsMIMEInfoUnix(const char *aMIMEType = "") : nsMIMEInfoImpl(aMIMEType) {}
explicit nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {}
nsMIMEInfoUnix(const nsACString& aType, HandlerClass aClass) :
nsMIMEInfoImpl(aType, aClass) {}
static bool HandlerExists(const char *aProtocolScheme);
protected:
- NS_IMETHOD GetHasDefaultHandler(bool *_retval);
+ NS_IMETHOD GetHasDefaultHandler(bool *_retval) override;
- virtual nsresult LoadUriInternal(nsIURI *aURI);
+ virtual nsresult LoadUriInternal(nsIURI *aURI) override;
- virtual nsresult LaunchDefaultWithFile(nsIFile *aFile);
+ virtual nsresult LaunchDefaultWithFile(nsIFile *aFile) override;
#if defined(MOZ_ENABLE_CONTENTACTION)
- NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleAppHandlers);
+ NS_IMETHOD GetPossibleApplicationHandlers(nsIMutableArray * *aPossibleAppHandlers) override;
#endif
};
#endif // nsMIMEInfoUnix_h_
--- a/uriloader/exthandler/unix/nsOSHelperAppService.h
+++ b/uriloader/exthandler/unix/nsOSHelperAppService.h
@@ -22,30 +22,30 @@ class nsOSHelperAppService : public nsEx
{
public:
nsOSHelperAppService();
virtual ~nsOSHelperAppService();
// method overrides for mime.types and mime.info look up steps
already_AddRefed<nsIMIMEInfo> GetMIMEInfoFromOS(const nsACString& aMimeType,
const nsACString& aFileExt,
- bool *aFound);
+ bool *aFound) override;
NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString &aScheme,
bool *found,
- nsIHandlerInfo **_retval);
+ nsIHandlerInfo **_retval) override;
// override nsIExternalProtocolService methods
- nsresult OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists);
- NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval);
+ nsresult OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists) override;
+ NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override;
// GetFileTokenForPath must be implemented by each platform.
// platformAppPath --> a platform specific path to an application that we got out of the
// rdf data source. This can be a mac file spec, a unix path or a windows path depending on the platform
// aFile --> an nsIFile representation of that platform application path.
- virtual nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile);
+ virtual nsresult GetFileTokenForPath(const char16_t * platformAppPath, nsIFile ** aFile) override;
protected:
already_AddRefed<nsMIMEInfoBase> GetFromType(const nsCString& aMimeType);
already_AddRefed<nsMIMEInfoBase> GetFromExtension(const nsCString& aFileExt);
private:
uint32_t mPermissions;
--- a/uriloader/exthandler/win/nsMIMEInfoWin.h
+++ b/uriloader/exthandler/win/nsMIMEInfoWin.h
@@ -14,19 +14,19 @@ class nsMIMEInfoWin : public nsMIMEInfoB
virtual ~nsMIMEInfoWin();
public:
explicit nsMIMEInfoWin(const char* aType = "") : nsMIMEInfoBase(aType) {}
explicit nsMIMEInfoWin(const nsACString& aMIMEType) : nsMIMEInfoBase(aMIMEType) {}
nsMIMEInfoWin(const nsACString& aType, HandlerClass aClass) :
nsMIMEInfoBase(aType, aClass) {}
- NS_IMETHOD LaunchWithFile(nsIFile* aFile);
- NS_IMETHOD GetHasDefaultHandler(bool * _retval);
- NS_IMETHOD GetPossibleLocalHandlers(nsIArray **_retval);
+ NS_IMETHOD LaunchWithFile(nsIFile* aFile) override;
+ NS_IMETHOD GetHasDefaultHandler(bool * _retval) override;
+ NS_IMETHOD GetPossibleLocalHandlers(nsIArray **_retval) override;
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIPROPERTYBAG
void SetDefaultApplicationHandler(nsIFile* aDefaultApplication)
{
mDefaultApplication = aDefaultApplication;
}
--- a/uriloader/exthandler/win/nsOSHelperAppService.h
+++ b/uriloader/exthandler/win/nsOSHelperAppService.h
@@ -28,17 +28,17 @@ class nsOSHelperAppService : public nsEx
{
public:
nsOSHelperAppService();
virtual ~nsOSHelperAppService();
// override nsIExternalProtocolService methods
nsresult OSProtocolHandlerExists(const char * aProtocolScheme, bool * aHandlerExists);
nsresult LoadUriInternal(nsIURI * aURL);
- NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval);
+ NS_IMETHOD GetApplicationDescription(const nsACString& aScheme, nsAString& _retval) override;
// method overrides for windows registry look up steps....
already_AddRefed<nsIMIMEInfo> GetMIMEInfoFromOS(const nsACString& aMIMEType, const nsACString& aFileExt, bool *aFound);
NS_IMETHOD GetProtocolHandlerInfoFromOS(const nsACString &aScheme,
bool *found,
nsIHandlerInfo **_retval);
virtual bool GetMIMETypeFromOSForExtension(const nsACString& aExtension,
nsACString& aMIMEType) override;
--- a/widget/android/nsDeviceContextAndroid.h
+++ b/widget/android/nsDeviceContextAndroid.h
@@ -11,17 +11,17 @@
class nsDeviceContextSpecAndroid final : public nsIDeviceContextSpec
{
private:
~nsDeviceContextSpecAndroid() {}
public:
NS_DECL_ISUPPORTS
- virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+ virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
NS_IMETHOD Init(nsIWidget* aWidget,
nsIPrintSettings* aPS,
bool aIsPrintPreview) override;
NS_IMETHOD BeginDocument(const nsAString& aTitle,
const nsAString& aPrintToFileName,
int32_t aStartPage,
int32_t aEndPage) override;
--- a/widget/android/nsLookAndFeel.h
+++ b/widget/android/nsLookAndFeel.h
@@ -9,26 +9,26 @@
#include "AndroidBridge.h"
class nsLookAndFeel final : public nsXPLookAndFeel
{
public:
nsLookAndFeel();
virtual ~nsLookAndFeel();
- virtual void NativeInit() final;
- virtual void RefreshImpl();
- virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
- virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
- virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
+ virtual void NativeInit() final override;
+ virtual void RefreshImpl() override;
+ virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
+ virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
+ virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
virtual bool GetFontImpl(FontID aID, nsString& aName, gfxFontStyle& aStyle,
- float aDevPixPerCSSPixel);
- virtual bool GetEchoPasswordImpl();
- virtual uint32_t GetPasswordMaskDelayImpl();
- virtual char16_t GetPasswordCharacterImpl();
+ float aDevPixPerCSSPixel) override;
+ virtual bool GetEchoPasswordImpl() override;
+ virtual uint32_t GetPasswordMaskDelayImpl() override;
+ virtual char16_t GetPasswordCharacterImpl() override;
protected:
static bool mInitializedSystemColors;
static mozilla::AndroidSystemColors mSystemColors;
static bool mInitializedShowPassword;
static bool mShowPassword;
nsresult GetSystemColors();
--- a/widget/cocoa/nsAppShell.h
+++ b/widget/cocoa/nsAppShell.h
@@ -22,36 +22,36 @@
}
@end
@class AppShellDelegate;
class nsAppShell : public nsBaseAppShell
{
public:
- NS_IMETHOD ResumeNative(void);
+ NS_IMETHOD ResumeNative(void) override;
nsAppShell();
nsresult Init();
- NS_IMETHOD Run(void);
- NS_IMETHOD Exit(void);
- NS_IMETHOD OnProcessNextEvent(nsIThreadInternal *aThread, bool aMayWait);
+ NS_IMETHOD Run(void) override;
+ NS_IMETHOD Exit(void) override;
+ NS_IMETHOD OnProcessNextEvent(nsIThreadInternal *aThread, bool aMayWait) override;
NS_IMETHOD AfterProcessNextEvent(nsIThreadInternal *aThread,
- bool aEventWasProcessed);
+ bool aEventWasProcessed) override;
// public only to be visible to Objective-C code that must call it
void WillTerminate();
protected:
virtual ~nsAppShell();
- virtual void ScheduleNativeEventCallback();
- virtual bool ProcessNextNativeEvent(bool aMayWait);
+ virtual void ScheduleNativeEventCallback() override;
+ virtual bool ProcessNextNativeEvent(bool aMayWait) override;
static void ProcessGeckoEvents(void* aInfo);
protected:
CFMutableArrayRef mAutoreleasePools;
AppShellDelegate* mDelegate;
CFRunLoopRef mCFRunLoop;
--- a/widget/cocoa/nsChildView.h
+++ b/widget/cocoa/nsChildView.h
@@ -338,17 +338,17 @@ public:
// Returns the "backing scale factor" of the view's window, which is the
// ratio of pixels in the window's backing store to Cocoa points. Prior to
// HiDPI support in OS X 10.7, this was always 1.0, but in HiDPI mode it
// will be 2.0 (and might potentially other values as screen resolutions
// evolve). This gives the relationship between what Gecko calls "device
// pixels" and the Cocoa "points" coordinate system.
CGFloat BackingScaleFactor() const;
- mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final {
+ mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final override {
return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
}
// Call if the window's backing scale factor changes - i.e., it is moved
// between HiDPI and non-HiDPI screens
void BackingScaleFactorChanged();
virtual double GetDefaultScaleInternal() override;
--- a/widget/cocoa/nsCocoaWindow.h
+++ b/widget/cocoa/nsCocoaWindow.h
@@ -281,17 +281,17 @@ public:
uint32_t aHotspotX, uint32_t aHotspotY)
override;
CGFloat BackingScaleFactor();
void BackingScaleFactorChanged();
virtual double GetDefaultScaleInternal() override;
virtual int32_t RoundsWidgetCoordinatesTo() override;
- mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final {
+ mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final override {
return mozilla::DesktopToLayoutDeviceScale(BackingScaleFactor());
}
virtual nsresult SetTitle(const nsAString& aTitle) override;
virtual void Invalidate(const LayoutDeviceIntRect& aRect) override;
virtual nsresult ConfigureChildren(const nsTArray<Configuration>& aConfigurations) override;
virtual LayerManager* GetLayerManager(PLayerTransactionChild* aShadowManager = nullptr,
--- a/widget/cocoa/nsDeviceContextSpecX.h
+++ b/widget/cocoa/nsDeviceContextSpecX.h
@@ -13,17 +13,17 @@
class nsDeviceContextSpecX : public nsIDeviceContextSpec
{
public:
NS_DECL_ISUPPORTS
nsDeviceContextSpecX();
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) override;
- virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+ virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
NS_IMETHOD BeginDocument(const nsAString& aTitle,
const nsAString& aPrintToFileName,
int32_t aStartPage,
int32_t aEndPage) override;
NS_IMETHOD EndDocument() override;
NS_IMETHOD BeginPage() override {
return NS_OK;
};
--- a/widget/cocoa/nsDragService.h
+++ b/widget/cocoa/nsDragService.h
@@ -21,25 +21,25 @@ extern NSString* const kMozFileUrlsPboar
class nsDragService : public nsBaseDragService
{
public:
nsDragService();
// nsBaseDragService
virtual nsresult InvokeDragSessionImpl(nsIArray* anArrayTransferables,
nsIScriptableRegion* aRegion,
- uint32_t aActionType);
+ uint32_t aActionType) override;
// nsIDragService
- NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers);
- NS_IMETHOD UpdateDragImage(nsIDOMNode* aImage, int32_t aImageX, int32_t aImageY);
+ NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override;
+ NS_IMETHOD UpdateDragImage(nsIDOMNode* aImage, int32_t aImageX, int32_t aImageY) override;
// nsIDragSession
- NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t aItemIndex);
- NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval);
- NS_IMETHOD GetNumDropItems(uint32_t * aNumItems);
+ NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t aItemIndex) override;
+ NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval) override;
+ NS_IMETHOD GetNumDropItems(uint32_t * aNumItems) override;
void DragMovedWithView(NSDraggingSession* aSession, NSPoint aPoint);
protected:
virtual ~nsDragService();
private:
--- a/widget/cocoa/nsLookAndFeel.h
+++ b/widget/cocoa/nsLookAndFeel.h
@@ -8,34 +8,35 @@
#include "nsXPLookAndFeel.h"
class nsLookAndFeel final : public nsXPLookAndFeel
{
public:
nsLookAndFeel();
virtual ~nsLookAndFeel();
- virtual void NativeInit() final;
- virtual void RefreshImpl();
- virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
- virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
- virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
+ virtual void NativeInit() final override;
+ virtual void RefreshImpl() override;
+ virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
+ virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
+ virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
virtual bool GetFontImpl(FontID aID, nsString& aFontName,
gfxFontStyle& aFontStyle,
- float aDevPixPerCSSPixel);
- virtual char16_t GetPasswordCharacterImpl()
+ float aDevPixPerCSSPixel) override;
+
+ virtual char16_t GetPasswordCharacterImpl() override
{
// unicode value for the bullet character, used for password textfields.
return 0x2022;
}
static bool UseOverlayScrollbars();
- virtual nsTArray<LookAndFeelInt> GetIntCacheImpl();
- virtual void SetIntCacheImpl(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache);
+ virtual nsTArray<LookAndFeelInt> GetIntCacheImpl() override;
+ virtual void SetIntCacheImpl(const nsTArray<LookAndFeelInt>& aLookAndFeelIntCache) override;
protected:
static bool SystemWantsOverlayScrollbars();
static bool AllowOverlayScrollbarsOverlap();
private:
int32_t mUseOverlayScrollbars;
bool mUseOverlayScrollbarsCached;
--- a/widget/gtk/nsAppShell.h
+++ b/widget/gtk/nsAppShell.h
@@ -15,18 +15,18 @@
class nsAppShell : public nsBaseAppShell {
public:
nsAppShell() : mTag(0) {
mPipeFDs[0] = mPipeFDs[1] = 0;
}
// nsBaseAppShell overrides:
nsresult Init();
- virtual void ScheduleNativeEventCallback();
- virtual bool ProcessNextNativeEvent(bool mayWait);
+ virtual void ScheduleNativeEventCallback() override;
+ virtual bool ProcessNextNativeEvent(bool mayWait) override;
private:
virtual ~nsAppShell();
static gboolean EventProcessorCallback(GIOChannel *source,
GIOCondition condition,
gpointer data);
--- a/widget/gtk/nsDeviceContextSpecG.h
+++ b/widget/gtk/nsDeviceContextSpecG.h
@@ -25,17 +25,17 @@ class nsPrintSettingsGTK;
class nsDeviceContextSpecGTK : public nsIDeviceContextSpec
{
public:
nsDeviceContextSpecGTK();
NS_DECL_ISUPPORTS
- virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+ virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
NS_IMETHOD Init(nsIWidget *aWidget, nsIPrintSettings* aPS,
bool aIsPrintPreview) override;
NS_IMETHOD BeginDocument(const nsAString& aTitle,
const nsAString& aPrintToFileName,
int32_t aStartPage, int32_t aEndPage) override;
NS_IMETHOD EndDocument() override;
NS_IMETHOD BeginPage() override { return NS_OK; }
--- a/widget/gtk/nsLookAndFeel.h
+++ b/widget/gtk/nsLookAndFeel.h
@@ -15,27 +15,27 @@
struct _GtkStyle;
class nsLookAndFeel final : public nsXPLookAndFeel
{
public:
nsLookAndFeel();
virtual ~nsLookAndFeel();
- virtual void NativeInit() final;
- virtual void RefreshImpl();
- virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
- virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
- virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
+ virtual void NativeInit() final override;
+ virtual void RefreshImpl() override;
+ virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
+ virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
+ virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
virtual bool GetFontImpl(FontID aID, nsString& aFontName,
gfxFontStyle& aFontStyle,
- float aDevPixPerCSSPixel);
+ float aDevPixPerCSSPixel) override;
- virtual char16_t GetPasswordCharacterImpl();
- virtual bool GetEchoPasswordImpl();
+ virtual char16_t GetPasswordCharacterImpl() override;
+ virtual bool GetEchoPasswordImpl() override;
bool IsCSDAvailable() const { return mCSDAvailable; }
protected:
// Cached fonts
bool mDefaultFontCached;
bool mButtonFontCached;
--- a/widget/gtk/nsPrintOptionsGTK.h
+++ b/widget/gtk/nsPrintOptionsGTK.h
@@ -23,18 +23,16 @@ namespace embedding
class nsPrintOptionsGTK : public nsPrintOptions
{
public:
nsPrintOptionsGTK();
virtual ~nsPrintOptionsGTK();
NS_IMETHODIMP SerializeToPrintData(nsIPrintSettings* aSettings,
nsIWebBrowserPrint* aWBP,
- mozilla::embedding::PrintData* data);
+ mozilla::embedding::PrintData* data) override;
NS_IMETHODIMP DeserializeToPrintSettings(const mozilla::embedding::PrintData& data,
- nsIPrintSettings* settings);
+ nsIPrintSettings* settings) override;
- virtual nsresult _CreatePrintSettings(nsIPrintSettings **_retval);
+ virtual nsresult _CreatePrintSettings(nsIPrintSettings **_retval) override;
};
-
-
#endif /* nsPrintOptions_h__ */
--- a/widget/headless/HeadlessLookAndFeel.h
+++ b/widget/headless/HeadlessLookAndFeel.h
@@ -18,28 +18,28 @@ namespace widget {
// Our nsLookAndFeel for GTK relies on APIs that aren't available in headless
// mode, so we use an implementation with hardcoded values.
class HeadlessLookAndFeel: public nsXPLookAndFeel {
public:
HeadlessLookAndFeel();
virtual ~HeadlessLookAndFeel();
- virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult);
- virtual void NativeInit() final {};
- virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
- virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
+ virtual nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
+ virtual void NativeInit() final override {};
+ virtual nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
+ virtual nsresult GetFloatImpl(FloatID aID, float &aResult) override;
virtual bool GetFontImpl(FontID aID,
nsString& aFontName,
gfxFontStyle& aFontStyle,
- float aDevPixPerCSSPixel);
+ float aDevPixPerCSSPixel) override;
- virtual void RefreshImpl();
- virtual char16_t GetPasswordCharacterImpl();
- virtual bool GetEchoPasswordImpl();
+ virtual void RefreshImpl() override;
+ virtual char16_t GetPasswordCharacterImpl() override;
+ virtual bool GetEchoPasswordImpl() override;
};
#else
// When possible, we simply reuse the platform's existing nsLookAndFeel
// implementation in headless mode.
typedef nsLookAndFeel HeadlessLookAndFeel;
--- a/widget/nsBaseFilePicker.h
+++ b/widget/nsBaseFilePicker.h
@@ -21,35 +21,35 @@ class nsBaseFilePicker : public nsIFileP
{
class AsyncShowFilePicker;
public:
nsBaseFilePicker();
virtual ~nsBaseFilePicker();
NS_IMETHOD Init(mozIDOMWindowProxy* aParent,
const nsAString& aTitle,
- int16_t aMode);
+ int16_t aMode) override;
- NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback);
- NS_IMETHOD AppendFilters(int32_t filterMask);
- NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex);
- NS_IMETHOD SetFilterIndex(int32_t aFilterIndex);
- NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
- NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory);
- NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory);
- NS_IMETHOD GetDisplaySpecialDirectory(nsAString& aDisplayDirectory);
- NS_IMETHOD SetDisplaySpecialDirectory(const nsAString& aDisplayDirectory);
- NS_IMETHOD GetAddToRecentDocs(bool *aFlag);
- NS_IMETHOD SetAddToRecentDocs(bool aFlag);
- NS_IMETHOD GetMode(int16_t *aMode);
- NS_IMETHOD SetOkButtonLabel(const nsAString& aLabel);
- NS_IMETHOD GetOkButtonLabel(nsAString& aLabel);
+ NS_IMETHOD Open(nsIFilePickerShownCallback *aCallback) override;
+ NS_IMETHOD AppendFilters(int32_t filterMask) override;
+ NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex) override;
+ NS_IMETHOD SetFilterIndex(int32_t aFilterIndex) override;
+ NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles) override;
+ NS_IMETHOD GetDisplayDirectory(nsIFile * *aDisplayDirectory) override;
+ NS_IMETHOD SetDisplayDirectory(nsIFile * aDisplayDirectory) override;
+ NS_IMETHOD GetDisplaySpecialDirectory(nsAString& aDisplayDirectory) override;
+ NS_IMETHOD SetDisplaySpecialDirectory(const nsAString& aDisplayDirectory) override;
+ NS_IMETHOD GetAddToRecentDocs(bool *aFlag) override;
+ NS_IMETHOD SetAddToRecentDocs(bool aFlag) override;
+ NS_IMETHOD GetMode(int16_t *aMode) override;
+ NS_IMETHOD SetOkButtonLabel(const nsAString& aLabel) override;
+ NS_IMETHOD GetOkButtonLabel(nsAString& aLabel) override;
- NS_IMETHOD GetDomFileOrDirectory(nsISupports** aValue);
- NS_IMETHOD GetDomFileOrDirectoryEnumerator(nsISimpleEnumerator** aValue);
+ NS_IMETHOD GetDomFileOrDirectory(nsISupports** aValue) override;
+ NS_IMETHOD GetDomFileOrDirectoryEnumerator(nsISimpleEnumerator** aValue) override;
protected:
virtual void InitNative(nsIWidget *aParent, const nsAString& aTitle) = 0;
virtual nsresult Show(int16_t *_retval) = 0;
bool mAddToRecentDocs;
nsCOMPtr<nsIFile> mDisplayDirectory;
--- a/widget/nsDeviceContextSpecProxy.h
+++ b/widget/nsDeviceContextSpecProxy.h
@@ -23,38 +23,38 @@ class RemotePrintJobChild;
}
class nsDeviceContextSpecProxy final : public nsIDeviceContextSpec
{
public:
NS_DECL_ISUPPORTS
NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPrintSettings,
- bool aIsPrintPreview) final;
+ bool aIsPrintPreview) final override;
- virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+ virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
- NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final;
+ NS_IMETHOD GetDrawEventRecorder(mozilla::gfx::DrawEventRecorder** aDrawEventRecorder) final override;
- float GetDPI() final;
+ float GetDPI() final override;
- float GetPrintingScale() final;
+ float GetPrintingScale() final override;
NS_IMETHOD BeginDocument(const nsAString& aTitle,
const nsAString& aPrintToFileName,
- int32_t aStartPage, int32_t aEndPage) final;
+ int32_t aStartPage, int32_t aEndPage) final override;
- NS_IMETHOD EndDocument() final;
+ NS_IMETHOD EndDocument() final override;
- NS_IMETHOD AbortDocument() final;
+ NS_IMETHOD AbortDocument() final override;
- NS_IMETHOD BeginPage() final;
+ NS_IMETHOD BeginPage() final override;
- NS_IMETHOD EndPage() final;
+ NS_IMETHOD EndPage() final override;
private:
~nsDeviceContextSpecProxy() {}
nsCOMPtr<nsIPrintSettings> mPrintSettings;
nsCOMPtr<nsIPrintSession> mPrintSession;
nsCOMPtr<nsIDeviceContextSpec> mRealDeviceContextSpec;
RefPtr<mozilla::layout::RemotePrintJobChild> mRemotePrintJob;
--- a/widget/tests/TestAppShellSteadyState.cpp
+++ b/widget/tests/TestAppShellSteadyState.cpp
@@ -116,17 +116,17 @@ class NextTestRunnable : public Runnable
{
nsCOMPtr<nsIAppShell> mAppShell;
public:
explicit NextTestRunnable(nsIAppShell* aAppShell)
: mAppShell(aAppShell)
{ }
- NS_IMETHOD Run();
+ NS_IMETHOD Run() override;
};
class ScheduleNestedStableStateRunnable : public ScheduleStableStateRunnable
{
public:
explicit ScheduleNestedStableStateRunnable(nsIAppShell* aAppShell)
: ScheduleStableStateRunnable(aAppShell)
{ }
--- a/widget/uikit/GfxInfo.h
+++ b/widget/uikit/GfxInfo.h
@@ -27,37 +27,37 @@ class GfxInfo : public GfxInfoBase
private:
~GfxInfo();
public:
GfxInfo();
// We only declare the subset of nsIGfxInfo that we actually implement. The
// rest is brought forward from GfxInfoBase.
- NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled);
- NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled);
- NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion);
- NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams);
- NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription);
- NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver);
- NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID);
- NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID);
- NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID);
- NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM);
- NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion);
- NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate);
- NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription);
- NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver);
- NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID);
- NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID);
- NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID);
- NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM);
- NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion);
- NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate);
- NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active);
+ NS_IMETHOD GetD2DEnabled(bool *aD2DEnabled) override;
+ NS_IMETHOD GetDWriteEnabled(bool *aDWriteEnabled) override;
+ NS_IMETHOD GetDWriteVersion(nsAString & aDwriteVersion) override;
+ NS_IMETHOD GetCleartypeParameters(nsAString & aCleartypeParams) override;
+ NS_IMETHOD GetAdapterDescription(nsAString & aAdapterDescription) override;
+ NS_IMETHOD GetAdapterDriver(nsAString & aAdapterDriver) override;
+ NS_IMETHOD GetAdapterVendorID(nsAString & aAdapterVendorID) override;
+ NS_IMETHOD GetAdapterDeviceID(nsAString & aAdapterDeviceID) override;
+ NS_IMETHOD GetAdapterSubsysID(nsAString & aAdapterSubsysID) override;
+ NS_IMETHOD GetAdapterRAM(nsAString & aAdapterRAM) override;
+ NS_IMETHOD GetAdapterDriverVersion(nsAString & aAdapterDriverVersion) override;
+ NS_IMETHOD GetAdapterDriverDate(nsAString & aAdapterDriverDate) override;
+ NS_IMETHOD GetAdapterDescription2(nsAString & aAdapterDescription) override;
+ NS_IMETHOD GetAdapterDriver2(nsAString & aAdapterDriver) override;
+ NS_IMETHOD GetAdapterVendorID2(nsAString & aAdapterVendorID) override;
+ NS_IMETHOD GetAdapterDeviceID2(nsAString & aAdapterDeviceID) override;
+ NS_IMETHOD GetAdapterSubsysID2(nsAString & aAdapterSubsysID) override;
+ NS_IMETHOD GetAdapterRAM2(nsAString & aAdapterRAM) override;
+ NS_IMETHOD GetAdapterDriverVersion2(nsAString & aAdapterDriverVersion) override;
+ NS_IMETHOD GetAdapterDriverDate2(nsAString & aAdapterDriverDate) override;
+ NS_IMETHOD GetIsGPU2Active(bool *aIsGPU2Active) override;
using GfxInfoBase::GetFeatureStatus;
using GfxInfoBase::GetFeatureSuggestedDriverVersion;
using GfxInfoBase::GetWebGLParameter;
#ifdef DEBUG
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_NSIGFXINFODEBUG
#endif
--- a/widget/uikit/nsAppShell.h
+++ b/widget/uikit/nsAppShell.h
@@ -18,24 +18,24 @@
#include <CoreFoundation/CFRunLoop.h>
#include <UIKit/UIWindow.h>
@class AppShellDelegate;
class nsAppShell : public nsBaseAppShell
{
public:
- NS_IMETHOD ResumeNative(void);
+ NS_IMETHOD ResumeNative(void) override;
nsAppShell();
nsresult Init();
- NS_IMETHOD Run(void);
- NS_IMETHOD Exit(void);
+ NS_IMETHOD Run(void) override;
+ NS_IMETHOD Exit(void) override;
// Called by the application delegate
void WillTerminate(void);
static nsAppShell* gAppShell;
static UIWindow* gWindow;
static NSMutableArray* gTopLevelViews;
protected:
--- a/widget/uikit/nsLookAndFeel.h
+++ b/widget/uikit/nsLookAndFeel.h
@@ -9,17 +9,17 @@
#include "nsXPLookAndFeel.h"
class nsLookAndFeel final : public nsXPLookAndFeel
{
public:
nsLookAndFeel();
virtual ~nsLookAndFeel();
- virtual void NativeInit() final;
+ virtual void NativeInit() final override;
virtual void RefreshImpl();
virtual nsresult NativeGetColor(const ColorID aID, nscolor &aResult);
virtual nsresult GetIntImpl(IntID aID, int32_t &aResult);
virtual nsresult GetFloatImpl(FloatID aID, float &aResult);
virtual bool GetFontImpl(FontID aID, nsString& aFontName,
gfxFontStyle& aFontStyle,
float aDevPixPerCSSPixel);
virtual char16_t GetPasswordCharacterImpl()
--- a/widget/uikit/nsScreenManager.h
+++ b/widget/uikit/nsScreenManager.h
@@ -14,29 +14,29 @@
@class UIScreen;
class UIKitScreen : public nsBaseScreen
{
public:
explicit UIKitScreen (UIScreen* screen);
~UIKitScreen () {}
- NS_IMETHOD GetId(uint32_t* outId) {
+ NS_IMETHOD GetId(uint32_t* outId) override {
*outId = 0;
return NS_OK;
}
- NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
- NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
- NS_IMETHOD GetRectDisplayPix(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
- NS_IMETHOD GetAvailRectDisplayPix(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight);
- NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth);
- NS_IMETHOD GetColorDepth(int32_t* aColorDepth);
- NS_IMETHOD GetContentsScaleFactor(double* aContentsScaleFactor);
- NS_IMETHOD GetDefaultCSSScaleFactor(double* aScaleFactor)
+ NS_IMETHOD GetRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
+ NS_IMETHOD GetAvailRect(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
+ NS_IMETHOD GetRectDisplayPix(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
+ NS_IMETHOD GetAvailRectDisplayPix(int32_t* aLeft, int32_t* aTop, int32_t* aWidth, int32_t* aHeight) override;
+ NS_IMETHOD GetPixelDepth(int32_t* aPixelDepth) override;
+ NS_IMETHOD GetColorDepth(int32_t* aColorDepth) override;
+ NS_IMETHOD GetContentsScaleFactor(double* aContentsScaleFactor) override;
+ NS_IMETHOD GetDefaultCSSScaleFactor(double* aScaleFactor) override
{
return GetContentsScaleFactor(aScaleFactor);
}
private:
UIScreen* mScreen;
};
--- a/widget/windows/nsAppShell.cpp
+++ b/widget/windows/nsAppShell.cpp
@@ -50,17 +50,17 @@ static mozilla::LazyLogModule gWinWakeLo
class WinWakeLockListener final : public nsIDOMMozWakeLockListener
{
public:
NS_DECL_ISUPPORTS
private:
~WinWakeLockListener() {}
- NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) {
+ NS_IMETHOD Callback(const nsAString& aTopic, const nsAString& aState) override {
if (!aTopic.EqualsASCII("screen") &&
!aTopic.EqualsASCII("audio-playing") &&
!aTopic.EqualsASCII("video-playing")) {
return NS_OK;
}
// we should still hold the lock for background audio.
if (aTopic.EqualsASCII("audio-playing") &&
--- a/widget/windows/nsAppShell.h
+++ b/widget/windows/nsAppShell.h
@@ -31,21 +31,21 @@ public:
typedef mozilla::Mutex Mutex;
nsresult Init();
void DoProcessMoreGeckoEvents();
static UINT GetTaskbarButtonCreatedMessage();
NS_IMETHOD AfterProcessNextEvent(nsIThreadInternal* thread,
- bool eventWasProcessed) final;
+ bool eventWasProcessed) final override;
protected:
- NS_IMETHOD Run();
- NS_IMETHOD Exit();
+ NS_IMETHOD Run() override;
+ NS_IMETHOD Exit() override;
#if defined(ACCESSIBILITY)
NS_IMETHOD Observe(nsISupports* aSubject, const char* aTopic,
const char16_t* aData) override;
#endif // defined(ACCESSIBILITY)
virtual void ScheduleNativeEventCallback();
virtual bool ProcessNextNativeEvent(bool mayWait);
--- a/widget/windows/nsColorPicker.h
+++ b/widget/windows/nsColorPicker.h
@@ -44,16 +44,16 @@ class nsColorPicker :
public:
nsColorPicker();
NS_DECL_ISUPPORTS
NS_IMETHOD Init(mozIDOMWindowProxy* parent, const nsAString& title,
const nsAString& aInitialColor);
- NS_IMETHOD Open(nsIColorPickerShownCallback* aCallback);
+ NS_IMETHOD Open(nsIColorPickerShownCallback* aCallback) override;
private:
COLORREF mInitialColor;
nsCOMPtr<nsIWidget> mParentWidget;
};
#endif // nsColorPicker_h__
--- a/widget/windows/nsDeviceContextSpecWin.h
+++ b/widget/windows/nsDeviceContextSpecWin.h
@@ -19,30 +19,30 @@ class nsIWidget;
class nsDeviceContextSpecWin : public nsIDeviceContextSpec
{
public:
nsDeviceContextSpecWin();
NS_DECL_ISUPPORTS
- virtual already_AddRefed<PrintTarget> MakePrintTarget() final;
+ virtual already_AddRefed<PrintTarget> MakePrintTarget() final override;
NS_IMETHOD BeginDocument(const nsAString& aTitle,
const nsAString& aPrintToFileName,
int32_t aStartPage,
int32_t aEndPage) override { return NS_OK; }
NS_IMETHOD EndDocument() override { return NS_OK; }
NS_IMETHOD BeginPage() override { return NS_OK; }
NS_IMETHOD EndPage() override { return NS_OK; }
NS_IMETHOD Init(nsIWidget* aWidget, nsIPrintSettings* aPS, bool aIsPrintPreview) override;
- float GetDPI() final;
+ float GetDPI() final override;
- float GetPrintingScale() final;
+ float GetPrintingScale() final override;
void GetDriverName(nsAString& aDriverName) const { aDriverName = mDriverName; }
void GetDeviceName(nsAString& aDeviceName) const { aDeviceName = mDeviceName; }
// The GetDevMode will return a pointer to a DevMode
// whether it is from the Global memory handle or just the DevMode
// To get the DevMode from the Global memory Handle it must lock it
// So this call must be paired with a call to UnlockGlobalHandle
--- a/widget/windows/nsDragService.h
+++ b/widget/windows/nsDragService.h
@@ -24,21 +24,21 @@ public:
virtual ~nsDragService();
// nsBaseDragService
virtual nsresult InvokeDragSessionImpl(nsIArray* anArrayTransferables,
nsIScriptableRegion* aRegion,
uint32_t aActionType);
// nsIDragSession
- NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t anItem);
- NS_IMETHOD GetNumDropItems(uint32_t * aNumItems);
- NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval);
- NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers);
- NS_IMETHOD UpdateDragImage(nsIDOMNode* aImage, int32_t aImageX, int32_t aImageY);
+ NS_IMETHOD GetData(nsITransferable * aTransferable, uint32_t anItem) override;
+ NS_IMETHOD GetNumDropItems(uint32_t * aNumItems) override;
+ NS_IMETHOD IsDataFlavorSupported(const char *aDataFlavor, bool *_retval) override;
+ NS_IMETHOD EndDragSession(bool aDoneDrag, uint32_t aKeyModifiers) override;
+ NS_IMETHOD UpdateDragImage(nsIDOMNode* aImage, int32_t aImageX, int32_t aImageY) override;
// native impl.
NS_IMETHOD SetIDataObject(IDataObject * aDataObj);
NS_IMETHOD StartInvokingDragSession(IDataObject * aDataObj,
uint32_t aActionType);
// A drop occurred within the application vs. outside of it.
void SetDroppedLocal();
--- a/widget/windows/nsFilePicker.h
+++ b/widget/windows/nsFilePicker.h
@@ -21,20 +21,20 @@
#undef LogSeverity // SetupAPI.h #defines this as DWORD
class nsILoadContext;
class nsBaseWinFilePicker :
public nsBaseFilePicker
{
public:
- NS_IMETHOD GetDefaultString(nsAString& aDefaultString);
- NS_IMETHOD SetDefaultString(const nsAString& aDefaultString);
- NS_IMETHOD GetDefaultExtension(nsAString& aDefaultExtension);
- NS_IMETHOD SetDefaultExtension(const nsAString& aDefaultExtension);
+ NS_IMETHOD GetDefaultString(nsAString& aDefaultString) override;
+ NS_IMETHOD SetDefaultString(const nsAString& aDefaultString) override;
+ NS_IMETHOD GetDefaultExtension(nsAString& aDefaultExtension) override;
+ NS_IMETHOD SetDefaultExtension(const nsAString& aDefaultExtension) override;
protected:
nsString mDefaultFilePath;
nsString mDefaultFilename;
nsString mDefaultExtension;
};
/**
@@ -44,30 +44,30 @@ protected:
class nsFilePicker :
public IFileDialogEvents,
public nsBaseWinFilePicker
{
virtual ~nsFilePicker();
public:
nsFilePicker();
- NS_IMETHOD Init(mozIDOMWindowProxy *aParent, const nsAString& aTitle, int16_t aMode);
+ NS_IMETHOD Init(mozIDOMWindowProxy *aParent, const nsAString& aTitle, int16_t aMode) override;
NS_DECL_ISUPPORTS
// IUnknown's QueryInterface
STDMETHODIMP QueryInterface(REFIID refiid, void** ppvResult);
// nsIFilePicker (less what's in nsBaseFilePicker and nsBaseWinFilePicker)
- NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex);
- NS_IMETHOD SetFilterIndex(int32_t aFilterIndex);
- NS_IMETHOD GetFile(nsIFile * *aFile);
- NS_IMETHOD GetFileURL(nsIURI * *aFileURL);
- NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles);
- NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter);
+ NS_IMETHOD GetFilterIndex(int32_t *aFilterIndex) override;
+ NS_IMETHOD SetFilterIndex(int32_t aFilterIndex) override;
+ NS_IMETHOD GetFile(nsIFile * *aFile) override;
+ NS_IMETHOD GetFileURL(nsIURI * *aFileURL) override;
+ NS_IMETHOD GetFiles(nsISimpleEnumerator **aFiles) override;
+ NS_IMETHOD AppendFilter(const nsAString& aTitle, const nsAString& aFilter) override;
// IFileDialogEvents
HRESULT STDMETHODCALLTYPE OnFileOk(IFileDialog *pfd);
HRESULT STDMETHODCALLTYPE OnFolderChanging(IFileDialog *pfd, IShellItem *psiFolder);
HRESULT STDMETHODCALLTYPE OnFolderChange(IFileDialog *pfd);
HRESULT STDMETHODCALLTYPE OnSelectionChange(IFileDialog *pfd);
HRESULT STDMETHODCALLTYPE OnShareViolation(IFileDialog *pfd, IShellItem *psi, FDE_SHAREVIOLATION_RESPONSE *pResponse);
HRESULT STDMETHODCALLTYPE OnTypeChange(IFileDialog *pfd);
--- a/widget/windows/nsLookAndFeel.h
+++ b/widget/windows/nsLookAndFeel.h
@@ -44,17 +44,17 @@
class nsLookAndFeel final : public nsXPLookAndFeel
{
static OperatingSystemVersion GetOperatingSystemVersion();
public:
nsLookAndFeel();
virtual ~nsLookAndFeel();
- void NativeInit() final;
+ void NativeInit() final override;
void RefreshImpl() override;
nsresult NativeGetColor(ColorID aID, nscolor &aResult) override;
nsresult GetIntImpl(IntID aID, int32_t &aResult) override;
nsresult GetFloatImpl(FloatID aID, float &aResult) override;
bool GetFontImpl(FontID aID, nsString& aFontName,
gfxFontStyle& aFontStyle,
float aDevPixPerCSSPixel) override;
char16_t GetPasswordCharacterImpl() override;
--- a/widget/windows/nsWindow.h
+++ b/widget/windows/nsWindow.h
@@ -107,19 +107,19 @@ public:
nsNativeWidget aNativeParent,
const LayoutDeviceIntRect& aRect,
nsWidgetInitData* aInitData = nullptr)
override;
virtual void Destroy() override;
virtual void SetParent(nsIWidget *aNewParent) override;
virtual nsIWidget* GetParent(void) override;
virtual float GetDPI() override;
- double GetDefaultScaleInternal() final;
- int32_t LogToPhys(double aValue) final;
- mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final
+ double GetDefaultScaleInternal() final override;
+ int32_t LogToPhys(double aValue) final override;
+ mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() final override
{
if (mozilla::widget::WinUtils::IsPerMonitorDPIAware()) {
return mozilla::DesktopToLayoutDeviceScale(1.0);
} else {
return mozilla::DesktopToLayoutDeviceScale(GetDefaultScaleInternal());
}
}
--- a/widget/xremoteclient/DBusRemoteClient.h
+++ b/widget/xremoteclient/DBusRemoteClient.h
@@ -11,22 +11,22 @@
#include "mozilla/DBusHelpers.h"
class DBusRemoteClient : public nsRemoteClient
{
public:
DBusRemoteClient();
~DBusRemoteClient();
- virtual nsresult Init();
+ virtual nsresult Init() override;
virtual nsresult SendCommandLine(const char *aProgram, const char *aUsername,
const char *aProfile,
int32_t argc, char **argv,
const char* aDesktopStartupID,
- char **aResponse, bool *aSucceeded);
+ char **aResponse, bool *aSucceeded) override;
void Shutdown();
private:
nsresult DoSendDBusCommandLine(const char *aProgram, const char *aProfile,
const char* aBuffer, int aLength);
RefPtr<DBusConnection> mConnection;
};
--- a/widget/xremoteclient/XRemoteClient.h
+++ b/widget/xremoteclient/XRemoteClient.h
@@ -9,22 +9,22 @@
#include "nsRemoteClient.h"
class XRemoteClient : public nsRemoteClient
{
public:
XRemoteClient();
~XRemoteClient();
- virtual nsresult Init();
+ virtual nsresult Init() override;
virtual nsresult SendCommandLine(const char *aProgram, const char *aUsername,
const char *aProfile,
int32_t argc, char **argv,
const char* aDesktopStartupID,
- char **aResponse, bool *aSucceeded);
+ char **aResponse, bool *aSucceeded) override;
void Shutdown();
private:
Window CheckWindow (Window aWindow);
Window CheckChildren (Window aWindow);
nsresult GetLock (Window aWindow, bool *aDestroyed);
nsresult FreeLock (Window aWindow);
--- a/xpcom/base/CycleCollectedJSRuntime.h
+++ b/xpcom/base/CycleCollectedJSRuntime.h
@@ -55,18 +55,17 @@ public:
MOZ_ASSERT(false, "Don't call Unroot on GC things, as they may be dead");
}
NS_IMETHOD_(void) DeleteCycleCollectable(void* aPtr) override
{
MOZ_ASSERT(false, "Can't directly delete a cycle collectable GC thing");
}
- NS_IMETHOD TraverseNative(void* aPtr, nsCycleCollectionTraversalCallback& aCb)
- override;
+ NS_IMETHOD TraverseNative(void* aPtr, nsCycleCollectionTraversalCallback& aCb) override;
NS_DECL_CYCLE_COLLECTION_CLASS_NAME_METHOD(JSGCThingParticipant)
};
class JSZoneParticipant : public nsCycleCollectionParticipant
{
public:
constexpr JSZoneParticipant(): nsCycleCollectionParticipant(false)
@@ -88,18 +87,17 @@ public:
MOZ_ASSERT(false, "Don't call Unroot on GC things, as they may be dead");
}
NS_IMETHOD_(void) DeleteCycleCollectable(void*) override
{
MOZ_ASSERT(false, "Can't directly delete a cycle collectable GC thing");
}
- NS_IMETHOD TraverseNative(void* aPtr, nsCycleCollectionTraversalCallback& aCb)
- override;
+ NS_IMETHOD TraverseNative(void* aPtr, nsCycleCollectionTraversalCallback& aCb) override;
NS_DECL_CYCLE_COLLECTION_CLASS_NAME_METHOD(JSZoneParticipant)
};
class IncrementalFinalizeRunnable;
struct JSHolderInfo
{
--- a/xpcom/base/nsAgg.h
+++ b/xpcom/base/nsAgg.h
@@ -49,19 +49,20 @@ private:
nsresult \
AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr); \
\
class Internal : public nsISupports { \
public: \
\
Internal() {} \
\
- NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); \
- NS_IMETHOD_(MozExternalRefCountType) AddRef(void); \
- NS_IMETHOD_(MozExternalRefCountType) Release(void); \
+ NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr) \
+ override; \
+ NS_IMETHOD_(MozExternalRefCountType) AddRef(void) override; \
+ NS_IMETHOD_(MozExternalRefCountType) Release(void) override; \
\
NS_DECL_OWNINGTHREAD \
}; \
\
friend class Internal; \
\
nsISupports* MOZ_UNSAFE_REF("fOuter can either point to fAggregated " \
"or to an outer object, and the safety " \
--- a/xpcom/base/nsCycleCollector.cpp
+++ b/xpcom/base/nsCycleCollector.cpp
@@ -2153,34 +2153,38 @@ private:
void SetLastChild()
{
mCurrPi->SetLastChild(mEdgeBuilder.Mark());
}
public:
// nsCycleCollectionNoteRootCallback methods.
NS_IMETHOD_(void) NoteXPCOMRoot(nsISupports* aRoot,
- nsCycleCollectionParticipant* aParticipant);
- NS_IMETHOD_(void) NoteJSRoot(JSObject* aRoot);
+ nsCycleCollectionParticipant* aParticipant)
+ override;
+ NS_IMETHOD_(void) NoteJSRoot(JSObject* aRoot) override;
NS_IMETHOD_(void) NoteNativeRoot(void* aRoot,
- nsCycleCollectionParticipant* aParticipant);
+ nsCycleCollectionParticipant* aParticipant)
+ override;
NS_IMETHOD_(void) NoteWeakMapping(JSObject* aMap, JS::GCCellPtr aKey,
- JSObject* aKdelegate, JS::GCCellPtr aVal);
+ JSObject* aKdelegate, JS::GCCellPtr aVal)
+ override;
// nsCycleCollectionTraversalCallback methods.
NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt aRefCount,
- const char* aObjName);
+ const char* aObjName) override;
NS_IMETHOD_(void) DescribeGCedNode(bool aIsMarked, const char* aObjName,
- uint64_t aCompartmentAddress);
-
- NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild);
- NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aThing);
+ uint64_t aCompartmentAddress) override;
+
+ NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild) override;
+ NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aThing) override;
NS_IMETHOD_(void) NoteNativeChild(void* aChild,
- nsCycleCollectionParticipant* aParticipant);
- NS_IMETHOD_(void) NoteNextEdgeName(const char* aName);
+ nsCycleCollectionParticipant* aParticipant)
+ override;
+ NS_IMETHOD_(void) NoteNextEdgeName(const char* aName) override;
private:
void NoteJSChild(JS::GCCellPtr aChild);
NS_IMETHOD_(void) NoteRoot(void* aRoot,
nsCycleCollectionParticipant* aParticipant)
{
MOZ_ASSERT(aRoot);
@@ -2545,31 +2549,32 @@ class ChildFinder : public nsCycleCollec
{
public:
ChildFinder() : mMayHaveChild(false)
{
}
// The logic of the Note*Child functions must mirror that of their
// respective functions in CCGraphBuilder.
- NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild);
+ NS_IMETHOD_(void) NoteXPCOMChild(nsISupports* aChild) override;
NS_IMETHOD_(void) NoteNativeChild(void* aChild,
- nsCycleCollectionParticipant* aHelper);
- NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aThing);
+ nsCycleCollectionParticipant* aHelper)
+ override;
+ NS_IMETHOD_(void) NoteJSChild(const JS::GCCellPtr& aThing) override;
NS_IMETHOD_(void) DescribeRefCountedNode(nsrefcnt aRefcount,
- const char* aObjname)
+ const char* aObjname) override
{
}
NS_IMETHOD_(void) DescribeGCedNode(bool aIsMarked,
const char* aObjname,
- uint64_t aCompartmentAddress)
+ uint64_t aCompartmentAddress) override
{
}
- NS_IMETHOD_(void) NoteNextEdgeName(const char* aName)
+ NS_IMETHOD_(void) NoteNextEdgeName(const char* aName) override
{
}
bool MayHaveChild()
{
return mMayHaveChild;
}
private:
bool mMayHaveChild;
--- a/xpcom/base/nsDebugImpl.cpp
+++ b/xpcom/base/nsDebugImpl.cpp
@@ -279,17 +279,17 @@ struct FixedBuffer final : public mozill
FixedBuffer() : curlen(0)
{
buffer[0] = '\0';
}
char buffer[500];
uint32_t curlen;
- bool append(const char* sp, size_t len);
+ bool append(const char* sp, size_t len) override;
};
bool
FixedBuffer::append(const char* aBuf, size_t aLen)
{
if (!aLen) {
return true;
}
--- a/xpcom/base/nsDumpUtils.h
+++ b/xpcom/base/nsDumpUtils.h
@@ -115,19 +115,19 @@ public:
static FifoWatcher* GetSingleton();
static bool MaybeCreate();
void RegisterCallback(const nsCString& aCommand, FifoCallback aCallback);
virtual ~FifoWatcher();
- virtual int OpenFd();
+ virtual int OpenFd() override;
- virtual void OnFileCanReadWithoutBlocking(int aFd);
+ virtual void OnFileCanReadWithoutBlocking(int aFd) override;
private:
nsAutoCString mDirPath;
static mozilla::StaticRefPtr<FifoWatcher> sSingleton;
explicit FifoWatcher(nsCString aPath)
: mDirPath(aPath)
@@ -153,21 +153,21 @@ public:
static SignalPipeWatcher* GetSingleton();
void RegisterCallback(uint8_t aSignal, PipeCallback aCallback);
void RegisterSignalHandler(uint8_t aSignal = 0);
virtual ~SignalPipeWatcher();
- virtual int OpenFd();
+ virtual int OpenFd() override;
- virtual void StopWatching();
+ virtual void StopWatching() override;
- virtual void OnFileCanReadWithoutBlocking(int aFd);
+ virtual void OnFileCanReadWithoutBlocking(int aFd) override;
private:
static mozilla::StaticRefPtr<SignalPipeWatcher> sSingleton;
SignalPipeWatcher()
: mSignalInfoLock("SignalPipeWatcher.mSignalInfoLock")
{
MOZ_ASSERT(NS_IsMainThread());
--- a/xpcom/base/nsMemoryInfoDumper.cpp
+++ b/xpcom/base/nsMemoryInfoDumper.cpp
@@ -446,17 +446,17 @@ MakeFilename(const char* aPrefix, const
// - It can be stored as a UniquePtr, whereas nsGZFileWriter is refcounted.
class GZWriterWrapper : public JSONWriteFunc
{
public:
explicit GZWriterWrapper(nsGZFileWriter* aGZWriter)
: mGZWriter(aGZWriter)
{}
- void Write(const char* aStr)
+ void Write(const char* aStr) override
{
// Ignore any failure because JSONWriteFunc doesn't have a mechanism for
// handling errors.
Unused << mGZWriter->Write(aStr);
}
nsresult Finish() { return mGZWriter->Finish(); }
--- a/xpcom/base/nsQueryObject.h
+++ b/xpcom/base/nsQueryObject.h
@@ -19,17 +19,17 @@ class MOZ_STACK_CLASS nsQueryObject fina
{
public:
explicit nsQueryObject(T* aRawPtr)
: mRawPtr(aRawPtr)
{
}
virtual nsresult NS_FASTCALL operator()(const nsIID& aIID,
- void** aResult) const
+ void** aResult) const override
{
nsresult status = mRawPtr ? mRawPtr->QueryInterface(aIID, aResult)
: NS_ERROR_NULL_POINTER;
return status;
}
private:
T* MOZ_NON_OWNING_REF mRawPtr;
};
@@ -39,17 +39,17 @@ class MOZ_STACK_CLASS nsQueryObjectWithE
{
public:
nsQueryObjectWithError(T* aRawPtr, nsresult* aErrorPtr)
: mRawPtr(aRawPtr), mErrorPtr(aErrorPtr)
{
}
virtual nsresult NS_FASTCALL operator()(const nsIID& aIID,
- void** aResult) const
+ void** aResult) const override
{
nsresult status = mRawPtr ? mRawPtr->QueryInterface(aIID, aResult)
: NS_ERROR_NULL_POINTER;
if (mErrorPtr) {
*mErrorPtr = status;
}
return status;
}
--- a/xpcom/build/LateWriteChecks.cpp
+++ b/xpcom/build/LateWriteChecks.cpp
@@ -98,17 +98,18 @@ public:
{
}
~LateWriteObserver()
{
PL_strfree(mProfileDirectory);
mProfileDirectory = nullptr;
}
- void Observe(IOInterposeObserver::Observation& aObservation);
+ void Observe(IOInterposeObserver::Observation& aObservation) override;
+
private:
char* mProfileDirectory;
};
void
LateWriteObserver::Observe(IOInterposeObserver::Observation& aOb)
{
// Crash if that is the shutdown check mode
--- a/xpcom/build/MainThreadIOLogger.cpp
+++ b/xpcom/build/MainThreadIOLogger.cpp
@@ -52,17 +52,17 @@ struct ObservationWithStack
class MainThreadIOLoggerImpl final : public mozilla::IOInterposeObserver
{
public:
MainThreadIOLoggerImpl();
~MainThreadIOLoggerImpl();
bool Init();
- void Observe(Observation& aObservation);
+ void Observe(Observation& aObservation) override;
private:
static void sIOThreadFunc(void* aArg);
void IOThreadFunc();
TimeStamp mLogStartTime;
const char* mFileName;
PRThread* mIOThread;
@@ -226,9 +226,8 @@ Init()
sImpl = impl.forget();
IOInterposer::Register(IOInterposeObserver::OpAllWithStaging, sImpl);
return true;
}
} // namespace MainThreadIOLogger
} // namespace mozilla
-
--- a/xpcom/ds/nsHashPropertyBag.cpp
+++ b/xpcom/ds/nsHashPropertyBag.cpp
@@ -265,17 +265,17 @@ class ProxyHashtableDestructor final : p
public:
using HashtableType = nsInterfaceHashtable<nsStringHashKey, nsIVariant>;
explicit ProxyHashtableDestructor(HashtableType&& aTable)
: mozilla::Runnable("ProxyHashtableDestructor")
, mPropertyHash(mozilla::Move(aTable))
{}
NS_IMETHODIMP
- Run()
+ Run() override
{
MOZ_ASSERT(NS_IsMainThread());
HashtableType table(mozilla::Move(mPropertyHash));
return NS_OK;
}
private:
HashtableType mPropertyHash;
--- a/xpcom/io/nsAppFileLocationProvider.cpp
+++ b/xpcom/io/nsAppFileLocationProvider.cpp
@@ -464,17 +464,17 @@ public:
*/
nsPathsDirectoryEnumerator(nsIDirectoryServiceProvider* aProvider,
const char* aKeyList[]) :
nsAppDirectoryEnumerator(aProvider, aKeyList + 1),
mEndPath(aKeyList[0])
{
}
- NS_IMETHOD HasMoreElements(bool* aResult)
+ NS_IMETHOD HasMoreElements(bool* aResult) override
{
if (mEndPath)
while (!mNext && *mEndPath) {
const char* pathVar = mEndPath;
// skip PATH_SEPARATORs at the begining of the mEndPath
while (*pathVar == PATH_SEPARATOR) {
++pathVar;
--- a/xpcom/io/nsLocalFileWin.cpp
+++ b/xpcom/io/nsLocalFileWin.cpp
@@ -830,17 +830,17 @@ public:
if (NS_FAILED(rv)) {
return rv;
}
mParent = aParent;
return NS_OK;
}
- NS_IMETHOD HasMoreElements(bool* aResult)
+ NS_IMETHOD HasMoreElements(bool* aResult) override
{
nsresult rv;
if (!mNext && mDir) {
nsString name;
rv = ReadDir(mDir, PR_SKIP_BOTH, name);
if (NS_FAILED(rv)) {
return rv;
}
@@ -869,47 +869,47 @@ public:
}
*aResult = mNext != nullptr;
if (!*aResult) {
Close();
}
return NS_OK;
}
- NS_IMETHOD GetNext(nsISupports** aResult)
+ NS_IMETHOD GetNext(nsISupports** aResult) override
{
nsresult rv;
bool hasMore;
rv = HasMoreElements(&hasMore);
if (NS_FAILED(rv)) {
return rv;
}
*aResult = mNext; // might return nullptr
NS_IF_ADDREF(*aResult);
mNext = nullptr;
return NS_OK;
}
- NS_IMETHOD GetNextFile(nsIFile** aResult)
+ NS_IMETHOD GetNextFile(nsIFile** aResult) override
{
*aResult = nullptr;
bool hasMore = false;
nsresult rv = HasMoreElements(&hasMore);
if (NS_FAILED(rv) || !hasMore) {
return rv;
}
*aResult = mNext;
NS_IF_ADDREF(*aResult);
mNext = nullptr;
return NS_OK;
}
- NS_IMETHOD Close()
+ NS_IMETHOD Close() override
{
if (mDir) {
nsresult rv = CloseDir(mDir);
NS_ASSERTION(NS_SUCCEEDED(rv), "close failed");
if (NS_FAILED(rv)) {
return NS_ERROR_FAILURE;
}
}
--- a/xpcom/reflect/xptcall/md/test/invoke_test.cpp
+++ b/xpcom/reflect/xptcall/md/test/invoke_test.cpp
@@ -28,29 +28,29 @@ class foo : public base {
public:
NS_IMETHOD callme1(int i, int j) = 0;
NS_IMETHOD callme2(int i, int j) = 0;
NS_IMETHOD callme3(int i, int j) = 0;
};
class bar : public foo{
public:
- NS_IMETHOD ignored();
- NS_IMETHOD callme1(int i, int j);
- NS_IMETHOD callme2(int i, int j);
- NS_IMETHOD callme3(int i, int j);
+ NS_IMETHOD ignored() override;
+ NS_IMETHOD callme1(int i, int j) override;
+ NS_IMETHOD callme2(int i, int j) override;
+ NS_IMETHOD callme3(int i, int j) override;
};
/*
class baz : public base {
public:
- NS_IMETHOD ignored();
- NS_IMETHOD callme1();
- NS_IMETHOD callme2();
- NS_IMETHOD callme3();
+ NS_IMETHOD ignored() override;
+ NS_IMETHOD callme1() override;
+ NS_IMETHOD callme2() override;
+ NS_IMETHOD callme3() override;
void setfoo(foo* f) {other = f;}
foo* other;
};
NS_IMETHODIMP baz::ignored(){return 0;}
*/
NS_IMETHODIMP bar::ignored(){return 0;}
--- a/xpcom/reflect/xptcall/md/test/stub_test.cpp
+++ b/xpcom/reflect/xptcall/md/test/stub_test.cpp
@@ -27,28 +27,28 @@ class foo : public base {
public:
NS_IMETHOD callme1(int i, int j) = 0;
NS_IMETHOD callme2(int i, int j) = 0;
NS_IMETHOD callme3(int i, int j) = 0;
};
class bar : public foo{
public:
- NS_IMETHOD ignored();
- NS_IMETHOD callme1(int i, int j);
- NS_IMETHOD callme2(int i, int j);
- NS_IMETHOD callme3(int i, int j);
+ NS_IMETHOD ignored() override;
+ NS_IMETHOD callme1(int i, int j) override;
+ NS_IMETHOD callme2(int i, int j) override;
+ NS_IMETHOD callme3(int i, int j) override;
};
class baz : public base {
public:
- NS_IMETHOD ignored();
- NS_IMETHOD callme1();
- NS_IMETHOD callme2();
- NS_IMETHOD callme3();
+ NS_IMETHOD ignored() override;
+ NS_IMETHOD callme1() override;
+ NS_IMETHOD callme2() override;
+ NS_IMETHOD callme3() override;
void setfoo(foo* f) {other = f;}
foo* other;
};
NS_IMETHODIMP baz::ignored(){return 0;}
NS_IMETHODIMP bar::ignored(){return 0;}
--- a/xpcom/tests/gtest/TestAtoms.cpp
+++ b/xpcom/tests/gtest/TestAtoms.cpp
@@ -153,17 +153,17 @@ TEST(Atoms, Table)
EXPECT_EQ(NS_GetNumberOfAtoms(), count + 1);
}
class nsAtomRunner final : public nsIRunnable
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
- NS_IMETHOD Run() final
+ NS_IMETHOD Run() final override
{
for (int i = 0; i < 10000; i++) {
RefPtr<nsAtom> atom = NS_Atomize(u"A Testing Atom");
}
return NS_OK;
}
private:
--- a/xpcom/tests/gtest/TestAutoRefCnt.cpp
+++ b/xpcom/tests/gtest/TestAutoRefCnt.cpp
@@ -13,17 +13,17 @@
using namespace mozilla;
class nsThreadSafeAutoRefCntRunner final : public nsIRunnable
{
public:
NS_DECL_THREADSAFE_ISUPPORTS
- NS_IMETHOD Run() final
+ NS_IMETHOD Run() final override
{
for (int i = 0; i < 10000; i++) {
if (++sRefCnt == 1) {
sIncToOne++;
}
if (--sRefCnt == 0) {
sDecToZero++;
}
--- a/xpcom/tests/gtest/TestDeadlockDetector.cpp
+++ b/xpcom/tests/gtest/TestDeadlockDetector.cpp
@@ -51,22 +51,22 @@ extern unsigned int _gdb_sleep_duration;
/**
* Simple test fixture that makes sure the gdb sleep setup in the
* ah crap handler is bypassed during the death tests.
*/
class TESTNAME(DeadlockDetectorTest) : public ::testing::Test
{
protected:
- void SetUp() final {
+ void SetUp() final override {
mOldSleepDuration = ::_gdb_sleep_duration;
::_gdb_sleep_duration = 0;
}
- void TearDown() final {
+ void TearDown() final override {
::_gdb_sleep_duration = mOldSleepDuration;
}
private:
unsigned int mOldSleepDuration;
};
void DisableCrashReporter()
--- a/xpcom/tests/gtest/TestExpirationTracker.cpp
+++ b/xpcom/tests/gtest/TestExpirationTracker.cpp
@@ -106,17 +106,17 @@ public:
LogAction(objref.get(), "Marked used");
}
break;
}
}
}
protected:
- void NotifyExpired(Object* aObj) {
+ void NotifyExpired(Object* aObj) override {
LogAction(aObj, "Expired");
PRIntervalTime now = PR_IntervalNow();
uint32_t timeDiffMS = (now - aObj->mLastUsed)*1000/PR_TicksPerSecond();
// See the comment for NotifyExpired in nsExpirationTracker.h for these
// bounds
uint32_t lowerBoundMS = (K-1)*periodMS - slackMS;
uint32_t upperBoundMS = K*(periodMS + sleepPeriodMS) + slackMS;
if (logging) {
--- a/xpcom/tests/windows/TestCOM.cpp
+++ b/xpcom/tests/windows/TestCOM.cpp
@@ -34,17 +34,17 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsITestCom
class nsTestCom final : public nsITestCom {
NS_DECL_ISUPPORTS
public:
nsTestCom() {
}
- NS_IMETHOD Test() {
+ NS_IMETHOD Test() override {
return NS_OK;
}
static int sDestructions;
private:
~nsTestCom() {
sDestructions++;
@@ -78,17 +78,17 @@ class nsTestComFactory final : public ns
public:
nsTestComFactory() {
}
NS_IMETHOD CreateInstance(nsISupports *aOuter,
const nsIID &aIID,
void **aResult);
- NS_IMETHOD LockFactory(bool aLock) {
+ NS_IMETHOD LockFactory(bool aLock) override {
return NS_OK;
}
static int sDestructions;
};
int nsTestComFactory::sDestructions;
--- a/xpcom/threads/CPUUsageWatcher.h
+++ b/xpcom/threads/CPUUsageWatcher.h
@@ -56,17 +56,17 @@ public:
void Uninit();
// Updates necessary values to allow AnnotateHang to function. This must be
// called on some semi-regular basis, as it will calculate the mean CPU
// usage values between now and the last time it was called.
Result<Ok, CPUUsageWatcherError> CollectCPUUsage();
- void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) final;
+ void AnnotateHang(HangMonitor::HangAnnotations& aAnnotations) final override;
private:
#ifdef CPU_USAGE_WATCHER_ACTIVE
bool mInitialized;
// The threshold above which we will mark a hang as occurring under high
// external CPU usage conditions
float mExternalUsageThreshold;
// The CPU usage (0-1) external to our process, averaged between the two
// most recent monitor thread runs
--- a/xpcom/threads/EventQueue.h
+++ b/xpcom/threads/EventQueue.h
@@ -18,30 +18,30 @@ namespace mozilla {
class EventQueue final : public AbstractEventQueue
{
public:
EventQueue() {}
explicit EventQueue(EventPriority aPriority);
void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
EventPriority aPriority,
- const MutexAutoLock& aProofOfLock) final;
+ const MutexAutoLock& aProofOfLock) final override;
already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
- const MutexAutoLock& aProofOfLock) final;
+ const MutexAutoLock& aProofOfLock) final override;
- bool IsEmpty(const MutexAutoLock& aProofOfLock) final;
- bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final;
+ bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
+ bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
- size_t Count(const MutexAutoLock& aProofOfLock) const final;
+ size_t Count(const MutexAutoLock& aProofOfLock) const final override;
already_AddRefed<nsIRunnable> PeekEvent(const MutexAutoLock& aProofOfLock);
- void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
- void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
- void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
- void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+ void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+ void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+ void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+ void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
private:
mozilla::Queue<nsCOMPtr<nsIRunnable>> mQueue;
};
} // namespace mozilla
#endif // mozilla_EventQueue_h
--- a/xpcom/threads/LabeledEventQueue.h
+++ b/xpcom/threads/LabeledEventQueue.h
@@ -31,28 +31,28 @@ class SchedulerGroup;
class LabeledEventQueue final : public AbstractEventQueue
{
public:
explicit LabeledEventQueue(EventPriority aPriority);
~LabeledEventQueue();
void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
EventPriority aPriority,
- const MutexAutoLock& aProofOfLock) final;
+ const MutexAutoLock& aProofOfLock) final override;
already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
- const MutexAutoLock& aProofOfLock) final;
+ const MutexAutoLock& aProofOfLock) final override;
- bool IsEmpty(const MutexAutoLock& aProofOfLock) final;
- size_t Count(const MutexAutoLock& aProofOfLock) const final;
- bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final;
+ bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
+ size_t Count(const MutexAutoLock& aProofOfLock) const final override;
+ bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
- void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
- void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
- void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
- void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final {}
+ void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+ void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+ void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
+ void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override {}
private:
// The basic problem here is to keep track of the ordering relationships
// between events. As long as there are only labeled events, there can be one
// queue per SchedulerGroup. However, if an unlabeled event is pushed, we must
// remember that it should run after all the labeled events currently in the
// queue. To do this, the queues are arranged in "epochs". Each time the tail
--- a/xpcom/threads/PrioritizedEventQueue.h
+++ b/xpcom/threads/PrioritizedEventQueue.h
@@ -43,41 +43,41 @@ public:
PrioritizedEventQueue(UniquePtr<InnerQueueT> aHighQueue,
UniquePtr<InnerQueueT> aInputQueue,
UniquePtr<InnerQueueT> aNormalQueue,
UniquePtr<InnerQueueT> aIdleQueue,
already_AddRefed<nsIIdlePeriod> aIdlePeriod);
void PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
EventPriority aPriority,
- const MutexAutoLock& aProofOfLock) final;
+ const MutexAutoLock& aProofOfLock) final override;
already_AddRefed<nsIRunnable> GetEvent(EventPriority* aPriority,
- const MutexAutoLock& aProofOfLock) final;
+ const MutexAutoLock& aProofOfLock) final override;
- bool IsEmpty(const MutexAutoLock& aProofOfLock) final;
- size_t Count(const MutexAutoLock& aProofOfLock) const final;
- bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final;
+ bool IsEmpty(const MutexAutoLock& aProofOfLock) final override;
+ size_t Count(const MutexAutoLock& aProofOfLock) const final override;
+ bool HasReadyEvent(const MutexAutoLock& aProofOfLock) final override;
// When checking the idle deadline, we need to drop whatever mutex protects
// this queue. This method allows that mutex to be stored so that we can drop
// it and reacquire it when checking the idle deadline. The mutex must live at
// least as long as the queue.
void SetMutexRef(Mutex& aMutex) { mMutex = &aMutex; }
#ifndef RELEASE_OR_BETA
// nsThread.cpp sends telemetry containing the most recently computed idle
// deadline. We store a reference to a field in nsThread where this deadline
// will be stored so that it can be fetched quickly for telemetry.
void SetNextIdleDeadlineRef(TimeStamp& aDeadline) { mNextIdleDeadline = &aDeadline; }
#endif
- void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
- void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
- void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
- void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final;
+ void EnableInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
+ void FlushInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
+ void SuspendInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
+ void ResumeInputEventPrioritization(const MutexAutoLock& aProofOfLock) final override;
private:
EventPriority SelectQueue(bool aUpdateState, const MutexAutoLock& aProofOfLock);
// Returns a null TimeStamp if we're not in the idle period.
mozilla::TimeStamp GetIdleDeadline();
UniquePtr<InnerQueueT> mHighQueue;
--- a/xpcom/threads/Scheduler.cpp
+++ b/xpcom/threads/Scheduler.cpp
@@ -39,35 +39,35 @@ public:
explicit SchedulerEventQueue(UniquePtr<AbstractEventQueue> aQueue)
: mLock("Scheduler")
, mNonCooperativeCondVar(mLock, "SchedulerNonCoop")
, mQueue(Move(aQueue))
, mScheduler(nullptr)
{}
bool PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
- EventPriority aPriority) final;
+ EventPriority aPriority) final override;
- void Disconnect(const MutexAutoLock& aProofOfLock) final {}
+ void Disconnect(const MutexAutoLock& aProofOfLock) final override {}
already_AddRefed<nsIRunnable> GetEvent(bool aMayWait,
- EventPriority* aPriority) final;
- bool HasPendingEvent() final;
+ EventPriority* aPriority) final override;
+ bool HasPendingEvent() final override;
bool HasPendingEvent(const MutexAutoLock& aProofOfLock);
- bool ShutdownIfNoPendingEvents() final;
+ bool ShutdownIfNoPendingEvents() final override;
- already_AddRefed<nsIThreadObserver> GetObserver() final;
- already_AddRefed<nsIThreadObserver> GetObserverOnThread() final;
- void SetObserver(nsIThreadObserver* aObserver) final;
+ already_AddRefed<nsIThreadObserver> GetObserver() final override;
+ already_AddRefed<nsIThreadObserver> GetObserverOnThread() final override;
+ void SetObserver(nsIThreadObserver* aObserver) final override;
- void EnableInputEventPrioritization() final;
- void FlushInputEventPrioritization() final;
- void SuspendInputEventPrioritization() final;
- void ResumeInputEventPrioritization() final;
+ void EnableInputEventPrioritization() final override;
+ void FlushInputEventPrioritization() final override;
+ void SuspendInputEventPrioritization() final override;
+ void ResumeInputEventPrioritization() final override;
bool UseCooperativeScheduling() const;
void SetScheduler(SchedulerImpl* aScheduler);
Mutex& MutexRef() { return mLock; }
private:
Mutex mLock;
--- a/xpcom/threads/SystemGroup.cpp
+++ b/xpcom/threads/SystemGroup.cpp
@@ -13,17 +13,17 @@
#include "nsINamed.h"
using namespace mozilla;
class SystemGroupImpl final : public SchedulerGroup
{
public:
SystemGroupImpl();
- NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SystemGroupImpl)
+ NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SystemGroupImpl, override)
static void InitStatic();
static void ShutdownStatic();
static SystemGroupImpl* Get();
static bool Initialized() { return !!sSingleton; }
private:
--- a/xpcom/threads/ThreadEventQueue.cpp
+++ b/xpcom/threads/ThreadEventQueue.cpp
@@ -23,22 +23,22 @@ class ThreadEventQueue<InnerQueueT>::Nes
public:
NestedSink(EventQueue* aQueue, ThreadEventQueue* aOwner)
: mQueue(aQueue)
, mOwner(aOwner)
{
}
bool PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
- EventPriority aPriority) final
+ EventPriority aPriority) final override
{
return mOwner->PutEventInternal(Move(aEvent), aPriority, this);
}
- void Disconnect(const MutexAutoLock& aProofOfLock) final
+ void Disconnect(const MutexAutoLock& aProofOfLock) final override
{
mQueue = nullptr;
}
private:
friend class ThreadEventQueue;
// This is a non-owning reference. It must live at least until Disconnect is
--- a/xpcom/threads/ThreadEventQueue.h
+++ b/xpcom/threads/ThreadEventQueue.h
@@ -35,30 +35,30 @@ class ThreadEventTarget;
// is a template parameter to avoid virtual dispatch overhead.
template<class InnerQueueT>
class ThreadEventQueue final : public SynchronizedEventQueue
{
public:
explicit ThreadEventQueue(UniquePtr<InnerQueueT> aQueue);
bool PutEvent(already_AddRefed<nsIRunnable>&& aEvent,
- EventPriority aPriority) final;
+ EventPriority aPriority) final override;
already_AddRefed<nsIRunnable> GetEvent(bool aMayWait,
- EventPriority* aPriority) final;
- bool HasPendingEvent() final;
+ EventPriority* aPriority) final override;
+ bool HasPendingEvent() final override;
- bool ShutdownIfNoPendingEvents() final;
+ bool ShutdownIfNoPendingEvents() final override;
- void Disconnect(const MutexAutoLock& aProofOfLock) final {}
+ void Disconnect(const MutexAutoLock& aProofOfLock) final override {}
- void EnableInputEventPrioritization() final;
- void FlushInputEventPrioritization() final;
- void SuspendInputEventPrioritization() final;
- void ResumeInputEventPrioritization() final;
+ void EnableInputEventPrioritization() final override;
+ void FlushInputEventPrioritization() final override;
+ void SuspendInputEventPrioritization() final override;
+ void ResumeInputEventPrioritization() final override;
/**
* This method causes any events currently enqueued on the thread to be
* suppressed until PopEventQueue is called, and any event dispatched to this
* thread's nsIEventTarget will queue as well. Calls to PushEventQueue may be
* nested and must each be paired with a call to PopEventQueue in order to
* restore the original state of the thread. The returned nsIEventTarget may
* be used to push events onto the nested queue. Dispatching will be disabled
@@ -72,19 +72,19 @@ public:
* Revert a call to PushEventQueue. When an event queue is popped, any events
* remaining in the queue are appended to the elder queue. This also causes
* the nsIEventTarget returned from PushEventQueue to stop dispatching events.
* Must only be called on the target thread, and with the innermost event
* queue.
*/
void PopEventQueue(nsIEventTarget* aTarget);
- already_AddRefed<nsIThreadObserver> GetObserver() final;
- already_AddRefed<nsIThreadObserver> GetObserverOnThread() final;
- void SetObserver(nsIThreadObserver* aObserver) final;
+ already_AddRefed<nsIThreadObserver> GetObserver() final override;
+ already_AddRefed<nsIThreadObserver> GetObserverOnThread() final override;
+ void SetObserver(nsIThreadObserver* aObserver) final override;
Mutex& MutexRef() { return mLock; }
private:
class NestedSink;
virtual ~ThreadEventQueue();
--- a/xpcom/threads/nsThreadUtils.h
+++ b/xpcom/threads/nsThreadUtils.h
@@ -1179,17 +1179,18 @@ public:
Method aMethod, Args&&... aArgs)
: BaseType(aName)
, mReceiver(Forward<ForwardedPtrType>(aObj))
, mMethod(aMethod)
, mArgs(Forward<Args>(aArgs)...)
{
static_assert(sizeof...(Storages) == sizeof...(Args), "Storages and Args should have equal sizes");
}
- NS_IMETHOD Run()
+
+ NS_IMETHOD Run() override
{
CancelTimer();
if (MOZ_LIKELY(mReceiver.Get())) {
mArgs.apply(mReceiver.Get(), mMethod);
}
return NS_OK;
--- a/xpfe/appshell/nsAppShellWindowEnumerator.h
+++ b/xpfe/appshell/nsAppShellWindowEnumerator.h
@@ -70,97 +70,97 @@ protected:
};
class nsASDOMWindowEnumerator : public nsAppShellWindowEnumerator {
public:
nsASDOMWindowEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowEnumerator();
- NS_IMETHOD GetNext(nsISupports **retval);
+ NS_IMETHOD GetNext(nsISupports **retval) override;
};
class nsASXULWindowEnumerator : public nsAppShellWindowEnumerator {
public:
nsASXULWindowEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowEnumerator();
- NS_IMETHOD GetNext(nsISupports **retval);
+ NS_IMETHOD GetNext(nsISupports **retval) override;
};
//
// concrete enumerators
//
class nsASDOMWindowEarlyToLateEnumerator : public nsASDOMWindowEnumerator {
public:
nsASDOMWindowEarlyToLateEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowEarlyToLateEnumerator();
protected:
- virtual nsWindowInfo *FindNext();
+ virtual nsWindowInfo *FindNext() override;
};
class nsASXULWindowEarlyToLateEnumerator : public nsASXULWindowEnumerator {
public:
nsASXULWindowEarlyToLateEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowEarlyToLateEnumerator();
protected:
- virtual nsWindowInfo *FindNext();
+ virtual nsWindowInfo *FindNext() override;
};
class nsASDOMWindowFrontToBackEnumerator : public nsASDOMWindowEnumerator {
public:
nsASDOMWindowFrontToBackEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowFrontToBackEnumerator();
protected:
- virtual nsWindowInfo *FindNext();
+ virtual nsWindowInfo *FindNext() override;
};
class nsASXULWindowFrontToBackEnumerator : public nsASXULWindowEnumerator {
public:
nsASXULWindowFrontToBackEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowFrontToBackEnumerator();
protected:
- virtual nsWindowInfo *FindNext();
+ virtual nsWindowInfo *FindNext() override;
};
class nsASDOMWindowBackToFrontEnumerator : public nsASDOMWindowEnumerator {
public:
nsASDOMWindowBackToFrontEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASDOMWindowBackToFrontEnumerator();
protected:
- virtual nsWindowInfo *FindNext();
+ virtual nsWindowInfo *FindNext() override;
};
class nsASXULWindowBackToFrontEnumerator : public nsASXULWindowEnumerator {
public:
nsASXULWindowBackToFrontEnumerator(const char16_t* aTypeString,
nsWindowMediator& inMediator);
virtual ~nsASXULWindowBackToFrontEnumerator();
protected:
- virtual nsWindowInfo *FindNext();
+ virtual nsWindowInfo *FindNext() override;
};
#endif