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

Unified Diff: base/debug/alias.cc

Issue 7039020: Tag all tracked objects, including Tasks, with the program counter at the site of FROM_HERE. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 7 months 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
Index: base/debug/alias.cc
===================================================================
--- base/debug/alias.cc (revision 0)
+++ base/debug/alias.cc (revision 0)
@@ -0,0 +1,25 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/debug/alias.h"
+#include "build/build_config.h"
+
+namespace base {
+namespace debug {
+
+// Prevent MSVC link time code generation from inlining this function. This
+// could render the referenced variable unaliased.
+#if defined(COMPILER_MSVC)
+__declspec(naked)
+#endif
+void Alias(void** var) {
+#if defined(COMPILER_MSVC)
+ __asm {
+ ret
+ }
+#endif
+}
+
+} // namespace debug
+} // namespace base
Property changes on: base\debug\alias.cc
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « base/debug/alias.h ('k') | base/message_loop.cc » ('j') | base/message_loop.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698