diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llappviewer.cpp | 15 | ||||
-rw-r--r-- | indra/newview/llappviewerwin32.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llassetuploadresponders.cpp | 8 | ||||
-rw-r--r-- | indra/newview/lldrawable.cpp | 34 | ||||
-rw-r--r-- | indra/newview/lleventpoll.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llfloatertos.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llspatialpartition.h | 2 | ||||
-rw-r--r-- | indra/newview/lltexturefetch.cpp | 2 | ||||
-rwxr-xr-x | indra/newview/lltranslate.h | 4 | ||||
-rwxr-xr-x | indra/newview/llviewermessage.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llviewerregion.cpp | 5 | ||||
-rw-r--r-- | indra/newview/tests/lltranslate_test.cpp | 7 | ||||
-rw-r--r-- | indra/newview/viewer_manifest.py | 5 |
14 files changed, 55 insertions, 48 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index c9458857d1..0a9d6229ef 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1891,8 +1891,17 @@ bool LLAppViewer::cleanup() sTextureFetch->shutDownTextureCacheThread() ; sTextureFetch->shutDownImageDecodeThread() ; + llinfos << "Shutting down message system" << llendflush; + end_messaging_system(); + + // *NOTE:Mani - The following call is not thread safe. + LL_CHECK_MEMORY + LLCurl::cleanupClass(); + LL_CHECK_MEMORY + LLFilePickerThread::cleanupClass(); + //MUST happen AFTER LLCurl::cleanupClass delete sTextureCache; sTextureCache = NULL; delete sTextureFetch; @@ -1961,12 +1970,6 @@ bool LLAppViewer::cleanup() LLViewerAssetStatsFF::cleanup(); - llinfos << "Shutting down message system" << llendflush; - end_messaging_system(); - - // *NOTE:Mani - The following call is not thread safe. - LLCurl::cleanupClass(); - // If we're exiting to launch an URL, do that here so the screen // is at the right resolution before we launch IE. if (!gLaunchFileOnQuit.empty()) diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 53c77fa22e..e0ca1232b0 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -131,7 +131,9 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, // Note: This won't work when running from the debugger unless the _NO_DEBUG_HEAP environment variable is set to 1 // Enable to get mem debugging within visual studio. - //_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#if LL_DEBUG + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); +#else _CrtSetDbgFlag(0); // default, just making explicit ULONG ulEnableLFH = 2; @@ -146,6 +148,7 @@ int APIENTRY WINMAIN(HINSTANCE hInstance, heap_enable_lfh_error[i] = GetLastError(); } #endif +#endif // *FIX: global gIconResource = MAKEINTRESOURCE(IDI_LL_ICON); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index 65bfc990d1..7b2c536f5a 100644 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -919,7 +919,7 @@ public: bool uploadConfirmationCallback( const LLSD& notification, const LLSD& response, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder) + LLPointer<LLNewAgentInventoryVariablePriceResponder> responder) { S32 option; std::string confirmation_url; @@ -949,7 +949,7 @@ public: void confirmUpload( const std::string& confirmation_url, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder> responder) + LLPointer<LLNewAgentInventoryVariablePriceResponder> responder) { if ( getFilename().empty() ) { @@ -1124,7 +1124,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog( // and cause sadness. mImpl->confirmUpload( confirmation_url, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)); + LLPointer<LLNewAgentInventoryVariablePriceResponder>(this)); } else { @@ -1157,7 +1157,7 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog( mImpl, _1, _2, - boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this))); + LLPointer<LLNewAgentInventoryVariablePriceResponder>(this))); } } diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 4eda2b92b3..954fd429a5 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -951,6 +951,12 @@ LLSpatialGroup* LLDrawable::getSpatialGroup() const void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) { + //precondition: mSpatialGroupp MUST be null or DEAD or mSpatialGroupp MUST NOT contain this + llassert(!mSpatialGroupp || mSpatialGroupp->isDead() || !mSpatialGroupp->hasElement(this)); + + //precondition: groupp MUST be null or groupp MUST contain this + llassert(!groupp || groupp->hasElement(this)); + /*if (mSpatialGroupp && (groupp != mSpatialGroupp)) { mSpatialGroupp->setState(LLSpatialGroup::GEOM_DIRTY); @@ -970,9 +976,12 @@ void LLDrawable::setSpatialGroup(LLSpatialGroup *groupp) } } - mSpatialGroupp = groupp; + //postcondition: if next group is NULL, previous group must be dead OR NULL OR binIndex must be -1 + //postcondition: if next group is NOT NULL, binIndex must not be -1 + llassert(groupp == NULL ? (mSpatialGroupp == NULL || mSpatialGroupp->isDead()) || getBinIndex() == -1 : + getBinIndex() != -1); - llassert((mSpatialGroupp == NULL) ? getBinIndex() == -1 : getBinIndex() != -1); + mSpatialGroupp = groupp; } LLSpatialPartition* LLDrawable::getSpatialPartition() @@ -1400,7 +1409,7 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update) markDead(); return; } - + if (gShiftFrame) { return; @@ -1483,13 +1492,11 @@ void LLSpatialBridge::cleanupReferences() LLDrawable::cleanupReferences(); if (mDrawable) { - LLSpatialGroup* group = mDrawable->getSpatialGroup(); - if (group) - { - group->mOctreeNode->remove(mDrawable); - mDrawable->setSpatialGroup(NULL); - } + /* + DON'T DO THIS -- this should happen through octree destruction + + mDrawable->setSpatialGroup(NULL); if (mDrawable->getVObj()) { LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren(); @@ -1500,15 +1507,10 @@ void LLSpatialBridge::cleanupReferences() LLDrawable* drawable = child->mDrawable; if (drawable) { - LLSpatialGroup* group = drawable->getSpatialGroup(); - if (group) - { - group->mOctreeNode->remove(drawable); - drawable->setSpatialGroup(NULL); - } + drawable->setSpatialGroup(NULL); } } - } + }*/ LLDrawable* drawablep = mDrawable; mDrawable = NULL; diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp index 4f4d9a40b4..2c786b7f8b 100644 --- a/indra/newview/lleventpoll.cpp +++ b/indra/newview/lleventpoll.cpp @@ -86,7 +86,7 @@ namespace class LLEventPollEventTimer : public LLEventTimer { - typedef boost::intrusive_ptr<LLEventPollResponder> EventPollResponderPtr; + typedef LLPointer<LLEventPollResponder> EventPollResponderPtr; public: LLEventPollEventTimer(F32 period, EventPollResponderPtr responder) diff --git a/indra/newview/llfloatertos.cpp b/indra/newview/llfloatertos.cpp index c5df7e16e9..a242b224cd 100644 --- a/indra/newview/llfloatertos.cpp +++ b/indra/newview/llfloatertos.cpp @@ -71,9 +71,9 @@ class LLIamHere : public LLHTTPClient::Responder public: - static boost::intrusive_ptr< LLIamHere > build( LLFloaterTOS* parent ) + static LLIamHere* build( LLFloaterTOS* parent ) { - return boost::intrusive_ptr< LLIamHere >( new LLIamHere( parent ) ); + return new LLIamHere( parent ); }; virtual void setParent( LLFloaterTOS* parentIn ) @@ -102,7 +102,7 @@ class LLIamHere : public LLHTTPClient::Responder // this is global and not a class member to keep crud out of the header file namespace { - boost::intrusive_ptr< LLIamHere > gResponsePtr = 0; + LLPointer< LLIamHere > gResponsePtr = 0; }; BOOL LLFloaterTOS::postBuild() diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 06c87e57fc..b815439834 100644 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -1859,6 +1859,8 @@ BOOL LLSpatialPartition::remove(LLDrawable *drawablep, LLSpatialGroup *curp) drawablep->setSpatialGroup(NULL); } + drawablep->setSpatialGroup(NULL); + assert_octree_valid(mOctree); return TRUE; @@ -4194,7 +4196,7 @@ public: { if (index < 255) { - if (facep->mDrawInfo->mTextureList.size()<= index) + if (facep->mDrawInfo->mTextureList.size() <= index) { llerrs << "Face texture index out of bounds." << llendl; } diff --git a/indra/newview/llspatialpartition.h b/indra/newview/llspatialpartition.h index f050df2b39..e63037b4a8 100644 --- a/indra/newview/llspatialpartition.h +++ b/indra/newview/llspatialpartition.h @@ -350,6 +350,8 @@ public: element_list& getData() { return mOctreeNode->getData(); } element_iter getDataBegin() { return mOctreeNode->getDataBegin(); } element_iter getDataEnd() { return mOctreeNode->getDataEnd(); } + bool hasElement(LLDrawable* drawablep) { return std::find(mOctreeNode->getDataBegin(), mOctreeNode->getDataEnd(), drawablep) != mOctreeNode->getDataEnd(); } + U32 getElementCount() const { return mOctreeNode->getElementCount(); } bool isEmpty() const { return mOctreeNode->isEmpty(); } diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp index 7adf5212c2..adffb2c706 100644 --- a/indra/newview/lltexturefetch.cpp +++ b/indra/newview/lltexturefetch.cpp @@ -2977,7 +2977,9 @@ TFReqSendMetrics::doWork(LLTextureFetch * fetcher) ~lcl_responder() { + LL_CHECK_MEMORY mFetcher->decrCurlPOSTCount(); + LL_CHECK_MEMORY } // virtual diff --git a/indra/newview/lltranslate.h b/indra/newview/lltranslate.h index c58e1adb8c..db5ad9479c 100755 --- a/indra/newview/lltranslate.h +++ b/indra/newview/lltranslate.h @@ -263,8 +263,8 @@ public : EService mService; }; - typedef boost::intrusive_ptr<TranslationReceiver> TranslationReceiverPtr; - typedef boost::intrusive_ptr<KeyVerificationReceiver> KeyVerificationReceiverPtr; + typedef LLPointer<TranslationReceiver> TranslationReceiverPtr; + typedef LLPointer<KeyVerificationReceiver> KeyVerificationReceiverPtr; /** * Translate given text. diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 903f4437a7..b048332e59 100755 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -3340,9 +3340,9 @@ public : { } - static boost::intrusive_ptr<ChatTranslationReceiver> build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args) + static ChatTranslationReceiver* build(const std::string &from_lang, const std::string &to_lang, const std::string &mesg, const LLChat &chat, const LLSD &toast_args) { - return boost::intrusive_ptr<ChatTranslationReceiver>(new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args)); + return new ChatTranslationReceiver(from_lang, to_lang, mesg, chat, toast_args); } protected: diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 755879f591..d86cf61f10 100644 --- a/indra/newview/llviewerregion.cpp +++ b/indra/newview/llviewerregion.cpp @@ -255,10 +255,9 @@ public: } } - static boost::intrusive_ptr<BaseCapabilitiesComplete> build( U64 region_handle, S32 id ) + static BaseCapabilitiesComplete* build( U64 region_handle, S32 id ) { - return boost::intrusive_ptr<BaseCapabilitiesComplete>( - new BaseCapabilitiesComplete(region_handle, id) ); + return new BaseCapabilitiesComplete(region_handle, id); } private: diff --git a/indra/newview/tests/lltranslate_test.cpp b/indra/newview/tests/lltranslate_test.cpp index 10e37fae97..fd9527d631 100644 --- a/indra/newview/tests/lltranslate_test.cpp +++ b/indra/newview/tests/lltranslate_test.cpp @@ -299,11 +299,6 @@ LLControlGroup::LLControlGroup(const std::string& name) : LLInstanceTracker<LLCo std::string LLControlGroup::getString(const std::string& name) { return "dummy"; } LLControlGroup::~LLControlGroup() {} -namespace boost { - void intrusive_ptr_add_ref(LLCurl::Responder*) {} - void intrusive_ptr_release(LLCurl::Responder*) {} -} - LLCurl::Responder::Responder() {} void LLCurl::Responder::completedHeader(U32, std::string const&, LLSD const&) {} void LLCurl::Responder::completedRaw(U32, const std::string&, const LLChannelDescriptors&, const LLIOPipe::buffer_ptr_t& buffer) {} @@ -314,7 +309,7 @@ void LLCurl::Responder::result(LLSD const&) {} LLCurl::Responder::~Responder() {} void LLHTTPClient::get(const std::string&, const LLSD&, ResponderPtr, const LLSD&, const F32) {} -void LLHTTPClient::get(const std::string&, boost::intrusive_ptr<LLCurl::Responder>, const LLSD&, const F32) {} +void LLHTTPClient::get(const std::string&, LLPointer<LLCurl::Responder>, const LLSD&, const F32) {} LLBufferStream::LLBufferStream(const LLChannelDescriptors& channels, LLBufferArray* buffer) : std::iostream(&mStreamBuf), mStreamBuf(channels, buffer) {} diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index d270991d30..021e529b9c 100644 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -537,6 +537,7 @@ class WindowsManifest(ViewerManifest): result += 'File ' + pkg_file + '\n' else: result += 'Delete ' + wpath(os.path.join('$INSTDIR', rel_file)) + '\n' + # at the end of a delete, just rmdir all the directories if not install: deleted_file_dirs = [os.path.dirname(pair[1].replace(self.get_dst_prefix()+os.path.sep,'')) for pair in self.file_list] @@ -1105,9 +1106,7 @@ class Linux_i686Manifest(LinuxManifest): # version number. self.path("libfontconfig.so.*.*") try: - self.path("libtcmalloc.so", "libtcmalloc.so") #formerly called google perf tools - self.path("libtcmalloc.so.0", "libtcmalloc.so.0") #formerly called google perf tools - self.path("libtcmalloc.so.0.1.0", "libtcmalloc.so.0.1.0") #formerly called google perf tools + self.path("libtcmalloc.so*") #formerly called google perf tools pass except: print "tcmalloc files not found, skipping" |