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

Method get_code

gi/gerror.cpp:124–131  ·  view source on GitHub ↗

JSNative property getter for `code`.

Source from the content-addressed store, hash-verified

122
123// JSNative property getter for `code`.
124bool ErrorBase::get_code(JSContext* cx, unsigned argc, JS::Value* vp) {
125 GJS_CHECK_WRAPPER_PRIV(cx, argc, vp, args, obj, ErrorBase, priv);
126 if (!priv->check_is_instance(cx, "get a field"))
127 return false;
128
129 args.rval().setInt32(priv->to_instance()->code());
130 return true;
131}
132
133// JSNative implementation of `toString()`.
134bool ErrorBase::to_string(JSContext* cx, unsigned argc, JS::Value* vp) {

Callers

nothing calls this directly

Calls 3

check_is_instanceMethod · 0.80
codeMethod · 0.80
to_instanceMethod · 0.80

Tested by

no test coverage detected