FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
void FB::Npapi::NpapiBrowserHost::DoDeferredRelease ( ) const
virtual

Releases any browser-specific objects that were destroyed on a thread other than the main thread. Usually safe to just let FireBreath deal with this.

Since
1.4b3

Implements FB::BrowserHost.

Definition at line 192 of file NpapiBrowserHost.cpp.

193 {
195  NPObject* cur(NULL);
196  while (m_deferredObjects.try_pop(cur)) {
197  ReleaseObject(cur);
198  }
199  // Also remove any expired IDispatch WeakReferences
200  NPObjectRefMap::iterator iter = m_cachedNPObject.begin();
201  NPObjectRefMap::iterator endIter = m_cachedNPObject.end();
202  while (iter != endIter) {
203  if (isExpired(*iter))
204  m_cachedNPObject.erase(iter++);
205  else
206  ++iter;
207  }
208 }
bool try_pop(Data &popped_value)
Try to pop a value off the front of the queue; if the queue is empty returns false.
Definition: SafeQueue.h:75
void assertMainThread() const
When running in debug mode, asserts that the call is made on the main thread.