summaryrefslogtreecommitdiffstats
path: root/content/gpu
diff options
context:
space:
mode:
authormohan.reddy <mohan.reddy@samsung.com>2014-09-12 02:52:40 -0700
committerCommit bot <commit-bot@chromium.org>2014-09-12 09:57:52 +0000
commit6993ff96ffd1d66c38bcfbdc5c09c56a2c29330d (patch)
tree714ee78fb6029a6a0f2d2f0a3b4cdf8bcd6e0cc4 /content/gpu
parent66f9d03f574d2aff47a9c878125e191234201882 (diff)
downloadchromium_src-6993ff96ffd1d66c38bcfbdc5c09c56a2c29330d.zip
chromium_src-6993ff96ffd1d66c38bcfbdc5c09c56a2c29330d.tar.gz
chromium_src-6993ff96ffd1d66c38bcfbdc5c09c56a2c29330d.tar.bz2
Changing the order of initialization WeakPtrFactory
Changing in the intialization order of WeakPtrFactory such that all member variables should appear before the WeakPtrFactory to ensure that any WeakPtrs to Controller are invalidated before its members variable's destructors are executed, rendering them invalid. BUG=303818 Review URL: https://codereview.chromium.org/565013003 Cr-Commit-Position: refs/heads/master@{#294567}
Diffstat (limited to 'content/gpu')
-rw-r--r--content/gpu/gpu_watchdog_thread.cc4
-rw-r--r--content/gpu/gpu_watchdog_thread.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/content/gpu/gpu_watchdog_thread.cc b/content/gpu/gpu_watchdog_thread.cc
index 61d4dee..02b6bff 100644
--- a/content/gpu/gpu_watchdog_thread.cc
+++ b/content/gpu/gpu_watchdog_thread.cc
@@ -38,8 +38,8 @@ GpuWatchdogThread::GpuWatchdogThread(int timeout)
arm_cpu_time_(),
#endif
task_observer_(this),
- weak_factory_(this),
- suspended_(false) {
+ suspended_(false),
+ weak_factory_(this) {
DCHECK(timeout >= 0);
#if defined(OS_WIN)
diff --git a/content/gpu/gpu_watchdog_thread.h b/content/gpu/gpu_watchdog_thread.h
index db7978b..fcd3636 100644
--- a/content/gpu/gpu_watchdog_thread.h
+++ b/content/gpu/gpu_watchdog_thread.h
@@ -88,14 +88,14 @@ class GpuWatchdogThread : public base::Thread,
// the task was posted.
base::Time suspension_timeout_;
- base::WeakPtrFactory<GpuWatchdogThread> weak_factory_;
-
bool suspended_;
#if defined(OS_CHROMEOS)
FILE* tty_file_;
#endif
+ base::WeakPtrFactory<GpuWatchdogThread> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(GpuWatchdogThread);
};