remove Chromium lazy instance from IPC code

RESOLVED FIXED in mozilla35

Status

()

Core
IPC
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: Josh Aas, Assigned: Josh Aas)

Tracking

Trunk
mozilla35
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
Created attachment 8493971 [details] [diff] [review]
fix v1.0
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+
(Assignee)

Comment 2

3 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/e37362b2d949

https://tbpl.mozilla.org/?tree=Mozilla-Inbound&rev=e37362b2d949
https://hg.mozilla.org/mozilla-central/rev/e37362b2d949
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.