Revert "Add debugging data to help diagnose a hang in fread()" This reverts commit fab1b6d64d3945881bcc39603eea9a515bc37e94. Reason for revert: No longer needed after developing a theory on why these hangs happen. Original change's description: > Add debugging data to help diagnose a hang in fread() > > Use pdfium::Alias() to save the path that is being read and the file > size. > > Bug: 376633555 > Change-Id: I7358b75a3d286791aa65f53b9118d39be63b0fe1 > Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/127910 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Lei Zhang <thestig@chromium.org> > Reviewed-by: Thomas Sepez <tsepez@google.com> # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 376633555 Change-Id: I2ad0ff4c6162fefaf4488465cf2db8faf03e2369 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/137510 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fxge/cfx_folderfontinfo.cpp b/core/fxge/cfx_folderfontinfo.cpp index 2976da3..86937f0 100644 --- a/core/fxge/cfx_folderfontinfo.cpp +++ b/core/fxge/cfx_folderfontinfo.cpp
@@ -6,7 +6,6 @@ #include "core/fxge/cfx_folderfontinfo.h" -#include <algorithm> #include <array> #include <iterator> #include <limits> @@ -17,7 +16,6 @@ #include "core/fxcrt/check_op.h" #include "core/fxcrt/compiler_specific.h" #include "core/fxcrt/containers/contains.h" -#include "core/fxcrt/debug/alias.h" #include "core/fxcrt/fixed_size_data_vector.h" #include "core/fxcrt/fx_codepage.h" #include "core/fxcrt/fx_extension.h" @@ -447,15 +445,6 @@ if (fseek(pFile.get(), offset, SEEK_SET) < 0) { return 0; } - - // TODO(crbug.com/376633555): Remove debugging data after fixing the bug. - pdfium::Alias(&datasize); - char buf[256] = {}; - pdfium::Alias(&buf); - ByteStringView font_path = font->file_path_.AsStringView(); - size_t path_char_count = std::min(font_path.GetLength(), std::size(buf)); - fxcrt::spancpy(pdfium::span(buf), font_path.Last(path_char_count).span()); - if (UNSAFE_TODO(fread(buffer.data(), datasize, 1, pFile.get())) != 1) { return 0; }