[Pkg-mozext-commits] [greasemonkey] 10/62: Create sandboxes with sameZoneAs to reduce GC costs

David Prévot taffit at moszumanska.debian.org
Sun Sep 13 22:10:20 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository greasemonkey.

commit c214b66040e5c24a0038282be434056ad9c70c8b
Author: The8472 <git at infinite-source.de>
Date:   Mon Aug 17 19:14:38 2015 +0200

    Create sandboxes with sameZoneAs to reduce GC costs
    
    
    by default sandboxes are created in the system zone which has a lifetime
    equal to that of the process and has a fairly large footprint.
    
    Since GM sandboxes are scoped to individual content pages they should be
    allocated in the same GC zone as the content. This allows them to be
    discarded together and also reduces the footprint (and thus GC overhead)
    for the system zone.
---
 modules/sandbox.js | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/sandbox.js b/modules/sandbox.js
index ebcd87f..f2ed4e7 100644
--- a/modules/sandbox.js
+++ b/modules/sandbox.js
@@ -29,6 +29,7 @@ function createSandbox(aScript, aContentWin, aUrl, aFrameScope) {
     var contentSandbox = new Components.utils.Sandbox(
         aContentWin,
         {
+          'sameZoneAs': aContentWin,
           'sandboxName': aScript.id,
           'sandboxPrototype': aContentWin,
           'wantXrays': false,
@@ -47,6 +48,7 @@ function createSandbox(aScript, aContentWin, aUrl, aFrameScope) {
   var sandbox = new Components.utils.Sandbox(
       [aContentWin],
       {
+        'sameZoneAs': aContentWin,
         'sandboxName': aScript.id,
         'sandboxPrototype': aContentWin,
         'wantXrays': true,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git



More information about the Pkg-mozext-commits mailing list