Commit 402ae42 1 parent 2d4dbf6 commit 402ae42 Copy full SHA for 402ae42
File tree 4 files changed +37
-18
lines changed
4 files changed +37
-18
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ for header in (
13
13
"SweepingAPI.h",
14
14
"TraceKind.h",
15
15
"TracingAPI.h",
16
+ "WeakMap.h",
16
17
"WeakMapPtr.h",
17
18
"GCHashTable.h",
18
19
"GCPolicyAPI.h",
Original file line number Diff line number Diff line change
1
+ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
+ * vim: set ts=8 sts=2 et sw=2 tw=80:
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
+ /*
8
+ * Weak Maps.
9
+ */
10
+
11
+ #ifndef js_WeakMap_h
12
+ #define js_WeakMap_h
13
+
14
+ #include " jspubtd.h"
15
+
16
+ namespace JS {
17
+
18
+ extern JS_PUBLIC_API JSObject* NewWeakMapObject (JSContext* cx);
19
+
20
+ extern JS_PUBLIC_API bool IsWeakMapObject (JSObject* obj);
21
+
22
+ extern JS_PUBLIC_API bool GetWeakMapEntry (JSContext* cx,
23
+ JS::HandleObject mapObj,
24
+ JS::HandleObject key,
25
+ JS::MutableHandleValue val);
26
+
27
+ extern JS_PUBLIC_API bool SetWeakMapEntry (JSContext* cx,
28
+ JS::HandleObject mapObj,
29
+ JS::HandleObject key,
30
+ JS::HandleValue val);
31
+
32
+ } // namespace JS
33
+
34
+ #endif // js_WeakMap_h
Original file line number Diff line number Diff line change 53
53
#include " js/Value.h"
54
54
#include " js/ValueArray.h"
55
55
#include " js/Vector.h"
56
+ #include " js/WeakMap.h"
56
57
57
58
/* ***********************************************************************/
58
59
@@ -2054,24 +2055,6 @@ extern JS_PUBLIC_API bool CreateError(
2054
2055
2055
2056
/* ***********************************************************************/
2056
2057
2057
- /*
2058
- * Weak Maps.
2059
- */
2060
-
2061
- extern JS_PUBLIC_API JSObject* NewWeakMapObject (JSContext* cx);
2062
-
2063
- extern JS_PUBLIC_API bool IsWeakMapObject (JSObject* obj);
2064
-
2065
- extern JS_PUBLIC_API bool GetWeakMapEntry (JSContext* cx,
2066
- JS::HandleObject mapObj,
2067
- JS::HandleObject key,
2068
- JS::MutableHandleValue val);
2069
-
2070
- extern JS_PUBLIC_API bool SetWeakMapEntry (JSContext* cx,
2071
- JS::HandleObject mapObj,
2072
- JS::HandleObject key,
2073
- JS::HandleValue val);
2074
-
2075
2058
/*
2076
2059
* Map
2077
2060
*/
Original file line number Diff line number Diff line change @@ -215,6 +215,7 @@ EXPORTS.js += [
215
215
"../public/Warnings.h" ,
216
216
"../public/WasmFeatures.h" ,
217
217
"../public/WasmModule.h" ,
218
+ "../public/WeakMap.h" ,
218
219
"../public/WeakMapPtr.h" ,
219
220
"../public/Wrapper.h" ,
220
221
]
You can’t perform that action at this time.
0 commit comments