DescriptionDestroy WebRTCStatsReportCallbackResolver on main thread, fixes crash.
The WebRTCStatsReportCallbackResolver has a
Persistent<ScriptPromiseResolver> and needs to be destroyed on the main
thread (blink/javascript thread). The callback resolver is an
implementation of WebRTCStatsReportCallback which is referenced and
owned by GetRTCStatsCallback::callback_.
callback_.reset() added to OnStatsDeliveredOnMainThread.
Previously it was implicitly reset by the destructor, which could
occur either on the webrtc signaling thread or the main thread
depending on which thread held the last reference to the
GetRTCStatsCallback (race).
BUG=700068
Review-Url: https://codereview.chromium.org/2772283002
Cr-Commit-Position: refs/heads/master@{#459784}
Committed: https://chromium.googlesource.com/chromium/src/+/b39b8d6fb03d46dff5556e7a5c428ac9302f5579
Patch Set 1 #
Total comments: 2
Patch Set 2 : callback_.reset(), not release() #Patch Set 3 : DCHECK that the callback is invoked and destroyed on the expected thread #
Messages
Total messages: 22 (14 generated)
|