Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit a18d1e1

Browse files
author
Ehsan Akhgari
committed
Bug 1547114 - Part 7: Get rid of nsCookieModule.h/cpp; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D28998 --HG-- extra : moz-landing-system : lando
1 parent 31a8a70 commit a18d1e1

6 files changed

Lines changed: 2 additions & 41 deletions

File tree

extensions/cookie/components.conf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44
# License, v. 2.0. If a copy of the MPL was not distributed with this
55
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
66

7-
Headers = [
8-
'/extensions/cookie/nsCookieModule.h',
9-
]
10-
11-
UnloadFunc = 'mozilla::CookieModuleDtor'
12-
137
Classes = [
148
{
159
'cid': '{4f6b5e00-0c36-11d5-a535-0010a401eb10}',

extensions/cookie/moz.build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ EXPORTS += [
1111
]
1212

1313
UNIFIED_SOURCES += [
14-
'nsCookieModule.cpp',
1514
'nsCookiePermission.cpp',
1615
'nsPermission.cpp',
1716
'nsPermissionManager.cpp',

extensions/cookie/nsCookieModule.cpp

Lines changed: 0 additions & 12 deletions
This file was deleted.

extensions/cookie/nsCookieModule.h

Lines changed: 0 additions & 18 deletions
This file was deleted.

extensions/cookie/nsCookiePermission.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "nsNetCID.h"
2626
#include "prtime.h"
2727
#include "mozilla/StaticPtr.h"
28+
#include "mozilla/ClearOnShutdown.h"
2829
#include "nsContentUtils.h"
2930

3031
/****************************************************************
@@ -47,13 +48,11 @@ NS_IMPL_ISUPPORTS(nsCookiePermission, nsICookiePermission)
4748
already_AddRefed<nsICookiePermission> nsCookiePermission::GetOrCreate() {
4849
if (!gSingleton) {
4950
gSingleton = new nsCookiePermission();
51+
ClearOnShutdown(&gSingleton);
5052
}
5153
return do_AddRef(gSingleton);
5254
}
5355

54-
// static
55-
void nsCookiePermission::Shutdown() { gSingleton = nullptr; }
56-
5756
bool nsCookiePermission::Init() {
5857
// Initialize nsIPermissionManager and fetch relevant prefs. This is only
5958
// required for some methods on nsICookiePermission, so it should be done

extensions/cookie/nsCookiePermission.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ class nsCookiePermission final : public nsICookiePermission {
1616

1717
// Singleton accessor
1818
static already_AddRefed<nsICookiePermission> GetOrCreate();
19-
static void Shutdown();
2019

2120
bool Init();
2221

0 commit comments

Comments
 (0)