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

Side by Side Diff: src/x64/full-codegen-x64.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_X64 7 #if V8_TARGET_ARCH_X64
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 5301 matching lines...) Expand 10 before | Expand all | Expand 10 after
5312 5312
5313 // Uncook return address. 5313 // Uncook return address.
5314 __ Pop(rdx); 5314 __ Pop(rdx);
5315 __ SmiToInteger32(rdx, rdx); 5315 __ SmiToInteger32(rdx, rdx);
5316 __ Move(rcx, masm_->CodeObject()); 5316 __ Move(rcx, masm_->CodeObject());
5317 __ addp(rdx, rcx); 5317 __ addp(rdx, rcx);
5318 __ jmp(rdx); 5318 __ jmp(rdx);
5319 } 5319 }
5320 5320
5321 5321
5322 void FullCodeGenerator::EnterCatchBlock() {
5323 DCHECK(!result_register().is(rdx));
5324 ExternalReference pending_message_obj =
5325 ExternalReference::address_of_pending_message_obj(isolate());
5326 __ LoadRoot(rdx, Heap::kTheHoleValueRootIndex);
5327 __ Store(pending_message_obj, rdx);
5328 }
5329
5330
5322 #undef __ 5331 #undef __
5323 5332
5324 5333
5325 static const byte kJnsInstruction = 0x79; 5334 static const byte kJnsInstruction = 0x79;
5326 static const byte kNopByteOne = 0x66; 5335 static const byte kNopByteOne = 0x66;
5327 static const byte kNopByteTwo = 0x90; 5336 static const byte kNopByteTwo = 0x90;
5328 #ifdef DEBUG 5337 #ifdef DEBUG
5329 static const byte kCallInstruction = 0xe8; 5338 static const byte kCallInstruction = 0xe8;
5330 #endif 5339 #endif
5331 5340
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
5395 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 5404 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
5396 Assembler::target_address_at(call_target_address, 5405 Assembler::target_address_at(call_target_address,
5397 unoptimized_code)); 5406 unoptimized_code));
5398 return OSR_AFTER_STACK_CHECK; 5407 return OSR_AFTER_STACK_CHECK;
5399 } 5408 }
5400 5409
5401 5410
5402 } } // namespace v8::internal 5411 } } // namespace v8::internal
5403 5412
5404 #endif // V8_TARGET_ARCH_X64 5413 #endif // V8_TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698