diff options
Diffstat (limited to 'meta-linaro-integration/recipes-overlayed/firefox/firefox/porting/Bug-747870-Properly-align-XPCLazyCallContext-mData.-.patch')
-rw-r--r-- | meta-linaro-integration/recipes-overlayed/firefox/firefox/porting/Bug-747870-Properly-align-XPCLazyCallContext-mData.-.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/meta-linaro-integration/recipes-overlayed/firefox/firefox/porting/Bug-747870-Properly-align-XPCLazyCallContext-mData.-.patch b/meta-linaro-integration/recipes-overlayed/firefox/firefox/porting/Bug-747870-Properly-align-XPCLazyCallContext-mData.-.patch new file mode 100644 index 00000000..ea01a1c0 --- /dev/null +++ b/meta-linaro-integration/recipes-overlayed/firefox/firefox/porting/Bug-747870-Properly-align-XPCLazyCallContext-mData.-.patch @@ -0,0 +1,40 @@ +From: Mike Hommey <mh@glandium.org> +Date: Mon, 23 Apr 2012 12:32:10 +0200 +Subject: Bug 747870 - Properly align XPCLazyCallContext::mData. r=bholley + +--- + js/xpconnect/src/xpcprivate.h | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/js/xpconnect/src/xpcprivate.h b/js/xpconnect/src/xpcprivate.h +index d57f66e..ca23216 100644 +--- a/js/xpconnect/src/xpcprivate.h ++++ b/js/xpconnect/src/xpcprivate.h +@@ -1328,12 +1328,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!"); + } +@@ -1361,7 +1362,7 @@ private: + JSObject *mFlattenedJSObject; + XPCWrappedNative *mWrapper; + XPCWrappedNativeTearOff *mTearOff; +- char mData[sizeof(XPCCallContext)]; ++ mozilla::AlignedStorage2<XPCCallContext> mData; + }; + + /*************************************************************************** |