mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 06:11:37 +00:00
Bug 718541 - Work around an MSVC compiler bug with inlining JSObject::nativeLookup. r=Waldo
--HG-- extra : rebase_source : 15e0e90a4c525b40253d38ed5c6c9b6b7d299891
This commit is contained in:
parent
537142c830
commit
5101b91ac2
@ -4074,6 +4074,20 @@ JSObject::setSlotSpan(JSContext *cx, uint32_t span)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER >= 1500
|
||||
/* Work around a compiler bug in MSVC9 and above, where inlining this function
|
||||
causes stack pointer offsets to go awry and spp to refer to something higher
|
||||
up the stack. */
|
||||
MOZ_NEVER_INLINE
|
||||
#endif
|
||||
const js::Shape *
|
||||
JSObject::nativeLookup(JSContext *cx, jsid id)
|
||||
{
|
||||
JS_ASSERT(isNative());
|
||||
js::Shape **spp;
|
||||
return js::Shape::search(cx, lastProperty(), id, &spp);
|
||||
}
|
||||
|
||||
bool
|
||||
JSObject::growSlots(JSContext *cx, uint32_t oldCount, uint32_t newCount)
|
||||
{
|
||||
|
@ -1154,14 +1154,6 @@ JSObject::isNative() const
|
||||
return lastProperty()->isNative();
|
||||
}
|
||||
|
||||
inline const js::Shape *
|
||||
JSObject::nativeLookup(JSContext *cx, jsid id)
|
||||
{
|
||||
JS_ASSERT(isNative());
|
||||
js::Shape **spp;
|
||||
return js::Shape::search(cx, lastProperty(), id, &spp);
|
||||
}
|
||||
|
||||
inline bool
|
||||
JSObject::nativeContains(JSContext *cx, jsid id)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user