Merge backout of revision 08e208698ef0, bug 533688 because of Tinderbox orange. last-mozilla-central
authorBenjamin Smedberg <benjamin@smedbergs.us>
Wed, 16 Dec 2009 10:32:57 -0500
changeset 36290 dba2abb7db57078c5a4810884834d3056a5d56c2
parent 36288 088fc4c3f9df535eccd25e6b207cb6549d026f65 (current diff)
parent 36289 ada564e50e86a6285a5a6773cadf7b2f5bc16885 (diff)
child 36291 7210af2c43680affeb74452fc8257c4bf13800d7
child 36301 5c9ee961025c99614e0d01cf5ba421eaf9bb668d
child 36307 8a63ddd1754704a916d53e567c94fae75f093b4f
push idunknown
push userunknown
push dateunknown
bugs533688
milestone1.9.3a1pre
Merge backout of revision 08e208698ef0, bug 533688 because of Tinderbox orange.
--- a/accessible/src/atk/nsAccessibleWrap.cpp
+++ b/accessible/src/atk/nsAccessibleWrap.cpp
@@ -920,20 +920,20 @@ refChildCB(AtkObject *aAtkObj, gint aChi
     if (!accChild)
         return nsnull;
 
     AtkObject* childAtkObj = nsAccessibleWrap::GetAtkObject(accChild);
 
     NS_ASSERTION(childAtkObj, "Fail to get AtkObj");
     if (!childAtkObj)
         return nsnull;
-    g_object_ref(childAtkObj);
     
     //this will addref parent
     atk_object_set_parent(childAtkObj, aAtkObj);
+    g_object_ref(childAtkObj);
     return childAtkObj;
 }
 
 gint
 getIndexInParentCB(AtkObject *aAtkObj)
 {
     // We don't use nsIAccessible::GetIndexInParent() because
     // for ATK we don't want to include text leaf nodes as children
--- a/accessible/src/base/nsRootAccessible.cpp
+++ b/accessible/src/base/nsRootAccessible.cpp
@@ -942,22 +942,19 @@ void nsRootAccessible::FireFocusCallback
 // nsAccessNode
 
 nsresult
 nsRootAccessible::Init()
 {
   nsRefPtr<nsApplicationAccessibleWrap> root = GetApplicationAccessible();
   NS_ENSURE_STATE(root);
 
-  nsresult rv = nsDocAccessibleWrap::Init();
+  root->AddRootAccessible(this);
 
-  if (NS_SUCCEEDED(rv))
-    root->AddRootAccessible(this);
-
-  return rv;
+  return nsDocAccessibleWrap::Init();
 }
 
 nsresult
 nsRootAccessible::Shutdown()
 {
   // Called manually or by nsAccessNode::LastRelease()
   if (!mWeakShell) {
     return NS_OK;  // Already shutdown