Closed Bug 630898 Opened 15 years ago Closed 14 years ago

Inconsistent definition of js/JS_CurrentThreadId

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sfink, Assigned: sfink)

Details

(Whiteboard: [fixed-in-tracemonkey])

Attachments

(2 files)

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+
Whiteboard: [fixed-in-tracemonkey]
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: