Closed Bug 630898 Opened 9 years ago Closed 9 years ago
Inconsistent definition of js/JS
_Current Thread Id
Apparently, we still do js shell builds with JS_THREADSAFE off. I notice that the relevant portions of jslock.h are: #ifdef JS_THREADSAFE #define js_CurrentThreadId() PR_GetCurrentThread() #else #define JS_CurrentThreadId() 0 #endif Why the discrepancy? It means sprinkling #ifdefs in the code that uses *_CurrentThreadId().
Here's a sample patch that applies to tracemonkey after jorendorff's fix from bug 626743. It just defines both.
Attachment #509140 - Flags: review?(brendan)
Comment on attachment 509140 [details] [diff] [review] Define both js_ and JS_CurrentThreadId with or without JS_THREADSAFE We should not have JS_CurrentThreadId -- looks like a typo/thinko/capitalize-o. Just js_CurrentThreadId. No way is this public API. JS_ALL_CAPS_MACROs aside, js_ for old C-compatible private and friend APIs. /be
Attachment #509140 - Flags: review?(brendan) → review-
Assignee: general → sphink
Status: NEW → ASSIGNED
Attachment #509550 - Flags: review?(brendan)
Attachment #509550 - Flags: review?(brendan) → review+
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.