RESOLVED FIXED 173441
Null deref under ViewGestureController::endSwipeGesture (navigationGestureDidEnd)
https://bugs.webkit.org/show_bug.cgi?id=173441
Summary Null deref under ViewGestureController::endSwipeGesture (navigationGestureDid...
Tim Horton
Reported 2017-06-15 14:33:29 PDT
Null deref under ViewGestureController::endSwipeGesture (navigationGestureDidEnd)
Attachments
Patch (12.76 KB, patch)
2017-06-15 14:34 PDT, Tim Horton
no flags
Patch (12.77 KB, patch)
2017-06-15 19:28 PDT, Tim Horton
no flags
Tim Horton
Comment 1 2017-06-15 14:34:35 PDT
Tim Horton
Comment 2 2017-06-15 14:35:27 PDT
Simon Fraser (smfr)
Comment 3 2017-06-15 14:56:44 PDT
Comment on attachment 313008 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=313008&action=review > Source/WebKit2/UIProcess/Cocoa/ViewGestureController.cpp:94 > + static uint64_t nextGestureID = 1; > + return nextGestureID++; Minor preference for nextGestureID = 0; return return ++nextGestureID; > Source/WebKit2/UIProcess/Cocoa/ViewGestureController.cpp:106 > + m_currentGestureID = std::nullopt; You should use 0 at the "none" gestureID. Cheaper than optional<> > Source/WebKit2/UIProcess/Cocoa/ViewGestureController.h:140 > + static ViewGestureController* controllerForGesture(uint64_t pageID, uint64_t gestureID); Maybe make a typedef for GestureID to avoid the mess we have with pageID, and make code more self-documenting.
Tim Horton
Comment 4 2017-06-15 19:28:14 PDT
Tim Horton
Comment 5 2017-06-15 20:27:19 PDT
Note You need to log in before you can comment on or make changes to this bug.