[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/video_decoder_resource.cc b/ppapi/proxy/video_decoder_resource.cc
index bcd60561..94548e14 100644
--- a/ppapi/proxy/video_decoder_resource.cc
+++ b/ppapi/proxy/video_decoder_resource.cc
@@ -523,11 +523,7 @@
void VideoDecoderResource::RunCallbackWithError(
scoped_refptr<TrackedCallback>* callback) {
- if (TrackedCallback::IsPending(*callback)) {
- scoped_refptr<TrackedCallback> temp;
- callback->swap(temp);
- temp->Run(decoder_last_error_);
- }
+ SafeRunCallback(callback, decoder_last_error_);
}
void VideoDecoderResource::DeleteGLTexture(uint32_t id) {