[gjs: 3/5] jsapi-util-string: Placeholder debug string for BigInt
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 3/5] jsapi-util-string: Placeholder debug string for BigInt
- Date: Wed, 21 Apr 2021 04:57:27 +0000 (UTC)
commit f2d6253ba2cfba43a67e3fcaf350be02c92384d3
Author: Philip Chimento <philip chimento gmail com>
Date: Tue Apr 20 21:50:12 2021 -0700
jsapi-util-string: Placeholder debug string for BigInt
This is intended to be a placeholder for a better debug value in the
future, when we increase our required mozjs version. For now, make sure
that we don't just print "<unexpected value>".
gjs/jsapi-util-string.cpp | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/gjs/jsapi-util-string.cpp b/gjs/jsapi-util-string.cpp
index e4aa7ca9..5fc1164a 100644
--- a/gjs/jsapi-util-string.cpp
+++ b/gjs/jsapi-util-string.cpp
@@ -550,6 +550,8 @@ gjs_debug_value(JS::Value v)
out << v.toDouble();
return out.str();
}
+ if (v.isBigInt())
+ return "<BigInt>";
if (v.isString()) {
out << gjs_debug_string(v.toString());
return out.str();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]