OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/callback.h" | 5 #include "base/callback.h" |
6 #include "base/lazy_instance.h" | 6 #include "base/lazy_instance.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "webkit/child/worker_task_runner.h" | 10 #include "webkit/child/worker_task_runner.h" |
11 | 11 |
12 using WebKit::WebWorkerRunLoop; | 12 using blink::WebWorkerRunLoop; |
13 | 13 |
14 namespace { | 14 namespace { |
15 | 15 |
16 class RunClosureTask : public WebWorkerRunLoop::Task { | 16 class RunClosureTask : public WebWorkerRunLoop::Task { |
17 public: | 17 public: |
18 RunClosureTask(const base::Closure& task) : task_(task) {} | 18 RunClosureTask(const base::Closure& task) : task_(task) {} |
19 virtual ~RunClosureTask() {} | 19 virtual ~RunClosureTask() {} |
20 virtual void Run() { | 20 virtual void Run() { |
21 task_.Run(); | 21 task_.Run(); |
22 } | 22 } |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 { | 102 { |
103 base::AutoLock locker(loop_map_lock_); | 103 base::AutoLock locker(loop_map_lock_); |
104 DCHECK(loop_map_[CurrentWorkerId()] == loop); | 104 DCHECK(loop_map_[CurrentWorkerId()] == loop); |
105 loop_map_.erase(CurrentWorkerId()); | 105 loop_map_.erase(CurrentWorkerId()); |
106 } | 106 } |
107 delete current_tls_.Get(); | 107 delete current_tls_.Get(); |
108 current_tls_.Set(NULL); | 108 current_tls_.Set(NULL); |
109 } | 109 } |
110 | 110 |
111 } // namespace webkit_glue | 111 } // namespace webkit_glue |
OLD | NEW |