From 2862086530e94dab7ab55e842601661aabd8a408 Mon Sep 17 00:00:00 2001 From: "rtenneti@chromium.org" Date: Tue, 22 Mar 2011 23:07:19 +0000 Subject: Removed the static on all stats macros and changed the static declaration of StatsCounter, StatsCounterTimer and StatsRate variables to auto. This change would fix possibel race condition during static's initialization in multi-threaded environments. BUG=76980 TEST=unit tests in net, browser and plugins R=jar@chromium.org Review URL: http://codereview.chromium.org/6719011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79065 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc | 4 ++-- webkit/plugins/npapi/webplugin_delegate_impl_win.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'webkit/plugins/npapi') diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc index 726abc0..9a0fb6b 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_gtk.cc @@ -446,7 +446,7 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context, } // Tell the plugin to paint into the pixmap. - static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsRate plugin_paint("Plugin.Paint"); base::StatsScope scope(plugin_paint); NPError err = instance()->NPP_HandleEvent(&np_event); DCHECK_EQ(err, NPERR_NO_ERROR); @@ -477,7 +477,7 @@ void WebPluginDelegateImpl::WindowlessPaint(cairo_t* context, event.drawable = GDK_PIXMAP_XID(pixmap_); // Tell the plugin to paint into the pixmap. - static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsRate plugin_paint("Plugin.Paint"); base::StatsScope scope(plugin_paint); NPError err = instance()->NPP_HandleEvent(&np_event); DCHECK_EQ(err, NPERR_NO_ERROR); diff --git a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc index 5bfc994..764d6d7 100644 --- a/webkit/plugins/npapi/webplugin_delegate_impl_win.cc +++ b/webkit/plugins/npapi/webplugin_delegate_impl_win.cc @@ -1040,7 +1040,7 @@ void WebPluginDelegateImpl::WindowlessPaint(HDC hdc, // NOTE: NPAPI is not 64bit safe. It puts pointers into 32bit values. paint_event.wParam = PtrToUlong(hdc); paint_event.lParam = PtrToUlong(&damage_rect_win); - static base::StatsRate plugin_paint("Plugin.Paint"); + base::StatsRate plugin_paint("Plugin.Paint"); base::StatsScope scope(plugin_paint); instance()->NPP_HandleEvent(&paint_event); window_.window = old_dc; -- cgit v1.1