Last Comment Bug 673625 - Add more asserts for scripts
: Add more asserts for scripts
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla8
Assigned To: general
:
Mentors:
Depends on: 674441
Blocks: 670702
  Show dependency treegraph
 
Reported: 2011-07-22 17:19 PDT by Bill McCloskey (:billm)
Modified: 2011-07-26 19:49 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (18.81 KB, patch)
2011-07-22 17:19 PDT, Bill McCloskey (:billm)
dmandelin: review+
Details | Diff | Splinter Review

Description Bill McCloskey (:billm) 2011-07-22 17:19:20 PDT
Created attachment 547853 [details] [diff] [review]
patch

The findings in bug 670702 comment 8 suggest two possibilities:
- there's a script that has two owners
- a script is released into the wild, but then freed on an error path

This patch tries to detect those conditions by giving each script an owner field. Whenever we set the owner, we check that it didn't already have an owner. And when we trace it or destroy it, we validate the owner.
Comment 1 David Mandelin [:dmandelin] 2011-07-25 17:29:25 PDT
Comment on attachment 547853 [details] [diff] [review]
patch

Review of attachment 547853 [details] [diff] [review]:
-----------------------------------------------------------------
Comment 2 Marco Bonardo [::mak] 2011-07-26 04:04:08 PDT
http://hg.mozilla.org/mozilla-central/rev/a840cf51978a

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