aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-05-12 12:02:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-12 16:49:07 +0000
commit175f588831c3d9f76349af8c27c64ceaa4460871 (patch)
treefd7733ec3dcc8caae5b4aa732ea1e665b643d909 /tools
parentebb1b5c297e394ab19f99d807095672b7f5d8aef (diff)
Modify SkEventTracer::SetInstance to fail rather than assert if a tracer has already been installed.
Chromium usually calls SetInstance once per process. However, when run in single process more renderer threads will try to set the instance after the browser process already has done so. This allows them to fail gracefully without asserting. Bug: skia:6603 Change-Id: Ic8a35422d787335aa67eefc07d0658f0fbe73db4 Reviewed-on: https://skia-review.googlesource.com/16664 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/viewer/Viewer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/viewer/Viewer.cpp b/tools/viewer/Viewer.cpp
index 7cf8cd8825..a1c0b5bbea 100644
--- a/tools/viewer/Viewer.cpp
+++ b/tools/viewer/Viewer.cpp
@@ -285,7 +285,7 @@ Viewer::Viewer(int argc, char** argv, void* platformData)
#endif
if (FLAGS_atrace) {
- SkEventTracer::SetInstance(new SkATrace());
+ SkAssertResult(SkEventTracer::SetInstance(new SkATrace()));
}
fBackendType = get_backend_type(FLAGS_backend[0]);