 Chromium Code Reviews
 Chromium Code Reviews Issue 1059273004:
  [strong] Implement static restrictions on direct eval  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 1059273004:
  [strong] Implement static restrictions on direct eval  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| Index: test/mjsunit/strong/classes.js | 
| diff --git a/test/mjsunit/strong/classes.js b/test/mjsunit/strong/classes.js | 
| index e33742af3fbd6373f68ac69b073e5b47a15c72d4..26c4fd5256b11b6ff577384fc0f504787ffdaa5a 100644 | 
| --- a/test/mjsunit/strong/classes.js | 
| +++ b/test/mjsunit/strong/classes.js | 
| @@ -9,18 +9,21 @@ | 
| class C {} | 
| +let ind_eval = eval; | 
| 
rossberg
2015/04/13 16:32:26
Nit: indirect_eval
 | 
| + | 
| function assertTypeError(script) { assertThrows(script, TypeError) } | 
| function assertSyntaxError(script) { assertThrows(script, SyntaxError) } | 
| function assertReferenceError(script) { assertThrows(script, ReferenceError) } | 
| (function ImmutableClassBindings() { | 
| class D {} | 
| - assertTypeError(function(){ eval("C = 0") }); | 
| - assertTypeError(function(){ eval("D = 0") }); | 
| + assertTypeError(function(){ ind_eval("C = 0") }); | 
| assertEquals('function', typeof C); | 
| assertEquals('function', typeof D); | 
| })(); | 
| +assertTypeError("'use strong'; (function f() {class E {}; E = 0})()"); | 
| 
rossberg
2015/04/13 16:32:26
Nit: move that inside the test function
 | 
| + | 
| function constructor(body) { | 
| return "'use strong'; " + | 
| "(class extends Object { constructor() { " + body + " } })"; |