emptyWeakRef needs to live forever, but is allocated from managed memory and can get collected under unusual circumstances. It should be allocated from unmanaged memory instead.
Created attachment 344338 [details] [diff] [review] Patch Added a GCRoot to GC to keep GC::emptyWeakRef around forever, as it needs to be. Also removed two unnecessary explicit calls to WB in Traits.cpp (the fields in question are DWB so explicit call is redundant)
Attachment #344338 - Flags: review?(treilly)
Comment on attachment 344338 [details] [diff] [review] Patch don't use new just make the GCRoot part of the GC
I tried that, but apparently the order of initialization isn't guaranteed, I had the root being initialized before m_roots was, which caused crashes.
Doesn't C++ guarantee declaration order == initialization order? Anyway's using new's fine I guess.
I thought it did, but empirically it doesn't seem to be so in certain Flash configurations. (awaiting a review+ if this is ok with you)
pushed to redux as changeset: 1024:d4df732ef925
Status: NEW → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED
Resolved fixed engineering / work item that has been pushed. Setting status to verified.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.