Index: src/asmjs/asm-wasm-builder.cc |
diff --git a/src/asmjs/asm-wasm-builder.cc b/src/asmjs/asm-wasm-builder.cc |
index 4996203ce2bba91cb888cb44c2a59f14b38e9b59..8556b13e55d3f20789f754adb8181d2a9accc3bd 100644 |
--- a/src/asmjs/asm-wasm-builder.cc |
+++ b/src/asmjs/asm-wasm-builder.cc |
@@ -176,6 +176,11 @@ class AsmWasmBuilderImpl final : public AstVisitor<AsmWasmBuilderImpl> { |
} |
current_function_builder_ = LookupOrInsertFunction(decl->proxy()->var()); |
scope_ = kFuncScope; |
+ |
+ // Record start of the function, used as position for the stack check. |
+ current_function_builder_->SetAsmFunctionStartPosition( |
+ decl->fun()->start_position()); |
+ |
RECURSE(Visit(decl->fun())); |
decl->set_fun(old_func); |
if (new_func_scope != nullptr) { |