Closed Bug 1071808 Opened 6 years ago Closed 6 years ago

remove Chromium lazy instance from IPC code

Categories

(Core :: IPC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jaas, Assigned: jaas)

Details

Attachments

(1 file)

Attached patch fix v1.0Splinter Review
No description provided.
Attachment #8493971 - Flags: review?(nfroyd)
Comment on attachment 8493971 [details] [diff] [review]
fix v1.0

Review of attachment 8493971 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for doing this.

::: ipc/chromium/src/base/message_loop.cc
@@ +40,5 @@
>  using base::TimeDelta;
>  using base::TimeTicks;
>  
> +static base::ThreadLocalPointer<MessageLoop>& get_tls_ptr() {
> +  static base::ThreadLocalPointer<MessageLoop> tls_ptr;

If you haven't already, it's probably appropriate to file a bug for replacing ThreadLocal{Pointer,Bool} with mozilla::ThreadLocal.

::: ipc/chromium/src/chrome/common/ipc_sync_channel.cc
@@ +37,5 @@
>  class SyncChannel::ReceivedSyncMsgQueue {
>   public:
>    NS_INLINE_DECL_THREADSAFE_REFCOUNTING(SyncChannel::ReceivedSyncMsgQueue)
> +
> +  static base::ThreadLocalPointer<ReceivedSyncMsgQueue>& get_tls_ptr() {

This compiles?  I learned some C++ today, I suppose.

I think it'd be better to make this private, but since this class isn't exposed via a header, I suppose it doesn't matter.
Attachment #8493971 - Flags: review?(nfroyd) → review+
https://hg.mozilla.org/mozilla-central/rev/e37362b2d949
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.