Commit 5ace0a8f authored by gbillock@chromium.org's avatar gbillock@chromium.org

Add a clarifying comment to the memory layout navigation. (Inspired by Coverity CID 100022)

R=tommi@chromium.org
BUG=None
TEST=None


Review URL: https://chromiumcodereview.appspot.com/10826014

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@148412 0039d316-1c4b-4281-b951-d872f2087c98
parent 55705ebb
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
...@@ -135,6 +135,8 @@ bool TempMapping::Initialize(size_t size) { ...@@ -135,6 +135,8 @@ bool TempMapping::Initialize(size_t size) {
void* TempMapping::memory() const { void* TempMapping::memory() const {
uint8* mem = reinterpret_cast<uint8*>(mapping_.view()); uint8* mem = reinterpret_cast<uint8*>(mapping_.view());
// The 'this' pointer is written at the start of mapping_.view(), so
// go past it. (See Initialize()).
if (mem) if (mem)
mem += sizeof(this); mem += sizeof(this);
DCHECK(mem); DCHECK(mem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment