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

Unified Diff: src/sampler.cc

Issue 131363008: A64: Synchronize with r15922. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 | « src/runtime.cc ('k') | src/serialize.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/sampler.cc
diff --git a/src/sampler.cc b/src/sampler.cc
index 32c5b251f61d70f4cab6d6662f45d9a4880f1bab..d333f457f896e7d5f292f138d2fbf7ba8fbab36e 100644
--- a/src/sampler.cc
+++ b/src/sampler.cc
@@ -70,6 +70,7 @@
#include "platform.h"
#include "simulator.h"
#include "v8threads.h"
+#include "vm-state-inl.h"
#if defined(__ANDROID__) && !defined(__BIONIC_HAVE_UCONTEXT_T)
@@ -658,9 +659,13 @@ DISABLE_ASAN void TickSample::Init(Isolate* isolate,
return;
}
- const Address callback = isolate->external_callback();
- if (callback != NULL) {
- external_callback = callback;
+ ExternalCallbackScope* scope = isolate->external_callback_scope();
+ Address handler = Isolate::handler(isolate->thread_local_top());
+ // If there is a handler on top of the external callback scope then
+ // we have already entrered JavaScript again and the external callback
+ // is not the top function.
+ if (scope && scope->scope_address() < handler) {
+ external_callback = scope->callback();
has_external_callback = true;
} else {
// Sample potential return address value for frameless invocation of
« no previous file with comments | « src/runtime.cc ('k') | src/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698