Skip to content

Commit 1773d30

Browse files
ckerrGitHub Copilot
andcommitted
fix(patch): sample delay per event loop iteration
Ref: nodejs/node#62935 Ref: nodejs/node#64480 Co-Authored-By: GitHub Copilot <[email protected]>
1 parent a0fc9e3 commit 1773d30

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

‎patches/node/api_promote_deprecation_of_v8_context_and_v8_object_api_methods.patch‎

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ index 74bbb9fb83246a90bc425e259150f0868020ac9e..a4b3a1c0907c9d50baf6c8cd473cb4c7
7272

7373
inline Environment* Environment::GetCurrent(
7474
diff --git a/src/histogram.cc b/src/histogram.cc
75-
index a676d302466605bbbd2d1a90e71ef5d9f640fe30..8be2fee3db9b6d64ace6eda58dd3dc06685ded12 100644
75+
index a676d302466605bbbd2d1a90e71ef5d9f640fe30..943edd53e06a34ae2175808af12b037d09812371 100644
7676
--- a/src/histogram.cc
7777
+++ b/src/histogram.cc
7878
@@ -154,7 +154,8 @@ HistogramBase::HistogramBase(
@@ -105,7 +105,17 @@ index a676d302466605bbbd2d1a90e71ef5d9f640fe30..8be2fee3db9b6d64ace6eda58dd3dc06
105105
uv_timer_init(env->event_loop(), &timer_);
106106
}
107107

108-
@@ -746,7 +749,8 @@ HistogramImpl* HistogramImpl::FromJSObject(Local<Value> value) {
108+
@@ -488,7 +491,8 @@ IterationHistogram::IterationHistogram(Environment* env,
109+
MakeWeak();
110+
wrap->SetAlignedPointerInInternalField(
111+
HistogramImpl::InternalFields::kImplField,
112+
- static_cast<HistogramImpl*>(this));
113+
+ static_cast<HistogramImpl*>(this),
114+
+ v8::kEmbedderDataTypeTagDefault);
115+
uv_check_init(env->event_loop(), &check_handle_);
116+
uv_prepare_init(env->event_loop(), &prepare_handle_);
117+
uv_unref(reinterpret_cast<uv_handle_t*>(&check_handle_));
118+
@@ -746,7 +750,8 @@ HistogramImpl* HistogramImpl::FromJSObject(Local<Value> value) {
109119
auto obj = value.As<Object>();
110120
DCHECK_GE(obj->InternalFieldCount(), HistogramImpl::kInternalFieldCount);
111121
return static_cast<HistogramImpl*>(

0 commit comments

Comments
 (0)