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

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: add regression test case 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
« no previous file with comments | « src/runtime/runtime.h ('k') | src/wasm/wasm-module.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « 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