Index: src/ia32/full-codegen-ia32.cc |
diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc |
index 04d48bdfdfb581c57096e8502ad50ee67f8531c2..116be1fa94adc90301acbefbfb238c413fa6ca1b 100644 |
--- a/src/ia32/full-codegen-ia32.cc |
+++ b/src/ia32/full-codegen-ia32.cc |
@@ -239,6 +239,10 @@ void FullCodeGenerator::Generate() { |
Variable* this_function_var = scope()->this_function_var(); |
if (this_function_var != nullptr) { |
Comment cmnt(masm_, "[ This function"); |
+ if (!function_in_register) { |
+ __ mov(edi, Operand(ebp, JavaScriptFrameConstants::kFunctionOffset)); |
+ // The write barrier clobbers register again, keep is marked as such. |
+ } |
SetVar(this_function_var, edi, ebx, edx); |
} |