mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 747870 - Properly align XPCLazyCallContext::mData. r=bholley
This commit is contained in:
parent
91480beb18
commit
79542a4d88
@ -1310,12 +1310,13 @@ public:
|
||||
XPCCallContext &GetXPCCallContext()
|
||||
{
|
||||
if (!mCcx) {
|
||||
XPCCallContext *data = mData.addr();
|
||||
mCcxToDestroy = mCcx =
|
||||
new (mData) XPCCallContext(mCallerLanguage, mCx,
|
||||
mCallBeginRequest == CALL_BEGINREQUEST,
|
||||
mObj,
|
||||
mFlattenedJSObject, mWrapper,
|
||||
mTearOff);
|
||||
new (data) XPCCallContext(mCallerLanguage, mCx,
|
||||
mCallBeginRequest == CALL_BEGINREQUEST,
|
||||
mObj,
|
||||
mFlattenedJSObject, mWrapper,
|
||||
mTearOff);
|
||||
if (!mCcx->IsValid()) {
|
||||
NS_ERROR("This is not supposed to fail!");
|
||||
}
|
||||
@ -1343,7 +1344,7 @@ private:
|
||||
JSObject *mFlattenedJSObject;
|
||||
XPCWrappedNative *mWrapper;
|
||||
XPCWrappedNativeTearOff *mTearOff;
|
||||
char mData[sizeof(XPCCallContext)];
|
||||
mozilla::AlignedStorage2<XPCCallContext> mData;
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user