• ananta's avatar
    Fix crash in the HWNDMessageHandler::HandleMouseInputForCaption function. · a54e6c0c
    ananta authored
    Crash occurs because we are referencing a member variable left_button_down_on_caption_ after the DefWindowProc call for WM_NCLBUTTONDOWN, which could destroy the window and in
    turn the HWNDMessageHandler instance.
    
    Fix is to reset the left_button_down_on_caption_ member before the DefWindowProc call.
    
    BUG=581341
    TEST=Covered by views_unittest WidgetTest.DestroyInSysCommandNCLButtonDownOnCaption
    
    Review URL: https://codereview.chromium.org/1636183003
    
    Cr-Commit-Position: refs/heads/master@{#371892}
    a54e6c0c
widget_unittest.cc 119 KB