mChromeNav->LoadURI(mChromeLocation.GetUnicode(), nsIWebNavigation::LOAD_FLAGS_NONE);
mChromeNav->LoadURI(mChromeLocation.get(), nsIWebNavigation::LOAD_FLAGS_NONE);
PhMozEmbedPrivate::LoadChrome(void){  // First push a nested event queue for event processing from netlib  // onto our UI thread queue stack.  This has to happen before we  // realize the widget so that any thread events happen on a thread  // event queue that isn't already in use in case we are being  // called from an event handler - say from necko in an onload  // handler.  nsEventQueueStack queuePusher;  NS_ENSURE_SUCCESS(queuePusher.Success(), NS_ERROR_FAILURE);  nsCOMPtr<nsIAppShell> subShell(do_CreateInstance(kAppShellCID));  NS_ENSURE_TRUE(subShell, NS_ERROR_FAILURE);  mChromeLocation.AssignWithConversion("chrome://embed/content/simple-shell.xul");  mChromeNav->LoadURI(mChromeLocation.GetUnicode(), nsIWebNavigation::LOAD_FLAGS_NONE);    subShell->Create(0, nsnull);  subShell->Spinup();  // Push nsnull onto the JSContext stack before we dispatch a native event.  nsCOMPtr<nsIJSContextStack> stack(do_GetService("@mozilla.org/js/xpc/ContextStack;1"));  if(stack && NS_SUCCEEDED(stack->Push(nsnull)))  {    // until both the content and chrome areas are loaded, don't    // return.    nsresult looprv = NS_OK;    while (NS_SUCCEEDED(looprv) && !mContentLoaded)    {      // technically this is just g_main_iteration() but in the hopes      // of making this XP in the future...      void      *data;      PRBool    isRealEvent;            looprv = subShell->GetNativeEvent(isRealEvent, data);      subShell->DispatchNativeEvent(isRealEvent, data);    }    JSContext *cx;    stack->Pop(&cx);    NS_ASSERTION(cx == nsnull, "JSContextStack mismatch");  }      // and spindown...  subShell->Spindown();  return NS_OK;}