summaryrefslogtreecommitdiff
path: root/indra/newview/llviewermedia.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewermedia.cpp')
-rw-r--r--indra/newview/llviewermedia.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/indra/newview/llviewermedia.cpp b/indra/newview/llviewermedia.cpp
index 4be39bb88e..74b87045e7 100644
--- a/indra/newview/llviewermedia.cpp
+++ b/indra/newview/llviewermedia.cpp
@@ -2398,15 +2398,13 @@ void LLViewerMediaImpl::updateJavascriptObject()
if ( mMediaSource )
{
// flag to expose this information to internal browser or not.
- bool expose_javascript_object = gSavedSettings.getBOOL("BrowserEnableJSObject");
- mMediaSource->jsExposeObjectEvent( expose_javascript_object );
+ bool enable = gSavedSettings.getBOOL("BrowserEnableJSObject");
+ mMediaSource->jsEnableObject( enable );
- // indicate if the values we have are valid (currently do this blanket-fashion for
- // everything depending on whether you are logged in or not - this may require a
- // more granular approach once variables are added that ARE valid before login
+ // these values are only menaingful after login so don't set them before
bool logged_in = LLLoginInstance::getInstance()->authSuccess();
- mMediaSource->jsValuesValidEvent( logged_in );
-
+ if ( logged_in )
+ {
// current location within a region
LLVector3 agent_pos = gAgent.getPositionAgent();
double x = agent_pos.mV[ VX ];
@@ -2435,6 +2433,7 @@ void LLViewerMediaImpl::updateJavascriptObject()
region_name = region->getName();
};
mMediaSource->jsAgentRegionEvent( region_name );
+ }
// language code the viewer is set to
mMediaSource->jsAgentLanguageEvent( LLUI::getLanguage() );