Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  test_breakpoint-25.js

  Sprache: JAVA
 

/* Any copyright is dedicated to the Public Domain.
   http://creativecommons.org/publicdomain/zero/1.0/ */


"use strict";

/**
 * Ensure that the debugger resume page execution when the connection drops
 * and when the target is detached.
 */


add_task(
  threadFrontTest(({ threadFront, debuggee, targetFront }) => {
    return new Promise(resolve => {
      (async () => {
        await executeOnNextTickAndWaitForPause(evalCode, threadFront);

        ok(true"The page is paused");
        ok(!debuggee.foo, "foo is still false after we hit the breakpoint");

        await targetFront.detach();

        // Closing the connection will force the thread actor to resume page
        // execution
        ok(debuggee.foo, "foo is true after target's detach request");

        resolve();
      })();

      function evalCode() {
        /* eslint-disable */
        Cu.evalInSandbox("var foo = false;\n", debuggee);
        /* eslint-enable */
        ok(!debuggee.foo, "foo is false at startup");

        /* eslint-disable */
        Cu.evalInSandbox("debugger;\n" + "foo = true;\n", debuggee);
        /* eslint-enable */
      }
    });
  })
);

add_task(
  threadFrontTest(({ threadFront, client, debuggee }) => {
    return new Promise(resolve => {
      (async () => {
        await executeOnNextTickAndWaitForPause(evalCode, threadFront);

        ok(true"The page is paused");
        ok(!debuggee.foo, "foo is still false after we hit the breakpoint");

        await client.close();

        // `close` will force the destruction of the thread actor, which,
        // will resume the page execution. But all of that seems to be
        // synchronous and we have to spin the event loop in order to ensure
        // having the content javascript to execute the resumed code.
        await new Promise(executeSoon);

        // Closing the connection will force the thread actor to resume page
        // execution
        ok(debuggee.foo, "foo is true after client close");
        executeSoon(resolve);
        dump("resolved\n");
      })();

      function evalCode() {
        /* eslint-disable */
        Cu.evalInSandbox("var foo = false;\n", debuggee);
        /* eslint-enable */
        ok(!debuggee.foo, "foo is false at startup");

        /* eslint-disable */
        Cu.evalInSandbox("debugger;\n" + "foo = true;\n", debuggee);
        /* eslint-enable */
      }
    });
  })
);

Messung V0.5 in Prozent
C=93 H=98 G=95

¤ Dauer der Verarbeitung: 0.9 Sekunden  (vorverarbeitet am  2026-06-08) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik