+8
-7
lines changedFilter options
+8
-7
lines changed Original file line number Diff line number Diff line change
@@ -1193,7 +1193,7 @@ MyWrap* MyWrap::New(Environment* env, v8::Local<v8::Object> object) {
1193
1193
// pointer with this, as this is not managed by the native memory
1194
1194
// allocator but by V8.
1195
1195
return cppgc::MakeGarbageCollected<MyWrap>(
1196
-
env->isolate()->GetCppHeap()->GetAllocationHandle(), env, object);
1196
+
env->cppgc_allocation_handle(), env, object);
1197
1197
}
1198
1198
1199
1199
// Binding method to be invoked by JavaScript.
Original file line number Diff line number Diff line change
@@ -205,6 +205,10 @@ inline v8::Isolate* Environment::isolate() const {
205
205
return isolate_;
206
206
}
207
207
208
+
inline cppgc::AllocationHandle& Environment::cppgc_allocation_handle() const {
209
+
return isolate_->GetCppHeap()->GetAllocationHandle();
210
+
}
211
+
208
212
inline v8::ExternalMemoryAccounter* Environment::external_memory_accounter()
209
213
const {
210
214
return external_memory_accounter_;
Original file line number Diff line number Diff line change
@@ -692,6 +692,7 @@ class Environment final : public MemoryRetainer {
692
692
void StartProfilerIdleNotifier();
693
693
694
694
inline v8::Isolate* isolate() const;
695
+
inline cppgc::AllocationHandle& cppgc_allocation_handle() const;
695
696
inline v8::ExternalMemoryAccounter* external_memory_accounter() const;
696
697
inline uv_loop_t* event_loop() const;
697
698
void TryLoadAddon(const char* filename,
Original file line number Diff line number Diff line change
@@ -330,11 +330,7 @@ ContextifyContext* ContextifyContext::New(Local<Context> v8_context,
330
330
}
331
331
DCHECK_NOT_NULL(env->isolate()->GetCppHeap());
332
332
result = cppgc::MakeGarbageCollected<ContextifyContext>(
333
-
env->isolate()->GetCppHeap()->GetAllocationHandle(),
334
-
env,
335
-
wrapper,
336
-
v8_context,
337
-
options);
333
+
env->cppgc_allocation_handle(), env, wrapper, v8_context, options);
338
334
}
339
335
340
336
Local<Object> wrapper_holder =
@@ -975,7 +971,7 @@ ContextifyScript* ContextifyScript::New(Environment* env,
975
971
Local<Object> object) {
976
972
DCHECK_NOT_NULL(env->isolate()->GetCppHeap());
977
973
return cppgc::MakeGarbageCollected<ContextifyScript>(
978
-
env->isolate()->GetCppHeap()->GetAllocationHandle(), env, object);
974
+
env->cppgc_allocation_handle(), env, object);
979
975
}
980
976
981
977
void ContextifyScript::New(const FunctionCallbackInfo<Value>& args) {
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4