зеркало из https://github.com/mozilla/gecko-dev.git
Bug 199113 Mozilla crashes when calling "Manage Stored Cookies" before loading any page
patch by dwitte@stanford.edu r=mvl@exedo.nl sr=darin
This commit is contained in:
Родитель
913ad38177
Коммит
e4411fc87c
|
@ -38,6 +38,8 @@
|
|||
|
||||
#include "nsCookieManager.h"
|
||||
#include "nsCookies.h"
|
||||
#include "nsICookieService.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsIGenericFactory.h"
|
||||
#include "nsIScriptGlobalObject.h"
|
||||
|
||||
|
@ -127,6 +129,12 @@ nsCookieManager::~nsCookieManager()
|
|||
|
||||
nsresult nsCookieManager::Init()
|
||||
{
|
||||
// XXX we need this until we merge the cookiemanager into the cookieservice.
|
||||
// otherwise, sCookieList is un-initialized (required by COOKIE_Read).
|
||||
nsresult rv;
|
||||
nsCOMPtr<nsICookieService> cookieService = do_GetService(NS_COOKIESERVICE_CONTRACTID, &rv);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
COOKIE_Read();
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче