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

Side by Side Diff: ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc

Issue 2750533003: Temporarily CHECK use after free in Value (Closed)
Patch Set: Fix more Created 3 years, 9 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
« no previous file with comments | « mojo/common/values_struct_traits.h ('k') | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « mojo/common/values_struct_traits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698