Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Firefox/js/src/jit-test/tests/fields/   (Firefox Browser Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 914 B image not shown  

Quelle  private-proxy-oom.js

  Sprache: JAVA
 

// Check for proxy expando OOM issues.

function assertThrowsTypeError(f) {
  assertThrowsInstanceOf(f, TypeError);
}


function testing() {
  var target = {};
  var p1 = new Proxy(target, {});
  var p2 = new Proxy(target, {});

  class A extends class {
    constructor(o) {
      return o;
    }
  }
  {
    #field = 10;
    static gf(o) {
      return o.#field;
    }
    static sf(o) {
      o.#field = 15;
    }
  }

  // Verify field handling on the proxy we install it on.
  new A(p1);
  assertEq(A.gf(p1), 10);
  A.sf(p1)
  assertEq(A.gf(p1), 15);

  // Should't be on the target
  assertThrowsTypeError(() => A.gf(target));

  // Can't set the field, doesn't exist
  assertThrowsTypeError(() => A.sf(p2));

  // Definitely can't get the field, doesn't exist.
  assertThrowsTypeError(() => A.gf(p2));

  // Still should't be on the target.
  assertThrowsTypeError(() => A.gf(target));
}

oomTest(testing);

Messung V0.5 in Prozent
C=80 H=82 G=80

¤ Dauer der Verarbeitung: 0.8 Sekunden  (vorverarbeitet am  2026-06-05) ¤

*© 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.