Commit 482441f3 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

Reland "[wasm] Open HandleScope in LogCode"

This reverts commit f09bec92.

Reason for revert: This CL was reverted by accident.

Original change's description:
> Revert "[wasm] Open HandleScope in LogCode"
> 
> This reverts commit 2035042e.
> 
> Reason for revert: Blocks the roll, see https://chromium-swarm.appspot.com/task?id=41356e9eff2a5010&refresh=10&show_raw=1 for error message
> 
> Original change's description:
> > [wasm] Open HandleScope in LogCode
> >
> > In WasmCode::LogCode we allocate handles, but not all callers of LogCode
> > open a HandleScope. Since the handles do not escape LogCode, we can just
> > open a Handlescope in the function.
> >
> > R=​herhut@chromium.org
> >
> > Bug: v8:8461
> > Change-Id: I2031b467f976a9af6f541b60af245573f33d9676
> > Reviewed-on: https://chromium-review.googlesource.com/c/1337736
> > Reviewed-by: Stephan Herhut <herhut@chromium.org>
> > Commit-Queue: Andreas Haas <ahaas@chromium.org>
> > Cr-Commit-Position: refs/heads/master@{#57550}
> 
> TBR=ahaas@chromium.org,herhut@chromium.org
> 
> NOTRY=true
> 
> Bug: v8:8461
> Change-Id: I4c95c79c029f4eed2bbaf1fcf7ccb04203335659
> Reviewed-on: https://chromium-review.googlesource.com/c/1340287
> Commit-Queue: Michael Hablich <hablich@chromium.org>
> Reviewed-by: Michael Hablich <hablich@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#57583}

TBR=hablich@chromium.org,ahaas@chromium.org,herhut@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: v8:8461
Change-Id: Ieaabde1c686505795e9059354573c38dd982c52a
Reviewed-on: https://chromium-review.googlesource.com/c/1340251Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarStephan Herhut <herhut@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#57603}
parent 858fc3f6
......@@ -154,6 +154,7 @@ void WasmCode::LogCode(Isolate* isolate) const {
native_module()->module()->LookupFunctionName(wire_bytes, index());
WasmName name_vec = wire_bytes.GetNameOrNull(name_ref);
if (!name_vec.is_empty()) {
HandleScope scope(isolate);
MaybeHandle<String> maybe_name = isolate->factory()->NewStringFromUtf8(
Vector<const char>::cast(name_vec));
Handle<String> name;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment