File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -1080,12 +1080,10 @@ ContextPtr WallProfiler::GetContextPtrSignalSafe(Isolate* isolate) {
1080
1080
std::atomic_signal_fence (std::memory_order_acquire);
1081
1081
if (curGcCount > 0 ) {
1082
1082
return gcContext;
1083
- } else if (isolate->InContext ()) {
1084
- auto handleScope = HandleScope (isolate);
1085
- return GetContextPtr (isolate);
1086
1083
}
1087
- // not in a V8 Context
1088
- return std::shared_ptr<Global<Value>>();
1084
+
1085
+ auto handleScope = HandleScope (isolate);
1086
+ return GetContextPtr (isolate);
1089
1087
}
1090
1088
1091
1089
ContextPtr WallProfiler::GetContextPtr (Isolate* isolate) {
@@ -1099,7 +1097,7 @@ ContextPtr WallProfiler::GetContextPtr(Isolate* isolate) {
1099
1097
auto cped = isolate->GetContinuationPreservedEmbedderData ();
1100
1098
RETURN_EMPTY_IF (!cped->IsObject ());
1101
1099
1102
- auto v8Ctx = isolate->GetCurrentContext ();
1100
+ auto v8Ctx = isolate->GetEnteredOrMicrotaskContext ();
1103
1101
RETURN_EMPTY_IF (v8Ctx.IsEmpty ());
1104
1102
1105
1103
auto cpedObj = cped.As <Object>();
You can’t perform that action at this time.
0 commit comments