Bug 1373579: Part 1 - Initialize all members when using an inherited constructor. r?billm
MozReview-Commit-ID: Dr4Zm2OJclo
--- a/js/public/StructuredClone.h
+++ b/js/public/StructuredClone.h
@@ -216,19 +216,19 @@ class MOZ_NON_MEMMOVABLE JS_PUBLIC_API(J
{
typedef js::SystemAllocPolicy AllocPolicy;
typedef mozilla::BufferList<js::SystemAllocPolicy> BufferList;
static const size_t kInitialSize = 0;
static const size_t kInitialCapacity = 4096;
static const size_t kStandardCapacity = 4096;
- const JSStructuredCloneCallbacks* callbacks_;
- void* closure_;
- OwnTransferablePolicy ownTransferables_;
+ const JSStructuredCloneCallbacks* callbacks_ = nullptr;
+ void* closure_ = nullptr;
+ OwnTransferablePolicy ownTransferables_ = OwnTransferablePolicy::NoTransferables;
js::SharedArrayRawBufferRefs refsHeld_;
void setOptionalCallbacks(const JSStructuredCloneCallbacks* callbacks,
void* closure,
OwnTransferablePolicy policy) {
callbacks_ = callbacks;
closure_ = closure;
ownTransferables_ = policy;