| Index: src/regexp-macro-assembler-ia32.cc
|
| diff --git a/src/regexp-macro-assembler-ia32.cc b/src/regexp-macro-assembler-ia32.cc
|
| index f4253557970beac98e4a11b459101a3ac9d629ef..0e96b9d9126764f3e348f77087e85955d3b9ff51 100644
|
| --- a/src/regexp-macro-assembler-ia32.cc
|
| +++ b/src/regexp-macro-assembler-ia32.cc
|
| @@ -1046,7 +1046,7 @@ int RegExpMacroAssemblerIA32::CaseInsensitiveCompareUC16(uc16** buffer,
|
| }
|
|
|
|
|
| -int RegExpMacroAssemblerIA32::CheckStackGuardState(Address return_address,
|
| +int RegExpMacroAssemblerIA32::CheckStackGuardState(Address* return_address,
|
| Code* re_code) {
|
| if (StackGuard::IsStackOverflow()) {
|
| Top::StackOverflow();
|
| @@ -1059,15 +1059,16 @@ int RegExpMacroAssemblerIA32::CheckStackGuardState(Address return_address,
|
| // Prepare for possible GC.
|
| Handle<Code> code_handle(re_code);
|
|
|
| - ASSERT(re_code->instruction_start() <= return_address);
|
| - ASSERT(return_address <=
|
| + ASSERT(re_code->instruction_start() <= *return_address);
|
| + ASSERT(*return_address <=
|
| re_code->instruction_start() + re_code->instruction_size());
|
|
|
| Object* result = Execution::HandleStackGuardInterrupt();
|
|
|
| if (*code_handle != re_code) { // Return address no longer valid
|
| int delta = *code_handle - re_code;
|
| - *reinterpret_cast<int32_t*>(return_address) += delta;
|
| + // Overwrite the return address on the stack.
|
| + *return_address += delta;
|
| }
|
|
|
| if (result->IsException()) {
|
|
|