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

Side by Side Diff: src/wasm/wasm-result.h

Issue 2640113005: [wasm] W.validate should not throw on failure (Closed)
Patch Set: Created 3 years, 11 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 | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-result.cc » ('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_RESULT_H_ 5 #ifndef V8_WASM_RESULT_H_
6 #define V8_WASM_RESULT_H_ 6 #define V8_WASM_RESULT_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/base/compiler-specific.h" 10 #include "src/base/compiler-specific.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 CompileError("%s", str.str().c_str()); 105 CompileError("%s", str.str().c_str());
106 } 106 }
107 107
108 i::Handle<i::Object> Reify() { 108 i::Handle<i::Object> Reify() {
109 i::Handle<i::Object> result = exception_; 109 i::Handle<i::Object> result = exception_;
110 exception_ = i::Handle<i::Object>::null(); 110 exception_ = i::Handle<i::Object>::null();
111 return result; 111 return result;
112 } 112 }
113 113
114 bool error() const { return !exception_.is_null(); } 114 bool error() const { return !exception_.is_null(); }
115 bool wasm_error() { return wasm_error_; }
115 116
116 private: 117 private:
117 void Format(i::Handle<i::JSFunction> constructor, const char* fmt, va_list); 118 void Format(i::Handle<i::JSFunction> constructor, const char* fmt, va_list);
118 119
119 i::Isolate* isolate_; 120 i::Isolate* isolate_;
120 const char* context_; 121 const char* context_;
121 i::Handle<i::Object> exception_; 122 i::Handle<i::Object> exception_;
123 bool wasm_error_ = false;
titzer 2017/01/20 12:03:55 Thinking of a better name for this. Looks like it
rossberg 2017/01/20 12:17:22 Nah, it's set only for {Compile,Link,Runtime}Error
122 }; 124 };
123 } // namespace wasm 125 } // namespace wasm
124 } // namespace internal 126 } // namespace internal
125 } // namespace v8 127 } // namespace v8
126 128
127 #endif 129 #endif
OLDNEW
« no previous file with comments | « src/wasm/wasm-js.cc ('k') | src/wasm/wasm-result.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698