Closed
Bug 379593
Opened 18 years ago
Closed 18 years ago
Only create one XPCCallContext per cycle collection
Categories
(Core :: XPConnect, defect)
Core
XPConnect
Tracking
()
RESOLVED
FIXED
People
(Reporter: peterv, Assigned: peterv)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jst
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
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
Assignee | ||
Comment 1•18 years ago
|
||
Attachment #263587 -
Flags: superreview?(jst)
Attachment #263587 -
Flags: review?(brendan)
Comment 2•18 years ago
|
||
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)
Assignee | ||
Comment 3•18 years ago
|
||
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 4•18 years ago
|
||
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+
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•