tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

select-any.js (658B)


      1 // Bug 1280921
      2 
      3 var m1 = wasmEvalText(
      4 `(module
      5  (type $type0 (func))
      6  (func $func0
      7   (select
      8     (unreachable)
      9     (return (nop))
     10     (loop (result i32) (i32.const 1))
     11   )
     12   drop
     13  )
     14  (export "" (func 0)))`).exports[""];
     15 
     16 try {
     17    m1();
     18 } catch (e) {
     19    if (!(e instanceof Error && e.message.match(/unreachable executed/)))
     20 throw e;
     21 }
     22 
     23 var m2 = wasmEvalText(
     24 `(module
     25  (type $type0 (func))
     26  (func $func0
     27   (select
     28    (i32.const 26)
     29    (unreachable)
     30    (i32.const 3)
     31   )
     32   drop
     33  )
     34  (export "" (func 0)))`).exports[""];
     35 
     36 try {
     37    m2();
     38 } catch (e) {
     39    if (!(e instanceof Error && e.message.match(/unreachable executed/)))
     40 throw e;
     41 }