• Alex Keng's avatar
    TSF: propagate HRESULT from TSF initialization · 765b0996
    Alex Keng authored
    This CL changes the return value of TSFBridge::Initialize from void to
    HRESULT and refactors the logics in TSFTextStore::TSFTextStore out to
    TSFTextStore::Initialize. The HRESULTs of various COM calls during TSF
    initialization are propagated so the caller can handle errors, if any,
    accordingly.
    
    Note at the moment upstream doesn't have any use case for the HRESULT,
    but downstream will use the value for WebView2 initialization, ex.
    handling errors due to creating CLSID_TF_CategoryMgr instance in a
    thread initialized with COM_MTA (while all TSF functions expect STA)
    
    Change-Id: I227000a594f203eecc37838ff877d3dcd077df2f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340543
    Commit-Queue: Alex Keng <shihken@microsoft.com>
    Reviewed-by: default avatarYohei Yukawa <yukawa@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#797396}
    765b0996
tsf_bridge.cc 22.7 KB