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 "ppapi/shared_impl/scoped_pp_var.h" | 5 #include "ppapi/shared_impl/scoped_pp_var.h" |
6 | 6 |
| 7 #include <stdint.h> |
| 8 |
7 #include "ppapi/c/dev/ppb_memory_dev.h" | 9 #include "ppapi/c/dev/ppb_memory_dev.h" |
8 #include "ppapi/shared_impl/ppapi_globals.h" | 10 #include "ppapi/shared_impl/ppapi_globals.h" |
9 #include "ppapi/shared_impl/var_tracker.h" | 11 #include "ppapi/shared_impl/var_tracker.h" |
10 #include "ppapi/thunk/thunk.h" | 12 #include "ppapi/thunk/thunk.h" |
11 | 13 |
12 namespace ppapi { | 14 namespace ppapi { |
13 | 15 |
14 namespace { | 16 namespace { |
15 | 17 |
16 void CallAddRef(const PP_Var& v) { | 18 void CallAddRef(const PP_Var& v) { |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 } | 83 } |
82 | 84 |
83 void ScopedPPVarArray::Set(size_t index, const ScopedPPVar& var) { | 85 void ScopedPPVarArray::Set(size_t index, const ScopedPPVar& var) { |
84 DCHECK(index < size_); | 86 DCHECK(index < size_); |
85 CallAddRef(var.get()); | 87 CallAddRef(var.get()); |
86 CallRelease(array_[index]); | 88 CallRelease(array_[index]); |
87 array_[index] = var.get(); | 89 array_[index] = var.get(); |
88 } | 90 } |
89 | 91 |
90 } // namespace ppapi | 92 } // namespace ppapi |
OLD | NEW |