Closed Bug 1067513 Opened 5 years ago Closed 5 years ago

Incorporate base::LazyInstance fixes from upstream

Categories

(Core :: IPC, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35
Tracking Status
firefox33 --- fixed
firefox34 --- fixed
firefox35 --- fixed

People

(Reporter: jchen, Assigned: jchen)

Details

Attachments

(1 file)

This patch imports the following files from upstream, and adapts them to the
in-tree fork at ipc/chromium,

* src/base/lazy_instance.cc
* src/base/lazy_instance.h

The updated code fixes several issues with LazyInstance [1-4], which we suspect
are causing crashes on Android (such as bug 1060009). LazyInstance usages in
other files are updated to reflect changes in the class interface.

Try: https://tbpl.mozilla.org/?tree=Try&rev=9f043c9fe425

[1] https://code.google.com/p/chromium/issues/detail?id=28749
[2] https://code.google.com/p/chromium/issues/detail?id=64930
[3] https://code.google.com/p/chromium/issues/detail?id=65298
[4] https://code.google.com/p/chromium/issues/detail?id=82122
Attachment #8490163 - Flags: review?(benjamin)
Comment on attachment 8490163 [details] [diff] [review]
Import updated base::LazyInstance from upstream (v1)

Do I need to actually-review this, or is this a straight import from upstream?

Does the other fork at /security/sandbox/chromium/base/lazy_instance.h also need this?
Flags: needinfo?(nchen)
(In reply to Benjamin Smedberg  [:bsmedberg] from comment #2)
> Comment on attachment 8490163 [details] [diff] [review]
> Import updated base::LazyInstance from upstream (v1)
> 
> Do I need to actually-review this, or is this a straight import from
> upstream?

Straight import, except I had to change LazyInstance::private_buf_ to using mozilla::AlignedStorage2 instead of the Chromium version (it's a straightforward change though).

> Does the other fork at /security/sandbox/chromium/base/lazy_instance.h also
> need this?

That version is already up-to-date.
Flags: needinfo?(nchen)
Attachment #8490163 - Flags: review?(benjamin) → review+
Assignee: nobody → nchen
Status: NEW → ASSIGNED
https://hg.mozilla.org/mozilla-central/rev/92ffb3d125f6
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
Comment on attachment 8490163 [details] [diff] [review]
Import updated base::LazyInstance from upstream (v1)

Approval Request Comment

[Feature/regressing bug #]: N/A

[User impact if declined]: We suspect this patch may fix the unidentified crash in bug 1060009 that's happening on all channels.

[Describe test coverage new/current, TBPL]: m-c; locally

[Risks and why]: Small risk because this introduces new code, even though the code comes from existing Chromium upstream source; however, we do want to see if this fixes the crashes in bug 1060009, which we can only find out through the beta channel.

[String/UUID change made/needed]: None
Attachment #8490163 - Flags: approval-mozilla-beta?
Attachment #8490163 - Flags: approval-mozilla-aurora?
Comment on attachment 8490163 [details] [diff] [review]
Import updated base::LazyInstance from upstream (v1)

I am going to take it in aurora, if it does not cause issue, I will merge it in beta (probably beta 6 or 7)
Attachment #8490163 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment on attachment 8490163 [details] [diff] [review]
Import updated base::LazyInstance from upstream (v1)

Taking it for beta 6
Attachment #8490163 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
You need to log in before you can comment on or make changes to this bug.