From c2bea784e16fc0835c56be7a5c1e40584ecbd300 Mon Sep 17 00:00:00 2001 From: "dcarney@chromium.org" Date: Wed, 11 Sep 2013 06:56:47 +0000 Subject: [PATCH] thread isolate for EntryHookTrampoline R=svenpanne@chromium.org BUG= Review URL: https://codereview.chromium.org/23587019 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/code-stubs-arm.cc | 3 +++ src/code-stubs.cc | 5 +++-- src/code-stubs.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index 4b964adcb..6eedd1986 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -6836,6 +6836,9 @@ void ProfileEntryHookStub::Generate(MacroAssembler* masm) { #else // Under the simulator we need to indirect the entry hook through a // trampoline function at a known address. + // It additionally takes an isolate as a third parameter + __ mov(r2, Operand(ExternalReference::isolate_address(masm->isolate()))); + ApiFunction dispatcher(FUNCTION_ADDR(EntryHookTrampoline)); __ mov(ip, Operand(ExternalReference(&dispatcher, ExternalReference::BUILTIN_CALL, diff --git a/src/code-stubs.cc b/src/code-stubs.cc index 601127550..538333951 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -731,8 +731,9 @@ void StubFailureTrampolineStub::GenerateAheadOfTime(Isolate* isolate) { void ProfileEntryHookStub::EntryHookTrampoline(intptr_t function, - intptr_t stack_pointer) { - FunctionEntryHook entry_hook = Isolate::Current()->function_entry_hook(); + intptr_t stack_pointer, + Isolate* isolate) { + FunctionEntryHook entry_hook = isolate->function_entry_hook(); ASSERT(entry_hook != NULL); entry_hook(function, stack_pointer); } diff --git a/src/code-stubs.h b/src/code-stubs.h index 3138efbde..207af47c8 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -2295,7 +2295,8 @@ class ProfileEntryHookStub : public PlatformCodeStub { private: static void EntryHookTrampoline(intptr_t function, - intptr_t stack_pointer); + intptr_t stack_pointer, + Isolate* isolate); Major MajorKey() { return ProfileEntryHook; } int MinorKey() { return 0; } -- 2.34.1