• Nico Weber's avatar
    Revert "Reland: Promises: Implement Promise<> handle with Then and Catch" · 0c886bed
    Nico Weber authored
    This reverts commit 810a8608.
    
    Reason for revert: Tests fail on UBSanVptr bot:
    https://ci.chromium.org/p/chromium/builders/ci/ToTLinuxUBSanVptr/6837
    
    All failures look like:
    
    [ RUN      ] PromiseTest.CatchThenVoid
    ../../base/task/promise/then_and_catch_executor.h:177:5: runtime error: member call on address 0x357fcd736278 which does not point to an object of type 'base::internal::ThenAndCatchExecutor<base::OnceCallback<void ()>, base::OnceCallback<int ()>, base::internal::NoCallback, void, base::Resolved<int>, base::Rejected<base::NoReject> >'
    0x357fcd736278: note: object has invalid vptr
     74 55 00 00  7b 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  28 8c 7b cd
                  ^~~~~~~~~~~~~~~~~~~~~~~
                  invalid vptr
    
    
    Original change's description:
    > Reland: Promises: Implement Promise<> handle with Then and Catch
    > 
    > Original patch https://crrev.com/c/1599620
    > 
    > MultiThreadedPromiseTest.CrossThreadThens had a race between the
    > resolve on thread b and thread a posting a bunch of tasks including
    > the quit closure which would sometimes arrive mid way through
    > thread b posting eligible thens.
    > 
    > 
    > 
    > Implements Then and Catch on top of AbstractPromise as well as
    > ManualPromiseResolver<> which is needed for testing at this
    > stage (PostTask doesn't yet return a promise). It's also
    > necessary for promises to interface with old style callback
    > based libraries which are extremely common in Chromium.
    > 
    > Design: https://docs.google.com/document/d/1l12PAJgEtlrqTXKiw6mk2cR2jP7FAfCCDr-DGIdiC9w/edit
    > 
    > TBR=fdoray@chromium.org, etiennep@chromium.org
    > 
    > Bug: 906125
    > Change-Id: I95bbd0f1a709643cd4a813e378b625a91f2abe7a
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1617769
    > Reviewed-by: Alex Clarke <alexclarke@chromium.org>
    > Commit-Queue: Alex Clarke <alexclarke@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#661171}
    
    TBR=alexclarke@chromium.org
    
    Change-Id: I7f5d8fb65620b8d0dd44066f6da9d077d1e7edcd
    No-Presubmit: true
    No-Tree-Checks: true
    No-Try: true
    Bug: 906125
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618803Reviewed-by: default avatarNico Weber <thakis@chromium.org>
    Commit-Queue: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#661189}
    0c886bed
BUILD.gn 127 KB