Skip to content

Commit

Permalink
Merge pull request dotnet#1216 from janvorli/fix-destructor-contracts
Browse files Browse the repository at this point in the history
Add missing contracts to some destructors
  • Loading branch information
janvorli committed Jul 10, 2015
2 parents eed62e3 + 24c0474 commit bff51f7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
5 changes: 4 additions & 1 deletion src/vm/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ typedef SHash<ZapperLoaderModuleTableTraits> ZapperLoaderModuleTable;
class CEECompileInfo : public ICorCompileInfo
{
public:
virtual ~CEECompileInfo() {}
virtual ~CEECompileInfo()
{
WRAPPER_NO_CONTRACT;
}

HRESULT Startup( BOOL fForceDebug,
BOOL fForceProfiling,
Expand Down
5 changes: 4 additions & 1 deletion src/vm/dllimport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ class StubState

virtual void FinishEmit(MethodDesc* pMD) = 0;

virtual ~StubState() {}
virtual ~StubState()
{
LIMITED_METHOD_CONTRACT;
}
};

class ILStubState : public StubState
Expand Down
5 changes: 4 additions & 1 deletion src/vm/hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ class Compare
m_ptr = ptr;
}

virtual ~Compare() {}
virtual ~Compare()
{
LIMITED_METHOD_CONTRACT;
}

virtual UPTR CompareHelper(UPTR val1, UPTR storedval)
{
Expand Down
11 changes: 10 additions & 1 deletion src/vm/ilmarshalers.h
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,10 @@ class ILMarshaler
{
}

virtual ~ILMarshaler() {}
virtual ~ILMarshaler()
{
LIMITED_METHOD_CONTRACT;
}

void SetNDirectStubLinker(NDirectStubLinker* pslNDirect)
{
Expand Down Expand Up @@ -1946,6 +1949,7 @@ class ILWSTRMarshaler : public ILMarshaler

ILWSTRMarshaler()
{
LIMITED_METHOD_CONTRACT;
m_fCoMemoryAllocated = false;
}
#endif // _DEBUG
Expand Down Expand Up @@ -2444,6 +2448,7 @@ class ILVBByValStrWMarshaler : public ILMarshaler
m_dwCCHLocal(-1)
,m_dwLocalBuffer(-1)
{
LIMITED_METHOD_CONTRACT;
}

virtual bool SupportsArgumentMarshal(DWORD dwMarshalFlags, UINT* pErrorResID);
Expand Down Expand Up @@ -2475,6 +2480,7 @@ class ILVBByValStrMarshaler : public ILMarshaler
ILVBByValStrMarshaler() :
m_dwCCHLocal(-1)
{
LIMITED_METHOD_CONTRACT;
}

virtual bool SupportsArgumentMarshal(DWORD dwMarshalFlags, UINT* pErrorResID);
Expand Down Expand Up @@ -2716,6 +2722,7 @@ class ILArrayWithOffsetMarshaler : public ILMarshaler
m_dwOffsetLocalNum(-1),
m_dwPinnedLocalNum(-1)
{
LIMITED_METHOD_CONTRACT;
}

protected:
Expand Down Expand Up @@ -2745,6 +2752,7 @@ class ILAsAnyMarshalerBase : public ILMarshaler
ILAsAnyMarshalerBase() :
m_dwMarshalerLocalNum(-1)
{
LIMITED_METHOD_CONTRACT;
}

protected:
Expand Down Expand Up @@ -2818,6 +2826,7 @@ class ILMngdMarshaler : public ILMarshaler
m_idClearNativeContents(clearNatContents),
m_idClearManaged(clearMan)
{
LIMITED_METHOD_CONTRACT;
}

protected:
Expand Down

0 comments on commit bff51f7

Please sign in to comment.