summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross/client.h
diff options
context:
space:
mode:
authorkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 21:53:49 +0000
committerkbr@google.com <kbr@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-02 21:53:49 +0000
commitff309b3ff56471cf49b9a95378078ed37437192f (patch)
tree133f2fc49c70ed9944fdbdf16ac0298ba942e4f4 /o3d/core/cross/client.h
parent71cb533c8712331906346ddea2fce0c3fccec78c (diff)
downloadchromium_src-ff309b3ff56471cf49b9a95378078ed37437192f.zip
chromium_src-ff309b3ff56471cf49b9a95378078ed37437192f.tar.gz
chromium_src-ff309b3ff56471cf49b9a95378078ed37437192f.tar.bz2
Prevent Client::Tick() from causing reentrancy in the plugin on Mac OS X.
Tested with client application. BUG=none TEST=none Review URL: http://codereview.chromium.org/2451002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48770 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core/cross/client.h')
-rw-r--r--o3d/core/cross/client.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/o3d/core/cross/client.h b/o3d/core/cross/client.h
index 158f1eb..1dcb36d 100644
--- a/o3d/core/cross/client.h
+++ b/o3d/core/cross/client.h
@@ -298,6 +298,12 @@ class Client {
// true if message check was ok.
bool Tick();
+ // Indicates whether a call to Tick() is in progress. This is needed
+ // to avoid reentrancy problems on some platforms.
+ bool IsTicking() const {
+ return is_ticking_;
+ }
+
// Searches in the Client for an object by its id. This function is for
// Javascript.
// Parameters:
@@ -497,6 +503,9 @@ class Client {
// Timer for getting the elapsed time between tick updates.
ElapsedTimeTimer tick_elapsed_time_timer_;
+ // Whether a call to Tick() is currently active.
+ bool is_ticking_;
+
// Used to gather render time from mulitple RenderTree calls.
float total_time_to_render_;