[webkit-reviews] review granted: [Bug 173441] Null deref under ViewGestureController::endSwipeGesture (navigationGestureDidEnd) : [Attachment 313008] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Jun 15 14:56:44 PDT 2017
Simon Fraser (smfr) <simon.fraser at apple.com> has granted Tim Horton
<thorton at apple.com>'s request for review:
Bug 173441: Null deref under ViewGestureController::endSwipeGesture
(navigationGestureDidEnd)
https://bugs.webkit.org/show_bug.cgi?id=173441
Attachment 313008: Patch
https://bugs.webkit.org/attachment.cgi?id=313008&action=review
--- Comment #3 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 313008
--> https://bugs.webkit.org/attachment.cgi?id=313008
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.
More information about the webkit-reviews
mailing list