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

Unified Diff: src/api.cc

Issue 16578008: Improved function entry hook coverage (Closed) Base URL: https://chromium.googlesource.com/external/v8.git@post_fix
Patch Set: WIP: Fix X64 implementation. Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/frames.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | src/bootstrapper.cc » ('j') | src/frames.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698