summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 01:24:30 +0000
committergregoryd@google.com <gregoryd@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-03 01:24:30 +0000
commit11e1a2a71fa01d356f534989265f366006fb4f52 (patch)
treec6aa441d8e830bd636a6d8dd90262c3ff361d65e
parent2f7995ec2a5679dcff8db39913811ee822a6106e (diff)
downloadchromium_src-11e1a2a71fa01d356f534989265f366006fb4f52.zip
chromium_src-11e1a2a71fa01d356f534989265f366006fb4f52.tar.gz
chromium_src-11e1a2a71fa01d356f534989265f366006fb4f52.tar.bz2
Add support for 64-bit Windows build
BUG=28176 TEST=none Review URL: http://codereview.chromium.org/455036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@33645 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--base/event_trace_provider_win.cc4
-rw-r--r--base/event_trace_provider_win.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/base/event_trace_provider_win.cc b/base/event_trace_provider_win.cc
index 69fcd57..4c43b72 100644
--- a/base/event_trace_provider_win.cc
+++ b/base/event_trace_provider_win.cc
@@ -99,7 +99,7 @@ ULONG EtwTraceProvider::Log(const EtwEventClass& event_class,
event.fields[0].DataPtr = reinterpret_cast<ULONG64>(message);
event.fields[0].Length = message ?
- sizeof(message[0]) * (1 + strlen(message)) : 0;
+ static_cast<ULONG>(sizeof(message[0]) * (1 + strlen(message))) : 0;
return ::TraceEvent(session_handle_, &event.header);
}
@@ -113,7 +113,7 @@ ULONG EtwTraceProvider::Log(const EtwEventClass& event_class,
event.fields[0].DataPtr = reinterpret_cast<ULONG64>(message);
event.fields[0].Length = message ?
- sizeof(message[0]) * (1 + wcslen(message)) : 0;
+ static_cast<ULONG>(sizeof(message[0]) * (1 + wcslen(message))) : 0;
return ::TraceEvent(session_handle_, &event.header);
}
diff --git a/base/event_trace_provider_win.h b/base/event_trace_provider_win.h
index bf186ee..9668740 100644
--- a/base/event_trace_provider_win.h
+++ b/base/event_trace_provider_win.h
@@ -56,9 +56,9 @@ template <size_t N> class EtwMofEvent: public EtwMofEventBase<N> {
void SetField(int field, size_t size, const void *data) {
// DCHECK(field < N);
- if (field < N) {
+ if ((field < N) && (size <= kuint32max)) {
fields[field].DataPtr = reinterpret_cast<ULONG64>(data);
- fields[field].Length = size;
+ fields[field].Length = static_cast<ULONG>(size);
}
}