Chromium Code Reviews
Help | Chromium Project | Sign in
(14)

Issue 9447052: Add CallOnce() and simple LazyInstance implementation. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 4 months ago by Philippe
Modified:
3 years, 3 months ago
CC:
v8-dev, digit
Visibility:
Public.

Description

Add CallOnce() and simple LazyInstance implementation. Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances are never deleted). This CL was initially reviewed on codereview.appspot.com: http://codereview.appspot.com/5687064/ BUG=1859

Patch Set 1 #

Patch Set 2 : Fix out-dated if statements in once.h #

Patch Set 3 : Lint. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+420 lines, -0 lines) Patch
M src/SConscript View 1 chunk +1 line, -0 lines 0 comments Download
A src/lazy-instance.h View 1 2 1 chunk +216 lines, -0 lines 0 comments Download
A src/once.h View 1 2 1 chunk +123 lines, -0 lines 0 comments Download
A src/once.cc View 1 2 1 chunk +77 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
Trybot results:
Commit: CQ not working?

Messages

Total messages: 6 (0 generated)
Philippe
3 years, 4 months ago (2012-02-24 11:57:35 UTC) #1
fschneider
Still LGTM.
3 years, 4 months ago (2012-02-24 12:01:00 UTC) #2
Dmitry Vyukov
LGTM
3 years, 4 months ago (2012-02-24 12:09:32 UTC) #3
jbates
lgtm
3 years, 4 months ago (2012-02-24 17:31:56 UTC) #4
Philippe
On 2012/02/24 17:31:56, jbates wrote: > lgtm I uploaded a new patch set. The previous ...
3 years, 4 months ago (2012-02-27 10:15:36 UTC) #5
Philippe
3 years, 4 months ago (2012-02-27 14:07:38 UTC) #6
On 2012/02/27 10:15:36, Philippe wrote:
> On 2012/02/24 17:31:56, jbates wrote:
> > lgtm
> 
> I uploaded a new patch set. The previous if statements in CallOnce(), in
once.h
> were out-dated.
> The atomic word visible in the header was initially used as a boolean.
> Now it has three states, therefore the condition could be satisfied while the
> initialization function was still running (state = 1) which was obviously a
bug.

I had to introduce some typedefs to make presubmit.py pass. Cpplint does not
like function pointer syntax in function arguments.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1f9106d