summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-04-29 17:33:37 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-04-29 17:33:37 -0700
commit77b13dc2df679c46f648a4f99c8e4d8836983a48 (patch)
treeebdf680fb2be21edb02d9f5ef5e4133cf307236d /indra/newview
parentdacc5afbf0f1bde7454c1eadf56edb669d0741a9 (diff)
Incorporate suggestions from Richard's review of the LLPlugin changes.
Use LLMutexLock (stack-based locker/unlocker) for the straightforward cases instead of explicit lock()/unlock(). There are still a couple of cases (one overlapping lock lifetime and two loops that unlock the mutex to call another function inside the loop) where I'm leaving explicit lock/unlock calls. Rename LLPluginProcessParent::sPollThread to sReadThread, for consistency. Made the LLPluginProcessParent destructor hold mIncomingQueueMutex while removing the instance from the global list -- this should prevent a possible race condition in LLPluginProcessParent::poll(). Removed a redundant check when calling LLPluginProcessParent::setUseReadThread().
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llviewermedia.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 8e210554fb..a4d8dddfe4 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -740,12 +740,8 @@ void LLViewerMedia::updateMedia(void *dummy_arg)
{
LLFastTimer t1(FTM_MEDIA_UPDATE);
- bool use_read_thread = gSavedSettings.getBOOL("PluginUseReadThread");
- if(LLPluginProcessParent::getUseReadThread() != use_read_thread)
- {
- // Enable/disable the plugin read thread
- LLPluginProcessParent::setUseReadThread(use_read_thread);
- }
+ // Enable/disable the plugin read thread
+ LLPluginProcessParent::setUseReadThread(gSavedSettings.getBOOL("PluginUseReadThread"));
sAnyMediaShowing = false;
sUpdatedCookies = getCookieStore()->getChangedCookies();