OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 var sym = Symbol(); |
| 6 function asm(stdlib, ffi) { |
| 7 "use asm"; |
| 8 var get_sym = ffi.get_sym; |
| 9 function crash() { |
| 10 get_sym()|0; |
| 11 } |
| 12 return {crash: crash}; |
| 13 } |
| 14 function get_sym() { |
| 15 return sym; |
| 16 } |
| 17 try { |
| 18 asm(null, {get_sym: get_sym}).crash(); |
| 19 } catch (e) { |
| 20 if (!(e instanceof TypeError)) |
| 21 throw e; |
| 22 } |
OLD | NEW |