Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/for-of/   (Firefox Browser Version 153.0.1©)  Datei vom 27.6.2026 mit Größe 1 kB image not shown  

Quelle  interrupt-3.js

  Sprache: JAVA
 

// |jit-test| exitstatus: 6;

setInterruptCallback(function() {
  // Return false from the interrupt handler to stop execution.
  return false;
});

var iterator = {
  [Symbol.iterator]() {
    return this;
  },
  next() {
    return {value: null, done: false};
  },
  return() {
    // Intentionally use |crash| to cause an abrupt program termination.
    crash("iterator return");
  },
};

function emptyFunctionToCheckInterruptState() {
  // Ion doesn't the check interrupt state, so don't run this function in it.
  with ({}) ;
}

class P extends Promise {
  static resolve(v) {
    // Request an interrupt.
    interruptIf(true);

    emptyFunctionToCheckInterruptState();

    return {
      then() {
        // Intentionally use |crash| to cause an abrupt program termination.
        crash("then called");
      }
    };
  }
}

// Promise.any internally uses |js::ForOfIterator|. Ensure ForOfIterator's
// behavior for interrupt handling matches for-of loops (tested in this file's
// siblings "interrupt-1.js" and "interrupt-2.js").

Promise.any.call(P, iterator);

Messung V0.5 in Prozent
C=81 H=100 G=90

¤ Dauer der Verarbeitung: 0.22 Sekunden  (vorverarbeitet am  2026-08-25) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.