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

Quellcode-Bibliothek parse-with-source-ccw.js   Sprache: JAVA

 

// |reftest| skip-if(!JSON.hasOwnProperty('isRawJSON')||!xulRuntime.shell)

(function checkCrossCompartmentWrappers() {
    var gbl = newGlobal({newCompartment: true});

    // the created context object should be wrapped in this compartment
    gbl.eval("context = JSON.parse('4.0', (k,v,context) => context);");
    assertEq(isCCW(gbl.context), true);
    // an object created in the reviver function should be wrapped in this compartment
    gbl.eval("sourceV = JSON.parse('4.0', (k,v,context) => { return {}; });");
    assertEq(isCCW(gbl.sourceV), true);

    // objects created by a reviver in this compartment should be wrapped in
    // the other compartment
    gbl.rev = (k,v,c) => { return {v}};
    gbl.eval("v2 = JSON.parse('4.0', rev);");
    assertEq(gbl.eval("isCCW(v2)"), true);

    gbl.eval("objCCW = {};");
    assertEq(JSON.isRawJSON(gbl.objCCW), false, "isRawJSON() should accept CCW arguments");
    rawJSONCCW = gbl.eval("JSON.rawJSON(455);");
    assertEq(JSON.isRawJSON(rawJSONCCW), true, "isRawJSON() should return true for wrapped rawJSON objects");

    assertEq(rawJSONCCW.rawJSON, "455", "rawJSON object enumerable property should be visible through CCW");

    objWithCCW = { ccw: rawJSONCCW, raw: JSON.rawJSON(true) };
    assertEq(JSON.stringify(objWithCCW), '{"ccw":455,"raw":true}');
    assertEq(isCCW(rawJSONCCW), true);
})();

if (typeof reportCompare == 'function')
    reportCompare(0, 0);

Messung V0.5 in Prozent
C=85 H=100 G=92

¤ 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.0.21Bemerkung:  (vorverarbeitet am  2026-10-11) ¤

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