Uploaded image for project: 'FireBreath Core'
  1. FireBreath Core
  2. FIREBREATH-48

FB::OneShotManager::npp_asyncCallback - Handle one shots one at a time incase the instance goes away during handling of call

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: FireBreath 1.5.0rc1, FireBreath 1.5.0
    • Operating System:
      Mac OS X
    • Web Browser:
      Firefox 3.x, Firefox 4.x, Google Chrome, Apple Safari

      Description

      Cannot copy all callbacks out and then process as the instance can go away before you are done. Instead process them one at a time. When this situation happens your process crashes.

      void FB::OneShotManager::npp_asyncCallback() {
      // Must be on main thread.
      // This is done this way because Safari may call NPP_Destroy during the callback.
      m_shot = false;
      SinkPair callback;
      while (npp_nextCallback(callback))
      callback.second(callback.first);
      }

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                richard Richard Bateman
                Reporter:
                jloveridge Jarom Loveridge
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: