Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Reword comments for policheck #27669

Merged
merged 3 commits into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/inc/bbsweep.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class BBSweep
if (!OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken))
goto cleanup;

// don't set pSecurityAttributes for Metro processes
// don't set pSecurityAttributes for Windows Store processes
jkoritzinsky marked this conversation as resolved.
Show resolved Hide resolved
if(!IsAppContainerProcess(hToken))
{
SECURITY_ATTRIBUTES securityAttributes;
Expand Down Expand Up @@ -344,31 +344,31 @@ class BBSweep
// 2. From bbsweepclr.exe
//
// When called from process init code, processID is always INVALID_PID.
// In case it is a Win8-Metro/WP8 process, we need to add the AppContainerNamedObjectPath to prefix.
// And if it is a non-Metro process, we will continue to use the default prefix (Global).
// In case it is a Win8-Windows Store/WP8 process, we need to add the AppContainerNamedObjectPath to prefix.
// And if it is a non-Windows Store process, we will continue to use the default prefix (Global).
// We use IsAppContainerProcess(CurrentProcessId) to make this decision.
//
//
// When called from bbsweepclr, processID is valid when sweeping a Metro or WP8 process.
// We use this valid processID to determine if the process being swept is Metro/WP8 indeed and then
// When called from bbsweepclr, processID is valid when sweeping a Windows Store or WP8 process.
// We use this valid processID to determine if the process being swept is Windows Store/WP8 indeed and then
// add AppContainerNamedObjectPath to prefix. This is done by IsAppContainerProcess(processID).
//
// In case INVALID_PID is passed(non-Metro process), we have to use default prefix. To handle this
// case we use IsAppContainerProcess(CurrentProcessId) and since bbsweepclr is a non-Metro process,
// In case INVALID_PID is passed(non-Windows Store process), we have to use default prefix. To handle this
// case we use IsAppContainerProcess(CurrentProcessId) and since bbsweepclr is a non-Windows Store process,
// this check always returns false and we end up using the intended(default) prefix.
//
if(processID == INVALID_PID) {
// we reach here when:
// * called from process init code:
// * called from bbsweepclr.exe and no processID has been passed as argument, that is, when sweeping a non-Metro process
// * called from bbsweepclr.exe and no processID has been passed as argument, that is, when sweeping a non-Windows Store process
processID = GetCurrentProcessId();
}

HandleHolder hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, processID);
if (hProcess != INVALID_HANDLE_VALUE)
{
HandleHolder hToken = NULL;
// if in the process init code of a Metro app or if bbsweepclr is used to sweep a Metro app,
// if in the process init code of a Windows Store app or if bbsweepclr is used to sweep a Windows Store app,
// construct the object name prefix using AppContainerNamedObjectPath
if (OpenProcessToken(hProcess, TOKEN_QUERY, &hToken) && IsAppContainerProcess(hToken))
{
Expand All @@ -377,7 +377,7 @@ class BBSweep

if (fromRuntime)
{
// for Metro apps, create the object in the "default" object path, i.e. do not provide any prefix
// for Windows Store apps, create the object in the "default" object path, i.e. do not provide any prefix
objectNamePrefix[0] = W('\0');
}
else
Expand All @@ -394,7 +394,7 @@ class BBSweep
GetProcAddress(WszGetModuleHandle(MODULE_NAME), "GetAppContainerNamedObjectPath");
if (pfnGetAppContainerNamedObjectPath)
{
// for bbsweepclr sweeping a Metro app, create the object specifying the AppContainer's path
// for bbsweepclr sweeping a Windows Store app, create the object specifying the AppContainer's path
DWORD sessionId = 0;
ProcessIdToSessionId(processID, &sessionId);
pfnGetAppContainerNamedObjectPath(hToken, NULL, sizeof (appxNamedObjPath) / sizeof (WCHAR), appxNamedObjPath, &appxNamedObjPathBufLen);
Expand Down
2 changes: 1 addition & 1 deletion src/pal/inc/rt/specstrings_strict.h
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
* void myfree(__deallocate_opt(Mem) void *p) : Memory is freed, no longer
* usable upon return, and p may be null.
*
* void free(__post_invalid void* x): Mark memory as untouchable when
* void free(__post_invalid void* x): Mark memory as unusable when
* function returns.
*
* ----------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion src/vm/rejit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1154,7 +1154,7 @@ HRESULT ReJitManager::ConfigureILCodeVersion(ILCodeVersion ilCodeVersion)
}
else if (fWaitForParameters)
{
// This feels lame, but it doesn't appear like we have the good threading primitves
// This feels annoying, but it doesn't appear like we have the good threading primitves
// for this. What I would like is an AutoResetEvent that atomically exits the table
// Crst when I wait on it. From what I can tell our AutoResetEvent doesn't have
// that atomic transition which means this ordering could occur:
Expand Down