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

Method dumpMemoryStatistics

valdi/src/valdi/jscore/JavaScriptCoreContext.cpp:308–333  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306Valdi::JSValueRef JavaScriptCoreContext::evaluatePreCompiled(const Valdi::BytesView& script,
307 const std::string_view& sourceFilename,
308 Valdi::JSExceptionTracker& exceptionTracker) {
309 exceptionTracker.onError(Valdi::Error("JavaScriptCore does not support precompilation"));
310 return Valdi::JSValueRef();
311}
312
313void JavaScriptCoreContext::garbageCollect() {
314 if (_isGarbageCollecting) {
315 _needGarbageCollect = true;
316 return;
317 }
318
319 _isGarbageCollecting = true;
320 _needGarbageCollect = true;
321
322 while (_needGarbageCollect) {
323 _needGarbageCollect = false;
324
325#if TARGET_OS_IPHONE
326 JSGarbageCollect(_globalContext);
327#else
328 JSSynchronousGarbageCollectForDebugging(_globalContext);
329#endif
330 }
331}
332
333Valdi::JavaScriptContextMemoryStatistics JavaScriptCoreContext::dumpMemoryStatistics() {
334 if (s_dumpMemoryStatisticsOverride) {
335 return s_dumpMemoryStatisticsOverride(_globalContext);
336 }

Callers

nothing calls this directly

Calls 8

isIosFunction · 0.85
jsValueToValueFunction · 0.85
JSCoreRefClass · 0.85
clearErrorMethod · 0.80
toLongMethod · 0.80
getMapValueMethod · 0.80
toValdiJSValueFunction · 0.70

Tested by

no test coverage detected