Closed Bug 379593 Opened 18 years ago Closed 18 years ago

Only create one XPCCallContext per cycle collection

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file, 1 obsolete file)

Right now we create a XPCCallContext for every call to BeginCycleCollection/Root/Unlink/Unroot/Traverse. We should create and store a XPCCallContext in BeginCycleCollection and destroy it in EndCycleCollection
Attached patch v1 (obsolete) (deleted) — Splinter Review
Attachment #263587 - Flags: superreview?(jst)
Attachment #263587 - Flags: review?(brendan)
Comment on attachment 263587 [details] [diff] [review] v1 >+ mCycleCollectionContext = new XPCCallContext(NATIVE_CALLER); >+ if(!mCycleCollectionContext || !mCycleCollectionContext->IsValid()) >+ { >+ mCycleCollectionContext = nsnull; delete first if non-null (if IsValid returns false). sr=me with that, and pending jst's r+ -- letting jst do r= duties for xpconnect. /be
Attachment #263587 - Flags: superreview?(jst)
Attachment #263587 - Flags: superreview+
Attachment #263587 - Flags: review?(jst)
Attachment #263587 - Flags: review?(brendan)
Attached patch v1.1 (deleted) — Splinter Review
Actually, delete should be null-safe, so I just added |delete mCycleCollectionContext| inside the if.
Attachment #263587 - Attachment is obsolete: true
Attachment #263640 - Flags: superreview+
Attachment #263640 - Flags: review?(jst)
Attachment #263587 - Flags: review?(jst)
Comment on attachment 263640 [details] [diff] [review] v1.1 - In nsXPConnect::BeginCycleCollection(): + mCycleCollectionContext = new XPCCallContext(NATIVE_CALLER); We might want to assert that mCycleCollectionContext is null before we assign into it here. r=jst
Attachment #263640 - Flags: review?(jst) → review+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: