tor-browser

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

oom-test-bug1497906.js (422B)


      1 // |jit-test| skip-if: !(hasFunction.oomTest && hasFunction.stackTest) || helperThreadCount() === 0
      2 
      3 // Check that oomTest throws an exception on worker threads.
      4 
      5 setSharedObject(0);
      6 evalInWorker(`
      7    try {
      8        oomTest(crash);
      9    } catch (e) {
     10        if (e.toString().includes("main thread")) {
     11            setSharedObject(1);
     12        }
     13    }
     14 `);
     15 
     16 while (getSharedObject() != 1) {
     17    // poor-man wait condition.
     18 }