Last Comment Bug 775067 - Start using Cu.nukeSandbox
: Start using Cu.nukeSandbox
Status: RESOLVED FIXED
:
Product: Add-on SDK
Classification: Client Software
Component: General (show other bugs)
: unspecified
: All All
: P2 normal with 2 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on: 769273
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-18 06:31 PDT by Alexandre Poirot [:ochameau]
Modified: 2012-10-03 07:53 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Alexandre Poirot [:ochameau] 2012-07-18 06:31:35 PDT
Now that bug 769273 has now landed in m-c, we should start using Cu.nukeSandox in order to kill all leaks on addon disabling.

Here is a pull request to start using it on CommonJS modules:
  https://github.com/mozilla/addon-sdk/pull/479

We may want to use it for content script sandboxes too.
Comment 1 Alexandre Poirot [:ochameau] 2012-07-18 06:54:47 PDT
Works perfectly!
Given pull request 479 and last try server build from gabor (bug 769273 comment 39)
And an awfull addons which desperatly want to leak by using such code:
  require("window-utils").activeBrowserWindow.foo = this;

We end up leaking only cuddlefish and loader sandboxes instead of all 41 module sandboxes! We are leaking these two because we don't call nukeSandbox on them.
Comment 2 [github robot] 2012-07-18 06:58:43 PDT
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/220332b32b255d508de9f583d149216302c3adbe
Bug 775067: Start using Cu.nukeSandbox for CommonJS modules.

https://github.com/mozilla/addon-sdk/commit/13eb5e5cbfd6104e18cf76aadf276eabfc3f5265
Merge pull request #479 from ochameau/leak/use-nukeSandbox

Bug 775067: Prevent leaking sandboxes by using Cu.nukeSandbox. r=@gozala
Comment 3 Dave Townsend [:mossop] 2012-07-18 09:35:20 PDT
(In reply to Alexandre Poirot (:ochameau) from comment #1)
> We end up leaking only cuddlefish and loader sandboxes instead of all 41
> module sandboxes! We are leaking these two because we don't call nukeSandbox
> on them.

Hopefully bug 771409 will take care of that!

Note You need to log in before you can comment on or make changes to this bug.