mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 20:49:27 +00:00
Bug 563643 - [Debug MacOSX SeaMonkey] leak test: "ASSERTION: Want to fire mutation events, but it's not safe" since bug 429175 landing. ("all" other test suites too); (Av1b) With 2 extra ifdefs as agreed on IRC.
r=Olli.Pettay a-2.0=jonas.
This commit is contained in:
parent
aaa76c99b7
commit
6a7e094d67
@ -71,6 +71,9 @@
|
||||
#include "nsIDOMDocument.h"
|
||||
#include "nsIScriptObjectPrincipal.h"
|
||||
#include "nsIURI.h"
|
||||
#if defined(XP_MACOSX)
|
||||
#include "nsThreadUtils.h"
|
||||
#endif
|
||||
|
||||
// CIDs
|
||||
static NS_DEFINE_CID(kWindowMediatorCID, NS_WINDOWMEDIATOR_CID);
|
||||
@ -948,7 +951,28 @@ nsContentTreeOwner::ProvideWindow(nsIDOMWindow* aParent,
|
||||
|
||||
//*****************************************************************************
|
||||
// nsContentTreeOwner: Accessors
|
||||
//*****************************************************************************
|
||||
//*****************************************************************************
|
||||
|
||||
#if defined(XP_MACOSX)
|
||||
class nsContentTitleSettingEvent : public nsRunnable
|
||||
{
|
||||
public:
|
||||
nsContentTitleSettingEvent(nsIDOMElement *dse, const nsAString& wtm)
|
||||
: mElement(dse),
|
||||
mTitleDefault(wtm) {}
|
||||
|
||||
NS_IMETHOD Run()
|
||||
{
|
||||
mElement->SetAttribute(NS_LITERAL_STRING("titledefault"), mTitleDefault);
|
||||
mElement->RemoveAttribute(NS_LITERAL_STRING("titlemodifier"));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
private:
|
||||
nsCOMPtr<nsIDOMElement> mElement;
|
||||
nsString mTitleDefault;
|
||||
};
|
||||
#endif
|
||||
|
||||
void nsContentTreeOwner::XULWindow(nsXULWindow* aXULWindow)
|
||||
{
|
||||
@ -975,9 +999,9 @@ void nsContentTreeOwner::XULWindow(nsXULWindow* aXULWindow)
|
||||
// On OS X, treat the titlemodifier like it's the titledefault, and don't ever append
|
||||
// the separator + appname.
|
||||
if (mTitleDefault.IsEmpty()) {
|
||||
docShellElement->SetAttribute(NS_LITERAL_STRING("titledefault"),
|
||||
mWindowTitleModifier);
|
||||
docShellElement->RemoveAttribute(NS_LITERAL_STRING("titlemodifier"));
|
||||
NS_DispatchToCurrentThread(
|
||||
new nsContentTitleSettingEvent(docShellElement,
|
||||
mWindowTitleModifier));
|
||||
mTitleDefault = mWindowTitleModifier;
|
||||
mWindowTitleModifier.Truncate();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user