зеркало из https://github.com/mozilla/pjs.git
Bug 319934 - Prevent shutdown crashes by having XMLHttpRequest objects hold the layout module alive, r+sr=dbaron
This commit is contained in:
Родитель
c9a405a2b7
Коммит
f99539aea8
|
@ -81,6 +81,7 @@
|
|||
#include "nsIContentPolicy.h"
|
||||
#include "nsContentPolicyUtils.h"
|
||||
#include "nsContentErrors.h"
|
||||
#include "nsLayoutStatics.h"
|
||||
|
||||
#define LOAD_STR "load"
|
||||
#define ERROR_STR "error"
|
||||
|
@ -272,6 +273,7 @@ GetDocumentFromScriptContext(nsIScriptContext *aScriptContext)
|
|||
nsXMLHttpRequest::nsXMLHttpRequest()
|
||||
: mState(XML_HTTP_REQUEST_UNINITIALIZED)
|
||||
{
|
||||
nsLayoutStatics::AddRef();
|
||||
}
|
||||
|
||||
nsXMLHttpRequest::~nsXMLHttpRequest()
|
||||
|
@ -287,6 +289,7 @@ nsXMLHttpRequest::~nsXMLHttpRequest()
|
|||
|
||||
// Needed to free the listener arrays.
|
||||
ClearEventListeners();
|
||||
nsLayoutStatics::Release();
|
||||
}
|
||||
|
||||
NS_IMPL_CYCLE_COLLECTION_CLASS(nsXMLHttpRequest)
|
||||
|
|
Загрузка…
Ссылка в новой задаче