Bug 380454, r=benjamin, sr=sicking
git-svn-id: svn://10.0.0.236/trunk@245967 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
01ce71eccd
commit
b11bb3807a
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user