зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1288870, part 3 - Remove the now-vestigial Mark code for XPCNativeInterface. r=billm
XPCNativeInterface::Mark(), Unmark() and IsMarked() don't do anything any more, so anything that calls them can be deleted. This removes the only use of XPCCallContext::CanGetInterface(), so delete that, too. MozReview-Commit-ID: 4w3aPTVXNDI
This commit is contained in:
Родитель
f8d14c904a
Коммит
e5e0b12c27
|
@ -119,12 +119,6 @@ XPCCallContext::GetSet() const
|
|||
return mSet;
|
||||
}
|
||||
|
||||
inline bool
|
||||
XPCCallContext::CanGetInterface() const
|
||||
{
|
||||
return mState >= HAVE_NAME;
|
||||
}
|
||||
|
||||
inline XPCNativeInterface*
|
||||
XPCCallContext::GetInterface() const
|
||||
{
|
||||
|
@ -442,26 +436,13 @@ XPCNativeSet::MatchesSetUpToInterface(const XPCNativeSet* other,
|
|||
|
||||
inline void XPCNativeSet::Mark()
|
||||
{
|
||||
if (IsMarked())
|
||||
return;
|
||||
|
||||
XPCNativeInterface* const * pp = mInterfaces;
|
||||
|
||||
for (int i = (int) mInterfaceCount; i > 0; i--, pp++)
|
||||
(*pp)->Mark();
|
||||
|
||||
MarkSelfOnly();
|
||||
mMarked = 1;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
inline void XPCNativeSet::ASSERT_NotMarked()
|
||||
{
|
||||
MOZ_ASSERT(!IsMarked(), "bad");
|
||||
|
||||
XPCNativeInterface* const * pp = mInterfaces;
|
||||
|
||||
for (int i = (int) mInterfaceCount; i > 0; i--, pp++)
|
||||
MOZ_ASSERT(!(*pp)->IsMarked(), "bad");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -804,11 +804,6 @@ XPCJSRuntime::FinalizeCallback(JSFreeOp* fop,
|
|||
if (set)
|
||||
set->Mark();
|
||||
}
|
||||
if (ccxp->CanGetInterface()) {
|
||||
XPCNativeInterface* iface = ccxp->GetInterface();
|
||||
if (iface)
|
||||
iface->Mark();
|
||||
}
|
||||
ccxp = ccxp->GetPrevCallContext();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1242,10 +1242,6 @@ class XPCNativeInterface final
|
|||
|
||||
void DebugDump(int16_t depth);
|
||||
|
||||
void Mark() {}
|
||||
void Unmark() {}
|
||||
bool IsMarked() const { return false; }
|
||||
|
||||
size_t SizeOfIncludingThis(mozilla::MallocSizeOf mallocSizeOf);
|
||||
|
||||
protected:
|
||||
|
@ -1364,11 +1360,6 @@ class XPCNativeSet final
|
|||
inline void TraceJS(JSTracer* trc) {}
|
||||
inline void AutoTrace(JSTracer* trc) {}
|
||||
|
||||
private:
|
||||
void MarkSelfOnly() {
|
||||
mMarked = 1;
|
||||
}
|
||||
|
||||
public:
|
||||
void Unmark() {
|
||||
mMarked = 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче