Chromium Code Reviews| Index: src/frames.h |
| diff --git a/src/frames.h b/src/frames.h |
| index ccf069c8c1322dec4002ded85b47880a60064626..466c850e0a6a7cff0b991550f758f5f1b5a6995b 100644 |
| --- a/src/frames.h |
| +++ b/src/frames.h |
| @@ -414,7 +414,9 @@ class StackFrame BASE_EMBEDDED { |
| bool is_exit() const { return type() == EXIT; } |
| bool is_optimized() const { return type() == OPTIMIZED; } |
| bool is_interpreted() const { return type() == INTERPRETED; } |
| - bool is_wasm() const { return type() == WASM; } |
| + bool is_wasm() const { |
|
bradn
2016/03/28 23:46:06
Keeping the 3 sorts of wasm frames orthogonal seem
JF
2016/03/29 00:24:06
I don't mind either way, but if we keep them separ
|
| + return type() == WASM || is_wasm_to_js() || is_js_to_wasm(); |
| + } |
| bool is_wasm_to_js() const { return type() == WASM_TO_JS; } |
| bool is_js_to_wasm() const { return type() == JS_TO_WASM; } |
| bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; } |
| @@ -961,6 +963,11 @@ class WasmFrame : public StandardFrame { |
| // Determine the code for the frame. |
| Code* unchecked_code() const override; |
| + static WasmFrame* cast(StackFrame* frame) { |
| + DCHECK(frame->is_wasm()); |
|
bradn
2016/03/28 23:46:06
Why not preserve the existing categories and dchec
|
| + return static_cast<WasmFrame*>(frame); |
| + } |
| + |
| protected: |
| inline explicit WasmFrame(StackFrameIteratorBase* iterator); |