| 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..eb654587b3c8ac7f72ae74fa97d4303459ec89a4 100644
|
| --- a/test/mjsunit/es6/block-sloppy-function.js
|
| +++ b/test/mjsunit/es6/block-sloppy-function.js
|
| @@ -538,25 +538,26 @@ 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 {
|
| - eval('{ function hoistWhenFrozen() {} }');
|
| -} catch (e) {
|
| - throws = true;
|
| +{
|
| + let throws = false;
|
| + try {
|
| + eval('{ function hoistWhenFrozen() {} }');
|
| + } catch (e) {
|
| + throws = true;
|
| + }
|
| + assertFalse(this.hasOwnProperty("hoistWhenFrozen"));
|
| + assertThrows(() => hoistWhenFrozen, ReferenceError);
|
| + // Should be assertFalse BUG(v8:4452)
|
| + assertTrue(throws);
|
| }
|
| -assertFalse(this.hasOwnProperty("hoistWhenFrozen"));
|
| -assertThrows(() => hoistWhenFrozen, ReferenceError);
|
| -// Should be assertFalse BUG(v8:4452)
|
| -assertTrue(throws);
|
|
|