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

Unified Diff: third_party/protobuf/src/google/protobuf/stubs/once.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/protobuf/src/google/protobuf/stubs/once.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/src/google/protobuf/stubs/once.cc
diff --git a/third_party/protobuf/src/google/protobuf/stubs/once.cc b/third_party/protobuf/src/google/protobuf/stubs/once.cc
index 1e24b85526705c0e1b31b1fa6109c66493bc18d6..2363622e330e344bcf9983497a6f7da65947ebe9 100644
--- a/third_party/protobuf/src/google/protobuf/stubs/once.cc
+++ b/third_party/protobuf/src/google/protobuf/stubs/once.cc
@@ -93,6 +93,13 @@ void GoogleOnceInitImpl(ProtobufOnceType* once, Closure* closure) {
}
}
+void GoogleOnceInit(ProtobufOnceType* once, void (*init_func)()) {
+ if (internal::Acquire_Load(once) != ONCE_STATE_DONE) {
+ internal::FunctionClosure0 func(init_func, false);
+ GoogleOnceInitImpl(once, &func);
+ }
+}
+
} // namespace protobuf
} // namespace google
« no previous file with comments | « third_party/protobuf/src/google/protobuf/stubs/once.h ('k') | ui/compositor/compositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698