Skip to content

Commit

Permalink
[wasm] Add crash key for the BytesConsumer debug name
Browse files Browse the repository at this point in the history
The |BytesConsumer| seems to return an inconsistent public state. Store
the debug name to debug the linked issue.

R=yoavweiss@chromium.org

Bug: chromium:1449546
Change-Id: Id228d59e35dd038222cc92db32f3625d692e9ebf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4640242
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Yoav Weiss <yoavweiss@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1162326}
  • Loading branch information
backes authored and Chromium LUCI CQ committed Jun 26, 2023
1 parent 7589b4d commit 0d06ea2
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include "third_party/blink/renderer/bindings/core/v8/v8_wasm_response_extensions.h"

#include "base/debug/crash_logging.h"
#include "base/debug/dump_without_crashing.h"
#include "base/memory/scoped_refptr.h"
#include "base/metrics/histogram_functions.h"
Expand Down Expand Up @@ -256,6 +257,12 @@ class FetchDataLoaderForWasmStreaming final : public FetchDataLoader,
AbortCompilation("Download cancelled");
break;
case BytesConsumer::PublicState::kErrored:
// Store the debug name of the BytesConsumer to debug
// https://crbug.com/1449546.
// TODO(clemensb): Remove this after resolving the issue.
static crash_reporter::CrashKeyString<128> detail_key(
"v8-wasm-bytes-consumer-debug-name");
detail_key.Set(consumer_->DebugName().Utf8().c_str());
AbortCompilation("Network error: " +
consumer_->GetError().Message());
break;
Expand Down

0 comments on commit 0d06ea2

Please sign in to comment.