servo/PULL_REQUEST_TEMPLATE.md
author Andrew Osmond <aosmond@mozilla.com>
Mon, 11 Sep 2017 08:39:30 -0400
changeset 424048 0b5841c7c3992c2c0a43cb77b51b3fd04b63b7d6
parent 399784 873ccd759d932a973695329530a3fedf423997ad
child 467632 921a6c4f71224fc825aff96f6f4461a83e5d2883
permissions -rw-r--r--
Bug 1397223 - Gracefully handle failures in SurfaceCacheImpl::StartTracking. r=tnikkel, a=lizzard When the surface cache starts tracking an unlocked surface, it must insert it into the expiration tracker, so that it can be freed later if it is remains unused. ExpirationTrackerImpl::AddObjectLocked can fail due to out-of-memory conditions or during shutdown, which we previously ignored, and could leave us in a state where we think the surface is in the tracker but is not. When we later try to mark the surface as used in the tracker, it will hit a release assert because it doesn't exist. Now we handle the insertion failure by discarding the surface. Marking the surface as used can itself encounter a similar issue, and we handle it the same way.

<!-- Please describe your changes on the following line: -->


---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #__ (github issue number if applicable).

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because _____

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->