scoped_disable_exit_on_dfatal.cc 757 B

123456789101112131415161718192021222324252627
  1. // Copyright 2014 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "net/test/scoped_disable_exit_on_dfatal.h"
  5. #include "base/bind.h"
  6. #include "base/callback.h"
  7. #include "base/strings/string_piece.h"
  8. namespace net::test {
  9. ScopedDisableExitOnDFatal::ScopedDisableExitOnDFatal()
  10. : assert_handler_(base::BindRepeating(LogAssertHandler)) {}
  11. ScopedDisableExitOnDFatal::~ScopedDisableExitOnDFatal() = default;
  12. // static
  13. void ScopedDisableExitOnDFatal::LogAssertHandler(
  14. const char* file,
  15. int line,
  16. const base::StringPiece message,
  17. const base::StringPiece stack_trace) {
  18. // Simply swallow the assert.
  19. }
  20. } // namespace net::test