• Jose Dapena Paz's avatar
    GCC: do not make pdf::Thumbnail move constructor/assignment operator noexcept · aa4166d0
    Jose Dapena Paz authored
    GCC fails to build with this:
    ../../pdf/thumbnail.cc:116:1: error: function ‘chrome_pdf::Thumbnail::Thumbnail(chrome_pdf::Thumbnail&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
      116 | Thumbnail::Thumbnail(Thumbnail&& other) noexcept = default;
          | ^~~~~~~~~
    ../../pdf/thumbnail.cc:118:12: error: function ‘chrome_pdf::Thumbnail& chrome_pdf::Thumbnail::operator=(chrome_pdf::Thumbnail&&)’ defaulted on its redeclaration with an exception-specification that differs from the implicit exception-specification ‘’
      118 | Thumbnail& Thumbnail::operator=(Thumbnail&& other) noexcept = default;
          |            ^~~~~~~~~
    
    Problem is that Skia SkBitmap move constructor and assignment operators are
    not noexcept (and after some discussion it is going to be kept this way).
    
    So the default implementation of move constructor and assignment operator
    of pdf::Thumbnail is noexcept, as SkBitmap is a member. The fix just
    removes noexcept declarations.
    
    Bug: 819294
    Change-Id: I8e6d914e4850707fbfcb51200b2a80d185cd1c19
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2411656Reviewed-by: default avatarJochen Eisinger <jochen@chromium.org>
    Commit-Queue: José Dapena Paz <jdapena@igalia.com>
    Cr-Commit-Position: refs/heads/master@{#807469}
    aa4166d0
thumbnail.h 1.02 KB