Bug 1877541 - WebGL about:support prints per-context inProcess/outOfProcess bool status. r=gfx-reviewers,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D200065
This commit is contained in:
@@ -2405,12 +2405,15 @@ void ClientWebGLContext::GetParameter(JSContext* cx, GLenum pname,
|
|||||||
if (asString) {
|
if (asString) {
|
||||||
const auto maybe = GetString(pname);
|
const auto maybe = GetString(pname);
|
||||||
if (maybe) {
|
if (maybe) {
|
||||||
auto str = *maybe;
|
auto str = std::string{};
|
||||||
if (pname == dom::MOZ_debug_Binding::WSI_INFO) {
|
if (pname == dom::MOZ_debug_Binding::WSI_INFO) {
|
||||||
nsPrintfCString more("\nIsWebglOutOfProcessEnabled: %i",
|
const auto& outOfProcess = mNotLost->outOfProcess;
|
||||||
int(IsWebglOutOfProcessEnabled()));
|
const auto& inProcess = mNotLost->inProcess;
|
||||||
str += more.BeginReading();
|
str += PrintfStdString("outOfProcess: %s\ninProcess: %s\n",
|
||||||
|
ToChars(bool(outOfProcess)),
|
||||||
|
ToChars(bool(inProcess)));
|
||||||
}
|
}
|
||||||
|
str += *maybe;
|
||||||
retval.set(StringValue(cx, str.c_str(), rv));
|
retval.set(StringValue(cx, str.c_str(), rv));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1273,6 +1273,20 @@ struct IndexedBufferBinding final {
|
|||||||
uint64_t ByteCount() const;
|
uint64_t ByteCount() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// -
|
||||||
|
|
||||||
|
template <class... Args>
|
||||||
|
inline std::string PrintfStdString(const char* const format,
|
||||||
|
const Args&... args) {
|
||||||
|
const auto nsStr = nsPrintfCString(format, args...);
|
||||||
|
return ToString(nsStr);
|
||||||
|
}
|
||||||
|
|
||||||
|
inline const char* ToChars(const bool val) {
|
||||||
|
if (val) return "true";
|
||||||
|
return "false";
|
||||||
|
}
|
||||||
|
|
||||||
} // namespace mozilla
|
} // namespace mozilla
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user