Changeset 222768 in webkit
- Timestamp:
- Oct 2, 2017, 10:10:29 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
LayoutTests/editing/pasteboard/drag-end-crash-accessing-item-list-expected.txt (added)
-
LayoutTests/editing/pasteboard/drag-end-crash-accessing-item-list.html (added)
-
LayoutTests/platform/mac-wk1/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/dom/DataTransfer.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r222766 r222768 1 2017-10-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION(r222595): Intermittent crash while accessing DataTransferItemList 4 https://bugs.webkit.org/show_bug.cgi?id=177791 5 <rdar://problem/34781456> 6 7 Reviewed by Ryosuke Niwa. 8 9 Add a new layout test that simulates the crash encountered in this bug by forcing a garbage collection sweep 10 right before accessing the pasteboard in a "dragend" event handler. 11 12 * TestExpectations: 13 * editing/pasteboard/drag-end-crash-accessing-item-list-expected.txt: Added. 14 * editing/pasteboard/drag-end-crash-accessing-item-list.html: Added. 15 * platform/mac-wk1/TestExpectations: 16 1 17 2017-10-02 Brent Fulgham <bfulgham@apple.com> 2 18 -
trunk/LayoutTests/TestExpectations
r222734 r222768 71 71 editing/pasteboard/data-transfer-get-data-on-drop-rich-text.html [ Skip ] 72 72 editing/pasteboard/data-transfer-get-data-on-drop-url.html [ Skip ] 73 editing/pasteboard/drag-end-crash-accessing-item-list.html [ Skip ] 73 74 74 75 # Only iOS supports QuickLook -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r222739 r222768 12 12 editing/pasteboard/data-transfer-get-data-on-drop-rich-text.html [ Pass ] 13 13 editing/pasteboard/data-transfer-get-data-on-drop-url.html [ Pass ] 14 editing/pasteboard/drag-end-crash-accessing-item-list.html [ Pass ] 14 15 15 16 #////////////////////////////////////////////////////////////////////////////////////////// -
trunk/Source/WebCore/ChangeLog
r222767 r222768 1 2017-10-02 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 REGRESSION(r222595): Intermittent crash while accessing DataTransferItemList 4 https://bugs.webkit.org/show_bug.cgi?id=177791 5 <rdar://problem/34781456> 6 7 Reviewed by Ryosuke Niwa. 8 9 DataTransfer::moveDragState() currently attempts to move the other DataTransfer's DataTransferItemList and 10 DragImageLoader as members of its own. This is incorrect, since both of these entities hold raw references of 11 some form to the other DataTransfer, yet they are held as unique_ptrs in the new DataTransfer. To fix this, we 12 (1) remove the line of code that moves the item list, since item lists will be lazily generated on the new 13 DataTransfer anyways, and (2) update the DataTransfer pointer on the old DataTransfer's DragImageLoader after 14 moving it to the new DataTransfer. 15 16 Test: editing/pasteboard/drag-end-crash-accessing-item-list.html 17 18 * dom/DataTransfer.cpp: 19 (WebCore::DragImageLoader::moveToDataTransfer): 20 (WebCore::DataTransfer::moveDragState): 21 1 22 2017-10-02 Chris Dumez <cdumez@apple.com> 2 23 -
trunk/Source/WebCore/dom/DataTransfer.cpp
r222702 r222768 52 52 void startLoading(CachedResourceHandle<CachedImage>&); 53 53 void stopLoading(CachedResourceHandle<CachedImage>&); 54 void moveToDataTransfer(DataTransfer&); 54 55 55 56 private: … … 364 365 : m_dataTransfer(dataTransfer) 365 366 { 367 } 368 369 void DragImageLoader::moveToDataTransfer(DataTransfer& newDataTransfer) 370 { 371 m_dataTransfer = &newDataTransfer; 366 372 } 367 373 … … 509 515 m_dragImageElement = WTFMove(other->m_dragImageElement); 510 516 m_dragImageLoader = WTFMove(other->m_dragImageLoader); 511 m_itemList = WTFMove(other->m_itemList); 517 if (m_dragImageLoader) 518 m_dragImageLoader->moveToDataTransfer(*this); 512 519 m_fileList = WTFMove(other->m_fileList); 513 520 }
Note:
See TracChangeset
for help on using the changeset viewer.