fetchOverPortExecutor(resource) {
    return (resolve, reject) => {
      const listener = (event) => {
        if (typeof event.data !== "string" || !event.data.startsWith("fetchResult::")) {
          return;
        }

        const result = event.data.slice("fetchResult::".length);
        if (result.startsWith("success::")) {
          resolve(result.slice("success::".length));
        } else {
          reject(result.slice("fail::".length));
        }

        this.port.removeEventListener("message", listener);
      }
      this.port.addEventListener("message", listener);
      this.port.start();
      this.port.postMessage(`fetchRequest::${resource}`);
    }
  }
Fetch adaptor function intended as a drop-in replacement for fetchAdaptor()
(see testharness-shadowrealm-outer.js), but it does not assume fetch() is
present in the realm. Instead, it relies on setupFakeFetchOverMessagePort()
having been called on the port on the other side of this.port's channel.