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

Side by Side Diff: third_party/protobuf/patches/0007-uninline_googleonce.patch

Issue 1842653006: Update //third_party/protobuf to version 3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 unchanged:
2 --- protobuf-cleaned/src/google/protobuf/stubs/once.cc 2015-12-30 13:21:46.0000 00000 -0800
3 +++ protobuf-patched/src/google/protobuf/stubs/once.cc 2016-03-31 13:25:32.1800 17848 -0700
4 @@ -62,6 +62,13 @@
5
6 } // namespace
7
8 +void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) {
9 + if (internal::Acquire_Load(once) != ONCE_STATE_DONE) {
10 + internal::FunctionClosure0 func(init_func, false);
11 + GoogleOnceInitImpl(once, &func);
12 + }
13 +}
14 +
15 void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure) {
16 internal::AtomicWord state = internal::Acquire_Load(once);
17 // Fast path. The provided closure was already executed.
18 only in patch2:
19 unchanged:
20 --- protobuf-cleaned/src/google/protobuf/stubs/once.h 2015-12-30 13:21:46.0000 00000 -0800
21 +++ protobuf-patched/src/google/protobuf/stubs/once.h 2016-03-31 13:25:35.5200 13490 -0700
22 @@ -122,12 +122,8 @@
23 LIBPROTOBUF_EXPORT
24 void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure);
25
26 -inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) {
27 - if (internal::Acquire_Load(once) != ONCE_STATE_DONE) {
28 - internal::FunctionClosure0 func(init_func, false);
29 - GoogleOnceInitImpl(once, &func);
30 - }
31 -}
32 +LIBPROTOBUF_EXPORT
33 +void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)());
34
35 template <typename Arg>
36 inline void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)(Arg*),
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698