Discussion:
[chromium-dev] Allow to destroy blink::WebRTCVoidRequest on different threads.
Alfred Kowalski
2018-11-19 09:39:59 UTC
Permalink
Hi,

I have an issue with blink::WebRTCVoidRequest
<https://chromium.googlesource.com/chromium/src.git/+/67.0.3396.127/third_party/blink/public/platform/web_rtc_void_request.h> and
it's destruction time in Chrome v67. There is a case when the object is
created by main thread and destroyed by signalling thread. I think it is
related to chromium bug 788802
<https://bugs.chromium.org/p/chromium/issues/detail?id=788802>.

However, by default, *blink::WebRTCVoidRequest* requires to be created and
destroyed by the same thread(in other cases behaviour is undefined, I
suppose). This is because of private filed *private_*. The filed's type is
*WebPrivatePtr<RTCVoidRequest>* which lifetime should be managed by singe
thread. But there is a possibility to change this restriction by adding
second parameter *kWebPrivatePtrDestructionCrossThread*.

Before:
class WebRTCVoidRequest {
...
private:
WebPrivatePtr<RTCVoidRequest> private_;
};

After:
class WebRTCVoidRequest {
...
private:
WebPrivatePtr<RTCVoidRequest, kWebPrivatePtrDestructionCrossThread>
private_;
};


Is the change safe?
Is there any negative impact on other components?
--
--
Chromium Developers mailing list: chromium-***@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+***@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/713b9e53-76d8-4ed4-8871-e1f9c877ffaf%40chromium.org.
Loading...