Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Unified Diff: src/runtime/runtime-internal.cc

Issue 2010493002: Check CallSite arguments more rigorously (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove unneeded cast Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/runtime/runtime-internal.cc
diff --git a/src/runtime/runtime-internal.cc b/src/runtime/runtime-internal.cc
index f805fdb74f346737254339dbf2150c87d21417f7..0ab91e1ab5338c4fab37ae77f9ed52488aa0db7f 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 {
@@ -603,5 +604,14 @@ RUNTIME_FUNCTION(Runtime_OrdinaryHasInstance) {
return *result;
}
+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
« src/messages.cc ('K') | « src/runtime/runtime.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698