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




commit d490ff5665eea31de3e70b2b79f864446283640b
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 ab5b6ebf..2e00e706 100644
--- a/gjs/coverage.cpp
+++ b/gjs/coverage.cpp
@@ -205,8 +205,7 @@ write_line(GOutputStream *out,
     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,
@@ -216,7 +215,7 @@ write_line(GOutputStream *out,
     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]