Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| OLD | NEW |