OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2009-2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2009-2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
50 }; | 50 }; |
51 | 51 |
52 template<typename T> struct CrossThreadTaskTraits<PassRefPtr<T> > { | 52 template<typename T> struct CrossThreadTaskTraits<PassRefPtr<T> > { |
53 typedef PassRefPtr<T> ParamType; | 53 typedef PassRefPtr<T> ParamType; |
54 }; | 54 }; |
55 | 55 |
56 template<typename T> struct CrossThreadTaskTraits<PassOwnPtr<T> > { | 56 template<typename T> struct CrossThreadTaskTraits<PassOwnPtr<T> > { |
57 typedef PassOwnPtr<T> ParamType; | 57 typedef PassOwnPtr<T> ParamType; |
58 }; | 58 }; |
59 | 59 |
60 // FIXME: Oilpan: Using a RawPtr is not safe. | |
61 // We need to move ExecutionContextTask to the heap and make this a Member. | |
62 template<typename T> struct CrossThreadTaskTraits<RawPtr<T> > { | |
63 typedef RawPtr<T> ParamType; | |
haraken
2014/05/27 15:01:44
In order to make the plugin happy, I need to add I
zerny-chromium
2014/05/28 06:03:19
You can do an ignore on the classes:
class GC_P
| |
64 }; | |
65 | |
60 template<typename P1, typename MP1> | 66 template<typename P1, typename MP1> |
61 class CrossThreadTask1 : public ExecutionContextTask { | 67 class CrossThreadTask1 : public ExecutionContextTask { |
62 public: | 68 public: |
63 typedef void (*Method)(ExecutionContext*, MP1); | 69 typedef void (*Method)(ExecutionContext*, MP1); |
64 typedef CrossThreadTask1<P1, MP1> CrossThreadTask; | 70 typedef CrossThreadTask1<P1, MP1> CrossThreadTask; |
65 typedef typename CrossThreadTaskTraits<P1>::ParamType Param1; | 71 typedef typename CrossThreadTaskTraits<P1>::ParamType Param1; |
66 | 72 |
67 static PassOwnPtr<CrossThreadTask> create(Method method, Param1 parameter1) | 73 static PassOwnPtr<CrossThreadTask> create(Method method, Param1 parameter1) |
68 { | 74 { |
69 return adoptPtr(new CrossThreadTask(method, parameter1)); | 75 return adoptPtr(new CrossThreadTask(method, parameter1)); |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
468 method, | 474 method, |
469 CrossThreadCopier<P1>::co py(parameter1), CrossThreadCopier<P2>::copy(parameter2), | 475 CrossThreadCopier<P1>::co py(parameter1), CrossThreadCopier<P2>::copy(parameter2), |
470 CrossThreadCopier<P3>::co py(parameter3), CrossThreadCopier<P4>::copy(parameter4), | 476 CrossThreadCopier<P3>::co py(parameter3), CrossThreadCopier<P4>::copy(parameter4), |
471 CrossThreadCopier<P5>::co py(parameter5), CrossThreadCopier<P6>::copy(parameter6), | 477 CrossThreadCopier<P5>::co py(parameter5), CrossThreadCopier<P6>::copy(parameter6), |
472 CrossThreadCopier<P7>::co py(parameter7), CrossThreadCopier<P8>::copy(parameter8)); | 478 CrossThreadCopier<P7>::co py(parameter7), CrossThreadCopier<P8>::copy(parameter8)); |
473 } | 479 } |
474 | 480 |
475 } // namespace WebCore | 481 } // namespace WebCore |
476 | 482 |
477 #endif // CrossThreadTask_h | 483 #endif // CrossThreadTask_h |
OLD | NEW |