Bug 632994 - When previewing personas, tab bar jitters. r=bz a=blocking2.0
authorMehdi Mulani <mmmulani@uwaterloo.ca>
Wed, 09 Feb 2011 16:45:54 -0800
changeset 62308 83a0538956cc3fa842c7e786670a07417e875409
parent 62307 3ce0b8db2ebb198ff7b46304fe670c05738c7126
child 62309 9e27e7d046990bc40b502e5710aadeed7799cfed
push idunknown
push userunknown
push dateunknown
reviewersbz, blocking2
bugs632994
milestone2.0b12pre
Bug 632994 - When previewing personas, tab bar jitters. r=bz a=blocking2.0
content/xul/content/src/nsXULElement.cpp
--- a/content/xul/content/src/nsXULElement.cpp
+++ b/content/xul/content/src/nsXULElement.cpp
@@ -2434,18 +2434,17 @@ private:
   PRBool mState;
 };
 
 void
 nsXULElement::SetDrawsInTitlebar(PRBool aState)
 {
     nsIWidget* mainWidget = GetWindowWidget();
     if (mainWidget) {
-        nsCOMPtr<nsIRunnable> event = new SetDrawInTitleBarEvent(mainWidget, aState);
-        NS_DispatchToCurrentThread(event);
+        nsContentUtils::AddScriptRunner(new SetDrawInTitleBarEvent(mainWidget, aState));
     }
 }
 
 void
 nsXULElement::SetChromeMargins(const nsAString* aValue)
 {
     if (!aValue)
         return;