diff options
author | Moonchild <moonchild@palemoon.org> | 2023-09-01 15:44:29 +0200 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-09-01 15:44:29 +0200 |
commit | 2d48de9998d5c4f768af051ce997777be126f8cd (patch) | |
tree | c6023db91bfadaa8e1d7c4c12d90ad63bf810454 /devtools/server | |
parent | 3b029cdfe482e5097ee09fa1998591faf9c1005b (diff) | |
parent | ee97a5dad40fb8d207b717cb2a0d487f54dd5f1d (diff) | |
download | uxp-RC_20230901.tar.gz |
Merge branch 'master' into releaseRC_20230901RB_20230904
Diffstat (limited to 'devtools/server')
-rw-r--r-- | devtools/server/actors/object.js | 6 | ||||
-rw-r--r-- | devtools/server/tests/unit/test_objectgrips-08.js | 42 |
2 files changed, 29 insertions, 19 deletions
diff --git a/devtools/server/actors/object.js b/devtools/server/actors/object.js index ab04b97048..7688e35c88 100644 --- a/devtools/server/actors/object.js +++ b/devtools/server/actors/object.js @@ -2159,6 +2159,12 @@ function createValueGrip(value, pool, makeObjectGrip) { } return value; + case "bigint": + return { + type: "BigInt", + text: value.toString(), + }; + case "undefined": return { type: "undefined" }; diff --git a/devtools/server/tests/unit/test_objectgrips-08.js b/devtools/server/tests/unit/test_objectgrips-08.js index ecaa7146db..2bd48a34c6 100644 --- a/devtools/server/tests/unit/test_objectgrips-08.js +++ b/devtools/server/tests/unit/test_objectgrips-08.js @@ -41,25 +41,15 @@ function test_object_grip() let objClient = gThreadClient.pauseGrip(args[0]); objClient.getPrototypeAndProperties(function (aResponse) { - do_check_eq(aResponse.ownProperties.a.configurable, true); - do_check_eq(aResponse.ownProperties.a.enumerable, true); - do_check_eq(aResponse.ownProperties.a.writable, true); - do_check_eq(aResponse.ownProperties.a.value.type, "Infinity"); + const {a, b, c, d, e, f, g} = aResponse.ownProperties; - do_check_eq(aResponse.ownProperties.b.configurable, true); - do_check_eq(aResponse.ownProperties.b.enumerable, true); - do_check_eq(aResponse.ownProperties.b.writable, true); - do_check_eq(aResponse.ownProperties.b.value.type, "-Infinity"); - - do_check_eq(aResponse.ownProperties.c.configurable, true); - do_check_eq(aResponse.ownProperties.c.enumerable, true); - do_check_eq(aResponse.ownProperties.c.writable, true); - do_check_eq(aResponse.ownProperties.c.value.type, "NaN"); - - do_check_eq(aResponse.ownProperties.d.configurable, true); - do_check_eq(aResponse.ownProperties.d.enumerable, true); - do_check_eq(aResponse.ownProperties.d.writable, true); - do_check_eq(aResponse.ownProperties.d.value.type, "-0"); + testPropertyType(a, "Infinity"); + testPropertyType(b, "-Infinity"); + testPropertyType(c, "NaN"); + testPropertyType(d, "-0"); + testPropertyType(e, "BigInt"); + testPropertyType(f, "BigInt"); + testPropertyType(g, "BigInt"); gThreadClient.resume(function () { gClient.close().then(gCallback); @@ -67,6 +57,20 @@ function test_object_grip() }); }); - gDebuggee.eval("stopMe({ a: Infinity, b: -Infinity, c: NaN, d: -0 })"); + gDebuggee.eval(`stopMe({ + a: Infinity, + b: -Infinity, + c: NaN, + d: -0, + e: 1n, + f: -2n, + g: 0n, + })`); } +function testPropertyType(prop, expectedType) { + do_check_eq(prop.configurable, true); + do_check_eq(prop.enumerable, true); + do_check_eq(prop.writable, true); + do_check_eq(prop.value.type, expectedType); +} |