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

Method storeException

valdi/src/valdi/runtime/JavaScript/JavaScriptTypes.cpp:84–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82}
83
84void JSExceptionTracker::storeException(JSValueRef&& exception) {
85 assertEmpty();
86 _exception = std::move(exception);
87 if (!_exception.isRetained()) {
88 _exception = JSValueRef::makeRetained(_jsContext, _exception.get());
89 }
90 setEmpty(false);
91}
92
93Result<JSValueRef> JSExceptionTracker::toRetainedResult(JSValueRef value) {
94 if (!*this) {

Callers 1

handleUncaughtJsErrorMethod · 0.45

Calls 2

isRetainedMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected