Bug 1778211 - Reject xpidl CDATA containing 'virtual', r=xpcom-reviewers,necko-reviewers,mccr8,dragana
We'll probably want to do something more accurate in the future with a custom clang static analysis pass which validates that XPIDL interfaces have the expected vtable and struct layout, however doing so would be more involved than the string matching done in this patch. In addition to checking for extra virtual methods, we'll likely also want to check for data members on interfaces, and reject them unless the class is marked as `[builtinclass]` in addition to some other attribute which we'll need to add to prevent them from being implemented in Rust (as c++ data members will not be reflected by the rust macro). There were 2 instances of a comment which contained the word 'virtual' within a CDATA block. These comments were moved out of the CDATA block to avoid triggering the error. Differential Revision: https://phabricator.services.mozilla.com/D151068
This commit is contained in:
@@ -22,6 +22,9 @@ class LocalAccessible;
|
|||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
[ptr] native InternalAccessible(mozilla::a11y::Accessible);
|
||||||
|
[ptr] native InternalLocalAccessible(mozilla::a11y::LocalAccessible);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A cross-platform interface that supports platform-specific
|
* A cross-platform interface that supports platform-specific
|
||||||
* accessibility APIs like MSAA and ATK. Contains the sum of what's needed
|
* accessibility APIs like MSAA and ATK. Contains the sum of what's needed
|
||||||
@@ -342,10 +345,8 @@ interface nsIAccessible : nsISupports
|
|||||||
*/
|
*/
|
||||||
void announce(in AString announcement, in unsigned short priority);
|
void announce(in AString announcement, in unsigned short priority);
|
||||||
|
|
||||||
%{C++
|
[notxpcom, nostdcall] InternalLocalAccessible toInternalAccessible();
|
||||||
virtual mozilla::a11y::LocalAccessible* ToInternalAccessible() const = 0;
|
[notxpcom, nostdcall] InternalAccessible toInternalGeneric();
|
||||||
virtual mozilla::a11y::Accessible* ToInternalGeneric() const = 0;
|
|
||||||
%}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -11,15 +11,15 @@
|
|||||||
#define NS_ACCESSIBLE_MAC_EVENT_TOPIC "accessible-mac-event"
|
#define NS_ACCESSIBLE_MAC_EVENT_TOPIC "accessible-mac-event"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
native NativeObjectId(id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A generic NSISupports wrapper for native NSObjects.
|
* A generic NSISupports wrapper for native NSObjects.
|
||||||
*/
|
*/
|
||||||
[scriptable, builtinclass, uuid(4582bb77-de03-4ed1-a9b4-d482d97c0129)]
|
[scriptable, builtinclass, uuid(4582bb77-de03-4ed1-a9b4-d482d97c0129)]
|
||||||
interface nsIAccessibleMacNSObjectWrapper : nsISupports
|
interface nsIAccessibleMacNSObjectWrapper : nsISupports
|
||||||
{
|
{
|
||||||
%{C++
|
[noscript, notxpcom, nostdcall] NativeObjectId GetNativeObject();
|
||||||
virtual id GetNativeObject() const = 0;
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, builtinclass, uuid(9d27cf21-66fc-47dc-8a07-98edb18707b1)]
|
[scriptable, builtinclass, uuid(9d27cf21-66fc-47dc-8a07-98edb18707b1)]
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ xpcAccessibleGeneric::~xpcAccessibleGeneric() {
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
// nsIAccessible
|
// nsIAccessible
|
||||||
|
|
||||||
LocalAccessible* xpcAccessibleGeneric::ToInternalAccessible() const {
|
LocalAccessible* xpcAccessibleGeneric::ToInternalAccessible() {
|
||||||
return mIntl->AsLocal();
|
return mIntl->AsLocal();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ class xpcAccessibleGeneric : public xpcAccessible,
|
|||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
|
|
||||||
// nsIAccessible
|
// nsIAccessible
|
||||||
LocalAccessible* ToInternalAccessible() const final;
|
LocalAccessible* ToInternalAccessible() final;
|
||||||
Accessible* ToInternalGeneric() const final { return mIntl; }
|
Accessible* ToInternalGeneric() final { return mIntl; }
|
||||||
|
|
||||||
// xpcAccessibleGeneric
|
// xpcAccessibleGeneric
|
||||||
virtual void Shutdown();
|
virtual void Shutdown();
|
||||||
|
|||||||
@@ -20,10 +20,7 @@ class xpcAccessibleMacNSObjectWrapper : public nsIAccessibleMacNSObjectWrapper {
|
|||||||
explicit xpcAccessibleMacNSObjectWrapper(id aTextMarker);
|
explicit xpcAccessibleMacNSObjectWrapper(id aTextMarker);
|
||||||
|
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSIACCESSIBLEMACNSOBJECTWRAPPER;
|
NS_DECL_NSIACCESSIBLEMACNSOBJECTWRAPPER
|
||||||
|
|
||||||
// Get the wrapped NSObject for this interface.
|
|
||||||
id GetNativeObject() const final;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~xpcAccessibleMacNSObjectWrapper();
|
virtual ~xpcAccessibleMacNSObjectWrapper();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ xpcAccessibleMacNSObjectWrapper::xpcAccessibleMacNSObjectWrapper(id aNativeObj)
|
|||||||
|
|
||||||
xpcAccessibleMacNSObjectWrapper::~xpcAccessibleMacNSObjectWrapper() { [mNativeObject release]; }
|
xpcAccessibleMacNSObjectWrapper::~xpcAccessibleMacNSObjectWrapper() { [mNativeObject release]; }
|
||||||
|
|
||||||
id xpcAccessibleMacNSObjectWrapper::GetNativeObject() const { return mNativeObject; }
|
id xpcAccessibleMacNSObjectWrapper::GetNativeObject() { return mNativeObject; }
|
||||||
|
|
||||||
// xpcAccessibleMacInterface
|
// xpcAccessibleMacInterface
|
||||||
|
|
||||||
|
|||||||
@@ -3546,6 +3546,6 @@ nsNodeWeakReference::QueryReferentFromScript(const nsIID& aIID,
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t nsNodeWeakReference::SizeOfOnlyThis(
|
size_t nsNodeWeakReference::SizeOfOnlyThis(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
return aMallocSizeOf(this);
|
return aMallocSizeOf(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,7 +252,6 @@ class nsNodeWeakReference final : public nsIWeakReference {
|
|||||||
|
|
||||||
// nsIWeakReference
|
// nsIWeakReference
|
||||||
NS_DECL_NSIWEAKREFERENCE
|
NS_DECL_NSIWEAKREFERENCE
|
||||||
size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
void NoticeNodeDestruction() { mObject = nullptr; }
|
void NoticeNodeDestruction() { mObject = nullptr; }
|
||||||
|
|
||||||
|
|||||||
@@ -618,6 +618,12 @@ WebrtcTCPSocket::OnUpgradeFailed(nsresult aErrorCode) {
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
WebrtcTCPSocket::OnWebSocketConnectionAvailable(
|
||||||
|
WebSocketConnectionBase* aConnection) {
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
// nsIRequestObserver (from nsIStreamListener)
|
// nsIRequestObserver (from nsIStreamListener)
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
WebrtcTCPSocket::OnStartRequest(nsIRequest* aRequest) {
|
WebrtcTCPSocket::OnStartRequest(nsIRequest* aRequest) {
|
||||||
|
|||||||
@@ -58,11 +58,6 @@ class WebrtcTCPSocket : public nsIHttpUpgradeListener,
|
|||||||
|
|
||||||
size_t CountUnwrittenBytes() const;
|
size_t CountUnwrittenBytes() const;
|
||||||
|
|
||||||
nsresult OnWebSocketConnectionAvailable(
|
|
||||||
WebSocketConnectionBase* aConnection) override {
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~WebrtcTCPSocket();
|
virtual ~WebrtcTCPSocket();
|
||||||
|
|
||||||
|
|||||||
@@ -90,11 +90,14 @@ DynamicImage::GetHeight(int32_t* aHeight) {
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult DynamicImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) const {
|
void DynamicImage::MediaFeatureValuesChangedAllDocuments(
|
||||||
|
const mozilla::MediaFeatureChange& aChange) {}
|
||||||
|
|
||||||
|
nsresult DynamicImage::GetNativeSizes(nsTArray<IntSize>&) {
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t DynamicImage::GetNativeSizesLength() const { return 0; }
|
size_t DynamicImage::GetNativeSizesLength() { return 0; }
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
DynamicImage::GetIntrinsicSize(nsSize* aSize) {
|
DynamicImage::GetIntrinsicSize(nsSize* aSize) {
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ class DynamicImage : public Image {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Inherited methods from Image.
|
// Inherited methods from Image.
|
||||||
nsresult GetNativeSizes(nsTArray<gfx::IntSize>& aNativeSizes) const override;
|
|
||||||
size_t GetNativeSizesLength() const override;
|
|
||||||
virtual already_AddRefed<ProgressTracker> GetProgressTracker() override;
|
virtual already_AddRefed<ProgressTracker> GetProgressTracker() override;
|
||||||
virtual size_t SizeOfSourceWithComputedFallback(
|
virtual size_t SizeOfSourceWithComputedFallback(
|
||||||
SizeOfState& aState) const override;
|
SizeOfState& aState) const override;
|
||||||
|
|||||||
@@ -103,11 +103,14 @@ ImageWrapper::GetHeight(int32_t* aHeight) {
|
|||||||
return mInnerImage->GetHeight(aHeight);
|
return mInnerImage->GetHeight(aHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult ImageWrapper::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) const {
|
void ImageWrapper::MediaFeatureValuesChangedAllDocuments(
|
||||||
|
const mozilla::MediaFeatureChange& aChange) {}
|
||||||
|
|
||||||
|
nsresult ImageWrapper::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) {
|
||||||
return mInnerImage->GetNativeSizes(aNativeSizes);
|
return mInnerImage->GetNativeSizes(aNativeSizes);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t ImageWrapper::GetNativeSizesLength() const {
|
size_t ImageWrapper::GetNativeSizesLength() {
|
||||||
return mInnerImage->GetNativeSizesLength();
|
return mInnerImage->GetNativeSizesLength();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ class ImageWrapper : public Image {
|
|||||||
NS_DECL_IMGICONTAINER
|
NS_DECL_IMGICONTAINER
|
||||||
|
|
||||||
// Inherited methods from Image.
|
// Inherited methods from Image.
|
||||||
nsresult GetNativeSizes(nsTArray<gfx::IntSize>& aNativeSizes) const override;
|
|
||||||
size_t GetNativeSizesLength() const override;
|
|
||||||
virtual already_AddRefed<ProgressTracker> GetProgressTracker() override;
|
virtual already_AddRefed<ProgressTracker> GetProgressTracker() override;
|
||||||
|
|
||||||
virtual size_t SizeOfSourceWithComputedFallback(
|
virtual size_t SizeOfSourceWithComputedFallback(
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ OrientedImage::GetHeight(int32_t* aHeight) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult OrientedImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) const {
|
nsresult OrientedImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) {
|
||||||
nsresult rv = InnerImage()->GetNativeSizes(aNativeSizes);
|
nsresult rv = InnerImage()->GetNativeSizes(aNativeSizes);
|
||||||
|
|
||||||
if (mOrientation.SwapsWidthAndHeight()) {
|
if (mOrientation.SwapsWidthAndHeight()) {
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ class OrientedImage : public ImageWrapper {
|
|||||||
|
|
||||||
NS_IMETHOD GetWidth(int32_t* aWidth) override;
|
NS_IMETHOD GetWidth(int32_t* aWidth) override;
|
||||||
NS_IMETHOD GetHeight(int32_t* aHeight) override;
|
NS_IMETHOD GetHeight(int32_t* aHeight) override;
|
||||||
nsresult GetNativeSizes(nsTArray<gfx::IntSize>& aNativeSizes) const override;
|
nsresult GetNativeSizes(nsTArray<gfx::IntSize>& aNativeSizes) override;
|
||||||
NS_IMETHOD GetIntrinsicSize(nsSize* aSize) override;
|
NS_IMETHOD GetIntrinsicSize(nsSize* aSize) override;
|
||||||
Maybe<AspectRatio> GetIntrinsicRatio() override;
|
Maybe<AspectRatio> GetIntrinsicRatio() override;
|
||||||
NS_IMETHOD_(already_AddRefed<SourceSurface>)
|
NS_IMETHOD_(already_AddRefed<SourceSurface>)
|
||||||
|
|||||||
@@ -205,7 +205,11 @@ RasterImage::GetHeight(int32_t* aHeight) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//******************************************************************************
|
//******************************************************************************
|
||||||
nsresult RasterImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) const {
|
void RasterImage::MediaFeatureValuesChangedAllDocuments(
|
||||||
|
const mozilla::MediaFeatureChange& aChange) {}
|
||||||
|
|
||||||
|
//******************************************************************************
|
||||||
|
nsresult RasterImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) {
|
||||||
if (mError) {
|
if (mError) {
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
}
|
}
|
||||||
@@ -224,7 +228,7 @@ nsresult RasterImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//******************************************************************************
|
//******************************************************************************
|
||||||
size_t RasterImage::GetNativeSizesLength() const {
|
size_t RasterImage::GetNativeSizesLength() {
|
||||||
if (mError || !LoadHasSize()) {
|
if (mError || !LoadHasSize()) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,8 +156,6 @@ class RasterImage final : public ImageResource,
|
|||||||
NS_DECL_IMGICONTAINERDEBUG
|
NS_DECL_IMGICONTAINERDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nsresult GetNativeSizes(nsTArray<gfx::IntSize>& aNativeSizes) const override;
|
|
||||||
size_t GetNativeSizesLength() const override;
|
|
||||||
virtual nsresult StartAnimation() override;
|
virtual nsresult StartAnimation() override;
|
||||||
virtual nsresult StopAnimation() override;
|
virtual nsresult StopAnimation() override;
|
||||||
|
|
||||||
|
|||||||
@@ -465,12 +465,12 @@ VectorImage::GetWidth(int32_t* aWidth) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//******************************************************************************
|
//******************************************************************************
|
||||||
nsresult VectorImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) const {
|
nsresult VectorImage::GetNativeSizes(nsTArray<IntSize>& aNativeSizes) {
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
//******************************************************************************
|
//******************************************************************************
|
||||||
size_t VectorImage::GetNativeSizesLength() const { return 0; }
|
size_t VectorImage::GetNativeSizesLength() { return 0; }
|
||||||
|
|
||||||
//******************************************************************************
|
//******************************************************************************
|
||||||
NS_IMETHODIMP_(void)
|
NS_IMETHODIMP_(void)
|
||||||
|
|||||||
@@ -36,9 +36,6 @@ class VectorImage final : public ImageResource, public nsIStreamListener {
|
|||||||
// (no public constructor - use ImageFactory)
|
// (no public constructor - use ImageFactory)
|
||||||
|
|
||||||
// Methods inherited from Image
|
// Methods inherited from Image
|
||||||
void MediaFeatureValuesChangedAllDocuments(const MediaFeatureChange&) final;
|
|
||||||
nsresult GetNativeSizes(nsTArray<gfx::IntSize>& aNativeSizes) const override;
|
|
||||||
size_t GetNativeSizesLength() const override;
|
|
||||||
virtual size_t SizeOfSourceWithComputedFallback(
|
virtual size_t SizeOfSourceWithComputedFallback(
|
||||||
SizeOfState& aState) const override;
|
SizeOfState& aState) const override;
|
||||||
|
|
||||||
|
|||||||
@@ -82,6 +82,7 @@ native ImageResolution(mozilla::image::Resolution);
|
|||||||
native TempRefSourceSurface(already_AddRefed<mozilla::gfx::SourceSurface>);
|
native TempRefSourceSurface(already_AddRefed<mozilla::gfx::SourceSurface>);
|
||||||
native TempRefImgIContainer(already_AddRefed<imgIContainer>);
|
native TempRefImgIContainer(already_AddRefed<imgIContainer>);
|
||||||
native nsIntSizeByVal(nsIntSize);
|
native nsIntSizeByVal(nsIntSize);
|
||||||
|
[ref] native MediaFeatureChange(mozilla::MediaFeatureChange);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -674,20 +675,18 @@ interface imgIContainer : nsISupports
|
|||||||
*/
|
*/
|
||||||
[noscript, notxpcom] void propagateUseCounters(in Document aReferencingDocument);
|
[noscript, notxpcom] void propagateUseCounters(in Document aReferencingDocument);
|
||||||
|
|
||||||
%{C++
|
|
||||||
/*
|
/*
|
||||||
* Called when media feature values that apply to all documents (such as
|
* Called when media feature values that apply to all documents (such as
|
||||||
* those based on system metrics) have changed. If this image is a type
|
* those based on system metrics) have changed. If this image is a type
|
||||||
* that can respond to media queries (i.e., an SVG image), this function
|
* that can respond to media queries (i.e., an SVG image), this function
|
||||||
* is overridden to handle restyling and invalidating the image.
|
* is overridden to handle restyling and invalidating the image.
|
||||||
*/
|
*/
|
||||||
virtual void MediaFeatureValuesChangedAllDocuments(const mozilla::MediaFeatureChange& aChange) {}
|
[notxpcom, nostdcall] void mediaFeatureValuesChangedAllDocuments([const] in MediaFeatureChange aChange);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the set of sizes the image can decode to natively.
|
* Get the set of sizes the image can decode to natively.
|
||||||
*/
|
*/
|
||||||
virtual nsresult GetNativeSizes(nsTArray<nsIntSize>& aNativeSizes) const = 0;
|
[nostdcall] Array<nsIntSizeByVal> getNativeSizes();
|
||||||
|
|
||||||
virtual size_t GetNativeSizesLength() const = 0;
|
[nostdcall, notxpcom] size_t getNativeSizesLength();
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -142,14 +142,6 @@ class ImageDecoderListener final : public nsIStreamListener,
|
|||||||
// imgIContainer
|
// imgIContainer
|
||||||
NS_FORWARD_IMGICONTAINER(mImage->)
|
NS_FORWARD_IMGICONTAINER(mImage->)
|
||||||
|
|
||||||
nsresult GetNativeSizes(nsTArray<nsIntSize>& aNativeSizes) const override {
|
|
||||||
return mImage->GetNativeSizes(aNativeSizes);
|
|
||||||
}
|
|
||||||
|
|
||||||
size_t GetNativeSizesLength() const override {
|
|
||||||
return mImage->GetNativeSizesLength();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~ImageDecoderListener() = default;
|
virtual ~ImageDecoderListener() = default;
|
||||||
|
|
||||||
|
|||||||
@@ -28,7 +28,11 @@ class FileDescriptor;
|
|||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
[scriptable, uuid(D85A17C2-AA7C-11d2-9B8C-00805F8A16D9)]
|
[ptr] native ContentParent(mozilla::dom::ContentParent);
|
||||||
|
[ref] native FileDescriptor(mozilla::ipc::FileDescriptor);
|
||||||
|
native MallocSizeOf(mozilla::MallocSizeOf);
|
||||||
|
|
||||||
|
[scriptable, builtinclass, uuid(D85A17C2-AA7C-11d2-9B8C-00805F8A16D9)]
|
||||||
interface nsIStringBundle : nsISupports
|
interface nsIStringBundle : nsISupports
|
||||||
{
|
{
|
||||||
AString GetStringFromID(in long aID);
|
AString GetStringFromID(in long aID);
|
||||||
@@ -67,13 +71,11 @@ interface nsIStringBundle : nsISupports
|
|||||||
// Preloads string bundle data asynchronously
|
// Preloads string bundle data asynchronously
|
||||||
void asyncPreload();
|
void asyncPreload();
|
||||||
|
|
||||||
%{C++
|
[notxpcom, nostdcall] size_t SizeOfIncludingThis(in MallocSizeOf aMallocSizeOf);
|
||||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
[notxpcom, nostdcall] size_t SizeOfIncludingThisIfUnshared(in MallocSizeOf aMallocSizeOf);
|
||||||
virtual size_t SizeOfIncludingThisIfUnshared(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, uuid(D85A17C0-AA7C-11d2-9B8C-00805F8A16D9)]
|
[scriptable, builtinclass, uuid(D85A17C0-AA7C-11d2-9B8C-00805F8A16D9)]
|
||||||
interface nsIStringBundleService : nsISupports
|
interface nsIStringBundleService : nsISupports
|
||||||
{
|
{
|
||||||
nsIStringBundle createBundle(in string aURLSpec);
|
nsIStringBundle createBundle(in string aURLSpec);
|
||||||
@@ -99,13 +101,11 @@ interface nsIStringBundleService : nsISupports
|
|||||||
*/
|
*/
|
||||||
void flushBundles();
|
void flushBundles();
|
||||||
|
|
||||||
%{C++
|
[notxpcom, nostdcall] size_t sizeOfIncludingThis(in MallocSizeOf aMallocSizeOf);
|
||||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
|
||||||
|
|
||||||
virtual void SendContentBundles(mozilla::dom::ContentParent* aContentParent) const = 0;
|
[notxpcom, nostdcall] void sendContentBundles(in ContentParent aContentParent);
|
||||||
|
|
||||||
virtual void RegisterContentBundle(const nsCString& aBundleURL,
|
[notxpcom, nostdcall] void registerContentBundle(in ACString aBundleURL,
|
||||||
const mozilla::ipc::FileDescriptor& aMapFile,
|
[const] in FileDescriptor aMapFile,
|
||||||
size_t aMapSize) = 0;
|
in size_t aMapSize);
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -117,20 +117,48 @@ class StringBundleProxy : public nsIStringBundle {
|
|||||||
explicit StringBundleProxy(already_AddRefed<nsIStringBundle> aTarget)
|
explicit StringBundleProxy(already_AddRefed<nsIStringBundle> aTarget)
|
||||||
: mMutex("StringBundleProxy::mMutex"), mTarget(aTarget) {}
|
: mMutex("StringBundleProxy::mMutex"), mTarget(aTarget) {}
|
||||||
|
|
||||||
NS_FORWARD_NSISTRINGBUNDLE(Target()->);
|
|
||||||
|
|
||||||
void Retarget(nsIStringBundle* aTarget) {
|
void Retarget(nsIStringBundle* aTarget) {
|
||||||
MutexAutoLock automon(mMutex);
|
MutexAutoLock automon(mMutex);
|
||||||
mTarget = aTarget;
|
mTarget = aTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(
|
// Forward nsIStringBundle methods (other than the `SizeOf*` methods) to
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override {
|
// `Target()`.
|
||||||
|
NS_IMETHOD GetStringFromID(int32_t aID, nsAString& _retval) override {
|
||||||
|
return Target()->GetStringFromID(aID, _retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD GetStringFromAUTF8Name(const nsACString& aName,
|
||||||
|
nsAString& _retval) override {
|
||||||
|
return Target()->GetStringFromAUTF8Name(aName, _retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD GetStringFromName(const char* aName, nsAString& _retval) override {
|
||||||
|
return Target()->GetStringFromName(aName, _retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD FormatStringFromID(int32_t aID, const nsTArray<nsString>& params,
|
||||||
|
nsAString& _retval) override {
|
||||||
|
return Target()->FormatStringFromID(aID, params, _retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD FormatStringFromAUTF8Name(const nsACString& aName,
|
||||||
|
const nsTArray<nsString>& params,
|
||||||
|
nsAString& _retval) override {
|
||||||
|
return Target()->FormatStringFromAUTF8Name(aName, params, _retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD FormatStringFromName(const char* aName,
|
||||||
|
const nsTArray<nsString>& params,
|
||||||
|
nsAString& _retval) override {
|
||||||
|
return Target()->FormatStringFromName(aName, params, _retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD GetSimpleEnumeration(nsISimpleEnumerator** _retval) override {
|
||||||
|
return Target()->GetSimpleEnumeration(_retval);
|
||||||
|
}
|
||||||
|
NS_IMETHOD AsyncPreload() override { return Target()->AsyncPreload(); }
|
||||||
|
|
||||||
|
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) override {
|
||||||
return aMallocSizeOf(this);
|
return aMallocSizeOf(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t SizeOfIncludingThisIfUnshared(
|
size_t SizeOfIncludingThisIfUnshared(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override {
|
mozilla::MallocSizeOf aMallocSizeOf) override {
|
||||||
return mRefCnt == 1 ? SizeOfIncludingThis(aMallocSizeOf) : 0;
|
return mRefCnt == 1 ? SizeOfIncludingThis(aMallocSizeOf) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -220,8 +248,7 @@ class SharedStringBundle final : public nsStringBundleBase {
|
|||||||
return descriptor;
|
return descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(
|
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) override;
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
static SharedStringBundle* Cast(nsIStringBundle* aStringBundle) {
|
static SharedStringBundle* Cast(nsIStringBundle* aStringBundle) {
|
||||||
return static_cast<SharedStringBundle*>(aStringBundle);
|
return static_cast<SharedStringBundle*>(aStringBundle);
|
||||||
@@ -322,7 +349,7 @@ nsStringBundleBase::AsyncPreload() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t nsStringBundle::SizeOfIncludingThis(
|
size_t nsStringBundle::SizeOfIncludingThis(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
if (mProps) {
|
if (mProps) {
|
||||||
n += mProps->SizeOfIncludingThis(aMallocSizeOf);
|
n += mProps->SizeOfIncludingThis(aMallocSizeOf);
|
||||||
@@ -330,8 +357,13 @@ size_t nsStringBundle::SizeOfIncludingThis(
|
|||||||
return aMallocSizeOf(this) + n;
|
return aMallocSizeOf(this) + n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t nsStringBundleBase::SizeOfIncludingThis(
|
||||||
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
size_t nsStringBundleBase::SizeOfIncludingThisIfUnshared(
|
size_t nsStringBundleBase::SizeOfIncludingThisIfUnshared(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
if (mRefCnt == 1) {
|
if (mRefCnt == 1) {
|
||||||
return SizeOfIncludingThis(aMallocSizeOf);
|
return SizeOfIncludingThis(aMallocSizeOf);
|
||||||
} else {
|
} else {
|
||||||
@@ -340,7 +372,7 @@ size_t nsStringBundleBase::SizeOfIncludingThisIfUnshared(
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t SharedStringBundle::SizeOfIncludingThis(
|
size_t SharedStringBundle::SizeOfIncludingThis(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
if (mStringMap) {
|
if (mStringMap) {
|
||||||
n += aMallocSizeOf(mStringMap);
|
n += aMallocSizeOf(mStringMap);
|
||||||
@@ -733,7 +765,7 @@ nsresult nsStringBundleService::Init() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t nsStringBundleService::SizeOfIncludingThis(
|
size_t nsStringBundleService::SizeOfIncludingThis(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
size_t n = mBundleMap.ShallowSizeOfExcludingThis(aMallocSizeOf);
|
size_t n = mBundleMap.ShallowSizeOfExcludingThis(aMallocSizeOf);
|
||||||
for (const auto& data : mBundleMap.Values()) {
|
for (const auto& data : mBundleMap.Values()) {
|
||||||
n += aMallocSizeOf(data);
|
n += aMallocSizeOf(data);
|
||||||
@@ -779,8 +811,7 @@ nsStringBundleService::FlushBundles() {
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void nsStringBundleService::SendContentBundles(
|
void nsStringBundleService::SendContentBundles(ContentParent* aContentParent) {
|
||||||
ContentParent* aContentParent) const {
|
|
||||||
nsTArray<StringBundleDescriptor> bundles;
|
nsTArray<StringBundleDescriptor> bundles;
|
||||||
|
|
||||||
for (auto* entry : mSharedBundles) {
|
for (auto* entry : mSharedBundles) {
|
||||||
@@ -795,7 +826,7 @@ void nsStringBundleService::SendContentBundles(
|
|||||||
}
|
}
|
||||||
|
|
||||||
void nsStringBundleService::RegisterContentBundle(
|
void nsStringBundleService::RegisterContentBundle(
|
||||||
const nsCString& aBundleURL, const FileDescriptor& aMapFile,
|
const nsACString& aBundleURL, const FileDescriptor& aMapFile,
|
||||||
size_t aMapSize) {
|
size_t aMapSize) {
|
||||||
RefPtr<StringBundleProxy> proxy;
|
RefPtr<StringBundleProxy> proxy;
|
||||||
|
|
||||||
@@ -812,7 +843,8 @@ void nsStringBundleService::RegisterContentBundle(
|
|||||||
delete cacheEntry;
|
delete cacheEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto bundle = MakeBundleRefPtr<SharedStringBundle>(aBundleURL.get());
|
auto bundle = MakeBundleRefPtr<SharedStringBundle>(
|
||||||
|
PromiseFlatCString(aBundleURL).get());
|
||||||
bundle->SetMapFile(aMapFile, aMapSize);
|
bundle->SetMapFile(aMapFile, aMapSize);
|
||||||
|
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
|
|||||||
@@ -57,9 +57,6 @@ class nsStringBundleBase : public nsIStringBundle, public nsIMemoryReporter {
|
|||||||
bool mAttemptedLoad;
|
bool mAttemptedLoad;
|
||||||
bool mLoaded;
|
bool mLoaded;
|
||||||
|
|
||||||
size_t SizeOfIncludingThisIfUnshared(
|
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static nsresult FormatString(const char16_t* formatStr,
|
static nsresult FormatString(const char16_t* formatStr,
|
||||||
const nsTArray<nsString>& aParams,
|
const nsTArray<nsString>& aParams,
|
||||||
@@ -74,8 +71,7 @@ class nsStringBundle : public nsStringBundleBase {
|
|||||||
|
|
||||||
nsresult LoadProperties() override;
|
nsresult LoadProperties() override;
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(
|
size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) override;
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class nsStringBundleBase;
|
friend class nsStringBundleBase;
|
||||||
|
|||||||
@@ -45,16 +45,6 @@ class nsStringBundleService : public nsIStringBundleService,
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
};
|
};
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(
|
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
void SendContentBundles(
|
|
||||||
mozilla::dom::ContentParent* aContentParent) const override;
|
|
||||||
|
|
||||||
void RegisterContentBundle(const nsCString& aBundleURL,
|
|
||||||
const mozilla::ipc::FileDescriptor& aMapFile,
|
|
||||||
size_t aMapSize) override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual ~nsStringBundleService();
|
virtual ~nsStringBundleService();
|
||||||
|
|
||||||
|
|||||||
@@ -796,5 +796,8 @@ ClassifierDummyChannel::SetEarlyHintObserver(nsIEarlyHintObserver* aObserver) {
|
|||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ClassifierDummyChannel::SetConnectionInfo(
|
||||||
|
mozilla::net::nsHttpConnectionInfo* aInfo) {}
|
||||||
|
|
||||||
} // namespace net
|
} // namespace net
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|||||||
@@ -280,6 +280,9 @@ NullHttpChannel::GetEncodedBodySize(uint64_t* aEncodedBodySize) {
|
|||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NullHttpChannel::SetSource(
|
||||||
|
mozilla::UniquePtr<mozilla::ProfileChunkedBuffer> aSource) {}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// NullHttpChannel::nsIChannel
|
// NullHttpChannel::nsIChannel
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ interface nsIReferrerInfo;
|
|||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfiler.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
native UniqueProfileChunkedBuffer(mozilla::UniquePtr<mozilla::ProfileChunkedBuffer>);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* nsIHttpChannel
|
* nsIHttpChannel
|
||||||
*
|
*
|
||||||
@@ -489,7 +491,5 @@ interface nsIHttpChannel : nsIIdentChannel
|
|||||||
in AString aURL,
|
in AString aURL,
|
||||||
in AString aContentType);
|
in AString aContentType);
|
||||||
|
|
||||||
%{ C++
|
[notxpcom, nostdcall] void setSource(in UniqueProfileChunkedBuffer aSource);
|
||||||
virtual void SetSource(mozilla::UniquePtr<mozilla::ProfileChunkedBuffer> aSource) {}
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -21,9 +21,11 @@ enum class RequestMode : uint8_t;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
%}
|
%}
|
||||||
|
[ptr] native nsHttpConnectionInfo(mozilla::net::nsHttpConnectionInfo);
|
||||||
[ptr] native StringArray(nsTArray<nsCString>);
|
[ptr] native StringArray(nsTArray<nsCString>);
|
||||||
[ref] native CStringArrayRef(const nsTArray<nsCString>);
|
[ref] native CStringArrayRef(const nsTArray<nsCString>);
|
||||||
[ref] native securityMessagesArray(nsCOMArray<nsISecurityConsoleMessage>);
|
[ref] native securityMessagesArray(nsCOMArray<nsISecurityConsoleMessage>);
|
||||||
|
[ptr] native WebSocketConnectionBase(mozilla::net::WebSocketConnectionBase);
|
||||||
|
|
||||||
native TimeStamp(mozilla::TimeStamp);
|
native TimeStamp(mozilla::TimeStamp);
|
||||||
native RequestMode(mozilla::dom::RequestMode);
|
native RequestMode(mozilla::dom::RequestMode);
|
||||||
@@ -50,9 +52,7 @@ interface nsIHttpUpgradeListener : nsISupports
|
|||||||
|
|
||||||
[must_use] void onUpgradeFailed(in nsresult aErrorCode);
|
[must_use] void onUpgradeFailed(in nsresult aErrorCode);
|
||||||
|
|
||||||
%{C++
|
void onWebSocketConnectionAvailable(in WebSocketConnectionBase aConnection);
|
||||||
virtual nsresult OnWebSocketConnectionAvailable(mozilla::net::WebSocketConnectionBase* aConnection) = 0;
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -468,8 +468,6 @@ interface nsIHttpChannelInternal : nsISupports
|
|||||||
*/
|
*/
|
||||||
[must_use] void setEarlyHintObserver(in nsIEarlyHintObserver aObserver);
|
[must_use] void setEarlyHintObserver(in nsIEarlyHintObserver aObserver);
|
||||||
|
|
||||||
%{ C++
|
[notxpcom, nostdcall] void setConnectionInfo(in nsHttpConnectionInfo aInfo);
|
||||||
virtual void SetConnectionInfo(mozilla::net::nsHttpConnectionInfo* aInfo) {}
|
|
||||||
%}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1054,6 +1054,11 @@ nsViewSourceChannel::LogMimeTypeMismatch(const nsACString& aMessageName,
|
|||||||
aContentType);
|
aContentType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Should this forward to mHttpChannel? This was previously handled by a
|
||||||
|
// default empty implementation.
|
||||||
|
void nsViewSourceChannel::SetSource(
|
||||||
|
mozilla::UniquePtr<mozilla::ProfileChunkedBuffer> aSource) {}
|
||||||
|
|
||||||
const nsTArray<mozilla::net::PreferredAlternativeDataTypeParams>&
|
const nsTArray<mozilla::net::PreferredAlternativeDataTypeParams>&
|
||||||
nsViewSourceChannel::PreferredAlternativeDataTypes() {
|
nsViewSourceChannel::PreferredAlternativeDataTypes() {
|
||||||
if (mCacheInfoChannel) {
|
if (mCacheInfoChannel) {
|
||||||
@@ -1080,6 +1085,11 @@ void nsViewSourceChannel::DoDiagnosticAssertWhenOnStopNotCalledOnDestroy() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FIXME: Should this forward to mHttpChannelInternal? This was previously
|
||||||
|
// handled by a default empty implementation.
|
||||||
|
void nsViewSourceChannel::SetConnectionInfo(
|
||||||
|
mozilla::net::nsHttpConnectionInfo* aInfo) {}
|
||||||
|
|
||||||
// nsIChildChannel methods
|
// nsIChildChannel methods
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
#include "mozilla/net/IPCTransportProvider.h"
|
#include "mozilla/net/IPCTransportProvider.h"
|
||||||
|
|
||||||
|
#include "IPCTransportProvider.h"
|
||||||
#include "nsISocketTransport.h"
|
#include "nsISocketTransport.h"
|
||||||
#include "nsIAsyncInputStream.h"
|
#include "nsIAsyncInputStream.h"
|
||||||
#include "nsIAsyncOutputStream.h"
|
#include "nsIAsyncOutputStream.h"
|
||||||
@@ -51,6 +52,12 @@ TransportProviderParent::OnTransportAvailable(
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
TransportProviderParent::OnUpgradeFailed(nsresult aErrorCode) { return NS_OK; }
|
TransportProviderParent::OnUpgradeFailed(nsresult aErrorCode) { return NS_OK; }
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
TransportProviderParent::OnWebSocketConnectionAvailable(
|
||||||
|
WebSocketConnectionBase* aConnection) {
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
void TransportProviderParent::MaybeNotify() {
|
void TransportProviderParent::MaybeNotify() {
|
||||||
if (!mListener || !mTransport) {
|
if (!mListener || !mTransport) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -58,11 +58,7 @@ class TransportProviderParent final : public PTransportProviderParent,
|
|||||||
NS_DECL_NSITRANSPORTPROVIDER
|
NS_DECL_NSITRANSPORTPROVIDER
|
||||||
NS_DECL_NSIHTTPUPGRADELISTENER
|
NS_DECL_NSIHTTPUPGRADELISTENER
|
||||||
|
|
||||||
void ActorDestroy(ActorDestroyReason aWhy) override{};
|
void ActorDestroy(ActorDestroyReason aWhy) override {}
|
||||||
nsresult OnWebSocketConnectionAvailable(
|
|
||||||
WebSocketConnectionBase* aConnection) override {
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~TransportProviderParent() = default;
|
~TransportProviderParent() = default;
|
||||||
|
|||||||
@@ -3719,7 +3719,8 @@ WebSocketChannel::OnTransportAvailable(nsISocketTransport* aTransport,
|
|||||||
return OnTransportAvailableInternal();
|
return OnTransportAvailableInternal();
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult WebSocketChannel::OnWebSocketConnectionAvailable(
|
NS_IMETHODIMP
|
||||||
|
WebSocketChannel::OnWebSocketConnectionAvailable(
|
||||||
WebSocketConnectionBase* aConnection) {
|
WebSocketConnectionBase* aConnection) {
|
||||||
if (!NS_IsMainThread()) {
|
if (!NS_IsMainThread()) {
|
||||||
RefPtr<WebSocketChannel> self = this;
|
RefPtr<WebSocketChannel> self = this;
|
||||||
|
|||||||
@@ -118,8 +118,6 @@ class WebSocketChannel : public BaseWebSocketChannel,
|
|||||||
bool IsEncrypted() const override;
|
bool IsEncrypted() const override;
|
||||||
|
|
||||||
nsresult OnTransportAvailableInternal();
|
nsresult OnTransportAvailableInternal();
|
||||||
nsresult OnWebSocketConnectionAvailable(
|
|
||||||
WebSocketConnectionBase* aConnection) override;
|
|
||||||
void OnError(nsresult aStatus) override;
|
void OnError(nsresult aStatus) override;
|
||||||
void OnTCPClosed() override;
|
void OnTCPClosed() override;
|
||||||
nsresult OnDataReceived(uint8_t* aData, uint32_t aCount) override;
|
nsresult OnDataReceived(uint8_t* aData, uint32_t aCount) override;
|
||||||
|
|||||||
@@ -118,6 +118,12 @@ WebSocketConnectionChild::OnUpgradeFailed(nsresult aReason) {
|
|||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NS_IMETHODIMP
|
||||||
|
WebSocketConnectionChild::OnWebSocketConnectionAvailable(
|
||||||
|
WebSocketConnectionBase* aConnection) {
|
||||||
|
return NS_ERROR_NOT_IMPLEMENTED;
|
||||||
|
}
|
||||||
|
|
||||||
mozilla::ipc::IPCResult WebSocketConnectionChild::RecvWriteOutputData(
|
mozilla::ipc::IPCResult WebSocketConnectionChild::RecvWriteOutputData(
|
||||||
nsTArray<uint8_t>&& aData) {
|
nsTArray<uint8_t>&& aData) {
|
||||||
LOG(("WebSocketConnectionChild::RecvWriteOutputData %p\n", this));
|
LOG(("WebSocketConnectionChild::RecvWriteOutputData %p\n", this));
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ class WebSocketConnectionChild final : public PWebSocketConnectionChild,
|
|||||||
|
|
||||||
void ActorDestroy(ActorDestroyReason aWhy) override;
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
||||||
|
|
||||||
nsresult OnWebSocketConnectionAvailable(
|
|
||||||
WebSocketConnectionBase* aConnection) override {
|
|
||||||
return NS_ERROR_NOT_IMPLEMENTED;
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnError(nsresult aStatus) override;
|
void OnError(nsresult aStatus) override;
|
||||||
void OnTCPClosed() override;
|
void OnTCPClosed() override;
|
||||||
nsresult OnDataReceived(uint8_t* aData, uint32_t aCount) override;
|
nsresult OnDataReceived(uint8_t* aData, uint32_t aCount) override;
|
||||||
|
|||||||
@@ -255,7 +255,6 @@ interface mozIStorageStatement : mozIStorageBaseStatement {
|
|||||||
[noscript] void getSharedString(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out wstring aResult);
|
[noscript] void getSharedString(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out wstring aResult);
|
||||||
[noscript] void getSharedBlob(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out octetPtr aResult);
|
[noscript] void getSharedBlob(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out octetPtr aResult);
|
||||||
|
|
||||||
%{C++
|
|
||||||
/**
|
/**
|
||||||
* Getters for native code that return their values as
|
* Getters for native code that return their values as
|
||||||
* the return type, for convenience and sanity.
|
* the return type, for convenience and sanity.
|
||||||
@@ -263,6 +262,7 @@ interface mozIStorageStatement : mozIStorageBaseStatement {
|
|||||||
* Not virtual; no vtable bloat.
|
* Not virtual; no vtable bloat.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%{C++
|
||||||
inline int32_t AsInt32(uint32_t idx) {
|
inline int32_t AsInt32(uint32_t idx) {
|
||||||
int32_t v = 0;
|
int32_t v = 0;
|
||||||
mozilla::DebugOnly<nsresult> rv = GetInt32(idx, &v);
|
mozilla::DebugOnly<nsresult> rv = GetInt32(idx, &v);
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ interface mozIStorageValueArray : nsISupports {
|
|||||||
[noscript] void getSharedString(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out wstring aResult);
|
[noscript] void getSharedString(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out wstring aResult);
|
||||||
[noscript] void getSharedBlob(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out octetPtr aResult);
|
[noscript] void getSharedBlob(in unsigned long aIndex, out unsigned long aByteLength, [shared,retval] out octetPtr aResult);
|
||||||
|
|
||||||
%{C++
|
|
||||||
/**
|
/**
|
||||||
* Getters for native code that return their values as
|
* Getters for native code that return their values as
|
||||||
* the return type, for convenience and sanity.
|
* the return type, for convenience and sanity.
|
||||||
@@ -90,6 +89,7 @@ interface mozIStorageValueArray : nsISupports {
|
|||||||
* Not virtual; no vtable bloat.
|
* Not virtual; no vtable bloat.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
%{C++
|
||||||
inline int32_t AsInt32(uint32_t idx) {
|
inline int32_t AsInt32(uint32_t idx) {
|
||||||
int32_t v = 0;
|
int32_t v = 0;
|
||||||
mozilla::DebugOnly<nsresult> rv = GetInt32(idx, &v);
|
mozilla::DebugOnly<nsresult> rv = GetInt32(idx, &v);
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
[ref] native nsCString(const nsCString);
|
[ref] native nsCString(const nsCString);
|
||||||
[ref] native StringArrayRef(const nsTArray<nsCString>);
|
[ref] native StringArrayRef(const nsTArray<nsCString>);
|
||||||
|
native ProfileDataBufferMozPromise(RefPtr<mozilla::MozPromise<FallibleTArray<uint8_t>, nsresult, true>>);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start-up parameters for subprocesses are passed through nsIObserverService,
|
* Start-up parameters for subprocesses are passed through nsIObserverService,
|
||||||
@@ -203,7 +204,5 @@ interface nsIProfiler : nsISupports
|
|||||||
[implicit_jscontext]
|
[implicit_jscontext]
|
||||||
Promise getSymbolTable(in ACString aDebugPath, in ACString aBreakpadID);
|
Promise getSymbolTable(in ACString aDebugPath, in ACString aBreakpadID);
|
||||||
|
|
||||||
%{C++
|
[notxpcom, nostdcall] ProfileDataBufferMozPromise getProfileDataAsGzippedArrayBufferAndroid(in double aSinceTime);
|
||||||
virtual RefPtr<mozilla::MozPromise<FallibleTArray<uint8_t>, nsresult, true>> GetProfileDataAsGzippedArrayBufferAndroid(double aSinceTime) = 0;
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -60,9 +60,6 @@ class nsProfiler final : public nsIProfiler {
|
|||||||
RefPtr<SymbolTablePromise> GetSymbolTableMozPromise(
|
RefPtr<SymbolTablePromise> GetSymbolTableMozPromise(
|
||||||
const nsACString& aDebugPath, const nsACString& aBreakpadID);
|
const nsACString& aDebugPath, const nsACString& aBreakpadID);
|
||||||
|
|
||||||
RefPtr<nsProfiler::GatheringPromiseAndroid>
|
|
||||||
GetProfileDataAsGzippedArrayBufferAndroid(double aSinceTime) override;
|
|
||||||
|
|
||||||
struct ExitProfile {
|
struct ExitProfile {
|
||||||
nsCString mJSON;
|
nsCString mJSON;
|
||||||
uint64_t mBufferPositionAtGatherTime;
|
uint64_t mBufferPositionAtGatherTime;
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ struct PrintSettingsInitializer;
|
|||||||
*/
|
*/
|
||||||
native nsNativeIntMargin(nsIntMargin);
|
native nsNativeIntMargin(nsIntMargin);
|
||||||
[ref] native nsNativeIntMarginRef(nsIntMargin);
|
[ref] native nsNativeIntMarginRef(nsIntMargin);
|
||||||
|
native PrintSettingsInitializer(mozilla::PrintSettingsInitializer);
|
||||||
|
|
||||||
interface nsIOutputStream;
|
interface nsIOutputStream;
|
||||||
|
|
||||||
@@ -362,12 +363,12 @@ interface nsIPrintSettings : nsISupports
|
|||||||
*/
|
*/
|
||||||
attribute Array<long> pageRanges;
|
attribute Array<long> pageRanges;
|
||||||
|
|
||||||
%{C++
|
|
||||||
/**
|
/**
|
||||||
* Get a PrintSettingsInitializer populated with the relevant current settings.
|
* Get a PrintSettingsInitializer populated with the relevant current settings.
|
||||||
*/
|
*/
|
||||||
virtual mozilla::PrintSettingsInitializer GetSettingsInitializer() = 0;
|
[notxpcom, nostdcall] PrintSettingsInitializer getSettingsInitializer();
|
||||||
|
|
||||||
|
%{C++
|
||||||
static bool IsPageSkipped(int32_t aPageNum, const nsTArray<int32_t>& aRanges);
|
static bool IsPageSkipped(int32_t aPageNum, const nsTArray<int32_t>& aRanges);
|
||||||
%}
|
%}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -69,8 +69,6 @@ class nsPrintSettings : public nsIPrintSettings {
|
|||||||
*/
|
*/
|
||||||
virtual void InitWithInitializer(const PrintSettingsInitializer& aSettings);
|
virtual void InitWithInitializer(const PrintSettingsInitializer& aSettings);
|
||||||
|
|
||||||
PrintSettingsInitializer GetSettingsInitializer() final;
|
|
||||||
|
|
||||||
nsPrintSettings& operator=(const nsPrintSettings& rhs);
|
nsPrintSettings& operator=(const nsPrintSettings& rhs);
|
||||||
|
|
||||||
// Sets a default file name for the print settings.
|
// Sets a default file name for the print settings.
|
||||||
|
|||||||
@@ -31,6 +31,8 @@
|
|||||||
|
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
native MallocSizeOf(mozilla::MallocSizeOf);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An instance of |nsIWeakReference| is a proxy object that cooperates with
|
* An instance of |nsIWeakReference| is a proxy object that cooperates with
|
||||||
* its referent to give clients a non-owning, non-dangling reference. Clients
|
* its referent to give clients a non-owning, non-dangling reference. Clients
|
||||||
@@ -45,7 +47,7 @@
|
|||||||
* @see nsWeakReference
|
* @see nsWeakReference
|
||||||
* @see nsWeakPtr
|
* @see nsWeakPtr
|
||||||
*/
|
*/
|
||||||
[scriptable, uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf)]
|
[scriptable, builtinclass, uuid(9188bc85-f92e-11d2-81ef-0060083a0bcf)]
|
||||||
interface nsIWeakReference : nsISupports
|
interface nsIWeakReference : nsISupports
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -57,9 +59,8 @@ interface nsIWeakReference : nsISupports
|
|||||||
[binaryname(QueryReferentFromScript)]
|
[binaryname(QueryReferentFromScript)]
|
||||||
void QueryReferent( in nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result );
|
void QueryReferent( in nsIIDRef uuid, [iid_is(uuid), retval] out nsQIResult result );
|
||||||
|
|
||||||
|
[notxpcom, nostdcall] size_t sizeOfOnlyThis(in MallocSizeOf aMallocSizeOf);
|
||||||
%{C++
|
%{C++
|
||||||
virtual size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the referring object is alive. Otherwise, false.
|
* Returns true if the referring object is alive. Otherwise, false.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class nsWeakReference final : public nsIWeakReference {
|
|||||||
|
|
||||||
// nsIWeakReference...
|
// nsIWeakReference...
|
||||||
NS_DECL_NSIWEAKREFERENCE
|
NS_DECL_NSIWEAKREFERENCE
|
||||||
size_t SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class nsSupportsWeakReference;
|
friend class nsSupportsWeakReference;
|
||||||
@@ -147,8 +146,7 @@ nsresult nsIWeakReference::QueryReferent(const nsIID& aIID,
|
|||||||
return mObject->QueryInterface(aIID, aInstancePtr);
|
return mObject->QueryInterface(aIID, aInstancePtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t nsWeakReference::SizeOfOnlyThis(
|
size_t nsWeakReference::SizeOfOnlyThis(mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
|
||||||
return aMallocSizeOf(this);
|
return aMallocSizeOf(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,9 @@ typedef long long int64_t ;
|
|||||||
typedef unsigned long nsrefcnt ;
|
typedef unsigned long nsrefcnt ;
|
||||||
typedef unsigned long nsresult ;
|
typedef unsigned long nsresult ;
|
||||||
|
|
||||||
// XXX need this built into xpidl compiler so that it's really size_t or size_t
|
// If we ever want to use `size_t` in scriptable interfaces, this will need to
|
||||||
// and it's scriptable:
|
// be built into the xpidl compiler, as the size varies based on platform.
|
||||||
typedef unsigned long size_t;
|
native size_t(size_t);
|
||||||
|
|
||||||
[ptr] native voidPtr(void);
|
[ptr] native voidPtr(void);
|
||||||
[ptr] native charPtr(char);
|
[ptr] native charPtr(char);
|
||||||
|
|||||||
@@ -13,13 +13,15 @@ interface nsISimpleEnumerator;
|
|||||||
#include "mozilla/MemoryReporting.h"
|
#include "mozilla/MemoryReporting.h"
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
native MallocSizeOf(mozilla::MallocSizeOf);
|
||||||
|
|
||||||
[scriptable, uuid(283EE646-1AEF-11D4-98B3-00C04fA0CE9A)]
|
[scriptable, uuid(283EE646-1AEF-11D4-98B3-00C04fA0CE9A)]
|
||||||
interface nsIPropertyElement : nsISupports {
|
interface nsIPropertyElement : nsISupports {
|
||||||
attribute AUTF8String key;
|
attribute AUTF8String key;
|
||||||
attribute AString value;
|
attribute AString value;
|
||||||
};
|
};
|
||||||
|
|
||||||
[scriptable, uuid(706867af-0400-4faa-beb1-0dae87308784)]
|
[scriptable, builtinclass, uuid(706867af-0400-4faa-beb1-0dae87308784)]
|
||||||
interface nsIPersistentProperties : nsIProperties
|
interface nsIPersistentProperties : nsIProperties
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
@@ -53,8 +55,6 @@ interface nsIPersistentProperties : nsIProperties
|
|||||||
*/
|
*/
|
||||||
AString setStringProperty(in AUTF8String key, in AString value);
|
AString setStringProperty(in AUTF8String key, in AString value);
|
||||||
|
|
||||||
%{C++
|
[notxpcom, nostdcall] size_t sizeOfIncludingThis(in MallocSizeOf aMallocSizeOf);
|
||||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ nsPersistentProperties::nsPersistentProperties()
|
|||||||
nsPersistentProperties::~nsPersistentProperties() = default;
|
nsPersistentProperties::~nsPersistentProperties() = default;
|
||||||
|
|
||||||
size_t nsPersistentProperties::SizeOfIncludingThis(
|
size_t nsPersistentProperties::SizeOfIncludingThis(
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const {
|
mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
// The memory used by mTable is accounted for in mArena.
|
// The memory used by mTable is accounted for in mArena.
|
||||||
size_t n = 0;
|
size_t n = 0;
|
||||||
n += mArena.SizeOfExcludingThis(aMallocSizeOf);
|
n += mArena.SizeOfExcludingThis(aMallocSizeOf);
|
||||||
|
|||||||
@@ -24,9 +24,6 @@ class nsPersistentProperties final : public nsIPersistentProperties {
|
|||||||
NS_DECL_NSIPROPERTIES
|
NS_DECL_NSIPROPERTIES
|
||||||
NS_DECL_NSIPERSISTENTPROPERTIES
|
NS_DECL_NSIPERSISTENTPROPERTIES
|
||||||
|
|
||||||
size_t SizeOfIncludingThis(
|
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~nsPersistentProperties();
|
~nsPersistentProperties();
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import re
|
|||||||
from ply import lex
|
from ply import lex
|
||||||
from ply import yacc
|
from ply import yacc
|
||||||
import six
|
import six
|
||||||
|
import textwrap
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
"""A type conforms to the following pattern:
|
"""A type conforms to the following pattern:
|
||||||
@@ -311,17 +312,21 @@ class RustNoncompat(Exception):
|
|||||||
|
|
||||||
|
|
||||||
class IDLError(Exception):
|
class IDLError(Exception):
|
||||||
def __init__(self, message, location, warning=False):
|
def __init__(self, message, location, warning=False, notes=None):
|
||||||
self.message = message
|
self.message = message
|
||||||
self.location = location
|
self.location = location
|
||||||
self.warning = warning
|
self.warning = warning
|
||||||
|
self.notes = notes
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "%s: %s, %s" % (
|
error = "%s: %s, %s" % (
|
||||||
self.warning and "warning" or "error",
|
self.warning and "warning" or "error",
|
||||||
self.message,
|
self.message,
|
||||||
self.location,
|
self.location,
|
||||||
)
|
)
|
||||||
|
if self.notes is not None:
|
||||||
|
error += "\nnote: %s" % self.notes
|
||||||
|
return error
|
||||||
|
|
||||||
|
|
||||||
class Include(object):
|
class Include(object):
|
||||||
@@ -431,7 +436,20 @@ class CDATA(object):
|
|||||||
self.location = location
|
self.location = location
|
||||||
|
|
||||||
def resolve(self, parent):
|
def resolve(self, parent):
|
||||||
pass
|
# This can be a false-positive if the word `virtual` is included in a
|
||||||
|
# comment, however this doesn't seem to happen very often.
|
||||||
|
if isinstance(parent, Interface) and re.search(r"\bvirtual\b", self.data):
|
||||||
|
raise IDLError(
|
||||||
|
"cannot declare a C++ `virtual` member in XPIDL interface",
|
||||||
|
self.location,
|
||||||
|
notes=textwrap.fill(
|
||||||
|
"""All virtual members must be declared directly using XPIDL.
|
||||||
|
Both the Rust bindings and XPConnect rely on the per-platform
|
||||||
|
vtable layouts generated by the XPIDL compiler to allow
|
||||||
|
cross-language XPCOM method calls between JS and C++.
|
||||||
|
Consider using a `[notxpcom, nostdcall]` method instead."""
|
||||||
|
),
|
||||||
|
)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "cdata: %s\n\t%r\n" % (self.location.get(), self.data)
|
return "cdata: %s\n\t%r\n" % (self.location.get(), self.data)
|
||||||
|
|||||||
@@ -331,14 +331,21 @@ def link_to_cpp(interfaces, fd, header_fd):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def is_type_reflectable(type):
|
||||||
|
# All native types end up getting tagged as void*, or as wrapper types around void*
|
||||||
|
if type["tag"] == "TD_VOID":
|
||||||
|
return False
|
||||||
|
if type["tag"] in ("TD_ARRAY", "TD_LEGACY_ARRAY"):
|
||||||
|
return is_type_reflectable(type["element"])
|
||||||
|
return True
|
||||||
|
|
||||||
def is_method_reflectable(method):
|
def is_method_reflectable(method):
|
||||||
if "hidden" in method["flags"]:
|
if "hidden" in method["flags"]:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
for param in method["params"]:
|
for param in method["params"]:
|
||||||
# Reflected methods can't use native types. All native types end up
|
# Reflected methods can't use non-reflectable types.
|
||||||
# getting tagged as void*, so this check is easy.
|
if not is_type_reflectable(param["type"]):
|
||||||
if param["type"]["tag"] == "TD_VOID":
|
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ class nsITimer;
|
|||||||
typedef void (*nsTimerCallbackFunc) (nsITimer *aTimer, void *aClosure);
|
typedef void (*nsTimerCallbackFunc) (nsITimer *aTimer, void *aClosure);
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
native MallocSizeOf(mozilla::MallocSizeOf);
|
||||||
native nsTimerCallbackFunc(nsTimerCallbackFunc);
|
native nsTimerCallbackFunc(nsTimerCallbackFunc);
|
||||||
[ref] native TimeDuration(mozilla::TimeDuration);
|
[ref] native TimeDuration(mozilla::TimeDuration);
|
||||||
|
|
||||||
@@ -242,9 +243,7 @@ interface nsITimer : nsISupports
|
|||||||
*/
|
*/
|
||||||
[noscript] readonly attribute unsigned long allowedEarlyFiringMicroseconds;
|
[noscript] readonly attribute unsigned long allowedEarlyFiringMicroseconds;
|
||||||
|
|
||||||
%{C++
|
[notxpcom, nostdcall] size_t sizeOfIncludingThis(in MallocSizeOf aMallocSizeOf);
|
||||||
virtual size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const = 0;
|
|
||||||
%}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
%{C++
|
%{C++
|
||||||
|
|||||||
@@ -781,7 +781,7 @@ void nsTimerImpl::SetHolder(nsTimerImplHolder* aHolder) { mHolder = aHolder; }
|
|||||||
|
|
||||||
nsTimer::~nsTimer() = default;
|
nsTimer::~nsTimer() = default;
|
||||||
|
|
||||||
size_t nsTimer::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const {
|
size_t nsTimer::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) {
|
||||||
return aMallocSizeOf(this);
|
return aMallocSizeOf(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -209,9 +209,6 @@ class nsTimer final : public nsITimer {
|
|||||||
: NS_ERROR_NULL_POINTER;
|
: NS_ERROR_NULL_POINTER;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual size_t SizeOfIncludingThis(
|
|
||||||
mozilla::MallocSizeOf aMallocSizeOf) const override;
|
|
||||||
|
|
||||||
// Create a timer targeting the given target. nullptr indicates that the
|
// Create a timer targeting the given target. nullptr indicates that the
|
||||||
// current thread should be used as the timer's target.
|
// current thread should be used as the timer's target.
|
||||||
static RefPtr<nsTimer> WithEventTarget(nsIEventTarget* aTarget);
|
static RefPtr<nsTimer> WithEventTarget(nsIEventTarget* aTarget);
|
||||||
|
|||||||
Reference in New Issue
Block a user