| 99 | } |
| 100 | |
| 101 | JSValueRef makeWrappedObject(IJavaScriptContext& jsContext, |
| 102 | const Ref<RefCountable>& wrappedObject, |
| 103 | JSExceptionTracker& exceptionTracker, |
| 104 | bool attachToContext) { |
| 105 | if (attachToContext) { |
| 106 | auto attachedRef = makeShared<ContextAttachedValdiObject>(Ref(Context::currentRoot()), wrappedObject); |
| 107 | return jsContext.newWrappedObject(attachedRef, exceptionTracker); |
| 108 | } else { |
| 109 | return jsContext.newWrappedObject(wrappedObject, exceptionTracker); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | Ref<RefCountable> unwrapWrappedObject(IJavaScriptContext& jsContext, |
| 114 | const JSValue& jsValue, |
no test coverage detected