aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/webglshader.rs
diff options
context:
space:
mode:
authorbors-servo <metajack+bors@gmail.com>2015-06-09 15:52:45 -0600
committerbors-servo <metajack+bors@gmail.com>2015-06-09 15:52:45 -0600
commit0dec64caf01c98d10e72b73e35b994127c23e81f (patch)
tree935105a748073596cfba481cfed37faed452ad69 /components/script/dom/webglshader.rs
parent88c1cdc9fca6568d1075ea9577ac996c5f73b98f (diff)
parent9b4d39d6d1c47ec467d842a1a7f0273d9f3d9b05 (diff)
downloadservo-0dec64caf01c98d10e72b73e35b994127c23e81f.tar.gz
servo-0dec64caf01c98d10e72b73e35b994127c23e81f.zip
Auto merge of #6289 - nnethercote:unleak-LOCAL_CONTEXT_KEY, r=pcwalton
`LOCAL_CONTEXT_KEY` is currently a `Cell<*mut LocalLayoutContext>`. The use of the raw pointer means that the `LocalLayoutContext` is not dropped when the thread dies; this leaks FreeType instances and probably other things. There are also some unsafe getter functions in `LayoutContext` (`font_context`, `applicable_declarations_cache` and `style_sharing_candidate_cache`) that @eddyb says involve undefined behaviour. This changeset changes `LOCAL_CONTEXT_KEY` to `RefCell<Option<Rc<LocalLayoutContext>>>`. This fixes the leak and also results in safe getters. (Fixes #6282.) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6289) <!-- Reviewable:end -->
Diffstat (limited to 'components/script/dom/webglshader.rs')
0 files changed, 0 insertions, 0 deletions