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

Function toRef

third-party/jscore/include/JavaScriptCore/APICast.h:131–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131inline JSValueRef toRef(JSC::ExecState* exec, JSC::JSValue v)
132{
133 ASSERT(exec->vm().currentThreadIsHoldingAPILock());
134#if USE(JSVALUE32_64)
135 if (!v)
136 return 0;
137 if (!v.isCell())
138 return reinterpret_cast<JSValueRef>(JSC::jsAPIValueWrapper(exec, v).asCell());
139 return reinterpret_cast<JSValueRef>(v.asCell());
140#else
141 UNUSED_PARAM(exec);
142 return reinterpret_cast<JSValueRef>(JSC::JSValue::encode(v));
143#endif
144}
145
146inline JSObjectRef toRef(JSC::JSObject* o)
147{

Callers 15

handleExceptionIfNeededFunction · 0.85
setExceptionFunction · 0.85
callMethod · 0.85
constructMethod · 0.85
~JSCallbackObjectMethod · 0.85
initMethod · 0.85
getOwnPropertySlotMethod · 0.85
defaultValueMethod · 0.85
putMethod · 0.85
putByIndexMethod · 0.85
deletePropertyMethod · 0.85
constructMethod · 0.85

Calls 1

encodeFunction · 0.85

Tested by

no test coverage detected