[ppapi] Merged three RunCallback methods doing the same thing
In jumbo build experiments, the different RunCallback functions
ended up in the same translation unit and thus the same
anonymous namespace where the symbols clashed. Since they,
and VideoDecoderResource::RunCallbackWithError had the same
implementation, this merges the functions into a shared
SafeRunCallback.
Bug: 898475
Change-Id: I3ee20972794d3c6ef73e49882e1ceba24c487e19
Reviewed-on: https://chromium-review.googlesource.com/c/1297427
Reviewed-by: Antoine Labour <[email protected]>
Commit-Queue: Daniel Bratell <[email protected]>
Cr-Commit-Position: refs/heads/master@{#602646}
diff --git a/ppapi/proxy/plugin_resource.h b/ppapi/proxy/plugin_resource.h
index 8f32277..54aa2b5 100644
--- a/ppapi/proxy/plugin_resource.h
+++ b/ppapi/proxy/plugin_resource.h
@@ -26,6 +26,10 @@
namespace ppapi {
namespace proxy {
+// A "safe" way to run callbacks, doing nothing if they are not
+// pending (active).
+void SafeRunCallback(scoped_refptr<TrackedCallback>* callback, int32_t error);
+
class PPAPI_PROXY_EXPORT PluginResource : public Resource {
public:
enum Destination {