Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Issue 1039823002: Add base::LazyInstance (Closed)

Created:
5 years, 9 months ago by Mark Mentovai
Modified:
5 years, 8 months ago
Reviewers:
Robert Sesek
CC:
crashpad-dev_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/mini_chromium@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Add base::LazyInstance. This is changed from the upstream in these ways: - mini_chromium’s LazyInstance cannot be used with traits that specify kRegisterOnExit. This means that DefaultLazyInstanceTraits are unusable, but LeakyLazyInstanceTraits and LazyInstance<>::Leaky are usable. kRegisterOnExit is not supported to avoid bringing in AtExitManager. The kRegisterOnExit traits constant is still present to maintain interface compatibility with mini_chromium, but a static_assert ensures that it is always false. - BASE_EXPORT is removed as in the rest of mini_chromium. - base/debug/leak_annotations.h is removed as it is unnecessary. - base/threading/thread_restrictions.h is removed as it is only used to implement a debug-mode check that is useless in mini_chromium and useless when kRegisterOnExit cannot be true. - base/threading/platform_thread.h is removed. A ThreadYield() function is provided here. BUG=crashpad:26 R=rsesek@chromium.org Committed: https://chromium.googlesource.com/chromium/mini_chromium/+/4870f18a33a6047f2ed0cd7cc78a6f8377f3d7fd

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+421 lines, -0 lines) Patch
M base/base.gyp View 2 chunks +4 lines, -0 lines 0 comments Download
M base/compiler_specific.h View 1 chunk +11 lines, -0 lines 0 comments Download
A base/lazy_instance.h View 1 chunk +183 lines, -0 lines 0 comments Download
A base/lazy_instance.cc View 1 chunk +66 lines, -0 lines 0 comments Download
A base/memory/aligned_memory.h View 1 chunk +113 lines, -0 lines 0 comments Download
A base/memory/aligned_memory.cc View 1 chunk +44 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
Mark Mentovai
5 years, 9 months ago (2015-03-27 21:34:12 UTC) #2
Robert Sesek
lgtm
5 years, 8 months ago (2015-03-30 15:22:41 UTC) #3
Mark Mentovai
5 years, 8 months ago (2015-03-30 15:43:06 UTC) #4
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
4870f18a33a6047f2ed0cd7cc78a6f8377f3d7fd (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698