Skip to content

Commit

Permalink
Cherry-pick 270612@main (723ded3). https://bugs.webkit.org/show_bug.c…
Browse files Browse the repository at this point in the history
…gi?id=264709

    [WPE][GTK][Debug] Crashes in imported/w3c/web-platform-tests/reporting
    https://bugs.webkit.org/show_bug.cgi?id=264709

    Reviewed by Michael Catanzaro.

    The C++ standard doesn't define an order of evaluation for function arguments, so without forcing it
    when creating the report we might trigger a use-after-move. This was specially noticeable on GCC
    builds, not so much with clang.

    * Source/WebCore/Modules/reporting/ReportingScope.cpp:
    (WebCore::ReportingScope::generateTestReport):

    Canonical link: https://commits.webkit.org/270612@main
  • Loading branch information
philn authored and aperezdc committed Jan 24, 2024
1 parent c9b3026 commit 69f2fe3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/WebCore/Modules/reporting/ReportingScope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,8 @@ void ReportingScope::generateTestReport(String&& message, String&& group)
document->sendReportToEndpoints(testReportURL, { }, { group }, WTFMove(reportFormData), ViolationReportType::Test);
}

notifyReportObservers(Report::create(testReportBody->type(), WTFMove(reportURL), WTFMove(testReportBody)));
auto bodyType = testReportBody->type();
notifyReportObservers(Report::create(bodyType, reportURL, WTFMove(testReportBody)));
}

} // namespace WebCore

0 comments on commit 69f2fe3

Please sign in to comment.