Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 : * vim: set ts=8 sts=4 et sw=4 tw=99:
3 : * This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #include "js/Value.h"
8 :
9 : static const JS::Value JSVAL_NULL = JS::Value::fromTagAndPayload(JSVAL_TAG_NULL, 0);
10 : static const JS::Value JSVAL_FALSE = JS::Value::fromTagAndPayload(JSVAL_TAG_BOOLEAN, false);
11 : static const JS::Value JSVAL_TRUE = JS::Value::fromTagAndPayload(JSVAL_TAG_BOOLEAN, true);
12 : static const JS::Value JSVAL_VOID = JS::Value::fromTagAndPayload(JSVAL_TAG_UNDEFINED, 0);
13 :
14 : namespace JS {
15 :
16 0 : const HandleValue NullHandleValue = HandleValue::fromMarkedLocation(&JSVAL_NULL);
17 : const HandleValue UndefinedHandleValue = HandleValue::fromMarkedLocation(&JSVAL_VOID);
18 : const HandleValue TrueHandleValue = HandleValue::fromMarkedLocation(&JSVAL_TRUE);
19 : const HandleValue FalseHandleValue = HandleValue::fromMarkedLocation(&JSVAL_FALSE);
20 :
21 : } // namespace JS
|