Commit f293b6a6 authored by waterson%netscape.com's avatar waterson%netscape.com
Browse files

Bug 59283. Don't let gtkEmbed/winEmbed open >1 window. r=dougt, sr=rpotts

parent f465d9a2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -118,9 +118,14 @@ extern nativeWindow CreateNativeWindow(nsIWebBrowserChrome* chrome);
NS_IMETHODIMP WebBrowserChrome::CreateBrowserWindow(PRUint32 chromeMask,
    PRInt32 aX, PRInt32 aY, PRInt32 aCX, PRInt32 aCY, nsIWebBrowser **aWebBrowser)
{
   static int gCount = 0;

   NS_ENSURE_ARG_POINTER(aWebBrowser);
   *aWebBrowser = nsnull;

   if (++gCount > 1)
     return NS_OK;

    mWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID);
    
	if (!mWebBrowser)
+5 −0
Original line number Diff line number Diff line
@@ -117,9 +117,14 @@ extern nativeWindow CreateNativeWindow(nsIWebBrowserChrome* chrome);

NS_IMETHODIMP WebBrowserChrome::CreateBrowserWindow(PRUint32 chromeMask, PRInt32 aX, PRInt32 aY, PRInt32 aCX, PRInt32 aCY, nsIWebBrowser **aWebBrowser)
{
   static int gCount = 0;

   NS_ENSURE_ARG_POINTER(aWebBrowser);
   *aWebBrowser = nsnull;

   if (++gCount > 1)
     return NS_OK;

    mWebBrowser = do_CreateInstance(NS_WEBBROWSER_CONTRACTID);
    
	if (!mWebBrowser)