Bug 877281 bustage fix. Deal with the fact that Value has 8-byte alignment. r=jandem
--- a/js/src/ion/arm/IonFrames-arm.h
+++ b/js/src/ion/arm/IonFrames-arm.h
@@ -433,17 +433,17 @@ class IonOOLProxyGetExitFrameLayout
};
class IonDOMExitFrameLayout
{
IonExitFooterFrame footer_;
IonExitFrameLayout exit_;
JSObject *thisObj;
- // We need to split the Value in 2 field of 32 bits, otherwise the C++
+ // We need to split the Value in 2 fields of 32 bits, otherwise the C++
// compiler may add some padding between the fields.
uint32_t loCalleeResult_;
uint32_t hiCalleeResult_;
public:
static inline size_t Size() {
return sizeof(IonDOMExitFrameLayout);
}
@@ -467,35 +467,38 @@ class IonDOMMethodExitFrameLayout
IonExitFooterFrame footer_;
IonExitFrameLayout exit_;
// This must be the last thing pushed, so as to stay common with
// IonDOMExitFrameLayout.
JSObject *thisObj_;
Value *argv_;
uintptr_t argc_;
- Value CalleeResult_;
+ // We need to split the Value in 2 fields of 32 bits, otherwise the C++
+ // compiler may add some padding between the fields.
+ uint32_t loCalleeResult_;
+ uint32_t hiCalleeResult_;
public:
static inline size_t Size() {
return sizeof(IonDOMMethodExitFrameLayout);
}
static size_t offsetOfResult() {
- return offsetof(IonDOMMethodExitFrameLayout, CalleeResult_);
+ return offsetof(IonDOMMethodExitFrameLayout, loCalleeResult_);
}
static size_t offsetOfArgcFromArgv() {
return offsetof(IonDOMMethodExitFrameLayout, argc_) -
offsetof(IonDOMMethodExitFrameLayout, argv_);
}
inline Value *vp() {
// The code in visitCallDOMNative depends on this static assert holding
- JS_STATIC_ASSERT(offsetof(IonDOMMethodExitFrameLayout, CalleeResult_) ==
+ JS_STATIC_ASSERT(offsetof(IonDOMMethodExitFrameLayout, loCalleeResult_) ==
(offsetof(IonDOMMethodExitFrameLayout, argc_) + sizeof(uintptr_t)));
- return &CalleeResult_;
+ return reinterpret_cast<Value*>(&loCalleeResult_);
}
inline JSObject **thisObjAddress() {
return &thisObj_;
}
inline uintptr_t argc() {
return argc_;
}
};
--- a/js/src/ion/shared/IonFrames-x86-shared.h
+++ b/js/src/ion/shared/IonFrames-x86-shared.h
@@ -398,17 +398,17 @@ class IonOOLProxyGetExitFrameLayout
class IonDOMExitFrameLayout
{
protected: // only to silence a clang warning about unused private fields
IonExitFooterFrame footer_;
IonExitFrameLayout exit_;
JSObject *thisObj;
- // We need to split the Value in 2 field of 32 bits, otherwise the C++
+ // We need to split the Value in 2 fields of 32 bits, otherwise the C++
// compiler may add some padding between the fields.
uint32_t loCalleeResult_;
uint32_t hiCalleeResult_;
public:
static inline size_t Size() {
return sizeof(IonDOMExitFrameLayout);
}
@@ -433,35 +433,38 @@ class IonDOMMethodExitFrameLayout
IonExitFooterFrame footer_;
IonExitFrameLayout exit_;
// This must be the last thing pushed, so as to stay common with
// IonDOMExitFrameLayout.
JSObject *thisObj_;
Value *argv_;
uintptr_t argc_;
- Value CalleeResult_;
+ // We need to split the Value into 2 fields of 32 bits, otherwise the C++
+ // compiler may add some padding between the fields.
+ uint32_t loCalleeResult_;
+ uint32_t hiCalleeResult_;
public:
static inline size_t Size() {
return sizeof(IonDOMMethodExitFrameLayout);
}
static size_t offsetOfResult() {
- return offsetof(IonDOMMethodExitFrameLayout, CalleeResult_);
+ return offsetof(IonDOMMethodExitFrameLayout, loCalleeResult_);
}
static size_t offsetOfArgcFromArgv() {
return offsetof(IonDOMMethodExitFrameLayout, argc_) -
offsetof(IonDOMMethodExitFrameLayout, argv_);
}
inline Value *vp() {
- JS_STATIC_ASSERT(offsetof(IonDOMMethodExitFrameLayout, CalleeResult_) ==
+ JS_STATIC_ASSERT(offsetof(IonDOMMethodExitFrameLayout, loCalleeResult_) ==
(offsetof(IonDOMMethodExitFrameLayout, argc_) + sizeof(uintptr_t)));
- return &CalleeResult_;
+ return reinterpret_cast<Value*>(&loCalleeResult_);
}
inline JSObject **thisObjAddress() {
return &thisObj_;
}
inline uintptr_t argc() {
return argc_;
}
};