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

Function getWrappedObjectClassRef

valdi/src/valdi/jscore/JSCoreCustomClasses.cpp:81–92  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 JSObjectRef function,
80 JSObjectRef /*thisObject*/,
81 size_t /*argumentCount*/,
82 const JSValueRef[] /*arguments*/,
83 JSValueRef* exception) {
84 auto functionData = Valdi::Ref(getAttachedNativeClassFunctionData(function));
85 auto& jsContext = functionData->jsContext;
86 Valdi::JSExceptionTracker exceptionTracker(jsContext);
87 exceptionTracker.onError("Native class constructor must be called with new");
88 return onJsCallError(ctx, exceptionTracker, exception);
89}
90
91static JSObjectRef callNativeClassConstructor(JSContextRef ctx,
92 JSObjectRef constructorObject,
93 size_t argumentCount,
94 const JSValueRef arguments[],
95 JSValueRef* exception) {

Callers 2

newWrappedObjectMethod · 0.85
getValueTypeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected