MCPcopy Create free account
hub / github.com/facebook/react / fprint_value

Function fprint_value

scripts/perf-counters/src/jsc-perf.cpp:40–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40static void fprint_value(
41 FILE *file,
42 JSContextRef context,
43 JSValueRef obj
44) {
45 JSStringRef jsStr = JSValueToStringCopy(context, obj, NULL);
46 size_t size = JSStringGetMaximumUTF8CStringSize(jsStr);
47 char *str = (char *) calloc(
48 size,
49 1
50 );
51 JSStringGetUTF8CString(
52 jsStr,
53 str,
54 size
55 );
56 JSStringRelease(jsStr);
57 fprintf(file, "%s", str);
58 free(str);
59}
60
61static JSValueRef js_print(
62 JSContextRef context,

Callers 2

js_printFunction · 0.85
mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected