author | Andi-Bogdan Postelnicu <bpostelnicu@mozilla.com> |
Fri, 13 Jul 2018 14:39:12 +0300 | |
changeset 426595 | 03ecdc85a12613b5fb79805c32a9896395351415 |
parent 426594 | 3719d445438c87ac488642275a0b6c8eee01ada8 |
child 426596 | ae6e737276854a376177f2a64c15e9172e01ab8a |
push id | 34276 |
push user | ncsoregi@mozilla.com |
push date | Sat, 14 Jul 2018 09:41:08 +0000 |
treeherder | mozilla-central@04dd259d71db [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | bz |
bugs | 1475515 |
milestone | 63.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/dom/bindings/ErrorResult.h +++ b/dom/bindings/ErrorResult.h @@ -504,33 +504,33 @@ private: // on us. nsresult mResult; struct Message; struct DOMExceptionInfo; union Extra { // mMessage is set by ThrowErrorWithMessage and reported (and deallocated) // by SetPendingExceptionWithMessage. + MOZ_INIT_OUTSIDE_CTOR Message* mMessage; // valid when IsErrorWithMessage() // mJSException is set (and rooted) by ThrowJSException and reported (and // unrooted) by SetPendingJSException. + MOZ_INIT_OUTSIDE_CTOR JS::Value mJSException; // valid when IsJSException() // mDOMExceptionInfo is set by ThrowDOMException and reported (and // deallocated) by SetPendingDOMException. + MOZ_INIT_OUTSIDE_CTOR DOMExceptionInfo* mDOMExceptionInfo; // valid when IsDOMException() // |mJSException| has a non-trivial constructor and therefore MUST be // placement-new'd into existence. MOZ_PUSH_DISABLE_NONTRIVIAL_UNION_WARNINGS - Extra() - : mMessage(nullptr) - { - } + Extra() {} MOZ_POP_DISABLE_NONTRIVIAL_UNION_WARNINGS } mExtra; Message* InitMessage(Message* aMessage) { // The |new| here switches the active arm of |mExtra|, from the compiler's // point of view. Mere assignment *won't* necessarily do the right thing! new (&mExtra.mMessage) Message*(aMessage); return mExtra.mMessage;