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

Unified Diff: test/mjsunit/es6/block-sloppy-function.js

Issue 2112163002: Block-scoped functions in evals are now only conditionally hoisted out. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « test/mjsunit/es6/block-eval-var-over-let.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/block-sloppy-function.js
diff --git a/test/mjsunit/es6/block-sloppy-function.js b/test/mjsunit/es6/block-sloppy-function.js
index e5f244774f673942a382c66703865ee33dfe758d..fb7236177bac2a6b16c6f94a25ec4ae606654082 100644
--- a/test/mjsunit/es6/block-sloppy-function.js
+++ b/test/mjsunit/es6/block-sloppy-function.js
@@ -538,17 +538,15 @@ let dontHoistGlobal;
assertEquals(undefined, dontHoistGlobal);
let dontHoistEval;
-// BUG(v8:) This shouldn't hoist and shouldn't throw
var throws = false;
try {
eval("{ function dontHoistEval() {} }");
} catch (e) {
throws = true;
}
-assertTrue(throws);
+assertFalse(throws);
// When the global object is frozen, silently don't hoist
-// Currently this actually throws BUG(v8:4452)
Object.freeze(this);
throws = false;
try {
@@ -558,5 +556,4 @@ try {
}
assertFalse(this.hasOwnProperty("hoistWhenFrozen"));
assertThrows(() => hoistWhenFrozen, ReferenceError);
-// Should be assertFalse BUG(v8:4452)
-assertTrue(throws);
+assertFalse(throws);
Dan Ehrenberg 2016/07/01 01:36:20 This one's funny. Because the global object is alr
« no previous file with comments | « test/mjsunit/es6/block-eval-var-over-let.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698