| 115 | auto jsValueId = _jsValueId; |
| 116 | |
| 117 | if (jsValueId.isNull()) { |
| 118 | return; |
| 119 | } |
| 120 | |
| 121 | _jsValueId = JSValueID(); |
| 122 | jsContext.removedStashedJSValue(jsValueId); |
| 123 | } |
| 124 | |
| 125 | bool JSValueRefHolder::dispose(std::unique_lock<Mutex>& disposablesLock) { |
| 126 | return doDispose(disposablesLock); |
| 127 | } |
| 128 | |
| 129 | static void doReleaseJsValue(const Shared<JavaScriptTaskScheduler>& taskScheduler, |
| 130 | const Ref<Context>& context, |
| 131 | const JSValueID& jsValueId) { |
| 132 | taskScheduler->dispatchOnJsThreadAsync(context, [jsValueId](JavaScriptEntryParameters& jsEntry) { |
| 133 | jsEntry.jsContext.removedStashedJSValue(jsValueId); |
| 134 | }); |
| 135 | } |
| 136 | |
| 137 | bool JSValueRefHolder::doDispose(std::unique_lock<Mutex>& disposablesLock) { |
| 138 | auto jsValueId = _jsValueId; |
| 139 | |
| 140 | if (jsValueId.isNull()) { |
nothing calls this directly
no test coverage detected