Bug 380454, r=benjamin, sr=sicking

This commit is contained in:
Olli.Pettay%helsinki.fi 2008-02-19 13:06:23 +00:00
Родитель 38efd51236
Коммит c57eb7ac12
3 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -58,6 +58,7 @@
#include "nsParserUtils.h"
#include "nsContentUtils.h"
#include "nsPIDOMWindow.h"
#include "nsPLDOMEvent.h"
class nsHTMLLinkElement : public nsGenericHTMLElement,
public nsIDOMHTMLLinkElement,
@ -273,9 +274,10 @@ nsHTMLLinkElement::CreateAndDispatchEvent(nsIDocument* aDoc,
strings, eIgnoreCase) != ATTR_VALUE_NO_MATCH)
return;
nsContentUtils::DispatchTrustedEvent(aDoc,
static_cast<nsIContent*>(this),
aEventName, PR_TRUE, PR_TRUE);
nsRefPtr<nsPLDOMEvent> event = new nsPLDOMEvent(this, aEventName);
if (event) {
event->PostDOMEvent();
}
}
nsresult

Просмотреть файл

@ -200,6 +200,9 @@ nsThreadManager::GetCurrentThread()
if (data)
return static_cast<nsThread *>(data);
if (!mInitialized)
return nsnull;
// OK, that's fine. We'll dynamically create one :-)
nsRefPtr<nsThread> thread = new nsThread();
if (!thread || NS_FAILED(thread->InitCurrentThread()))

Просмотреть файл

@ -69,7 +69,8 @@ public:
// method must be called when the given thread is the current thread.
void UnregisterCurrentThread(nsThread *thread);
// Returns the current thread. Returns null if OOM.
// Returns the current thread. Returns null if OOM or if ThreadManager isn't
// initialized.
nsThread *GetCurrentThread();
// This needs to be public in order to support static instantiation of this