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

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

Issue 2219303002: [ic] Don't share LoadGlobalIC slots inside typeof and outside typeof. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/ast/ast-numbering.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-interceptors.cc
diff --git a/test/cctest/test-api-interceptors.cc b/test/cctest/test-api-interceptors.cc
index 3e2d8dc5be77cb03c5d3335adc54a503aa25dba3..1636e4bdce5d87d1ca9e8af47e78b1991d224f5c 100644
--- a/test/cctest/test-api-interceptors.cc
+++ b/test/cctest/test-api-interceptors.cc
@@ -873,7 +873,21 @@ THREADED_TEST(InterceptorLoadGlobalICGlobalWithInterceptor) {
v8::Local<Value> value = CompileRun(
"var f = function() { "
" try {"
- " x;"
+ " x1;"
+ " } catch(e) {"
+ " }"
+ " return typeof x1 === 'undefined';"
+ "};"
+ "for (var i = 0; i < 10; i++) {"
+ " f();"
+ "};"
+ "f();");
+ CHECK_EQ(true, value->BooleanValue(context.local()).FromJust());
+
+ value = CompileRun(
+ "var f = function() { "
+ " try {"
+ " x2;"
" return false;"
" } catch(e) {"
" return true;"
@@ -888,7 +902,7 @@ THREADED_TEST(InterceptorLoadGlobalICGlobalWithInterceptor) {
value = CompileRun(
"var f = function() { "
" try {"
- " typeof(x);"
+ " typeof(x3);"
" return true;"
" } catch(e) {"
" return false;"
« no previous file with comments | « src/ast/ast-numbering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698