public object Call(Context cx, Scriptable scope, Scriptable thisObj, object[] args) { return ((NativeGenerator)thisObj).Resume(cx, scope, NativeGenerator.GENERATOR_CLOSE, new NativeGenerator.GeneratorClosedException()); } }