[wasm] Fix runtime stub relocation in {AddAnonymousCode}.

R=clemensh@chromium.org

Change-Id: I82e329058d7904e638010e10b4f75aac5075e7d1
Reviewed-on: https://chromium-review.googlesource.com/1107062
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#53884}
This commit is contained in:
Michael Starzinger 2018-06-20 09:43:58 +02:00 committed by Commit Bot
parent ed27ae1b31
commit 34d1cf28c8

View File

@ -501,7 +501,7 @@ WasmCode* NativeModule::AddAnonymousCode(Handle<Code> code,
!it.done(); it.next(), orig_it.next()) {
RelocInfo::Mode mode = it.rinfo()->rmode();
if (RelocInfo::IsWasmStubCall(mode)) {
uint32_t stub_call_tag = it.rinfo()->wasm_stub_call_tag();
uint32_t stub_call_tag = orig_it.rinfo()->wasm_stub_call_tag();
DCHECK_LT(stub_call_tag, WasmCode::kRuntimeStubCount);
WasmCode* code =
runtime_stub(static_cast<WasmCode::RuntimeStubId>(stub_call_tag));