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

Unified Diff: test/cctest/test-api.cc

Issue 1575973006: [builtins] Sanitize receiver patching for API functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. MIPS fixes. Created 4 years, 11 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/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index 839893e4a654aa3d241c79f44e72aaa23d86eec0..deb8074c8c523e92fae209f3de63b46beddccef4 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -22172,6 +22172,12 @@ TEST(EmptyApiCallback) {
result = CompileRun("x(1,2,3)");
CHECK(v8::Utils::OpenHandle(*result)->IsJSGlobalProxy());
+ result = CompileRun("x.call(undefined)");
+ CHECK(v8::Utils::OpenHandle(*result)->IsJSGlobalProxy());
+
+ result = CompileRun("x.call(null)");
+ CHECK(v8::Utils::OpenHandle(*result)->IsJSGlobalProxy());
+
result = CompileRun("7 + x.call(3) + 11");
CHECK(result->IsInt32());
CHECK_EQ(21, result->Int32Value(context.local()).FromJust());
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698