| 444 | } |
| 445 | |
| 446 | jsid gjs_intern_string_to_id(JSContext* cx, const char* string) { |
| 447 | JS::RootedString str(cx, JS_AtomizeAndPinString(cx, string)); |
| 448 | if (!str) |
| 449 | return JS::PropertyKey::Void(); |
| 450 | return JS::PropertyKey::fromPinnedString(str); |
| 451 | } |
| 452 | |
| 453 | std::string gjs_debug_bigint(JS::BigInt* bi) { |
| 454 | // technically this prints the value % INT64_MAX, cast into an int64_t if |
no outgoing calls