pjs/xpcom/doc/leaks.html

765 строки
6.7 KiB
HTML

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Author" content="Suresh Duddi">
<meta name="GENERATOR" content="Mozilla/4.61 [en] (X11; U; Linux 2.2.5-15 i686) [Netscape]">
<title>Memory leaks fixing</title>
</head>
<body>
<center>
<h1>
Memory leaks fixing effort
<hr WIDTH="100%"></h1></center>
<h2>
Viewer</h2>
<ul>
<li>
Startup (not the firsttime)</li>
<li>
Show default page</li>
<li>
Quit</li>
</ul>
<table BORDER COLS=3 WIDTH="100%" >
<tr>
<th>Component</th>
<th>Leaks fixing by...</th>
<th>Status (<a href="#Stage 1: nsIModule conversion">nsIModule conversion</a>)</th>
</tr>
<tr BGCOLOR="#FFFF99">
<td COLSPAN="3"><b>bin/Components/</b></td>
</tr>
<tr>
<td>caps.dll</td>
<td>rjc</td>
<td></td>
</tr>
<tr>
<td>chardet.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>history.dll</td>
<td>dp</td>
<td>DONE&nbsp;(waiting to checkin)</td>
</tr>
<tr>
<td>jsloader.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>lwbrk.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>necko.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>necko_resource.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>necko_file.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>nsgif.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>nslocale.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>mimetype.dll</td>
<td>rjc</td>
<td></td>
</tr>
<tr>
<td>oji.dll</td>
<td>rjc</td>
<td></td>
</tr>
<tr>
<td>profile.dll</td>
<td>dp</td>
<td></td>
</tr>
<tr>
<td>raptorhtml.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>raptorview.dll</td>
<td>dp</td>
<td>DONE (doesnt cache factory)</td>
</tr>
<tr>
<td>rdf.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>uconv.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>ucvlatin.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>ucharuti.dll</td>
<td>cata</td>
<td></td>
</tr>
<tr>
<td>xpc3250.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>xppref32.dll</td>
<td>dp</td>
<td>DONE (waiting to checkin)</td>
</tr>
<tr BGCOLOR="#FFFF99">
<td COLSPAN="3"><b>bin/</b></td>
</tr>
<tr>
<td>jsdom.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorhtmlpars.dll</td>
<td>vidur</td>
<td></td>
</tr>
<tr>
<td>raptorgfxwin.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorweb.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorplugin.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>raptorwidget.dll</td>
<td></td>
<td></td>
</tr>
</table>
<h2>
Apprunner only</h2>
&nbsp;
<table BORDER COLS=3 WIDTH="100%" >
<tr>
<th>Component</th>
<th>Leaks fixing by...</th>
<th>Status (<a href="#Stage 1: nsIModule conversion">nsIModule conversion</a>)</th>
</tr>
<tr>
<td>addrbook.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>bookmarks.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>brprof.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>chrome.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>cnvts.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>cookie.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>directory.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>emitter.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ender.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>eventloop.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>intlcmpt.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>jar50.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>jsurl.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mime.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mork.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozbrwsr.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozfind.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozucth.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>mozxfer.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgbase.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgcompo.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgdb.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgimap.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msglocal.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>msgnews.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>nativeapp.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>necko_about.dll</td>
<td>kipp</td>
<td></td>
</tr>
<tr>
<td>necko_data.dll</td>
<td>kipp</td>
<td></td>
</tr>
<tr>
<td>necko_ftp.dll</td>
<td>kipp</td>
<td></td>
</tr>
<tr>
<td>necko_http.dll</td>
<td>kipp</td>
<td></td>
</tr>
<tr>
<td>nsjpg.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>nspng.dll</td>
<td>kipp</td>
<td>DONE</td>
</tr>
<tr>
<td>nsprefm.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>nsxpi.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>pics.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>prefwind.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>rdfdomds.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>regviewer.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>related.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>sample.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>search.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>streamconv.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>strres.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>txmgr.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>txtsvc.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvcn.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvja.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvko.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvtw.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>ucvtw2.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>vcard.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>wallet.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>wlltvwrs.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>xpctest.dll</td>
<td></td>
<td></td>
</tr>
<tr>
<td>xpiflash.dll</td>
<td></td>
<td></td>
</tr>
</table>
<br>&nbsp;
<h2>
How to fix leaks in a dll</h2>
<h3>
<a NAME="Stage 1: nsIModule conversion"></a>Stage 1: nsIModule conversion</h3>
<ol>
<li>
Convert dll to use nsIModule. Sample code is in&nbsp; <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/sample/nsSampleModule.cpp">mozilla/xpcom/sample/nsSampleModule.cpp</a></li>
</ol>
<h3>
<a NAME="Stage 2: Leak fixing"></a>Stage 2: Leak fixing</h3>
<ol>
<li>
While in purify run <a href="http://lxr.mozilla.org/seamonkey/source/xpcom/tests/TestShutdown.cpp">bin/TestShutdown</a>
on the dll. For this you will need to find a CID that the module implements.
Then invoke TestShutdown as</li>
<ol>% TestShutdown {123d4-4908-490840-409850}</ol>
<li>
Make sure there are no leaks from the purify output.</li>
<br>Use ns&lt;dll>Module::Shutdown() to release any global memory that
is being leaked.</ol>
<hr WIDTH="100%">
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
<br>&nbsp;
</body>
</html>