Last Comment Bug 673625 - Add more asserts for scripts
: Add more asserts for scripts
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All All
-- normal (vote)
: mozilla8
Assigned To: general
: Jason Orendorff [:jorendorff]
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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

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

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 User image David Mandelin [:dmandelin] 2011-07-25 17:29:25 PDT
Comment on attachment 547853 [details] [diff] [review]

Review of attachment 547853 [details] [diff] [review]:
Comment 2 User image Marco Bonardo [::mak] 2011-07-26 04:04:08 PDT

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