~ubuntu-branches/ubuntu/utopic/xulrunner-1.9/utopic

« back to all changes in this revision

Viewing changes to mozilla/content/base/src/nsObjectLoadingContent.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alexander Sack, Alexander Sack, Fabien Tassin
  • Date: 2009-02-05 09:12:37 UTC
  • mfrom: (1.1.16 upstream)
  • Revision ID: james.westby@ubuntu.com-20090205091237-2uu65i47p00yi2xk
Tags: 1.9.0.6+nobinonly-0ubuntu1
[ Alexander Sack <asac@ubuntu.com> ]
* new security/stability update v1.9.0.6 (FIREFOX_3_0_6_RELEASE)
  - see USN-717-1
* adjust patches to changed code base
  - update debian/patches/dom_inspector_support_for_prism.patch

[ Fabien Tassin <fta@ubuntu.com> ]
* Fix preinst script to better handle the /etc/gre.d clean-up
  - update debian/xulrunner-1.9.preinst.in
* Fix permissions in the -dev package (LP: #303940)
  - update debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
762
762
{
763
763
  LOG(("OBJLC [%p]: Got frame %p (mInstantiating=%i)\n", this, aFrame,
764
764
       mInstantiating));
765
 
  if (!mInstantiating && aFrame && mType == eType_Plugin) {
 
765
 
 
766
  // "revoke" any existing instantiate event as it likely has out of
 
767
  // date data (frame pointer etc).
 
768
  mPendingInstantiateEvent = nsnull;
 
769
 
 
770
  nsCOMPtr<nsIPluginInstance> instance;
 
771
  aFrame->GetPluginInstance(*getter_AddRefs(instance));
 
772
 
 
773
  if (instance) {
 
774
    // The frame already has a plugin instance, that means the plugin
 
775
    // has already been instantiated.
 
776
 
 
777
    return NS_OK;
 
778
  }
 
779
 
 
780
  if (!mInstantiating && mType == eType_Plugin) {
766
781
    // Asynchronously call Instantiate
767
782
    // This can go away once plugin loading moves to content
768
783
    // This must be done asynchronously to ensure that the frame is correctly
769
784
    // initialized (has a view etc)
770
785
 
771
 
    // "revoke" any existing instantiate event.
772
 
    mPendingInstantiateEvent = nsnull;
773
 
 
774
786
    // When in a plugin document, the document will take care of calling
775
787
    // instantiate
776
788
    nsCOMPtr<nsIPluginDocument> pDoc (do_QueryInterface(GetOurDocument()));
1650
1662
    LOG(("OBJLC [%p]: No frame yet\n", this));
1651
1663
    return NS_OK; // Not a failure to have no frame
1652
1664
  }
1653
 
  nsIFrame* iframe;
1654
 
  CallQueryInterface(frame, &iframe);
1655
 
  if (iframe->GetStateBits() & NS_FRAME_FIRST_REFLOW) {
1656
 
    LOG(("OBJLC [%p]: Frame hasn't been reflown yet\n", this));
1657
 
    return NS_OK; // Not a failure to have no frame
 
1665
 
 
1666
  nsCOMPtr<nsIPluginInstance> instance;
 
1667
  nsresult rv = frame->GetPluginInstance(*getter_AddRefs(instance));
 
1668
 
 
1669
  if (!instance) {
 
1670
    // The frame has no plugin instance yet. If the frame hasn't been
 
1671
    // reflown yet, do nothing as once the reflow happens we'll end up
 
1672
    // instantiating the plugin with the correct size n' all (which
 
1673
    // isn't known until we've done the first reflow). But if the
 
1674
    // frame does have a plugin instance already, be sure to
 
1675
    // re-instantiate the plugin as its source or whatnot might have
 
1676
    // chanced since it was instantiated.
 
1677
    nsIFrame* iframe;
 
1678
    CallQueryInterface(frame, &iframe);
 
1679
    if (iframe->GetStateBits() & NS_FRAME_FIRST_REFLOW) {
 
1680
      LOG(("OBJLC [%p]: Frame hasn't been reflown yet\n", this));
 
1681
      return NS_OK; // Not a failure to have no frame
 
1682
    }
1658
1683
  }
 
1684
 
1659
1685
  return Instantiate(frame, aMIMEType, aURI);
1660
1686
}
1661
1687