Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(570)

Unified Diff: src/regexp-macro-assembler-ia32.cc

Issue 20536: Add test to check that RegExp-ia32 can survive a garbage collection during execution. (Closed)
Patch Set: Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/regexp-macro-assembler-ia32.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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()) {
« no previous file with comments | « src/regexp-macro-assembler-ia32.h ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698