docs: public Object callFunctionWithContinuations(Callable function,
              Scriptable scope, Object[] args)
          throws ContinuationPending
      {
          if (!(function instanceof InterpretedFunction)) {
              // Can only be applied to scripts
              throw new IllegalArgumentException("Function argument was not" +
                      " created by interpreted mode ");
          }
          if (ScriptRuntime.hasTopCall(this)) {
              throw new IllegalStateException("Cannot have any pending top " +
                      "calls when executing a script with continuations");
          }
          // Annotate so we can check later to ensure no java code in
          // intervening frames
          isContinuationsTopCall = true;
          return ScriptRuntime.doTopCall(function, this, scope, scope, args, isTopLevelStrict);
      }