Closed Bug 300583 Opened 19 years ago Closed 8 years ago

XPCJSRuntime::XPCJSRuntime NS_ASSERTION(!gOldJSGCCallback, ...) is faulty

Categories

(Core :: XPConnect, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: timeless, Unassigned)

References

Details

when spidermonkey inits, the GC callback is null. this means that the first
caller to JS_SetGCCallbackRT will receive null as the return.

in most cases this seems to be xpconnect. As a result, the assertion will not
work properly for even simple cases:
1. world starts
2. spidermonkey starts
3. xpconnect inits
3a. ASSERTION is happy (static is null)
3b. JS_SetGCCallbackRT returns null
3c. static is set to null from returned value
4. xpconnect inits again
4a. ASSERTION is happy (static is null from returned value)
4b. JS_SetGCCallbackRT returns xpconnect
5. at this point you're hosed anyway, but what's the big deal? :) oh, well, you
didn't get an assert (you were supposed to).

fwiw, the assertion is:
    NS_ASSERTION(!gOldJSGCCallback, "XPCJSRuntime created more than once");
Blocks: 300584
Assignee: dbradley → nobody
QA Contact: pschwartau → xpconnect
This particular assert doesn't exist any more.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.