mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 487546: Fix shell bustage, r=brendan
This commit is contained in:
parent
874ab2823f
commit
803163441c
@ -306,6 +306,12 @@ extern void js_SetScopeInfo(JSScope *scope, const char *file, int line);
|
||||
extern JSBool
|
||||
js_CompareAndSwap(jsword *w, jsword ov, jsword nv);
|
||||
|
||||
/* Atomically bitwise-or the mask into the word *w using compare and swap. */
|
||||
extern void
|
||||
js_AtomicSetMask(jsword *w, jsword mask);
|
||||
|
||||
#define JS_ATOMIC_SET_MASK(w, mask) js_AtomicSetMask(w, mask)
|
||||
|
||||
#else
|
||||
|
||||
static inline JSBool
|
||||
@ -314,11 +320,9 @@ js_CompareAndSwap(jsword *w, jsword ov, jsword nv)
|
||||
return (*w == ov) ? *w = nv, JS_TRUE : JS_FALSE;
|
||||
}
|
||||
|
||||
#endif
|
||||
#define JS_ATOMIC_SET_MASK(w, mask) *(w) |= mask
|
||||
|
||||
/* Atomically bitwise-or the mask into the word *w using compare and swap. */
|
||||
extern void
|
||||
js_AtomicSetMask(jsword *w, jsword mask);
|
||||
#endif /* JS_THREADSAFE */
|
||||
|
||||
JS_END_EXTERN_C
|
||||
|
||||
|
@ -142,8 +142,8 @@ JS_STATIC_ASSERT(sizeof(size_t) == sizeof(jsword));
|
||||
|
||||
#define JSSTRING_IS_DEFLATED(str) ((str)->length & JSSTRFLAG_DEFLATED)
|
||||
|
||||
#define JSSTRING_SET_DEFLATED(str) js_AtomicSetMask((jsword*)&(str)->length, \
|
||||
JSSTRFLAG_DEFLATED);
|
||||
#define JSSTRING_SET_DEFLATED(str) \
|
||||
JS_ATOMIC_SET_MASK((jsword*)&(str)->length, JSSTRFLAG_DEFLATED)
|
||||
|
||||
#define JSSTRING_CHARS_AND_LENGTH(str, chars_, length_) \
|
||||
((void)(JSSTRING_IS_DEPENDENT(str) \
|
||||
@ -197,7 +197,7 @@ JS_STATIC_ASSERT(sizeof(size_t) == sizeof(jsword));
|
||||
#define JSFLATSTR_SET_ATOMIZED(str) \
|
||||
JS_BEGIN_MACRO \
|
||||
JS_ASSERT(JSSTRING_IS_FLAT(str) && !JSSTRING_IS_MUTABLE(str)); \
|
||||
js_AtomicSetMask((jsword*) &(str)->length, JSSTRFLAG_ATOMIZED); \
|
||||
JS_ATOMIC_SET_MASK((jsword*) &(str)->length, JSSTRFLAG_ATOMIZED); \
|
||||
JS_END_MACRO
|
||||
|
||||
#define JSFLATSTR_SET_MUTABLE(str) \
|
||||
|
Loading…
Reference in New Issue
Block a user