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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 1150293002: Do not leak message object beyond try-catch. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: platform ports and turbofan Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 5283 matching lines...) Expand 10 before | Expand all | Expand 10 after
5294 __ pop(result_register()); 5294 __ pop(result_register());
5295 5295
5296 // Uncook return address. 5296 // Uncook return address.
5297 __ pop(edx); 5297 __ pop(edx);
5298 __ SmiUntag(edx); 5298 __ SmiUntag(edx);
5299 __ add(edx, Immediate(masm_->CodeObject())); 5299 __ add(edx, Immediate(masm_->CodeObject()));
5300 __ jmp(edx); 5300 __ jmp(edx);
5301 } 5301 }
5302 5302
5303 5303
5304 void FullCodeGenerator::EnterCatchBlock() {
5305 DCHECK(!result_register().is(edx));
5306 ExternalReference pending_message_obj =
5307 ExternalReference::address_of_pending_message_obj(isolate());
5308 __ mov(edx, Immediate(isolate()->factory()->the_hole_value()));
5309 __ mov(Operand::StaticVariable(pending_message_obj), edx);
5310 }
5311
5312
5304 #undef __ 5313 #undef __
5305 5314
5306 5315
5307 static const byte kJnsInstruction = 0x79; 5316 static const byte kJnsInstruction = 0x79;
5308 static const byte kJnsOffset = 0x11; 5317 static const byte kJnsOffset = 0x11;
5309 static const byte kNopByteOne = 0x66; 5318 static const byte kNopByteOne = 0x66;
5310 static const byte kNopByteTwo = 0x90; 5319 static const byte kNopByteTwo = 0x90;
5311 #ifdef DEBUG 5320 #ifdef DEBUG
5312 static const byte kCallInstruction = 0xe8; 5321 static const byte kCallInstruction = 0xe8;
5313 #endif 5322 #endif
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5377 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5386 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5378 Assembler::target_address_at(call_target_address, 5387 Assembler::target_address_at(call_target_address,
5379 unoptimized_code)); 5388 unoptimized_code));
5380 return OSR_AFTER_STACK_CHECK; 5389 return OSR_AFTER_STACK_CHECK;
5381 } 5390 }
5382 5391
5383 5392
5384 } } // namespace v8::internal 5393 } } // namespace v8::internal
5385 5394
5386 #endif // V8_TARGET_ARCH_IA32 5395 #endif // V8_TARGET_ARCH_IA32
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698