Bug 1819816 - Make devtools/shared/heapsnapshot/tests/gtest buildable outside of a unified build environment r=andi

Depends on D171422

Differential Revision: https://phabricator.services.mozilla.com/D171423
This commit is contained in:
serge-sans-paille 2023-03-02 07:44:29 +00:00
parent f760120998
commit 374078cfdf
3 changed files with 11 additions and 7 deletions

View file

@ -0,0 +1,7 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2; -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "DevTools.h"
const char16_t JS::ubi::Concrete<FakeNode>::concreteTypeName[] = u"FakeNode";

View file

@ -130,13 +130,11 @@ class Concrete<FakeNode> : public Base {
} }
}; };
const char16_t Concrete<FakeNode>::concreteTypeName[] = u"FakeNode";
} // namespace ubi } // namespace ubi
} // namespace JS } // namespace JS
void AddEdge(FakeNode& node, FakeNode& referent, inline void AddEdge(FakeNode& node, FakeNode& referent,
const char16_t* edgeName = nullptr) { const char16_t* edgeName = nullptr) {
char16_t* ownedEdgeName = nullptr; char16_t* ownedEdgeName = nullptr;
if (edgeName) { if (edgeName) {
ownedEdgeName = NS_xstrdup(edgeName); ownedEdgeName = NS_xstrdup(edgeName);
@ -207,7 +205,7 @@ class MockWriter : public CoreDumpWriter {
MOCK_METHOD1(writeMetadata, bool(uint64_t)); MOCK_METHOD1(writeMetadata, bool(uint64_t));
}; };
void ExpectWriteNode(MockWriter& writer, FakeNode& node) { inline void ExpectWriteNode(MockWriter& writer, FakeNode& node) {
EXPECT_CALL(writer, writeNode(Eq(JS::ubi::Node(&node)), _)) EXPECT_CALL(writer, writeNode(Eq(JS::ubi::Node(&node)), _))
.Times(1) .Times(1)
.WillOnce(Return(true)); .WillOnce(Return(true));

View file

@ -16,6 +16,7 @@ DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
UNIFIED_SOURCES = [ UNIFIED_SOURCES = [
"DeserializedNodeUbiNodes.cpp", "DeserializedNodeUbiNodes.cpp",
"DeserializedStackFrameUbiStackFrames.cpp", "DeserializedStackFrameUbiStackFrames.cpp",
"DevTools.cpp",
"DoesCrossCompartmentBoundaries.cpp", "DoesCrossCompartmentBoundaries.cpp",
"DoesntCrossCompartmentBoundaries.cpp", "DoesntCrossCompartmentBoundaries.cpp",
"SerializesEdgeNames.cpp", "SerializesEdgeNames.cpp",
@ -29,5 +30,3 @@ if CONFIG["CC_TYPE"] == "clang":
CXXFLAGS += ["-Wno-inconsistent-missing-override"] CXXFLAGS += ["-Wno-inconsistent-missing-override"]
FINAL_LIBRARY = "xul-gtest" FINAL_LIBRARY = "xul-gtest"
REQUIRES_UNIFIED_BUILD = True