Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan

This commit is contained in:
Tristan Bourvon 2018-04-10 21:11:02 +02:00
parent 798efd6d66
commit a3a77c0312
536 changed files with 5457 additions and 2818 deletions

View File

@ -127,7 +127,12 @@ protected:
class TTextAttr : public TextAttr
{
public:
explicit TTextAttr(bool aGetRootValue) : mGetRootValue(aGetRootValue) {}
explicit TTextAttr(bool aGetRootValue)
: mGetRootValue(aGetRootValue)
, mIsDefined{ false }
, mIsRootDefined{ false }
{
}
// TextAttr
virtual void Expose(nsIPersistentProperties* aAttributes,

View File

@ -45,9 +45,10 @@ class MOZ_RAII AutoMemMap
public:
explicit AutoMemMap(MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM)
: fd(nullptr)
, fileMap(nullptr)
, addr(nullptr)
: fileInfo{}
, fd(nullptr)
, fileMap(nullptr)
, addr(nullptr)
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;
};

View File

@ -403,12 +403,18 @@ class StackFrame_Data : public ::google::protobuf::MessageLite /* @@protoc_inser
bool issystem_;
bool isselfhosted_;
union SourceOrRefUnion {
SourceOrRefUnion() {}
SourceOrRefUnion()
: sourceref_{}
{
}
::google::protobuf::internal::ArenaStringPtr source_;
::google::protobuf::uint64 sourceref_;
} SourceOrRef_;
union FunctionDisplayNameOrRefUnion {
FunctionDisplayNameOrRefUnion() {}
FunctionDisplayNameOrRefUnion()
: functiondisplaynameref_{}
{
}
::google::protobuf::internal::ArenaStringPtr functiondisplayname_;
::google::protobuf::uint64 functiondisplaynameref_;
} FunctionDisplayNameOrRef_;
@ -542,7 +548,10 @@ class StackFrame : public ::google::protobuf::MessageLite /* @@protoc_insertion_
::google::protobuf::internal::HasBits<1> _has_bits_;
mutable int _cached_size_;
union StackFrameTypeUnion {
StackFrameTypeUnion() {}
StackFrameTypeUnion()
: data_{ nullptr }
{
}
::mozilla::devtools::protobuf::StackFrame_Data* data_;
::google::protobuf::uint64 ref_;
} StackFrameType_;
@ -805,17 +814,26 @@ class Node : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(
::google::protobuf::uint64 size_;
::google::protobuf::uint32 coarsetype_;
union TypeNameOrRefUnion {
TypeNameOrRefUnion() {}
TypeNameOrRefUnion()
: typenameref_{}
{
}
::google::protobuf::internal::ArenaStringPtr typename__;
::google::protobuf::uint64 typenameref_;
} TypeNameOrRef_;
union JSObjectClassNameOrRefUnion {
JSObjectClassNameOrRefUnion() {}
JSObjectClassNameOrRefUnion()
: jsobjectclassnameref_{}
{
}
::google::protobuf::internal::ArenaStringPtr jsobjectclassname_;
::google::protobuf::uint64 jsobjectclassnameref_;
} JSObjectClassNameOrRef_;
union ScriptFilenameOrRefUnion {
ScriptFilenameOrRefUnion() {}
ScriptFilenameOrRefUnion()
: scriptfilenameref_{}
{
}
::google::protobuf::internal::ArenaStringPtr scriptfilename_;
::google::protobuf::uint64 scriptfilenameref_;
} ScriptFilenameOrRef_;
@ -963,7 +981,10 @@ class Edge : public ::google::protobuf::MessageLite /* @@protoc_insertion_point(
mutable int _cached_size_;
::google::protobuf::uint64 referent_;
union EdgeNameOrRefUnion {
EdgeNameOrRefUnion() {}
EdgeNameOrRefUnion()
: nameref_{}
{
}
::google::protobuf::internal::ArenaStringPtr name_;
::google::protobuf::uint64 nameref_;
} EdgeNameOrRef_;

View File

@ -1356,11 +1356,13 @@ public:
uint32_t nodeCount;
uint32_t edgeCount;
HeapSnapshotHandler(CoreDumpWriter& writer,
JS::CompartmentSet* compartments)
: writer(writer),
compartments(compartments)
{ }
HeapSnapshotHandler(CoreDumpWriter& writer, JS::CompartmentSet* compartments)
: writer(writer)
, compartments(compartments)
, nodeCount{}
, edgeCount{}
{
}
// JS::ubi::BreadthFirst handler interface.

View File

@ -13,11 +13,17 @@
namespace IPC {
SerializedLoadContext::SerializedLoadContext(nsILoadContext* aLoadContext)
: mIsContent{ false }
, mUseRemoteTabs{ false }
, mUseTrackingProtection{ false }
{
Init(aLoadContext);
}
SerializedLoadContext::SerializedLoadContext(nsIChannel* aChannel)
: mIsContent{ false }
, mUseRemoteTabs{ false }
, mUseTrackingProtection{ false }
{
if (!aChannel) {
Init(nullptr);
@ -45,6 +51,9 @@ SerializedLoadContext::SerializedLoadContext(nsIChannel* aChannel)
}
SerializedLoadContext::SerializedLoadContext(nsIWebSocketChannel* aChannel)
: mIsContent{ false }
, mUseRemoteTabs{ false }
, mUseTrackingProtection{ false }
{
nsCOMPtr<nsILoadContext> loadContext;
if (aChannel) {

View File

@ -389,6 +389,9 @@ nsDocShell::nsDocShell()
, mHasLoadedNonBlankURI(false)
, mBlankTiming(false)
{
this->mHistoryID.m0 = {};
this->mHistoryID.m1 = {};
this->mHistoryID.m2 = {};
AssertOriginAttributesMatchPrivateBrowsing();
nsContentUtils::GenerateUUIDInPlace(mHistoryID);

View File

@ -44,6 +44,7 @@ public:
ComputedTimingFunction() = default;
explicit ComputedTimingFunction(const nsTimingFunction& aFunction)
: mStepsOrFrames{}
{
Init(aFunction);
}
@ -114,7 +115,10 @@ public:
private:
ComputedTimingFunction(double x1, double y1, double x2, double y2)
: mType(nsTimingFunction::Type::CubicBezier)
, mTimingFunction(x1, y1, x2, y2) { }
, mTimingFunction(x1, y1, x2, y2)
, mStepsOrFrames{}
{
}
ComputedTimingFunction(nsTimingFunction::Type aType, uint32_t aStepsOrFrames)
: mType(aType)
, mStepsOrFrames(aStepsOrFrames) { }

View File

@ -441,15 +441,16 @@ public:
ParentRunnable(const PrincipalInfo& aPrincipalInfo,
OpenMode aOpenMode,
const WriteParams& aWriteParams)
: mOwningEventTarget(GetCurrentThreadEventTarget()),
mPrincipalInfo(aPrincipalInfo),
mOpenMode(aOpenMode),
mWriteParams(aWriteParams),
mOperationMayProceed(true),
mState(eInitial),
mResult(JS::AsmJSCache_InternalError),
mActorDestroyed(false),
mOpened(false)
: mOwningEventTarget(GetCurrentThreadEventTarget())
, mPrincipalInfo(aPrincipalInfo)
, mOpenMode(aOpenMode)
, mWriteParams(aWriteParams)
, mOperationMayProceed(true)
, mModuleIndex{}
, mState(eInitial)
, mResult(JS::AsmJSCache_InternalError)
, mActorDestroyed(false)
, mOpened(false)
{
MOZ_ASSERT(XRE_IsParentProcess());
AssertIsOnOwningThread();

View File

@ -170,12 +170,13 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
Exception::Exception(const nsACString& aMessage,
nsresult aResult,
const nsACString& aName,
nsIStackFrame *aLocation,
nsISupports *aData)
nsIStackFrame* aLocation,
nsISupports* aData)
: mMessage(aMessage)
, mResult(aResult)
, mName(aName)
, mData(aData)
, mInitialized{ false }
, mHoldingJSVal(false)
{
if (aLocation) {

View File

@ -455,6 +455,7 @@ public:
NS_LITERAL_CSTRING("EventSource :: Init"))
, mImpl(aEventSourceImpl)
, mURL(aURL)
, mRv{ NS_ERROR_NOT_INITIALIZED }
{
MOZ_ASSERT(aWorkerPrivate);
aWorkerPrivate->AssertIsOnWorkerThread();
@ -1928,6 +1929,7 @@ EventSourceImpl::CheckListenerChain()
EventSource::EventSource(nsPIDOMWindowInner* aOwnerWindow,
bool aWithCredentials)
: DOMEventTargetHelper(aOwnerWindow)
, mReadyState{}
, mWithCredentials(aWithCredentials)
, mIsMainThread(true)
, mKeepingAlive(false)

View File

@ -72,22 +72,29 @@ private:
virtual ~NodeIterator();
struct NodePointer {
NodePointer() : mNode(nullptr) {}
NodePointer(nsINode *aNode, bool aBeforeNode);
NodePointer()
: mNode(nullptr)
, mBeforeNode{ false }
{
}
NodePointer(nsINode* aNode, bool aBeforeNode);
typedef bool (NodePointer::*MoveToMethodType)(nsINode*);
bool MoveToNext(nsINode *aRoot);
bool MoveToPrevious(nsINode *aRoot);
typedef bool (NodePointer::*MoveToMethodType)(nsINode*);
bool MoveToNext(nsINode* aRoot);
bool MoveToPrevious(nsINode* aRoot);
bool MoveForward(nsINode *aRoot, nsINode *aNode);
void MoveBackward(nsINode *aParent, nsINode *aNode);
bool MoveForward(nsINode* aRoot, nsINode* aNode);
void MoveBackward(nsINode* aParent, nsINode* aNode);
void AdjustAfterRemoval(nsINode *aRoot, nsINode *aContainer, nsIContent *aChild, nsIContent *aPreviousSibling);
void AdjustAfterRemoval(nsINode* aRoot,
nsINode* aContainer,
nsIContent* aChild,
nsIContent* aPreviousSibling);
void Clear() { mNode = nullptr; }
void Clear() { mNode = nullptr; }
nsINode *mNode;
bool mBeforeNode;
nsINode* mNode;
bool mBeforeNode;
};
// Have to return a strong ref, because the act of testing the node can

View File

@ -38,6 +38,7 @@ class TextInputProcessorNotification final :
public:
explicit TextInputProcessorNotification(const char* aType)
: mType(aType)
, mTextChangeData{}
{
}
@ -278,7 +279,10 @@ private:
SelectionChangeDataBase mSelectionChangeData;
};
TextInputProcessorNotification() { }
TextInputProcessorNotification()
: mTextChangeData{}
{
}
};
NS_IMPL_ISUPPORTS(TextInputProcessorNotification,

View File

@ -582,12 +582,18 @@ public:
#endif
protected:
nsCacheableFuncStringContentList(nsINode* aRootNode,
nsContentListMatchFunc aFunc,
nsContentListDestroyFunc aDestroyFunc,
nsFuncStringContentListDataAllocator aDataAllocator,
const nsAString& aString) :
nsContentList(aRootNode, aFunc, aDestroyFunc, nullptr),
nsCacheableFuncStringContentList(
nsINode* aRootNode,
nsContentListMatchFunc aFunc,
nsContentListDestroyFunc aDestroyFunc,
nsFuncStringContentListDataAllocator aDataAllocator,
const nsAString& aString)
: nsContentList(aRootNode, aFunc, aDestroyFunc, nullptr)
,
#ifdef DEBUG
mType{ static_cast<ContentListType>(0) }
,
#endif
mString(aString)
{
mData = (*aDataAllocator)(aRootNode, &mString);

View File

@ -582,6 +582,7 @@ nsContentPermissionRequestProxy::nsContentPermissionRequesterProxy
}
nsContentPermissionRequestProxy::nsContentPermissionRequestProxy()
: mParent{ nullptr }
{
}

View File

@ -12694,6 +12694,8 @@ namespace {
struct PrefStore
{
PrefStore()
: mFlashBlockEnabled{ false }
, mPluginsHttpOnly{ false }
{
Preferences::AddBoolVarCache(&mFlashBlockEnabled,
"plugins.flashBlock.enabled");

View File

@ -208,6 +208,7 @@ NS_IMPL_CYCLE_COLLECTION(nsDocumentEncoder,
nsDocumentEncoder::nsDocumentEncoder()
: mEncoding(nullptr)
, mIsCopying{ false }
, mCachedBuffer(nullptr)
{
Initialize();

View File

@ -164,8 +164,10 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsFrameLoader)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
nsFrameLoader::nsFrameLoader(Element* aOwner, nsPIDOMWindowOuter* aOpener,
bool aNetworkCreated, int32_t aJSPluginID)
nsFrameLoader::nsFrameLoader(Element* aOwner,
nsPIDOMWindowOuter* aOpener,
bool aNetworkCreated,
int32_t aJSPluginID)
: mOwnerContent(aOwner)
, mDetachedSubdocFrame(nullptr)
, mOpener(aOpener)
@ -187,6 +189,7 @@ nsFrameLoader::nsFrameLoader(Element* aOwner, nsPIDOMWindowOuter* aOpener,
, mClipSubdocument(true)
, mClampScrollPosition(true)
, mObservingOwnerContent(false)
, mFreshProcess{ false }
{
mRemoteFrame = ShouldUseRemoteProcess();
MOZ_ASSERT(!mRemoteFrame || !aOpener,

View File

@ -7676,6 +7676,7 @@ nsGlobalWindowOuter::AbstractMainThreadFor(TaskCategory aCategory)
nsGlobalWindowOuter::TemporarilyDisableDialogs::TemporarilyDisableDialogs(
nsGlobalWindowOuter* aWindow MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)
: mSavedDialogsEnabled{ false }
{
MOZ_GUARD_OBJECT_NOTIFIER_INIT;

View File

@ -604,6 +604,8 @@ nsJSContext::nsJSContext(bool aGCOnDestruction,
nsIScriptGlobalObject* aGlobalObject)
: mWindowProxy(nullptr)
, mGCOnDestruction(aGCOnDestruction)
, mModalStateTime{}
, mModalStateDepth{}
, mGlobalObjectRef(aGlobalObject)
{
EnsureStatics();

View File

@ -81,7 +81,10 @@ NS_NewPlainTextSerializer(nsIContentSerializer** aSerializer)
}
nsPlainTextSerializer::nsPlainTextSerializer()
: kSpace(NS_LITERAL_STRING(" ")) // Init of "constant"
: mFlags{}
, mFloatingLines{}
, mLineBreakDue{ false }
, kSpace(NS_LITERAL_STRING(" ")) // Init of "constant"
{
mOutputString = nullptr;

View File

@ -53,7 +53,10 @@ NS_IMPL_RELEASE(nsQueryContentEventResult)
nsQueryContentEventResult::nsQueryContentEventResult()
: mEventMessage(eVoidEvent)
, mOffset{}
, mTentativeCaretOffset{}
, mSucceeded(false)
, mReversed{ false }
{
}

View File

@ -40,21 +40,26 @@ class nsSyncLoader : public nsIStreamListener,
public nsSupportsWeakReference
{
public:
nsSyncLoader() : mLoading(false) {}
nsSyncLoader()
: mLoading(false)
, mAsyncLoadStatus{ NS_ERROR_NOT_INITIALIZED }
{
}
NS_DECL_ISUPPORTS
NS_DECL_ISUPPORTS
nsresult LoadDocument(nsIChannel* aChannel,
bool aChannelIsSync, bool aForceToXML,
ReferrerPolicy aReferrerPolicy,
nsIDOMDocument** aResult);
nsresult LoadDocument(nsIChannel* aChannel,
bool aChannelIsSync,
bool aForceToXML,
ReferrerPolicy aReferrerPolicy,
nsIDOMDocument** aResult);
NS_FORWARD_NSISTREAMLISTENER(mListener->)
NS_DECL_NSIREQUESTOBSERVER
NS_FORWARD_NSISTREAMLISTENER(mListener->)
NS_DECL_NSIREQUESTOBSERVER
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSICHANNELEVENTSINK
NS_DECL_NSIINTERFACEREQUESTOR
NS_DECL_NSIINTERFACEREQUESTOR
private:
virtual ~nsSyncLoader();

View File

@ -49,6 +49,11 @@ NS_NewXHTMLContentSerializer(nsIContentSerializer** aSerializer)
nsXHTMLContentSerializer::nsXHTMLContentSerializer()
: mIsHTMLSerializer(false)
, mDoHeader{ false }
, mIsCopying{ false }
, mDisableEntityEncoding{}
, mRewriteEncodingDeclaration{ false }
, mIsFirstChildOfOL{ false }
{
}

View File

@ -57,16 +57,23 @@ NS_NewXMLContentSerializer(nsIContentSerializer** aSerializer)
}
nsXMLContentSerializer::nsXMLContentSerializer()
: mPrefixIndex(0),
mColPos(0),
mIndentOverflow(0),
mIsIndentationAddedOnCurrentLine(false),
mInAttribute(false),
mAddNewlineForRootNode(false),
mAddSpace(false),
mMayIgnoreLineBreakSequence(false),
mBodyOnly(false),
mInBody(0)
: mPrefixIndex(0)
, mFlags{}
, mColPos(0)
, mDoFormat{ false }
, mDoRaw{ false }
, mDoWrap{ false }
, mAllowLineBreaking{ false }
, mMaxColumn{}
, mIndentOverflow(0)
, mIsIndentationAddedOnCurrentLine(false)
, mInAttribute(false)
, mAddNewlineForRootNode(false)
, mAddSpace(false)
, mMayIgnoreLineBreakSequence(false)
, mBodyOnly(false)
, mInBody(0)
, mPreLevel{}
{
}

View File

@ -15,7 +15,10 @@
struct nsNameSpaceEntry
{
explicit nsNameSpaceEntry(nsAtom* aPrefix)
: prefix(aPrefix) {}
: prefix(aPrefix)
, nameSpaceID{}
{
}
RefPtr<nsAtom> prefix;
MOZ_INIT_OUTSIDE_CTOR int32_t nameSpaceID;

View File

@ -387,10 +387,15 @@ class NonNull
{
public:
NonNull()
: ptr
{
nullptr
}
#ifdef DEBUG
: inited(false)
, inited(false)
#endif
{}
{
}
// This is no worse than get() in terms of const handling.
operator T&() const {

View File

@ -172,7 +172,11 @@ namespace binding_danger {
template<typename CleanupPolicy>
struct TErrorResult<CleanupPolicy>::Message {
Message() { MOZ_COUNT_CTOR(TErrorResult::Message); }
Message()
: mErrorNumber{ dom::Err_Limit }
{
MOZ_COUNT_CTOR(TErrorResult::Message);
}
~Message() { MOZ_COUNT_DTOR(TErrorResult::Message); }
nsTArray<nsString> mArgs;

View File

@ -123,6 +123,10 @@ class TErrorResult {
public:
TErrorResult()
: mResult(NS_OK)
, mMessage
{
nullptr
}
#ifdef DEBUG
, mMightHaveUnreportedJSException(false)
, mUnionState(HasNothing)

View File

@ -18,9 +18,11 @@ namespace binding_detail {
// constructor and destructor behavior. FakeString uses inline storage
// for small strings and a nsStringBuffer for longer strings.
struct FakeString {
FakeString() :
mDataFlags(nsString::DataFlags::TERMINATED),
mClassFlags(nsString::ClassFlags(0))
FakeString()
: mData{ nullptr }
, mLength{}
, mDataFlags(nsString::DataFlags::TERMINATED)
, mClassFlags(nsString::ClassFlags(0))
{
}

View File

@ -221,6 +221,7 @@ private:
public:
ArrayBufferView_base()
: Base()
, mType{ static_cast<js::Scalar::Type>(0) }
{
}

View File

@ -22,7 +22,15 @@ namespace cache {
struct SavedRequest
{
SavedRequest() : mHasBodyId(false) { mValue.body() = void_t(); }
SavedRequest()
: mHasBodyId(false)
, mCacheId{}
{
this->mBodyId.m0 = {};
this->mBodyId.m1 = {};
this->mBodyId.m2 = {};
mValue.body() = void_t();
}
CacheRequest mValue;
bool mHasBodyId;
nsID mBodyId;
@ -31,7 +39,15 @@ struct SavedRequest
struct SavedResponse
{
SavedResponse() : mHasBodyId(false) { mValue.body() = void_t(); }
SavedResponse()
: mHasBodyId(false)
, mCacheId{}
{
this->mBodyId.m0 = {};
this->mBodyId.m1 = {};
this->mBodyId.m2 = {};
mValue.body() = void_t();
}
CacheResponse mValue;
bool mHasBodyId;
nsID mBodyId;

View File

@ -3986,6 +3986,12 @@ struct MOZ_STACK_CLASS CanvasBidiProcessor : public nsBidiPresUtils::BidiProcess
CanvasBidiProcessor()
: nsBidiPresUtils::BidiProcessor()
, mCtx{ nullptr }
, mFontgrp{ nullptr }
, mAppUnitsPerDevPixel{}
, mOp{ static_cast<CanvasRenderingContext2D::TextDrawOperation>(0) }
, mTextRunFlags{ static_cast<gfx::ShapedTextFlags>(0) }
, mDoMeasureBoundingBox{ false }
{
if (Preferences::GetBool(GFX_MISSING_FONTS_NOTIFY_PREF)) {
mMissingFonts = new gfxMissingFontRecorder();

View File

@ -109,71 +109,129 @@ WebGLContextOptions::WebGLContextOptions()
}
WebGLContext::WebGLContext()
: WebGLContextUnchecked(nullptr)
, mMaxPerfWarnings(gfxPrefs::WebGLMaxPerfWarnings())
, mNumPerfWarnings(0)
, mMaxAcceptableFBStatusInvals(gfxPrefs::WebGLMaxAcceptableFBStatusInvals())
, mDataAllocGLCallCount(0)
, mBypassShaderValidation(false)
, mEmptyTFO(0)
, mContextLossHandler(this)
, mNeedsFakeNoAlpha(false)
, mNeedsFakeNoDepth(false)
, mNeedsFakeNoStencil(false)
, mAllowFBInvalidation(gfxPrefs::WebGLFBInvalidation())
, mMsaaSamples(gfxPrefs::WebGLMsaaSamples())
: WebGLContextUnchecked(nullptr)
, mMaxPerfWarnings(gfxPrefs::WebGLMaxPerfWarnings())
, mNumPerfWarnings(0)
, mMaxAcceptableFBStatusInvals(gfxPrefs::WebGLMaxAcceptableFBStatusInvals())
, mDepthTestEnabled{ '\0' }
, mGenerateMipmapHint{}
, mDataAllocGLCallCount(0)
, mPrimRestartTypeBytes{}
, mActiveTexture{}
, mDefaultFB_DrawBuffer0{}
, mDefaultFB_ReadBuffer{}
, mBypassShaderValidation(false)
, mGLMaxTextureUnits{}
, mGLMaxVertexAttribs{}
, mGLMaxFragmentUniformVectors{}
, mGLMaxVertexUniformVectors{}
, mGLMaxVaryingVectors{}
, mGLMaxTransformFeedbackSeparateAttribs{}
, mGLMaxUniformBufferBindings{}
, mGLMaxVertexTextureImageUnits{}
, mGLMaxFragmentTextureImageUnits{}
, mGLMaxCombinedTextureImageUnits{}
, mGLMaxColorAttachments{}
, mGLMaxDrawBuffers{}
, mGLMaxTextureSize{}
, mGLMaxCubeMapTextureSize{}
, mGLMax3DTextureSize{}
, mGLMaxArrayTextureLayers{}
, mGLMaxRenderbufferSize{}
, mPixelStore_UnpackImageHeight{}
, mPixelStore_UnpackSkipImages{}
, mPixelStore_UnpackRowLength{}
, mPixelStore_UnpackSkipRows{}
, mPixelStore_UnpackSkipPixels{}
, mPixelStore_UnpackAlignment{}
, mPixelStore_PackRowLength{}
, mPixelStore_PackSkipRows{}
, mPixelStore_PackSkipPixels{}
, mPixelStore_PackAlignment{}
, mPixelStore_ColorspaceConversion{}
, mPixelStore_FlipY{ false }
, mPixelStore_PremultiplyAlpha{ false }
, mPixelStore_RequireFastPath{ false }
, mEmptyTFO(0)
, mFakeVertexAttrib0BufferObject{}
, mFakeVertexAttrib0BufferObjectSize{}
, mFakeVertexAttrib0DataDefined{ false }
, mStencilRefFront{}
, mStencilRefBack{}
, mStencilValueMaskFront{}
, mStencilValueMaskBack{}
, mStencilWriteMaskFront{}
, mStencilWriteMaskBack{}
, mColorWriteMask{ '\0' }
, mDepthWriteMask{ '\0' }
, mStencilClearValue{}
, mDepthClearValue{ 0.0 }
, mLineWidth{ 0.0 }
, mContextLossHandler(this)
, mNeedsFakeNoAlpha(false)
, mNeedsFakeNoDepth(false)
, mNeedsFakeNoStencil(false)
, mNeedsFakeNoStencil_UserFBs{ false }
, mDriverColorMask{ '\0' }
, mDriverDepthTest{ false }
, mDriverStencilTest{ false }
, mNeedsIndexValidation{ false }
, mAllowFBInvalidation(gfxPrefs::WebGLFBInvalidation())
, mMsaaSamples(gfxPrefs::WebGLMsaaSamples())
, mDefaultFB_IsInvalid{ false }
{
mGeneration = 0;
mInvalidated = false;
mCapturedFrameInvalidated = false;
mShouldPresent = true;
mResetLayer = true;
mOptionsFrozen = false;
mDisableExtensions = false;
mIsMesa = false;
mEmitContextLostErrorOnce = false;
mWebGLError = 0;
mUnderlyingGLError = 0;
mGeneration = 0;
mInvalidated = false;
mCapturedFrameInvalidated = false;
mShouldPresent = true;
mResetLayer = true;
mOptionsFrozen = false;
mDisableExtensions = false;
mIsMesa = false;
mEmitContextLostErrorOnce = false;
mWebGLError = 0;
mUnderlyingGLError = 0;
mContextLostErrorSet = false;
mContextLostErrorSet = false;
mViewportX = 0;
mViewportY = 0;
mViewportWidth = 0;
mViewportHeight = 0;
mViewportX = 0;
mViewportY = 0;
mViewportWidth = 0;
mViewportHeight = 0;
mDitherEnabled = 1;
mRasterizerDiscardEnabled = 0; // OpenGL ES 3.0 spec p244
mScissorTestEnabled = 0;
mStencilTestEnabled = 0;
mDitherEnabled = 1;
mRasterizerDiscardEnabled = 0; // OpenGL ES 3.0 spec p244
mScissorTestEnabled = 0;
mStencilTestEnabled = 0;
if (NS_IsMainThread()) {
// XXX mtseng: bug 709490, not thread safe
WebGLMemoryTracker::AddWebGLContext(this);
}
if (NS_IsMainThread()) {
// XXX mtseng: bug 709490, not thread safe
WebGLMemoryTracker::AddWebGLContext(this);
}
mAllowContextRestore = true;
mLastLossWasSimulated = false;
mContextStatus = ContextNotLost;
mLoseContextOnMemoryPressure = false;
mCanLoseContextInForeground = true;
mRestoreWhenVisible = false;
mAllowContextRestore = true;
mLastLossWasSimulated = false;
mContextStatus = ContextNotLost;
mLoseContextOnMemoryPressure = false;
mCanLoseContextInForeground = true;
mRestoreWhenVisible = false;
mAlreadyGeneratedWarnings = 0;
mAlreadyWarnedAboutFakeVertexAttrib0 = false;
mAlreadyWarnedAboutViewportLargerThanDest = false;
mAlreadyGeneratedWarnings = 0;
mAlreadyWarnedAboutFakeVertexAttrib0 = false;
mAlreadyWarnedAboutViewportLargerThanDest = false;
mMaxWarnings = gfxPrefs::WebGLMaxWarningsPerContext();
if (mMaxWarnings < -1) {
GenerateWarning("webgl.max-warnings-per-context size is too large (seems like a negative value wrapped)");
mMaxWarnings = 0;
}
mMaxWarnings = gfxPrefs::WebGLMaxWarningsPerContext();
if (mMaxWarnings < -1) {
GenerateWarning("webgl.max-warnings-per-context size is too large (seems "
"like a negative value wrapped)");
mMaxWarnings = 0;
}
mLastUseIndex = 0;
mLastUseIndex = 0;
mDisableFragHighP = false;
mDisableFragHighP = false;
mDrawCallsSinceLastFlush = 0;
mDrawCallsSinceLastFlush = 0;
}
WebGLContext::~WebGLContext()

View File

@ -122,9 +122,7 @@ private:
public:
StrongGLenum()
#ifdef DEBUG
: mValue(NonexistantGLenum)
#endif
{
AssertOnceThatEnumValuesAreSorted();
}

View File

@ -125,21 +125,22 @@ WebGLTexture::WrapObject(JSContext* cx, JS::Handle<JSObject*> givenProto) {
}
WebGLTexture::WebGLTexture(WebGLContext* webgl, GLuint tex)
: WebGLRefCountedObject(webgl)
, mGLName(tex)
, mTarget(LOCAL_GL_NONE)
, mFaceCount(0)
, mMinFilter(LOCAL_GL_NEAREST_MIPMAP_LINEAR)
, mMagFilter(LOCAL_GL_LINEAR)
, mWrapS(LOCAL_GL_REPEAT)
, mWrapT(LOCAL_GL_REPEAT)
, mImmutable(false)
, mImmutableLevelCount(0)
, mBaseMipmapLevel(0)
, mMaxMipmapLevel(1000)
, mTexCompareMode(LOCAL_GL_NONE)
, mIsResolved(false)
, mResolved_Swizzle(nullptr)
: WebGLRefCountedObject(webgl)
, mGLName(tex)
, mTarget(LOCAL_GL_NONE)
, mFaceCount(0)
, mMinFilter(LOCAL_GL_NEAREST_MIPMAP_LINEAR)
, mMagFilter(LOCAL_GL_LINEAR)
, mWrapS(LOCAL_GL_REPEAT)
, mWrapT(LOCAL_GL_REPEAT)
, mImmutable(false)
, mImmutableLevelCount(0)
, mBaseMipmapLevel(0)
, mMaxMipmapLevel(1000)
, mTexCompareMode(LOCAL_GL_NONE)
, mIsResolved(false)
, mResolved_FakeBlack{ FakeBlackType::None }
, mResolved_Swizzle(nullptr)
{
mContext->mTextures.insertBack(this);
}

View File

@ -13,13 +13,16 @@
namespace mozilla {
WebGLTransformFeedback::WebGLTransformFeedback(WebGLContext* webgl, GLuint tf)
: WebGLRefCountedObject(webgl)
, mGLName(tf)
, mIndexedBindings(webgl->mGLMaxTransformFeedbackSeparateAttribs)
, mIsPaused(false)
, mIsActive(false)
: WebGLRefCountedObject(webgl)
, mGLName(tf)
, mIndexedBindings(webgl->mGLMaxTransformFeedbackSeparateAttribs)
, mIsPaused(false)
, mIsActive(false)
, mActive_PrimMode{}
, mActive_VertPosition{}
, mActive_VertCapacity{}
{
mContext->mTransformFeedbacks.insertBack(this);
mContext->mTransformFeedbacks.insertBack(this);
}
WebGLTransformFeedback::~WebGLTransformFeedback()

View File

@ -51,10 +51,19 @@ public:
// note that these initial values are what GL initializes vertex attribs to
WebGLVertexAttribData()
: mDivisor(0)
, mEnabled(false)
: mDivisor(0)
, mEnabled(false)
, mIntegerFunc{ false }
, mType{}
, mBaseType{}
, mSize{ '\0' }
, mBytesPerVertex{ '\0' }
, mNormalized{ false }
, mStride{}
, mExplicitStride{}
, mByteOffset{}
{
VertexAttribPointer(false, nullptr, 4, LOCAL_GL_FLOAT, false, 0, 0);
VertexAttribPointer(false, nullptr, 4, LOCAL_GL_FLOAT, false, 0, 0);
}
void VertexAttribPointer(bool integerFunc, WebGLBuffer* buf, uint8_t size,

View File

@ -42,6 +42,7 @@ protected:
HashEntry(uint8_t aType, const char* aEntryName)
: mEntryName(aEntryName)
, mEntryType(aType)
, mData{}
{
Reset(mEntryType);
}

View File

@ -520,18 +520,28 @@ class AesTask : public ReturnArrayBufferViewTask,
public DeferredData
{
public:
AesTask(JSContext* aCx, const ObjectOrString& aAlgorithm,
CryptoKey& aKey, bool aEncrypt)
: mSymKey(aKey.GetSymKey())
AesTask(JSContext* aCx,
const ObjectOrString& aAlgorithm,
CryptoKey& aKey,
bool aEncrypt)
: mMechanism{}
, mSymKey(aKey.GetSymKey())
, mTagLength{ '\0' }
, mCounterLength{ '\0' }
, mEncrypt(aEncrypt)
{
Init(aCx, aAlgorithm, aKey, aEncrypt);
}
AesTask(JSContext* aCx, const ObjectOrString& aAlgorithm,
CryptoKey& aKey, const CryptoOperationData& aData,
AesTask(JSContext* aCx,
const ObjectOrString& aAlgorithm,
CryptoKey& aKey,
const CryptoOperationData& aData,
bool aEncrypt)
: mSymKey(aKey.GetSymKey())
: mMechanism{}
, mSymKey(aKey.GetSymKey())
, mTagLength{ '\0' }
, mCounterLength{ '\0' }
, mEncrypt(aEncrypt)
{
Init(aCx, aAlgorithm, aKey, aEncrypt);
@ -1682,18 +1692,25 @@ private:
class ImportRsaKeyTask : public ImportKeyTask
{
public:
ImportRsaKeyTask(nsIGlobalObject* aGlobal, JSContext* aCx,
const nsAString& aFormat,
const ObjectOrString& aAlgorithm, bool aExtractable,
const Sequence<nsString>& aKeyUsages)
ImportRsaKeyTask(nsIGlobalObject* aGlobal,
JSContext* aCx,
const nsAString& aFormat,
const ObjectOrString& aAlgorithm,
bool aExtractable,
const Sequence<nsString>& aKeyUsages)
: mModulusLength{}
{
Init(aGlobal, aCx, aFormat, aAlgorithm, aExtractable, aKeyUsages);
}
ImportRsaKeyTask(nsIGlobalObject* aGlobal, JSContext* aCx,
const nsAString& aFormat, JS::Handle<JSObject*> aKeyData,
const ObjectOrString& aAlgorithm, bool aExtractable,
const Sequence<nsString>& aKeyUsages)
ImportRsaKeyTask(nsIGlobalObject* aGlobal,
JSContext* aCx,
const nsAString& aFormat,
JS::Handle<JSObject*> aKeyData,
const ObjectOrString& aAlgorithm,
bool aExtractable,
const Sequence<nsString>& aKeyUsages)
: mModulusLength{}
{
Init(aGlobal, aCx, aFormat, aAlgorithm, aExtractable, aKeyUsages);
if (NS_FAILED(mEarlyRv)) {
@ -2360,9 +2377,15 @@ private:
};
GenerateAsymmetricKeyTask::GenerateAsymmetricKeyTask(
nsIGlobalObject* aGlobal, JSContext* aCx, const ObjectOrString& aAlgorithm,
bool aExtractable, const Sequence<nsString>& aKeyUsages)
nsIGlobalObject* aGlobal,
JSContext* aCx,
const ObjectOrString& aAlgorithm,
bool aExtractable,
const Sequence<nsString>& aKeyUsages)
: mKeyPair(new CryptoKeyPair())
, mMechanism{}
, mRsaParams{}
, mDhParams{}
{
mArena = UniquePLArenaPool(PORT_NewArena(DER_DEFAULT_CHUNKSIZE));
if (!mArena) {
@ -2601,15 +2624,23 @@ class DeriveHkdfBitsTask : public ReturnArrayBufferViewTask
{
public:
DeriveHkdfBitsTask(JSContext* aCx,
const ObjectOrString& aAlgorithm, CryptoKey& aKey, uint32_t aLength)
const ObjectOrString& aAlgorithm,
CryptoKey& aKey,
uint32_t aLength)
: mSymKey(aKey.GetSymKey())
, mMechanism{}
{
Init(aCx, aAlgorithm, aKey, aLength);
}
DeriveHkdfBitsTask(JSContext* aCx, const ObjectOrString& aAlgorithm,
CryptoKey& aKey, const ObjectOrString& aTargetAlgorithm)
: mSymKey(aKey.GetSymKey())
DeriveHkdfBitsTask(JSContext* aCx,
const ObjectOrString& aAlgorithm,
CryptoKey& aKey,
const ObjectOrString& aTargetAlgorithm)
: mLengthInBits{}
, mLengthInBytes{}
, mSymKey(aKey.GetSymKey())
, mMechanism{}
{
size_t length;
mEarlyRv = GetKeyLengthForAlgorithm(aCx, aTargetAlgorithm, length);
@ -2751,15 +2782,23 @@ class DerivePbkdfBitsTask : public ReturnArrayBufferViewTask
{
public:
DerivePbkdfBitsTask(JSContext* aCx,
const ObjectOrString& aAlgorithm, CryptoKey& aKey, uint32_t aLength)
const ObjectOrString& aAlgorithm,
CryptoKey& aKey,
uint32_t aLength)
: mSymKey(aKey.GetSymKey())
, mHashOidTag{ SEC_OID_UNKNOWN }
{
Init(aCx, aAlgorithm, aKey, aLength);
}
DerivePbkdfBitsTask(JSContext* aCx, const ObjectOrString& aAlgorithm,
CryptoKey& aKey, const ObjectOrString& aTargetAlgorithm)
: mSymKey(aKey.GetSymKey())
DerivePbkdfBitsTask(JSContext* aCx,
const ObjectOrString& aAlgorithm,
CryptoKey& aKey,
const ObjectOrString& aTargetAlgorithm)
: mLength{}
, mIterations{}
, mSymKey(aKey.GetSymKey())
, mHashOidTag{ SEC_OID_UNKNOWN }
{
size_t length;
mEarlyRv = GetKeyLengthForAlgorithm(aCx, aTargetAlgorithm, length);

View File

@ -291,8 +291,10 @@ EventStateManager::EventStateManager()
: mLockCursor(0)
, mLastFrameConsumedSetCursor(false)
, mCurrentTarget(nullptr)
// init d&d gesture state machine variables
, mGestureDownPoint(0,0)
// init d&d gesture state machine variables
, mGestureDownPoint(0, 0)
, mGestureModifiers{}
, mGestureDownButtons{}
, mPresContext(nullptr)
, mLClickCount(0)
, mMClickCount(0)

View File

@ -199,6 +199,7 @@ NS_IMPL_CYCLE_COLLECTING_RELEASE(IMEContentObserver)
IMEContentObserver::IMEContentObserver()
: mESM(nullptr)
, mIMENotificationRequests(nullptr)
, mPreAttrChangeLength{}
, mSuppressNotifications(0)
, mPreCharacterDataChangeLength(-1)
, mSendingNotification(NOTIFY_IME_OF_NOTHING)

View File

@ -577,6 +577,7 @@ private:
CompositionEventDispatcher()
: Runnable("TextComposition::CompositionEventDispatcher")
, mEventMessage{ eVoidEvent }
, mIsSynthesizedEvent(false){};
};

View File

@ -13,9 +13,10 @@ namespace dom {
XULCommandEvent::XULCommandEvent(EventTarget* aOwner,
nsPresContext* aPresContext,
WidgetInputEvent* aEvent)
: UIEvent(aOwner, aPresContext,
aEvent ? aEvent :
new WidgetInputEvent(false, eVoidEvent, nullptr))
: UIEvent(aOwner,
aPresContext,
aEvent ? aEvent : new WidgetInputEvent(false, eVoidEvent, nullptr))
, mInputSource{}
{
if (aEvent) {
mEventIsInternal = false;

View File

@ -339,16 +339,20 @@ FetchDriver::FetchDriver(InternalRequest* aRequest,
, mPerformanceStorage(aPerformanceStorage)
, mNeedToObserveOnDataAvailable(false)
, mIsTrackingFetch(aIsTrackingFetch)
, mOnStopRequestCalled
{
false
}
#ifdef DEBUG
, mResponseAvailableCalled(false)
, mFetchCalled(false)
#endif
{
AssertIsOnMainThread();
{
AssertIsOnMainThread();
MOZ_ASSERT(aRequest);
MOZ_ASSERT(aPrincipal);
MOZ_ASSERT(aMainThreadEventTarget);
MOZ_ASSERT(aRequest);
MOZ_ASSERT(aPrincipal);
MOZ_ASSERT(aMainThreadEventTarget);
}
FetchDriver::~FetchDriver()

View File

@ -124,6 +124,7 @@ InternalRequest::InternalRequest(const nsACString& aURL,
const nsAString& aIntegrity)
: mMethod(aMethod)
, mHeaders(aHeaders)
, mBodyLength{}
, mContentPolicyType(aContentPolicyType)
, mReferrer(aReferrer)
, mReferrerPolicy(aReferrerPolicy)
@ -138,7 +139,7 @@ InternalRequest::InternalRequest(const nsACString& aURL,
, mAuthenticationFlag(false)
, mForceOriginHeader(false)
, mPreserveContentCodings(false)
// FIXME See the above comment in the default constructor.
// FIXME See the above comment in the default constructor.
, mSameOriginDataURL(true)
, mSkipServiceWorker(false)
, mSynchronous(false)
@ -182,15 +183,27 @@ InternalRequest::InternalRequest(const InternalRequest& aOther)
InternalRequest::InternalRequest(const IPCInternalRequest& aIPCRequest)
: mMethod(aIPCRequest.method())
, mURLList(aIPCRequest.urls())
, mHeaders(new InternalHeaders(aIPCRequest.headers(),
aIPCRequest.headersGuard()))
, mHeaders(
new InternalHeaders(aIPCRequest.headers(), aIPCRequest.headersGuard()))
, mBodyLength{}
, mContentPolicyType(aIPCRequest.contentPolicyType())
, mReferrer(aIPCRequest.referrer())
, mReferrerPolicy(aIPCRequest.referrerPolicy())
, mEnvironmentReferrerPolicy{ RP_Unset }
, mMode(aIPCRequest.mode())
, mCredentialsMode(aIPCRequest.credentials())
, mCacheMode(aIPCRequest.requestCache())
, /* FIXME: initialize mResponseTainting */ mCacheMode(
aIPCRequest.requestCache())
, mRedirectMode(aIPCRequest.requestRedirect())
, mMozErrors{ false }
, mAuthenticationFlag{ false }
, mForceOriginHeader{ false }
, mPreserveContentCodings{ false }
, mSameOriginDataURL{ false }
, mSkipServiceWorker{ false }
, mSynchronous{ false }
, mUnsafeRequest{ false }
, mUseURLCredentials{ false }
{
MOZ_ASSERT(!mURLList.IsEmpty());
}

View File

@ -188,7 +188,9 @@ class FileSystemTaskParentBase : public Runnable
public:
FileSystemTaskParentBase()
: Runnable("FileSystemTaskParentBase")
{}
, mErrorValue{ NS_ERROR_NOT_INITIALIZED }
{
}
/*
* Start the task. This must be called from the PBackground thread only.

View File

@ -159,7 +159,11 @@ public:
GetFilesHelperChild(nsIGlobalObject* aGlobal, bool aRecursiveFlag)
: GetFilesHelper(aGlobal, aRecursiveFlag)
, mPendingOperation(false)
{}
{
this->mUUID.m0 = {};
this->mUUID.m1 = {};
this->mUUID.m2 = {};
}
virtual void
Work(ErrorResult& aRv) override;

View File

@ -23,7 +23,10 @@ public:
GamepadHapticActuator(nsISupports* aParent, uint32_t aGamepadId,
uint32_t aIndex);
explicit GamepadHapticActuator(nsISupports* aParent)
: mParent(aParent), mType(GamepadHapticActuatorType::Vibration)
: mParent(aParent)
, mGamepadId{}
, mType(GamepadHapticActuatorType::Vibration)
, mIndex{}
{
}

View File

@ -20,12 +20,13 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(GridLine)
NS_INTERFACE_MAP_ENTRY(nsISupports)
NS_INTERFACE_MAP_END
GridLine::GridLine(GridLines *aParent)
GridLine::GridLine(GridLines* aParent)
: mParent(aParent)
, mStart(0.0)
, mBreadth(0.0)
, mType(GridDeclaration::Implicit)
, mNumber(0)
, mNegativeNumber{}
{
MOZ_ASSERT(aParent, "Should never be instantiated with a null GridLines");
}

View File

@ -23,7 +23,8 @@ NS_IMPL_ISUPPORTS(ContentBridgeParent,
nsIObserver)
ContentBridgeParent::ContentBridgeParent()
: mIsForJSPlugin(false)
: mIsForBrowser{ false }
, mIsForJSPlugin(false)
{}
ContentBridgeParent::~ContentBridgeParent()

View File

@ -22,25 +22,27 @@ namespace dom {
class FilePickerParent : public PFilePickerParent
{
public:
FilePickerParent(const nsString& aTitle,
const int16_t& aMode)
: mTitle(aTitle)
, mMode(aMode)
{}
FilePickerParent(const nsString& aTitle, const int16_t& aMode)
: mTitle(aTitle)
, mMode(aMode)
, mResult{}
{
}
virtual ~FilePickerParent();
virtual ~FilePickerParent();
void Done(int16_t aResult);
void Done(int16_t aResult);
struct BlobImplOrString
{
RefPtr<BlobImpl> mBlobImpl;
nsString mDirectoryPath;
struct BlobImplOrString
{
RefPtr<BlobImpl> mBlobImpl;
nsString mDirectoryPath;
enum {
eBlobImpl,
eDirectoryPath
} mType;
enum
{
eBlobImpl,
eDirectoryPath
} mType;
};
void SendFilesOrDirectories(const nsTArray<BlobImplOrString>& aData);

View File

@ -304,16 +304,17 @@ bool HangMonitorParent::sShouldForcePaint = true;
/* HangMonitorChild implementation */
HangMonitorChild::HangMonitorChild(ProcessHangMonitor* aMonitor)
: mHangMonitor(aMonitor),
mMonitor("HangMonitorChild lock"),
mSentReport(false),
mTerminateScript(false),
mTerminateGlobal(false),
mStartDebugger(false),
mFinishedStartingDebugger(false),
mForcePaint(false),
mShutdownDone(false),
mIPCOpen(true)
: mHangMonitor(aMonitor)
, mMonitor("HangMonitorChild lock")
, mSentReport(false)
, mTerminateScript(false)
, mTerminateGlobal(false)
, mStartDebugger(false)
, mFinishedStartingDebugger(false)
, mForcePaint(false)
, mForcePaintEpoch{}
, mShutdownDone(false)
, mIPCOpen(true)
{
MOZ_RELEASE_ASSERT(NS_IsMainThread());
mContext = danger::GetJSContext();

View File

@ -405,8 +405,9 @@ TabChild::TabChild(nsIContentChild* aManager,
, mChromeFlags(aChromeFlags)
, mMaxTouchPoints(0)
, mActiveSuppressDisplayport(0)
, mLayersId{0}
, mLayersId{ 0 }
, mBeforeUnloadListeners(0)
, mLastBackgroundColor{}
, mDidFakeShow(false)
, mNotified(false)
, mTriedBrowserInit(false)

View File

@ -163,6 +163,8 @@ TabParent::TabParent(nsIContentParent* aManager,
, mTabId(aTabId)
, mCreatingWindow(false)
, mCursor(eCursorInvalid)
, mCustomCursorHotspotX{}
, mCustomCursorHotspotY{}
, mTabSetsCursor(false)
, mHasContentOpener(false)
#ifdef DEBUG

View File

@ -19,7 +19,12 @@ extern mozilla::LazyLogModule gMP4MetadataLog;
class MOZ_RAII BufferReader
{
public:
BufferReader() : mPtr(nullptr), mRemaining(0) {}
BufferReader()
: mPtr(nullptr)
, mRemaining(0)
, mLength{}
{
}
BufferReader(const uint8_t* aData, size_t aSize)
: mPtr(aData), mRemaining(aSize), mLength(aSize)
{

View File

@ -422,12 +422,19 @@ NS_INTERFACE_MAP_END_INHERITING(DOMMediaStream)
DOMMediaStream::DOMMediaStream(nsPIDOMWindowInner* aWindow,
MediaStreamTrackSourceGetter* aTrackSourceGetter)
: mLogicalStreamStartTime(0), mWindow(aWindow),
mInputStream(nullptr), mOwnedStream(nullptr), mPlaybackStream(nullptr),
mTracksPendingRemoval(0), mTrackSourceGetter(aTrackSourceGetter),
mPlaybackTrackListener(MakeAndAddRef<PlaybackTrackListener>(this)),
mTracksCreated(false), mNotifiedOfMediaStreamGraphShutdown(false),
mActive(false), mSetInactiveOnFinish(false)
: mLogicalStreamStartTime(0)
, mWindow(aWindow)
, mInputStream(nullptr)
, mOwnedStream(nullptr)
, mPlaybackStream(nullptr)
, mTracksPendingRemoval(0)
, mTrackSourceGetter(aTrackSourceGetter)
, mPlaybackTrackListener(MakeAndAddRef<PlaybackTrackListener>(this))
, mTracksCreated(false)
, mNotifiedOfMediaStreamGraphShutdown(false)
, mActive(false)
, mSetInactiveOnFinish(false)
, mCORSMode{ CORS_NONE }
{
nsresult rv;
nsCOMPtr<nsIUUIDGenerator> uuidgen =

View File

@ -28,12 +28,15 @@ GetUserMediaRequest::GetUserMediaRequest(
{
}
GetUserMediaRequest::GetUserMediaRequest(
nsPIDOMWindowInner* aInnerWindow,
const nsAString& aRawId,
const nsAString& aMediaSource)
: mRawID(aRawId)
GetUserMediaRequest::GetUserMediaRequest(nsPIDOMWindowInner* aInnerWindow,
const nsAString& aRawId,
const nsAString& aMediaSource)
: mInnerWindowID{}
, mOuterWindowID{}
, mRawID(aRawId)
, mMediaSource(aMediaSource)
, mIsSecure{ false }
, mIsHandlingUserInput{ false }
{
if (aInnerWindow && aInnerWindow->GetOuterWindow()) {
mOuterWindowID = aInnerWindow->GetOuterWindow()->WindowID();

View File

@ -520,6 +520,7 @@ MediaCacheStream::MediaCacheStream(ChannelMediaResource* aClient,
, mStreamOffset(0)
, mPlaybackBytesPerSecond(10000)
, mPinCount(0)
, mNotifyDataEndedStatus{ NS_ERROR_NOT_INITIALIZED }
, mMetadataInPartialBlockBuffer(false)
, mIsPrivateBrowsing(aIsPrivateBrowsing)
{

View File

@ -409,7 +409,12 @@ private:
private:
struct Entry : public nsUint32HashKey {
explicit Entry(KeyTypePointer aKey) : nsUint32HashKey(aKey) { }
explicit Entry(KeyTypePointer aKey)
: nsUint32HashKey(aKey)
, mNextBlock{}
, mPrevBlock{}
{
}
Entry(const Entry& toCopy) : nsUint32HashKey(&toCopy.GetKey()),
mNextBlock(toCopy.mNextBlock), mPrevBlock(toCopy.mPrevBlock) {}

View File

@ -820,7 +820,11 @@ class MediaDecoderStateMachine::SeekingState
: public MediaDecoderStateMachine::StateObject
{
public:
explicit SeekingState(Master* aPtr) : StateObject(aPtr) { }
explicit SeekingState(Master* aPtr)
: StateObject(aPtr)
, mVisibility{ static_cast<EventVisibility>(0) }
{
}
RefPtr<MediaDecoder::SeekPromise> Enter(SeekJob&& aSeekJob,
EventVisibility aVisibility)

View File

@ -1256,6 +1256,9 @@ MediaRecorder::MediaRecorder(DOMMediaStream& aSourceMediaStream,
: DOMEventTargetHelper(aOwnerWindow)
, mAudioNodeOutput(0)
, mState(RecordingState::Inactive)
, mAudioBitsPerSecond{}
, mVideoBitsPerSecond{}
, mBitsPerSecond{}
{
MOZ_ASSERT(aOwnerWindow);
mDOMStream = &aSourceMediaStream;
@ -1269,6 +1272,9 @@ MediaRecorder::MediaRecorder(AudioNode& aSrcAudioNode,
: DOMEventTargetHelper(aOwnerWindow)
, mAudioNodeOutput(aSrcOutput)
, mState(RecordingState::Inactive)
, mAudioBitsPerSecond{}
, mVideoBitsPerSecond{}
, mBitsPerSecond{}
{
MOZ_ASSERT(aOwnerWindow);

View File

@ -3581,6 +3581,7 @@ MediaStreamGraphImpl::MediaStreamGraphImpl(GraphDriverType aDriverRequested,
TrackRate aSampleRate,
AbstractThread* aMainThread)
: MediaStreamGraph(aSampleRate)
, mFirstCycleBreaker{}
, mPortCount(0)
, mInputWanted(false)
, mInputDeviceID(-1)

View File

@ -249,8 +249,13 @@ public:
/**
* Iterate through the tracks of aBuffer in order of ID.
*/
explicit TrackIter(const StreamTracks& aBuffer) :
mBuffer(&aBuffer.mTracks), mIndex(0), mMatchType(false) {}
explicit TrackIter(const StreamTracks& aBuffer)
: mBuffer(&aBuffer.mTracks)
, mIndex(0)
, mType{ static_cast<MediaSegment::Type>(0) }
, mMatchType(false)
{
}
/**
* Iterate through the tracks of aBuffer with type aType, in order of ID.
*/

View File

@ -486,6 +486,9 @@ public:
friend class StringListRange;
Iterator(const CharType* aRangeStart, uint32_t aLength)
: mRangeEnd(aRangeStart + aLength)
, mStart{ nullptr }
, mEnd{ nullptr }
, mComma{ nullptr }
{
SearchItemAt(aRangeStart);
}

View File

@ -40,6 +40,7 @@ NS_INTERFACE_MAP_END_INHERITING(Event)
MediaKeyMessageEvent::MediaKeyMessageEvent(EventTarget* aOwner)
: Event(aOwner, nullptr, nullptr)
, mMessageType{ static_cast<MediaKeyMessageType>(0) }
{
mozilla::HoldJSObjects(this);
}

View File

@ -223,7 +223,9 @@ public:
, mChannels(0)
, mSamplingRate(0)
, mAudioBitrate(0)
{}
, mDirectConnected{ false }
{
}
/**
* Suspends encoding from mCurrentTime, i.e., all audio data until the next

View File

@ -34,6 +34,7 @@ namespace gmp {
GMPContentParent::GMPContentParent(GMPParent* aParent)
: mParent(aParent)
, mPluginId{}
{
if (mParent) {
SetDisplayName(mParent->GetDisplayName());

View File

@ -35,7 +35,9 @@ private:
static void GMPTimerExpired(nsITimer *aTimer, void *aClosure);
struct Context {
Context() {
Context()
: mId{}
{
MOZ_COUNT_CTOR(Context);
}
~Context() {

View File

@ -24,6 +24,8 @@ using namespace gfx;
RemoteVideoDecoder::RemoteVideoDecoder()
: mActor(new VideoDecoderChild())
, mDescription("RemoteVideoDecoder")
, mIsHardwareAccelerated{ false }
, mConversion{ MediaDataDecoder::ConversionRequired::kNeedNone }
{
}

View File

@ -123,6 +123,8 @@ Box::Box(BoxContext* aContext, uint64_t aOffset, const Box* aParent)
Box::Box()
: mContext(nullptr)
, mBodyOffset{}
, mChildOffset{}
, mParent(nullptr)
{}

View File

@ -128,6 +128,7 @@ AccumulateSPSTelemetry(const MediaByteBuffer* aExtradata)
MP4Demuxer::MP4Demuxer(MediaResource* aResource)
: mResource(aResource)
, mStream(new ResourceStream(aResource))
, mIsSeekable{ false }
{
DDLINKCHILD("resource", aResource);
DDLINKCHILD("stream", mStream.get());

View File

@ -27,6 +27,7 @@ LazyLogModule gMP4MetadataLog("MP4Metadata");
IndiceWrapper::IndiceWrapper(Mp4parseByteData& aIndice)
{
this->mIndice.data = { nullptr };
mIndice.length = aIndice.length;
mIndice.indices = aIndice.indices;
}

View File

@ -687,6 +687,7 @@ Moof::ParseTrun(Box& aBox, Tfhd& aTfhd, Mvhd& aMvhd, Mdhd& aMdhd, Edts& aEdts, u
}
Tkhd::Tkhd(Box& aBox)
: mTrackId{}
{
mValid = Parse(aBox).isOk();
if (!mValid) {
@ -727,6 +728,10 @@ Tkhd::Parse(Box& aBox)
}
Mvhd::Mvhd(Box& aBox)
: mCreationTime{}
, mModificationTime{}
, mTimescale{}
, mDuration{}
{
mValid = Parse(aBox).isOk();
if (!mValid) {
@ -769,6 +774,12 @@ Mdhd::Mdhd(Box& aBox)
}
Trex::Trex(Box& aBox)
: mFlags{}
, mTrackId{}
, mDefaultSampleDescriptionIndex{}
, mDefaultSampleDuration{}
, mDefaultSampleSize{}
, mDefaultSampleFlags{}
{
mValid = Parse(aBox).isOk();
if (!mValid) {
@ -793,6 +804,7 @@ Trex::Parse(Box& aBox)
Tfhd::Tfhd(Box& aBox, Trex& aTrex)
: Trex(aTrex)
, mBaseDataOffset{}
{
mValid = Parse(aBox).isOk();
if (!mValid) {
@ -832,6 +844,7 @@ Tfhd::Parse(Box& aBox)
}
Tfdt::Tfdt(Box& aBox)
: mBaseMediaDecodeTime{}
{
mValid = Parse(aBox).isOk();
if (!mValid) {
@ -1000,6 +1013,7 @@ Saio::Parse(Box& aBox)
}
Sbgp::Sbgp(Box& aBox)
: mGroupingTypeParam{}
{
mValid = Parse(aBox).isOk();
if (!mValid) {

View File

@ -11,8 +11,28 @@
namespace mozilla {
OggWriter::OggWriter() : ContainerWriter()
OggWriter::OggWriter()
: ContainerWriter()
, mOggPage{}
, mPacket{}
{
this->mOggStreamState.body_data = { nullptr };
this->mOggStreamState.body_storage = {};
this->mOggStreamState.body_fill = {};
this->mOggStreamState.body_returned = {};
this->mOggStreamState.lacing_vals = { nullptr };
this->mOggStreamState.granule_vals = { nullptr };
this->mOggStreamState.lacing_storage = {};
this->mOggStreamState.lacing_fill = {};
this->mOggStreamState.lacing_packet = {};
this->mOggStreamState.lacing_returned = {};
this->mOggStreamState.header_fill = {};
this->mOggStreamState.e_o_s = {};
this->mOggStreamState.b_o_s = {};
this->mOggStreamState.serialno = {};
this->mOggStreamState.pageno = {};
this->mOggStreamState.packetno = {};
this->mOggStreamState.granulepos = {};
if (NS_FAILED(Init())) {
LOG("ERROR! Fail to initialize the OggWriter.");
}

View File

@ -20,20 +20,25 @@ namespace mozilla {
extern LazyLogModule gMediaDecoderLog;
#define OPUS_LOG(type, msg) MOZ_LOG(gMediaDecoderLog, type, msg)
OpusParser::OpusParser():
mRate(0),
mNominalRate(0),
mChannels(0),
mPreSkip(0),
OpusParser::OpusParser()
: mRate(0)
, mNominalRate(0)
, mChannels(0)
, mPreSkip(0)
,
#ifdef MOZ_SAMPLE_TYPE_FLOAT32
mGain(1.0f),
mGain(1.0f)
,
#else
mGain_Q16(65536),
mGain_Q16(65536)
,
#endif
mChannelMapping(0),
mStreams(0),
mCoupledStreams(0)
{ }
mChannelMapping(0)
, mStreams(0)
, mCoupledStreams(0)
, mPrevPacketGranulepos{}
{
}
bool OpusParser::DecodeHeader(unsigned char* aData, size_t aLength)
{

View File

@ -47,6 +47,8 @@ TheoraDecoder::TheoraDecoder(const CreateDecoderParams& aParams)
: mImageAllocator(aParams.mKnowsCompositor)
, mImageContainer(aParams.mImageContainer)
, mTaskQueue(aParams.mTaskQueue)
, mTheoraInfo{}
, mTheoraComment{}
, mTheoraSetupInfo(nullptr)
, mTheoraDecoderContext(nullptr)
, mPacketCount(0)

View File

@ -22,12 +22,12 @@
namespace mozilla {
AppleATDecoder::AppleATDecoder(const AudioInfo& aConfig,
TaskQueue* aTaskQueue)
AppleATDecoder::AppleATDecoder(const AudioInfo& aConfig, TaskQueue* aTaskQueue)
: mConfig(aConfig)
, mFileStreamError(false)
, mTaskQueue(aTaskQueue)
, mConverter(nullptr)
, mOutputFormat{}
, mStream(nullptr)
, mParsedFramesForAACMagicCookie(0)
, mErrored(false)

View File

@ -708,11 +708,15 @@ CamerasChild::ActorDestroy(ActorDestroyReason aWhy)
}
CamerasChild::CamerasChild()
: mCallbackMutex("mozilla::cameras::CamerasChild::mCallbackMutex"),
mIPCIsAlive(true),
mRequestMutex("mozilla::cameras::CamerasChild::mRequestMutex"),
mReplyMonitor("mozilla::cameras::CamerasChild::mReplyMonitor"),
mZero(0)
: mCallbackMutex("mozilla::cameras::CamerasChild::mCallbackMutex")
, mIPCIsAlive(true)
, mRequestMutex("mozilla::cameras::CamerasChild::mRequestMutex")
, mReplyMonitor("mozilla::cameras::CamerasChild::mReplyMonitor")
, mReceivedReply{ false }
, mReplySuccess{ false }
, mZero(0)
, mReplyInteger{}
, mReplyScary{ false }
{
LOG(("CamerasChild: %p", this));

View File

@ -133,6 +133,7 @@ public:
, mCapEngine(aEngine)
, mStreamId(aStreamId)
, mProperties(aProperties)
, mResult{}
{
// No ShmemBuffer (of the right size) was available, so make an
// extra buffer here. We have no idea when we are going to run and
@ -155,7 +156,8 @@ public:
, mCapEngine(aEngine)
, mStreamId(aStreamId)
, mBuffer(Move(aBuffer))
, mProperties(aProperties){};
, mProperties(aProperties)
, mResult{} {};
NS_IMETHOD Run() override {
if (mParent->IsShuttingDown()) {

View File

@ -12,6 +12,7 @@ namespace media {
MediaSystemResourceManagerChild::MediaSystemResourceManagerChild()
: mDestroyed(false)
, mManager{ nullptr }
{
}

View File

@ -229,10 +229,11 @@ VideoEngine::GenerateId() {
return mId = sId++;
}
VideoEngine::VideoEngine(UniquePtr<const webrtc::Config>&& aConfig):
mCaptureDevInfo(aConfig->Get<webrtc::CaptureDeviceInfo>()),
mDeviceInfo(nullptr),
mConfig(std::move(aConfig))
VideoEngine::VideoEngine(UniquePtr<const webrtc::Config>&& aConfig)
: mId{}
, mCaptureDevInfo(aConfig->Get<webrtc::CaptureDeviceInfo>())
, mDeviceInfo(nullptr)
, mConfig(std::move(aConfig))
{
LOG((__PRETTY_FUNCTION__));
}

View File

@ -32,7 +32,8 @@ private:
static const int64_t kCacheExpiryPeriodMs = 2000;
public:
VideoEngine (){};
VideoEngine()
: mId{} {};
NS_INLINE_DECL_REFCOUNTING(VideoEngine)
static already_AddRefed<VideoEngine> Create(UniquePtr<const webrtc::Config>&& aConfig);

View File

@ -78,10 +78,12 @@ WAVTrackDemuxer::WAVTrackDemuxer(MediaResource* aSource)
, mFirstChunkOffset(0)
, mNumParsedChunks(0)
, mChunkIndex(0)
, mDataLength{}
, mTotalChunkLen(0)
, mSamplesPerChunk(0)
, mSamplesPerSecond(0)
, mChannels(0)
, mSampleFormat{}
{
DDLINKCHILD("source", aSource);
Reset();

View File

@ -42,21 +42,28 @@ class AudioBufferSourceNodeEngine final : public AudioNodeEngine
{
public:
AudioBufferSourceNodeEngine(AudioNode* aNode,
AudioDestinationNode* aDestination) :
AudioNodeEngine(aNode),
mStart(0.0), mBeginProcessing(0),
mStop(STREAM_TIME_MAX),
mResampler(nullptr), mRemainingResamplerTail(0),
mBufferEnd(0),
mLoopStart(0), mLoopEnd(0),
mBufferPosition(0), mBufferSampleRate(0),
AudioDestinationNode* aDestination)
: AudioNodeEngine(aNode)
, mStart(0.0)
, mBeginProcessing(0)
, mStop(STREAM_TIME_MAX)
, mResampler(nullptr)
, mRemainingResamplerTail(0)
, mBufferEnd(0)
, mLoopStart(0)
, mLoopEnd(0)
, mBufferPosition(0)
, mBufferSampleRate(0)
,
// mResamplerOutRate is initialized in UpdateResampler().
mChannels(0),
mDopplerShift(1.0f),
mDestination(aDestination->Stream()),
mPlaybackRateTimeline(1.0f),
mDetuneTimeline(0.0f),
mLoop(false)
mResamplerOutRate{}
, mChannels(0)
, mDopplerShift(1.0f)
, mDestination(aDestination->Stream())
, mSource{ nullptr }
, mPlaybackRateTimeline(1.0f)
, mDetuneTimeline(0.0f)
, mLoop(false)
{}
~AudioBufferSourceNodeEngine()
@ -624,6 +631,8 @@ AudioBufferSourceNode::AudioBufferSourceNode(AudioContext* aContext)
, mLoopStart(0.0)
, mLoopEnd(0.0)
// mOffset and mDuration are initialized in Start().
, mOffset{ 0.0 }
, mDuration{ 0.0 }
, mPlaybackRate(new AudioParam(this, PLAYBACKRATE, "playbackRate", 1.0f))
, mDetune(new AudioParam(this, DETUNE, "detune", 0.0f))
, mLoop(false)

View File

@ -78,6 +78,7 @@ AudioTimelineEvent::AudioTimelineEvent(Type aType,
AudioTimelineEvent::AudioTimelineEvent(MediaStream* aStream)
: mType(Stream)
, mValue{ 0.0 }
, mCurve(nullptr)
, mStream(aStream)
, mTimeConstant(0.0)

View File

@ -27,6 +27,7 @@ AudioProcessingEvent::AudioProcessingEvent(ScriptProcessorNode* aOwner,
: Event(aOwner, aPresContext, aEvent)
, mPlaybackTime(0.0)
, mNode(aOwner)
, mNumberOfInputChannels{}
{
}

View File

@ -25,6 +25,9 @@ public:
, mMaxDelayTicks(ceil(aMaxDelayTicks))
, mCurrentChunk(0)
// mLastReadChunk is initialized in EnsureBuffer
, mLastReadChunk
{
}
#ifdef DEBUG
, mHaveWrittenBlock(false)
#endif

View File

@ -42,20 +42,23 @@ const double MaxDelayTimeSeconds = 0.002;
const int UninitializedAzimuth = -1;
const unsigned RenderingQuantum = WEBAUDIO_BLOCK_SIZE;
HRTFPanner::HRTFPanner(float sampleRate, already_AddRefed<HRTFDatabaseLoader> databaseLoader)
: m_databaseLoader(databaseLoader)
, m_sampleRate(sampleRate)
, m_crossfadeSelection(CrossfadeSelection1)
, m_azimuthIndex1(UninitializedAzimuth)
, m_azimuthIndex2(UninitializedAzimuth)
// m_elevation1 and m_elevation2 are initialized in pan()
, m_crossfadeX(0)
, m_crossfadeIncr(0)
, m_convolverL1(HRTFElevation::fftSizeForSampleRate(sampleRate))
, m_convolverR1(m_convolverL1.fftSize())
, m_convolverL2(m_convolverL1.fftSize())
, m_convolverR2(m_convolverL1.fftSize())
, m_delayLine(MaxDelayTimeSeconds * sampleRate)
HRTFPanner::HRTFPanner(float sampleRate,
already_AddRefed<HRTFDatabaseLoader> databaseLoader)
: m_databaseLoader(databaseLoader)
, m_sampleRate(sampleRate)
, m_crossfadeSelection(CrossfadeSelection1)
, m_azimuthIndex1(UninitializedAzimuth)
, m_elevation1{ 0.0 }
, m_azimuthIndex2(UninitializedAzimuth)
// m_elevation1 and m_elevation2 are initialized in pan()
, m_elevation2{ 0.0 }
, m_crossfadeX(0)
, m_crossfadeIncr(0)
, m_convolverL1(HRTFElevation::fftSizeForSampleRate(sampleRate))
, m_convolverR1(m_convolverL1.fftSize())
, m_convolverL2(m_convolverL1.fftSize())
, m_convolverR2(m_convolverL1.fftSize())
, m_delayLine(MaxDelayTimeSeconds * sampleRate)
{
MOZ_ASSERT(m_databaseLoader);
MOZ_COUNT_CTOR(HRTFPanner);

View File

@ -108,12 +108,15 @@ PeriodicWave::createTriangle(float sampleRate)
return periodicWave.forget();
}
PeriodicWave::PeriodicWave(float sampleRate, size_t numberOfComponents, bool disableNormalization)
: m_sampleRate(sampleRate)
, m_centsPerRange(CentsPerRange)
, m_maxPartialsInBandLimitedTable(0)
, m_normalizationScale(1.0f)
, m_disableNormalization(disableNormalization)
PeriodicWave::PeriodicWave(float sampleRate,
size_t numberOfComponents,
bool disableNormalization)
: m_sampleRate(sampleRate)
, m_centsPerRange(CentsPerRange)
, m_numberOfComponents{}
, m_maxPartialsInBandLimitedTable(0)
, m_normalizationScale(1.0f)
, m_disableNormalization(disableNormalization)
{
float nyquist = 0.5 * m_sampleRate;

View File

@ -225,6 +225,8 @@ EbmlComposer::EbmlComposer()
, mClusterTimecode(0)
, mWidth(0)
, mHeight(0)
, mDisplayWidth{}
, mDisplayHeight{}
, mSampleFreq(0)
, mChannels(0)
{}

View File

@ -24,7 +24,10 @@ public:
, mOffset(-1)
, mTimestamp(-1)
, mDuration(-1)
, mIsKeyframe(false) {}
, mTrack{}
, mIsKeyframe(false)
{
}
bool Init(nestegg_packet* aPacket, int64_t aOffset, unsigned aTrack, bool aIsKeyframe)
{

View File

@ -109,7 +109,7 @@ SpeechTaskCallback::SpeechTaskCallback(nsISpeechTask* aTask,
const nsTArray<size_t>& aOffsets)
: mTask(aTask)
, mSpeechSynthesizer(aSynth)
, mOffsets(aOffsets)
, mCurrentIndex{}, mOffsets(aOffsets)
{
mDelegate = [[SpeechDelegate alloc] initWithCallback:this];
[mSpeechSynthesizer setDelegate:mDelegate];

View File

@ -160,8 +160,10 @@ SpeechSynthesisRequestChild::RecvOnMark(const nsString& aName,
// SpeechTaskChild
SpeechTaskChild::SpeechTaskChild(SpeechSynthesisUtterance* aUtterance, bool aIsChrome)
SpeechTaskChild::SpeechTaskChild(SpeechSynthesisUtterance* aUtterance,
bool aIsChrome)
: nsSpeechTask(aUtterance, aIsChrome)
, mActor{ nullptr }
{
}

View File

@ -80,7 +80,10 @@ class SpeechTaskParent : public nsSpeechTask
friend class SpeechSynthesisRequestParent;
public:
SpeechTaskParent(float aVolume, const nsAString& aUtterance, bool aIsChrome)
: nsSpeechTask(aVolume, aUtterance, aIsChrome) {}
: nsSpeechTask(aVolume, aUtterance, aIsChrome)
, mActor{ nullptr }
{
}
nsresult DispatchStartImpl(const nsAString& aUri) override;

View File

@ -111,14 +111,21 @@ private:
~GlobalQueueItem() {}
public:
GlobalQueueItem(VoiceData* aVoice, nsSpeechTask* aTask, const nsAString& aText,
const float& aVolume, const float& aRate, const float& aPitch)
GlobalQueueItem(VoiceData* aVoice,
nsSpeechTask* aTask,
const nsAString& aText,
const float& aVolume,
const float& aRate,
const float& aPitch)
: mVoice(aVoice)
, mTask(aTask)
, mText(aText)
, mVolume(aVolume)
, mRate(aRate)
, mPitch(aPitch) {}
, mPitch(aPitch)
, mIsLocal{ false }
{
}
NS_INLINE_DECL_REFCOUNTING(GlobalQueueItem)

View File

@ -201,6 +201,7 @@ NS_IMPL_RELEASE_INHERITED(MessagePort, DOMEventTargetHelper)
MessagePort::MessagePort(nsIGlobalObject* aGlobal)
: DOMEventTargetHelper(aGlobal)
, mInnerID(0)
, mState{ static_cast<State>(0) }
, mMessageQueueEnabled(false)
, mIsKeptAlive(false)
, mHasBeenTransferredOrClosed(false)

View File

@ -153,6 +153,7 @@ NS_IMPL_ISUPPORTS_INHERITED(PaymentCanMakeActionResponse,
nsIPaymentCanMakeActionResponse)
PaymentCanMakeActionResponse::PaymentCanMakeActionResponse()
: mResult{ false }
{
mType = nsIPaymentActionResponse::CANMAKE_ACTION;
}
@ -180,6 +181,7 @@ NS_IMPL_ISUPPORTS_INHERITED(PaymentShowActionResponse,
nsIPaymentShowActionResponse)
PaymentShowActionResponse::PaymentShowActionResponse()
: mAcceptStatus{}
{
mType = nsIPaymentActionResponse::SHOW_ACTION;
}
@ -291,6 +293,7 @@ NS_IMPL_ISUPPORTS_INHERITED(PaymentAbortActionResponse,
nsIPaymentAbortActionResponse)
PaymentAbortActionResponse::PaymentAbortActionResponse()
: mAbortStatus{}
{
mType = nsIPaymentActionResponse::ABORT_ACTION;
}
@ -327,6 +330,7 @@ NS_IMPL_ISUPPORTS_INHERITED(PaymentCompleteActionResponse,
nsIPaymentCompleteActionResponse)
PaymentCompleteActionResponse::PaymentCompleteActionResponse()
: mCompleteStatus{}
{
mType = nsIPaymentActionResponse::COMPLETE_ACTION;
}

View File

@ -75,6 +75,7 @@ Performance::CreateForWorker(WorkerPrivate* aWorkerPrivate)
Performance::Performance()
: mResourceTimingBufferSize(kDefaultResourceTimingBufferSize)
, mPendingNotificationObserversTask(false)
, mSystemPrincipal{ false }
{
MOZ_ASSERT(!NS_IsMainThread());
}
@ -83,6 +84,7 @@ Performance::Performance(nsPIDOMWindowInner* aWindow)
: DOMEventTargetHelper(aWindow)
, mResourceTimingBufferSize(kDefaultResourceTimingBufferSize)
, mPendingNotificationObserversTask(false)
, mSystemPrincipal{ false }
{
MOZ_ASSERT(NS_IsMainThread());
}

View File

@ -1658,9 +1658,14 @@ class GetSitesClosure : public nsIGetSitesWithDataCallback {
public:
NS_DECL_ISUPPORTS
GetSitesClosure(const nsACString& domain, nsPluginHost* host)
: domain(domain), host(host), keepWaiting(true)
: domain(domain)
, host(host)
, result{ false }
, keepWaiting(true)
, retVal{ NS_ERROR_NOT_INITIALIZED }
{
}
NS_IMETHOD SitesWithData(InfallibleTArray<nsCString>& sites) override {
retVal = HandleGetSites(sites);
keepWaiting = false;

View File

@ -257,6 +257,7 @@ nsPluginInstanceOwner::GetCurrentImageSize()
nsPluginInstanceOwner::nsPluginInstanceOwner()
: mPluginWindow(nullptr)
, mLastEventloopNestingLevel{}
{
// create nsPluginNativeWindow object, it is derived from NPWindow
// struct and allows to manipulate native window procedure

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