| Index: src/builtins/ia32/builtins-ia32.cc
|
| diff --git a/src/builtins/ia32/builtins-ia32.cc b/src/builtins/ia32/builtins-ia32.cc
|
| index f31ba6fcf146c4b3c90c4aca18cdc7be7e0a4bf7..b16e2b68c0c8cfd4738123951f1a4bf15bd71d67 100644
|
| --- a/src/builtins/ia32/builtins-ia32.cc
|
| +++ b/src/builtins/ia32/builtins-ia32.cc
|
| @@ -1273,6 +1273,16 @@ void Builtins::Generate_DatePrototype_GetField(MacroAssembler* masm,
|
| __ Move(ebx, Immediate(0));
|
| __ EnterBuiltinFrame(esi, edi, ebx);
|
| __ CallRuntime(Runtime::kThrowNotDateError);
|
| +
|
| + // It's far from obvious, but this final trailing instruction after the call
|
| + // is required for StackFrame::LookupCode to work correctly. To illustrate
|
| + // why: if call were the final instruction in the code object, then the pc
|
| + // (== return address) would point beyond the code object when the stack is
|
| + // traversed. When we then try to look up the code object through
|
| + // StackFrame::LookupCode, we actually return the next code object that
|
| + // happens to be on the same page in memory.
|
| + // TODO(jgruber): A proper fix for this would be nice.
|
| + __ nop();
|
| }
|
| }
|
|
|
|
|