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/js/messages.js

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 | « no previous file | src/messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/messages.js
diff --git a/src/js/messages.js b/src/js/messages.js
index d48bd5cfbbf6d5b5b8a181f0c595f148790a12fe..439043f809c5b50151c3313ed8e6b88e9e484d11 100644
--- a/src/js/messages.js
+++ b/src/js/messages.js
@@ -275,8 +275,8 @@ function GetStackTraceLine(recv, fun, pos, isGlobal) {
function CallSite(receiver, fun, pos, strict_mode) {
// For wasm frames, receiver is the wasm object and fun is the function index
// instead of an actual function.
- if (!IS_FUNCTION(fun) && !IS_NUMBER(fun)) {
- throw MakeTypeError(kCallSiteExpectsFunction, typeof fun);
+ if (!IS_FUNCTION(fun) && !%IsWasmObject(receiver)) {
+ throw MakeTypeError(kCallSiteExpectsFunction, typeof receiver, typeof fun);
}
if (IS_UNDEFINED(new.target)) {
« no previous file with comments | « no previous file | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698