summaryrefslogtreecommitdiff
path: root/deps/v8/src/api-arguments-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/api-arguments-inl.h')
-rw-r--r--deps/v8/src/api-arguments-inl.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/deps/v8/src/api-arguments-inl.h b/deps/v8/src/api-arguments-inl.h
index 1e2e9ed807..7f83708b96 100644
--- a/deps/v8/src/api-arguments-inl.h
+++ b/deps/v8/src/api-arguments-inl.h
@@ -17,6 +17,17 @@
namespace v8 {
namespace internal {
+void Object::VerifyApiCallResultType() {
+#if DEBUG
+ if (IsSmi()) return;
+ DCHECK(IsHeapObject());
+ if (!(IsString() || IsSymbol() || IsJSReceiver() || IsHeapNumber() ||
+ IsBigInt() || IsUndefined() || IsTrue() || IsFalse() || IsNull())) {
+ FATAL("API call returned invalid object");
+ }
+#endif // DEBUG
+}
+
CustomArgumentsBase::CustomArgumentsBase(Isolate* isolate)
: Relocatable(isolate) {}