mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 180169 ASSERTION: RgnRectMemoryAllocator not thread-safe triggers because static class exists past nspr shutdown
r=roc+moz sr=roc+moz
This commit is contained in:
parent
af2d8d7225
commit
4a9cdfd6ec
@ -106,7 +106,21 @@ RgnRectMemoryAllocator::~RgnRectMemoryAllocator ()
|
||||
FreeChunk (tmp);
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*
|
||||
* As a static object this class outlives any library which would implement
|
||||
* locking. So we intentionally leak the 'lock'.
|
||||
*
|
||||
* Currently RgnRectMemoryAllocator is only used from the primary thread,
|
||||
* so we aren't using a lock which means that there is no lock to leak.
|
||||
* If we ever switch to multiple GUI threads (e.g. one per window),
|
||||
* we'd probably use one allocator per window-thread to avoid the
|
||||
* locking overhead and just require consumers not to pass regions
|
||||
* across threads/windows, which would be a reasonable restriction
|
||||
* because they wouldn't be useful outside their window.
|
||||
*/
|
||||
DestroyLock();
|
||||
#endif
|
||||
}
|
||||
|
||||
nsRegion::RgnRect* RgnRectMemoryAllocator::Alloc ()
|
||||
|
Loading…
Reference in New Issue
Block a user