Index: src/messages.h |
diff --git a/src/messages.h b/src/messages.h |
index 25c54ff75e4f07c4751f384dbd16b00773c04b11..31aea3fc75cab57ba880e650c98bdf42638cbfe9 100644 |
--- a/src/messages.h |
+++ b/src/messages.h |
@@ -59,13 +59,16 @@ class CallSite { |
bool IsEval(); |
bool IsConstructor(); |
- bool IsValid() { return !fun_.is_null(); } |
+ bool IsJavaScript() { return !fun_.is_null(); } |
+ bool IsWasm() { return !wasm_obj_.is_null(); } |
private: |
Isolate* isolate_; |
Handle<Object> receiver_; |
Handle<JSFunction> fun_; |
- int32_t pos_; |
+ int32_t pos_ = -1; |
+ Handle<JSObject> wasm_obj_; |
+ uint32_t wasm_func_index_ = static_cast<uint32_t>(-1); |
}; |
#define MESSAGE_TEMPLATES(T) \ |
@@ -96,7 +99,7 @@ class CallSite { |
T(CalledOnNonObject, "% called on non-object") \ |
T(CalledOnNullOrUndefined, "% called on null or undefined") \ |
T(CallSiteExpectsFunction, \ |
- "CallSite expects function as second argument, got %") \ |
+ "CallSite expects function or number as second argument, got %") \ |
T(CallSiteMethod, "CallSite method % expects CallSite as receiver") \ |
T(CannotConvertToPrimitive, "Cannot convert object to primitive value") \ |
T(CannotPreventExt, "Cannot prevent extensions") \ |