summaryrefslogtreecommitdiffstats
path: root/base/win
diff options
context:
space:
mode:
authortbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 22:44:50 +0000
committertbreisacher@chromium.org <tbreisacher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-20 22:44:50 +0000
commit3f46b13a5bf0dd30d601156eb007d0222ae87db3 (patch)
tree28a14d6881988711309dcf30143ef8ab43cbe3c2 /base/win
parentbcfe4b0464b1cf269f087cf3e3a6c19ff1b39f06 (diff)
downloadchromium_src-3f46b13a5bf0dd30d601156eb007d0222ae87db3.zip
chromium_src-3f46b13a5bf0dd30d601156eb007d0222ae87db3.tar.gz
chromium_src-3f46b13a5bf0dd30d601156eb007d0222ae87db3.tar.bz2
Make sure all the pointers in ProfilerFuncs are NULL if they don't get initialized.
CID=102658 BUG=NONE TEST=NONE Review URL: http://codereview.chromium.org/9004026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115206 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/win')
-rw-r--r--base/win/sampling_profiler.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/base/win/sampling_profiler.cc b/base/win/sampling_profiler.cc
index d1f6fbc..400eb63 100644
--- a/base/win/sampling_profiler.cc
+++ b/base/win/sampling_profiler.cc
@@ -74,7 +74,13 @@ class ProfilerFuncs {
bool initialized_;
};
-ProfilerFuncs::ProfilerFuncs() : initialized_(false) {
+ProfilerFuncs::ProfilerFuncs()
+ : ZwSetIntervalProfile(NULL),
+ ZwQueryIntervalProfile(NULL),
+ ZwCreateProfile(NULL),
+ ZwStartProfile(NULL),
+ ZwStopProfile(NULL),
+ initialized_(false) {
HMODULE ntdll = ::GetModuleHandle(L"ntdll.dll");
if (ntdll != NULL) {
ZwSetIntervalProfile = reinterpret_cast<ZwSetIntervalProfileFunc>(