MCPcopy Create free account
hub / github.com/Snapchat/Valdi / removeRejectedPromise

Method removeRejectedPromise

valdi/src/valdi/quickjs/QuickJSJavaScriptContext.cpp:1278–1289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1276
1277 Valdi::JavaScriptContextMemoryStatistics out;
1278 out.memoryUsageBytes = static_cast<size_t>(memoryUsage.memory_used_size);
1279 out.objectsCount = static_cast<size_t>(memoryUsage.obj_count);
1280
1281 return out;
1282}
1283
1284#pragma clang diagnostic push
1285#pragma clang diagnostic ignored "-Wunneeded-internal-declaration"
1286
1287static inline Valdi::JavaScriptHeapDumpBuilder* getHeapDumpBuilder(JSRuntime* rt) {
1288 return reinterpret_cast<Valdi::JavaScriptHeapDumpBuilder*>(JS_GetRuntimeOpaque(rt));
1289}
1290
1291static void onObjectBegin(JSRuntime* rt, void* gp, const char* name, JSObjectType objectType, size_t bytesSize) {
1292 auto* heapDumpBuilder = getHeapDumpBuilder(rt);

Callers 1

handleRejectedPromiseFunction · 0.80

Calls 4

JS_FreeValueFunction · 0.85
endMethod · 0.65
beginMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected