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

Side by Side Diff: base/task.h

Issue 7624052: Cleanup code used to diagnose and fix bug 81449. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/process_win.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 #ifndef BASE_TASK_H_ 5 #ifndef BASE_TASK_H_
6 #define BASE_TASK_H_ 6 #define BASE_TASK_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/base_export.h" 9 #include "base/base_export.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 COMPILE_ASSERT( 455 COMPILE_ASSERT(
456 (base::internal::ParamsUseScopedRefptrCorrectly<Params>::value), 456 (base::internal::ParamsUseScopedRefptrCorrectly<Params>::value),
457 badrunnablefunctionparams); 457 badrunnablefunctionparams);
458 } 458 }
459 459
460 ~RunnableFunction() { 460 ~RunnableFunction() {
461 function_ = reinterpret_cast<Function>(base::kDeadTask); 461 function_ = reinterpret_cast<Function>(base::kDeadTask);
462 } 462 }
463 463
464 virtual void Run() { 464 virtual void Run() {
465 // TODO(apatrick): Remove this ASAP. This ensures that the function pointer
466 // is available in minidumps for the purpose of diagnosing
467 // http://crbug.com/81449.
468 Function function = function_;
469 base::debug::Alias(&function);
470 Params params = params_;
471 base::debug::Alias(&params);
472
473 if (function_) 465 if (function_)
474 DispatchToFunction(function_, params_); 466 DispatchToFunction(function_, params_);
475 } 467 }
476 468
477 private: 469 private:
478 Function function_; 470 Function function_;
479 Params params_; 471 Params params_;
480 }; 472 };
481 473
482 template <class Function> 474 template <class Function>
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
598 Task* task_; 590 Task* task_;
599 bool* should_leak_task_; 591 bool* should_leak_task_;
600 static bool kTaskLeakingDefault; 592 static bool kTaskLeakingDefault;
601 }; 593 };
602 594
603 } // namespace subtle 595 } // namespace subtle
604 596
605 } // namespace base 597 } // namespace base
606 598
607 #endif // BASE_TASK_H_ 599 #endif // BASE_TASK_H_
OLDNEW
« no previous file with comments | « base/process_win.cc ('k') | base/threading/platform_thread_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698