Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Unified Diff: src/runtime-profiler.cc

Issue 5621005: Fix strict aliasing rule violation in runtime-profiler.cc (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime-profiler.cc
diff --git a/src/runtime-profiler.cc b/src/runtime-profiler.cc
index 4b135a605ef35c1096b4a5f4f6e71241ebe979f1..051dc51193b83c9a36411a31887e308a7f1c8448 100644
--- a/src/runtime-profiler.cc
+++ b/src/runtime-profiler.cc
@@ -94,7 +94,7 @@ static int sampler_threshold_size_factor = kSamplerThresholdSizeFactorInit;
// the window might contain stale pointers. The window is updated on
// scavenges and (parts of it) cleared on mark-sweep and
// mark-sweep-compact.
-static JSFunction* sampler_window[kSamplerWindowSize] = { NULL, };
+static Object* sampler_window[kSamplerWindowSize] = { NULL, };
static int sampler_window_position = 0;
static int sampler_window_weight[kSamplerWindowSize] = { 0, };
@@ -220,7 +220,7 @@ static void ClearSampleBufferNewSpaceEntries() {
static int LookupSample(JSFunction* function) {
int weight = 0;
for (int i = 0; i < kSamplerWindowSize; i++) {
- JSFunction* sample = sampler_window[i];
+ Object* sample = sampler_window[i];
if (sample != NULL) {
if (function == sample) {
weight += sampler_window_weight[i];
@@ -351,7 +351,7 @@ void RuntimeProfiler::TearDown() {
Object** RuntimeProfiler::SamplerWindowAddress() {
- return reinterpret_cast<Object**>(sampler_window);
+ return sampler_window;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698