Changeset 75935 in webkit
- Timestamp:
- Jan 17, 2011 5:28:53 AM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r75880 r75935 1 2011-01-17 Balazs Kelemen <kbalazs@webkit.org> 2 3 Reviewed by Andreas Kling. 4 5 [Qt][WK2] Crash due to double destruction of QSharedMemory 6 https://bugs.webkit.org/show_bug.cgi?id=52569 7 8 Avoid deleting the QSharedMemory twice. 9 * Platform/qt/SharedMemoryQt.cpp: 10 (WebKit::SharedMemory::~SharedMemory): 11 * Shared/qt/CleanupHandler.cpp: 12 Renamed m_inDeleteObjects to m_hasStartedDeleting and 13 added a getter for it. 14 (WebKit::CleanupHandler::CleanupHandler): 15 (WebKit::CleanupHandler::deleteObjects): 16 * Shared/qt/CleanupHandler.h: 17 (WebKit::CleanupHandler::unmark): 18 (WebKit::CleanupHandler::hasStartedDeleting): 19 1 20 2011-01-15 Adam Barth <abarth@webkit.org> 2 21 -
trunk/Source/WebKit2/Platform/qt/SharedMemoryQt.cpp
r74967 r75935 145 145 SharedMemory::~SharedMemory() 146 146 { 147 if (CleanupHandler::instance()->hasStartedDeleting()) 148 return; 149 147 150 CleanupHandler::instance()->unmark(m_impl); 148 151 delete m_impl; -
trunk/Source/WebKit2/Shared/qt/CleanupHandler.cpp
r74967 r75935 37 37 38 38 CleanupHandler::CleanupHandler() 39 : m_ inDeleteObjects(false)39 : m_hasStartedDeleting(false) 40 40 { 41 41 moveToThread(qApp->thread()); // Ensure that we are acting on the main thread. … … 51 51 void CleanupHandler::deleteObjects() 52 52 { 53 m_ inDeleteObjects= true;53 m_hasStartedDeleting = true; 54 54 for (unsigned i = 0; i < m_objects.size(); ++i) 55 55 m_objects[i]->deleteLater(); -
trunk/Source/WebKit2/Shared/qt/CleanupHandler.h
r74967 r75935 52 52 void unmark(QObject* object) 53 53 { 54 if (m_ inDeleteObjects)54 if (m_hasStartedDeleting) 55 55 return; 56 56 m_objects.removeOne(object); 57 57 } 58 59 bool hasStartedDeleting() const { return m_hasStartedDeleting; } 58 60 59 61 private slots: … … 67 69 68 70 QList<QObject*> m_objects; 69 bool m_ inDeleteObjects;71 bool m_hasStartedDeleting; 70 72 }; 71 73
Note: See TracChangeset
for help on using the changeset viewer.