Bug 829518 - Enclose InternetQueryOptionW in __try...__except to suppress crash. r=mcmanus

This commit is contained in:
Masatoshi Kimura 2013-01-13 05:30:15 +09:00
parent c6b2bcf5f7
commit 2337904cb1

View File

@ -91,8 +91,12 @@ static nsresult ReadInternetOption(uint32_t aOption, uint32_t& aFlags,
}
options[0].dwOption = INTERNET_PER_CONN_FLAGS;
size = sizeof(INTERNET_PER_CONN_OPTION_LISTW);
if (!InternetQueryOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION,
&list, &size)) {
__try {
if (!InternetQueryOptionW(NULL, INTERNET_OPTION_PER_CONNECTION_OPTION,
&list, &size)) {
return NS_ERROR_FAILURE;
}
} __except (EXCEPTION_EXECUTE_HANDLER) {
return NS_ERROR_FAILURE;
}
}