From a827a56218099cbb06ae49c89c6dea6c32a2644f Mon Sep 17 00:00:00 2001 From: "hans@chromium.org" Date: Wed, 11 Jun 2014 00:37:42 +0000 Subject: dllexport base::internal::WeakReference::Flag Flag's methods can end up getting called across a dll boundary due to inlining. For example, Flag's destructor ends up being called from gpu.dll when the following call chain gets inlined: gpu::gles2::ContextGroup::HaveContexts() -> std::vector>::remove_if() -> WeakPtr copy assignment -> WeakReference copy assignment -> scoped_refptr copy assignment -> RefCountedThreadSafe::Release -> ~Flag. (Note that dllimport/export isn't inherited by nested classes, but the visibility attribute that we use on other platforms is.) BUG=82385 TEST=build gpu.dll with Clang in a shared_library Release build R=mark@chromium.org Review URL: https://codereview.chromium.org/321983002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276220 0039d316-1c4b-4281-b951-d872f2087c98 --- base/memory/weak_ptr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'base/memory') diff --git a/base/memory/weak_ptr.h b/base/memory/weak_ptr.h index 1675889..f6001e2 100644 --- a/base/memory/weak_ptr.h +++ b/base/memory/weak_ptr.h @@ -83,7 +83,7 @@ class BASE_EXPORT WeakReference { public: // Although Flag is bound to a specific thread, it may be deleted from another // via base::WeakPtr::~WeakPtr(). - class Flag : public RefCountedThreadSafe { + class BASE_EXPORT Flag : public RefCountedThreadSafe { public: Flag(); -- cgit v1.1