Chromium Code Reviews| Index: src/api.cc |
| diff --git a/src/api.cc b/src/api.cc |
| old mode 100644 |
| new mode 100755 |
| index a06e0dbbbc640d07aabdd3938a9410741f2a2f74..b2d24d3ffa6b1f2744293a96b3bb58e6ae02432f |
| --- a/src/api.cc |
| +++ b/src/api.cc |
| @@ -5148,7 +5148,15 @@ void v8::V8::SetReturnAddressLocationResolver( |
| bool v8::V8::SetFunctionEntryHook(FunctionEntryHook entry_hook) { |
|
danno
2013/06/13 15:33:44
API calls should take an Isolate parameter if you
Sigurður Ásgeirsson
2013/06/19 20:51:51
Done.
|
| - return i::ProfileEntryHookStub::SetFunctionEntryHook(entry_hook); |
| + i::Isolate* isolate = i::Isolate::Current(); |
| + |
| + // We don't allow switching from one hook to another, as hooks don't stack. |
| + // This way a second user can at least detect that there's a problem. |
| + if (entry_hook != NULL && isolate->HasFunctionEntryHook()) |
|
danno
2013/06/13 15:33:44
Seems like this should be a ASSERT(entry_hook != N
Sigurður Ásgeirsson
2013/06/19 20:51:51
Done.
|
| + return false; |
| + |
| + isolate->SetFunctionEntryHook(entry_hook); |
|
danno
2013/06/13 15:33:44
It would be great to introduce some checks to make
Sigurður Ásgeirsson
2013/06/19 20:51:51
Done.
|
| + return true; |
| } |