title: Issue with CDialog::DoModal() when called from firebreath plugin
body: <p>I have my ActiveX COM component developed in VC6. I have created the firebreath plugin over it to be able to call the COM API from different browsers. I have one API in ActiveX component which pops up the CDialog UI, On Google Chrome browser dlg.DoModal() function is failing. Issue is only with Chrome it simply crashes at this call, in other browsers its working perfectly</p>
  
  <p>On Windows 7 its working with Google Chrome as well issue is with Windows XP.</p>
  
  <p>Please provide me some feedback on this issue.</p>
  
  <p>I am attaching some code snippets here to give some idea of what I am trying to do</p>
  
  <p>Firebreath Plugin code (Plugin name is FBTest):</p>
  
  <pre><code>bool FBTest::onWindowAttached(FB::AttachedEvent *evt, FB::PluginWindow *piw)
   {
   // The window is attached; act appropriately   
  try {
  
      /* Now that we have the plugin window, create the ActiveX container
         window as a child of the plugin, then create the ActiveX control
          as a child of the container.
      */
  
      FB::PluginWindowWin* pwnd = piw-&gt;get_as&lt;FB::PluginWindowWin&gt;();
      if(pwnd != NULL)
      {
          HWND hWnd = pwnd-&gt;getHWND();
          if(hWnd)
          {               
              // Create the ActiveX control container
              RECT rc;
              ::GetClientRect(hWnd, &amp;rc);
              m_fbTestWin.Create(hWnd, &amp;rc, 0, WS_VISIBLE|WS_CHILD);
  
              CComPtr&lt;IUnknown&gt; spControlTest;
  
                              //ETESTPROGID is prog id of activex component
              HRESULT hrTest = m_fbTestWin.CreateControlEx(ETESTPROGID, NULL, NULL, &amp;spControlTest, GUID_NULL, NULL);
  
              if(SUCCEEDED(hrTest) &amp;&amp; (spControlTest != NULL))
              {
                  spControlTest.QueryInterface(&amp;m_eTestAxCtl);
                  g_eTestAxCtl = m_eTestAxCtl;
                  if (m_eTestAxCtl)
                  {
                      //TODO: should we throw a FB exception here?
                  }
              }               
          }
      }
  } catch(...) {
      //TODO: should we throw a FB exception here?
  }
    return false;
  }
  
  void FBTest::TestFunc()
  {   
      //hThread = (HANDLE)_beginthreadex(NULL, 0,&amp;FBTest::Start, (void*)&amp;m_eTestAxCtl, 0, &amp;ThreadId);
  
  if(m_eTestAxCtl)
  {
      try {
          long nCode = -1;
          //This is call to API of Activex component which will popup the dialog
          HRESULT hr = m_eTestAxCtl-&gt;TestFunc();
          //return nCode;         
      }
      catch(...) {
  
      }
  }
  </code></pre>
  
  <p>}</p>
  
  <p>Activex Component code :</p>
  
  <pre><code>STDMETHODIMP CTest::TestFunc()
  {
  //CTestDlg is ATL Dialog Object
      CTestDlg TestDlg;
  
  //At this call Google chrome is crashing
  if(!TestDlg.DoModal())
      return S_FALSE;
  
  return S_OK;
  }
  </code></pre>
  
  <p>I am calling TestFunc() API of plugin from one HTML page and its showing me the dailog in IE and firefox browsers but Chrome is crashing..</p>
  
  <p>Please help.</p>