Index: src/runtime/runtime-internal.cc |
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc |
index 7a6c5362b0cc759884f4dc957f9eb037ab51574e..1bfa6894858cafe5eae22d5c6c2514ff9be29b89 100644 |
--- a/src/runtime/runtime-internal.cc |
+++ b/src/runtime/runtime-internal.cc |
@@ -13,6 +13,7 @@ |
#include "src/isolate-inl.h" |
#include "src/messages.h" |
#include "src/parsing/parser.h" |
+#include "src/wasm/wasm-module.h" |
namespace v8 { |
namespace internal { |
@@ -595,5 +596,14 @@ RUNTIME_FUNCTION(Runtime_OrdinaryHasInstance) { |
isolate, Object::OrdinaryHasInstance(isolate, callable, object)); |
} |
+RUNTIME_FUNCTION(Runtime_IsWasmObject) { |
+ HandleScope scope(isolate); |
+ DCHECK_EQ(1, args.length()); |
+ CONVERT_ARG_HANDLE_CHECKED(Object, object, 0); |
+ bool is_wasm_object = object->IsJSObject() && |
+ wasm::IsWasmObject(Handle<JSObject>::cast(object)); |
+ return *isolate->factory()->ToBoolean(is_wasm_object); |
+} |
+ |
} // namespace internal |
} // namespace v8 |