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

Side by Side Diff: base/tuple.h

Issue 6323003: Revert "Adding CHECKs to troubleshoot the crash issue ..." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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 | « no previous file | chrome/browser/renderer_host/browser_render_process_host.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // A Tuple is a generic templatized container, similar in concept to std::pair. 5 // A Tuple is a generic templatized container, similar in concept to std::pair.
6 // There are classes Tuple0 to Tuple6, cooresponding to the number of elements 6 // There are classes Tuple0 to Tuple6, cooresponding to the number of elements
7 // it contains. The convenient MakeTuple() function takes 0 to 6 arguments, 7 // it contains. The convenient MakeTuple() function takes 0 to 6 arguments,
8 // and will construct and return the appropriate Tuple object. The functions 8 // and will construct and return the appropriate Tuple object. The functions
9 // DispatchToMethod and DispatchToFunction take a function pointer or instance 9 // DispatchToMethod and DispatchToFunction take a function pointer or instance
10 // and method pointer, and unpack a tuple into arguments to the call. 10 // and method pointer, and unpack a tuple into arguments to the call.
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 (obj->*method)(); 541 (obj->*method)();
542 } 542 }
543 543
544 template <class ObjT, class Method, class A> 544 template <class ObjT, class Method, class A>
545 inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) { 545 inline void DispatchToMethod(ObjT* obj, Method method, const A& arg) {
546 (obj->*method)(arg); 546 (obj->*method)(arg);
547 } 547 }
548 548
549 template <class ObjT, class Method, class A> 549 template <class ObjT, class Method, class A>
550 inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) { 550 inline void DispatchToMethod(ObjT* obj, Method method, const Tuple1<A>& arg) {
551
552 #if defined(OS_CHROMEOS)
553 // To troubleshoot crosbug.com/7327.
554 CHECK(obj);
555 CHECK(&arg);
556 CHECK(method);
557 #endif
558 (obj->*method)(arg.a); 551 (obj->*method)(arg.a);
559 } 552 }
560 553
561 template<class ObjT, class Method, class A, class B> 554 template<class ObjT, class Method, class A, class B>
562 inline void DispatchToMethod(ObjT* obj, 555 inline void DispatchToMethod(ObjT* obj,
563 Method method, 556 Method method,
564 const Tuple2<A, B>& arg) { 557 const Tuple2<A, B>& arg) {
565 (obj->*method)(arg.a, arg.b); 558 (obj->*method)(arg.a, arg.b);
566 } 559 }
567 560
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 class InA, class InB, class InC, class InD, class InE, class InF, 1040 class InA, class InB, class InC, class InD, class InE, class InF,
1048 class OutA, class OutB, class OutC, class OutD, class OutE> 1041 class OutA, class OutB, class OutC, class OutD, class OutE>
1049 inline void DispatchToMethod(ObjT* obj, Method method, 1042 inline void DispatchToMethod(ObjT* obj, Method method,
1050 const Tuple6<InA, InB, InC, InD, InE, InF>& in, 1043 const Tuple6<InA, InB, InC, InD, InE, InF>& in,
1051 Tuple5<OutA, OutB, OutC, OutD, OutE>* out) { 1044 Tuple5<OutA, OutB, OutC, OutD, OutE>* out) {
1052 (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f, 1045 (obj->*method)(in.a, in.b, in.c, in.d, in.e, in.f,
1053 &out->a, &out->b, &out->c, &out->d, &out->e); 1046 &out->a, &out->b, &out->c, &out->d, &out->e);
1054 } 1047 }
1055 1048
1056 #endif // BASE_TUPLE_H__ 1049 #endif // BASE_TUPLE_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/browser_render_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698