Skip to content

Commit

Permalink
Bug 961019 - Remove nsIClassInfo::MAIN_THREAD_ONLY. r=peterv,necko-re…
Browse files Browse the repository at this point in the history
…viewers

XPConnect has been single threaded for a long time, so this
flag doesn't do anything.

Differential Revision: https://phabricator.services.mozilla.com/D168442
  • Loading branch information
amccreight committed Feb 1, 2023
1 parent 25b121b commit 0e20ed9
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 14 deletions.
3 changes: 1 addition & 2 deletions caps/ContentPrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@

using namespace mozilla;

NS_IMPL_CLASSINFO(ContentPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
NS_PRINCIPAL_CID)
NS_IMPL_CLASSINFO(ContentPrincipal, nullptr, 0, NS_PRINCIPAL_CID)
NS_IMPL_QUERY_INTERFACE_CI(ContentPrincipal, nsIPrincipal)
NS_IMPL_CI_INTERFACE_GETTER(ContentPrincipal, nsIPrincipal)

Expand Down
3 changes: 1 addition & 2 deletions caps/ExpandedPrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@

using namespace mozilla;

NS_IMPL_CLASSINFO(ExpandedPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
NS_EXPANDEDPRINCIPAL_CID)
NS_IMPL_CLASSINFO(ExpandedPrincipal, nullptr, 0, NS_EXPANDEDPRINCIPAL_CID)
NS_IMPL_QUERY_INTERFACE_CI(ExpandedPrincipal, nsIPrincipal,
nsIExpandedPrincipal)
NS_IMPL_CI_INTERFACE_GETTER(ExpandedPrincipal, nsIPrincipal,
Expand Down
3 changes: 1 addition & 2 deletions caps/NullPrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@

using namespace mozilla;

NS_IMPL_CLASSINFO(NullPrincipal, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
NS_NULLPRINCIPAL_CID)
NS_IMPL_CLASSINFO(NullPrincipal, nullptr, 0, NS_NULLPRINCIPAL_CID)
NS_IMPL_QUERY_INTERFACE_CI(NullPrincipal, nsIPrincipal)
NS_IMPL_CI_INTERFACE_GETTER(NullPrincipal, nsIPrincipal)

Expand Down
3 changes: 1 addition & 2 deletions caps/SystemPrincipal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@

using namespace mozilla;

NS_IMPL_CLASSINFO(SystemPrincipal, nullptr,
nsIClassInfo::SINGLETON | nsIClassInfo::MAIN_THREAD_ONLY,
NS_IMPL_CLASSINFO(SystemPrincipal, nullptr, nsIClassInfo::SINGLETON,
NS_SYSTEMPRINCIPAL_CID)
NS_IMPL_QUERY_INTERFACE_CI(SystemPrincipal, nsIPrincipal, nsISerializable)
NS_IMPL_CI_INTERFACE_GETTER(SystemPrincipal, nsIPrincipal, nsISerializable)
Expand Down
3 changes: 1 addition & 2 deletions dom/security/nsCSPContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,7 @@ bool nsCSPContext::permitsInternal(

/* ===== nsISupports implementation ========== */

NS_IMPL_CLASSINFO(nsCSPContext, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
NS_CSPCONTEXT_CID)
NS_IMPL_CLASSINFO(nsCSPContext, nullptr, 0, NS_CSPCONTEXT_CID)

NS_IMPL_ISUPPORTS_CI(nsCSPContext, nsIContentSecurityPolicy, nsISerializable)

Expand Down
2 changes: 1 addition & 1 deletion js/xpconnect/src/XPCRuntimeService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ BackstagePass::GetClassID(nsCID** aClassID) {

NS_IMETHODIMP
BackstagePass::GetFlags(uint32_t* aFlags) {
*aFlags = nsIClassInfo::MAIN_THREAD_ONLY;
*aFlags = 0;
return NS_OK;
}

Expand Down
3 changes: 1 addition & 2 deletions netwerk/protocol/res/SubstitutingProtocolHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ SubstitutingJARURI::Write(nsIObjectOutputStream* aStream) {
return NS_OK;
}

NS_IMPL_CLASSINFO(SubstitutingJARURI, nullptr, nsIClassInfo::MAIN_THREAD_ONLY,
NS_SUBSTITUTINGJARURI_CID)
NS_IMPL_CLASSINFO(SubstitutingJARURI, nullptr, 0, NS_SUBSTITUTINGJARURI_CID)

NS_IMPL_ADDREF(SubstitutingJARURI)
NS_IMPL_RELEASE(SubstitutingJARURI)
Expand Down
1 change: 0 additions & 1 deletion xpcom/components/nsIClassInfo.idl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ interface nsIClassInfo : nsISupports
*/
const uint32_t SINGLETON = 1 << 0;
const uint32_t THREADSAFE = 1 << 1;
const uint32_t MAIN_THREAD_ONLY = 1 << 2;
const uint32_t SINGLETON_CLASSINFO = 1 << 5;

// The high order bit is RESERVED for consumers of these flags.
Expand Down

0 comments on commit 0e20ed9

Please sign in to comment.