Closed Bug 131275 Opened 24 years ago Closed 23 years ago

JS_AddRoot could provide a default root name if you define NAME_ALL_GC_ROOTS

Categories

(Core :: JavaScript Engine, defect)

x86
All
defect
Not set
normal

Tracking

()

VERIFIED FIXED

People

(Reporter: rginda, Assigned: timeless)

Details

Attachments

(1 file, 2 obsolete files)

If JS_AddRoot were a #define to JS_AddNamedRoot in debug builds, leaked roots could be easier to track. I'm not sure how to turn __LINE__ into a string in preprocessor speak, so the upcoming patch only uses __FILE__ as the name. What do you all think?
Attached patch proposed patch (obsolete) — Splinter Review
Attached patch like 74404 but with line number (obsolete) — Splinter Review
http://www.jaggersoft.com/pubs/CVu10_1.html by jon@jaggersoft.com describes how to convert __LINE__ into a string.
Attachment #113687 - Flags: review?(rginda)
I'd like to hear from brendan or some else closer to the engine than I am before I r= anything.
I don't think we should change the ABI (exported symbols) even for DEBUG versions of js3250.dll, e.g. (DSO, whatever). So I'd prefer a different test than DEBUG. How about JS_NAME_ALL_ROOTS or some such? rginda, did this come up in a real-world situation? Who was using JS_AddRoot and not JS_AddNamedRoot? /be
Yes, this came from a real world situation, but it was a while ago so I don't recall the specifics. I may have been trying to get more information in the GC_MARK_DEBUG output.
not that my say counts for anything, but that define seems fine with me, if people like it then I can try to write up that patch...
If you test GC_MARK_DEBUG with that #ifdef, embedders will have to recompile the world when enabling GC_MARK_DEBUG. That didn't used to be the case. I'd say make the test #if defined GC_MARK_DEBUG && defined NAME_ALL_GC_ROOTS /be
I happened to use this in conjunction with GC_MARK_DEBUG, but I could imagine it being useful in other situations. How about just NAME_ALL_GC_ROOTS?
Ok, NAME_ALL_GC_ROOTS it is. Timeless, can you repatch? /be
Attachment #74404 - Attachment is obsolete: true
Attachment #113687 - Attachment is obsolete: true
Attachment #113687 - Flags: review?(rginda)
Attachment #115400 - Flags: review?(brendan)
Comment on attachment 115400 [details] [diff] [review] like 113687 but dependent on NAME_ALL_GC_ROOTS Sure, why not? /be
Attachment #115400 - Flags: review?(brendan) → review+
.
Assignee: rginda → timeless
Summary: JS_AddRoot could provide a default root name in debug builds → JS_AddRoot could provide a default root name if you define NAME_ALL_GC_ROOTS
checked in
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Checkin verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: