[gjs/mozjs78: 17/23] Update coverage for signature changes. - 'js::GetCodeCoverageSummary' now returns JS::UniqueChars.



commit 6865b706cfbcfcfbf68a261eb45192035021a20d
Author: Evan Welsh <noreply evanwelsh com>
Date:   Sat Jul 4 22:25:32 2020 -0500

    Update coverage for signature changes.
    - 'js::GetCodeCoverageSummary' now returns JS::UniqueChars.

 gjs/coverage.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gjs/coverage.cpp b/gjs/coverage.cpp
index cbeeafcb..614aea4a 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -233,8 +233,7 @@ write_statistics_internal(GjsCoverage *coverage,
     GFile *output_file = g_file_get_child(priv->output_dir, "coverage.lcov");
 
     size_t lcov_length;
-    GjsAutoPointer<char, void, free> lcov(
-        js::GetCodeCoverageSummary(cx, &lcov_length));
+    JS::UniqueChars lcov = js::GetCodeCoverageSummary(cx, &lcov_length);
 
     GjsAutoUnref<GOutputStream> ostream =
         G_OUTPUT_STREAM(g_file_append_to(output_file,
@@ -244,7 +243,7 @@ write_statistics_internal(GjsCoverage *coverage,
     if (!ostream)
         return nullptr;
 
-    GjsAutoStrv lcov_lines = g_strsplit(lcov, "\n", -1);
+    GjsAutoStrv lcov_lines = g_strsplit(lcov.get(), "\n", -1);
     const char* test_name = NULL;
     bool ignoring_file = false;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]