MCPcopy Create free account
hub / github.com/GNOME/gjs / quit

Function quit

gjs/debugger.cpp:41–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39#include "util/console.h"
40
41GJS_JSAPI_RETURN_CONVENTION
42static bool quit(JSContext* cx, unsigned argc, JS::Value* vp) {
43 JS::CallArgs args = JS::CallArgsFromVp(argc, vp);
44
45 int32_t exitcode;
46 if (!gjs_parse_call_args(cx, "quit", args, "i", "exitcode", &exitcode))
47 return false;
48
49 GjsContextPrivate* gjs = GjsContextPrivate::from_cx(cx);
50 gjs->exit(exitcode);
51 JS::ReportUncatchableException(cx);
52 return false;
53}
54
55GJS_JSAPI_RETURN_CONVENTION
56static bool do_readline(JSContext* cx, unsigned argc, JS::Value* vp) {

Callers

nothing calls this directly

Calls 2

gjs_parse_call_argsFunction · 0.85
exitMethod · 0.45

Tested by

no test coverage detected