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

Side by Side Diff: src/wasm/decoder.h

Issue 1533593004: Fix several wasm warnings an a use after free. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 5 years 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 | « src/wasm/ast-decoder.cc ('k') | src/wasm/encoder.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project 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 #ifndef V8_WASM_DECODER_H_ 5 #ifndef V8_WASM_DECODER_H_
6 #define V8_WASM_DECODER_H_ 6 #define V8_WASM_DECODER_H_
7 7
8 #include "src/base/smart-pointers.h" 8 #include "src/base/smart-pointers.h"
9 #include "src/flags.h" 9 #include "src/flags.h"
10 #include "src/signature.h" 10 #include "src/signature.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 Result<T> result; 191 Result<T> result;
192 if (error_pc_) { 192 if (error_pc_) {
193 result.error_code = kError; 193 result.error_code = kError;
194 result.start = start_; 194 result.start = start_;
195 result.error_pc = error_pc_; 195 result.error_pc = error_pc_;
196 result.error_pt = error_pt_; 196 result.error_pt = error_pt_;
197 result.error_msg = error_msg_; 197 result.error_msg = error_msg_;
198 error_msg_.Reset(nullptr); 198 error_msg_.Reset(nullptr);
199 } else { 199 } else {
200 result.error_code = kSuccess; 200 result.error_code = kSuccess;
201 result.val = val;
202 } 201 }
202 result.val = val;
203 return result; 203 return result;
204 } 204 }
205 205
206 // Resets the boundaries of this decoder. 206 // Resets the boundaries of this decoder.
207 void Reset(const byte* start, const byte* end) { 207 void Reset(const byte* start, const byte* end) {
208 start_ = start; 208 start_ = start;
209 pc_ = start; 209 pc_ = start;
210 limit_ = end; 210 limit_ = end;
211 error_pc_ = nullptr; 211 error_pc_ = nullptr;
212 error_pt_ = nullptr; 212 error_pt_ = nullptr;
(...skipping 11 matching lines...) Expand all
224 const byte* error_pt_; 224 const byte* error_pt_;
225 base::SmartArrayPointer<char> error_msg_; 225 base::SmartArrayPointer<char> error_msg_;
226 }; 226 };
227 227
228 #undef TRACE 228 #undef TRACE
229 } // namespace wasm 229 } // namespace wasm
230 } // namespace internal 230 } // namespace internal
231 } // namespace v8 231 } // namespace v8
232 232
233 #endif // V8_WASM_DECODER_H_ 233 #endif // V8_WASM_DECODER_H_
OLDNEW
« no previous file with comments | « src/wasm/ast-decoder.cc ('k') | src/wasm/encoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698