Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app_server: plug leak of layers when empty clipping
* If there is an empty clipping region (invalid clipping) for the current view, a new layer could still be started, but not ended anymore. That's because unlike begin layer, end layer is handled in _DispatchViewDrawingMessage (because it can do actual drawing) and this method checks whether the clipping is valid and bails out if it isn't. * Add an exception for the AS_VIEW_END_LAYER command code to still process it even when the clipping is invalid. The layer itself can after all set a valid clipping later on when its command list is played back. And even if it doesn't, we still have to play it to make sure nested layers are cleaned up. * Fixes the memory leak in #12460 where webkit creates said situation: it had a layer open and then the closing was ignored due to empty clipping. All subsequent layer calls created nested layers in that one, hundreds of them, and their BPictures contained bitmaps, quickly eating up and leaking hundreds of MiB in app_server.
- Loading branch information