Reviewers: Sven Panne,

Description:
thread isolate for EntryHookTrampoline

[email protected]
BUG=

Please review this at https://codereview.chromium.org/23587019/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+8, -3 lines):
  M src/arm/code-stubs-arm.cc
  M src/code-stubs.h
  M src/code-stubs.cc


Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index 4b964adcba219e7ff362f28bb15aee92d7b155be..6eedd1986d3d0a5db1752f1c899eff340d1203ce 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,
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 60112755090dacbf9ea5907f2982ec8c7738c7d5..5383339510e1d338258a8a5220007c7ac0309db5 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);
 }
Index: src/code-stubs.h
diff --git a/src/code-stubs.h b/src/code-stubs.h
index 3138efbde6771c6f06a987fa4fba46c15b5e3d7c..207af47c8e8ead3ecb3a01b3f56aa5c993c8567b 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; }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to