From: NV A. b. c. <nor...@nv...> - 2010-04-30 08:01:38
|
At http://bzr.nvaccess.org/nvda/displayModel ------------------------------------------------------------ revno: 3472 revision-id: mi...@ku...-20100430074201-yeovoa098vwxndpq parent: mi...@ku...-20100430051140-wfod5arysfbazmq1 committer: Michael Curran <mi...@ku...> branch nick: displayModel timestamp: Fri 2010-04-30 17:42:01 +1000 message: NVDAHelper display model: Fix possible assertions/crashes when displayModels were being accessed more than once at the same time. Specific changes: *displayModel_t now inherits from LockableAutoFreeObject. *The maps that hold displayModels (by window and by memory DC) are instances of a class that contains LockableObject as one of its base classes. *Rather than the displayModelMaps criticalSection, acquire and release on each map is used, around any accesses to the individual map. *acquireDisplayModel (which fetches or creates a displayModel from a HDC) now calls acquire on the DisplayModel before releasing the map, and returning the displayModel. *The RPC function displayModel_getWindowTextInRect appropriately uses acquire and release on the displayModelsByWindow map and on the individual displayModels. *Functions that remove displayModels from maps (such as the destroyWindow hook, deleteDC hook and gdi_inprocess_terminate) appropriately call acquire and release on the displayModel maps, and call requestDelete on each displayModel. This change will probably stop many various assertions/crashes, though one place that it definitly does is holding down up or down arrow in a document in textPad, where we used to see an assertion in the CRT due to corrupt map iterators. |