Closed
Bug 385087
Opened 18 years ago
Closed 18 years ago
use XPCOMUtils in content pref services to prevent leaks
Categories
(Toolkit :: Preferences, defect)
Toolkit
Preferences
Tracking
()
RESOLVED
FIXED
People
(Reporter: myk, Assigned: myk)
References
Details
Attachments
(1 file)
5.34 KB,
patch
|
sayrer
:
review+
|
Details | Diff | Splinter Review |
After the content pref service got checked in, Rlk on fxdbug-linux-tbox went from 2.99KB to 3.07KB and then to 3.16KB. It now fluctuates between the latter two numbers, whereas before it was fluctuating between the former two.
Per discussion on #developers, one issue is inline XPCOM plumbing. We should switch to XPCOMUtils, although that'll only help once bug 381651 lands.
Assignee | ||
Comment 1•18 years ago
|
||
Here's a patch that uses XPCOMUtils (the version in bug 381651). Note that the following statement does not successfully import the module:
Components.utils.import("rel:XPCOMUtils.jsm");
It causes the app to complain:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXPCComponents_Utils.import]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: file:///home/myk/Projects/minefield/build/firefox-debug/dist/bin/components/nsContentPrefService.js :: <TOP_LEVEL> :: line 41" data: no]
But this works:
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
Updated•18 years ago
|
Attachment #269013 -
Flags: review?(sayrer) → review+
Assignee | ||
Comment 2•18 years ago
|
||
Checking in toolkit/components/contentprefs/src/nsContentPrefService.js;
/cvsroot/mozilla/toolkit/components/contentprefs/src/nsContentPrefService.js,v <-- nsContentPrefService.js
new revision: 1.5; previous revision: 1.4
done
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 3•18 years ago
|
||
I backed this out, because it raised the leak stats. Locally, I can verify that it causes three leaked XPCWrappedNative objects and one XPCWrappedNativeProto object.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 4•18 years ago
|
||
Urm, right. I thought it hadn't, but I wasn't running the bloat cycle, merely starting up and then shutting down the browser. After running the bloat cycle, I see the same increase in the number and type of leaked objects.
Assignee | ||
Comment 5•18 years ago
|
||
Checked in again now that bug 180380 has fixed the leaks.
Status: REOPENED → RESOLVED
Closed: 18 years ago → 18 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•