mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Issue #1240 - Part 1 - Define a new BigInt primitive type. Based on https://bugzilla.mozilla.org/show_bug.cgi?id=1366287 Part 1.0. However leaving out the --enable-bigint changes.
This commit is contained in:
parent
748cac6e80
commit
f041afc61d
43 changed files with 411 additions and 20 deletions
|
|
@ -18,6 +18,7 @@
|
|||
#include "vm/GlobalObject.h"
|
||||
#include "vm/ProxyObject.h"
|
||||
#include "vm/StringBuffer.h"
|
||||
#include "vm/BigIntType.h"
|
||||
|
||||
#include "vm/BooleanObject-inl.h"
|
||||
|
||||
|
|
@ -170,6 +171,8 @@ js::ToBooleanSlow(HandleValue v)
|
|||
{
|
||||
if (v.isString())
|
||||
return v.toString()->length() != 0;
|
||||
if (v.isBigInt())
|
||||
return v.toBigInt()->toBoolean();
|
||||
|
||||
MOZ_ASSERT(v.isObject());
|
||||
return !EmulatesUndefined(&v.toObject());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue