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/. */
7 /* SpiderMonkey buildId-related functionality. */
9 #include "js/BuildId.h" // JS::BuildIdCharVector, JS::BuildIdOp, JS::GetOptimizedEncodingBuildId, JS::SetProcessBuildIdOp
11 #include "mozilla/Atomics.h" // mozilla::Atomic
13 #include "jstypes.h" // JS_PUBLIC_API
15 #include "vm/Runtime.h" // js::GetBuildId
16 #include "wasm/WasmModule.h" // js::wasm::GetOptimizedEncodingBuildId
18 mozilla::Atomic
<JS::BuildIdOp
> js::GetBuildId
;
20 JS_PUBLIC_API
void JS::SetProcessBuildIdOp(JS::BuildIdOp buildIdOp
) {
21 js::GetBuildId
= buildIdOp
;
24 JS_PUBLIC_API
bool JS::GetOptimizedEncodingBuildId(
25 JS::BuildIdCharVector
* buildId
) {
26 return js::wasm::GetOptimizedEncodingBuildId(buildId
);