I have an XPCOM object which calls a javascript callback function
repeatedly.  The javascript code must call
netscape.security.PrivilageManager.enablePrivilege("UniversalXPConnect")
before it can call functions on the XPCOM object.  It seems that every
couple hunred calls to privilege manager result in a few bytes of
memory being eaten.  The following HTML recreates the problem:

<html>
<head>
  <script language="javascript" type="text/javascript">
        var count = 0;

        function init()
        {
                setInterval("update()", 10);
        }

        function update()
        {
                count = count+1;
                
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");

                document.getElementById("count").innerHTML = count;

        }

  </script>
</head>
<body onload="init();">
<table border="1" cellspacing="0" cellpadding="5">
<tr>
  <TD>update count</TD>
  <td id="count"> </td>
</tr>
</table>
</body>
</html>

Does anyone know of a way to get around making calls to
netscape.security.PrivilegeManager.enablePrivilege?  XMLHttpRequest
does it somehow, but I can't figure out how it does it.

dupes

_______________________________________________
Mozilla-xpcom mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to