| 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/private/ppb_x509_certificate_private_shared.h" | 5 #include "ppapi/shared_impl/private/ppb_x509_certificate_private_shared.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "ppapi/shared_impl/ppapi_globals.h" | 10 #include "ppapi/shared_impl/ppapi_globals.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 const char* buffer = value->GetBuffer(); | 68 const char* buffer = value->GetBuffer(); |
| 69 PP_Var array_buffer = | 69 PP_Var array_buffer = |
| 70 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(size, | 70 PpapiGlobals::Get()->GetVarTracker()->MakeArrayBufferPPVar(size, |
| 71 buffer); | 71 buffer); |
| 72 return array_buffer; | 72 return array_buffer; |
| 73 } | 73 } |
| 74 case base::Value::Type::DICTIONARY: | 74 case base::Value::Type::DICTIONARY: |
| 75 case base::Value::Type::LIST: | 75 case base::Value::Type::LIST: |
| 76 // Not handled. | 76 // Not handled. |
| 77 break; | 77 break; |
| 78 case base::Value::Type::DELETED: |
| 79 // TODO(crbug.com/697817): This means |value| is used after free. |
| 80 CHECK(false); |
| 81 break; |
| 78 } | 82 } |
| 79 | 83 |
| 80 // Should not reach here. | 84 // Should not reach here. |
| 81 CHECK(false); | 85 CHECK(false); |
| 82 return PP_MakeUndefined(); | 86 return PP_MakeUndefined(); |
| 83 } | 87 } |
| 84 | 88 |
| 85 //------------------------------------------------------------------------------ | 89 //------------------------------------------------------------------------------ |
| 86 | 90 |
| 87 PPB_X509Certificate_Private_Shared::PPB_X509Certificate_Private_Shared( | 91 PPB_X509Certificate_Private_Shared::PPB_X509Certificate_Private_Shared( |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 const std::vector<char>& der, | 141 const std::vector<char>& der, |
| 138 PPB_X509Certificate_Fields* result) { | 142 PPB_X509Certificate_Fields* result) { |
| 139 // A concrete PPB_X509Certificate_Private_Shared should only ever be | 143 // A concrete PPB_X509Certificate_Private_Shared should only ever be |
| 140 // constructed by passing in PPB_X509Certificate_Fields, in which case it is | 144 // constructed by passing in PPB_X509Certificate_Fields, in which case it is |
| 141 // already initialized. | 145 // already initialized. |
| 142 CHECK(false); | 146 CHECK(false); |
| 143 return false; | 147 return false; |
| 144 } | 148 } |
| 145 | 149 |
| 146 } // namespace ppapi | 150 } // namespace ppapi |
| OLD | NEW |