| 306 | } |
| 307 | |
| 308 | void ShareSystem::BindNativeToPlugin(CPlugin *pPlugin, const RefPtr<Native> &entry) |
| 309 | { |
| 310 | if (!entry->owner) |
| 311 | return; |
| 312 | |
| 313 | sp::BaseRuntime *pContext = pPlugin->GetBaseContext()->GetBaseRuntime(); |
| 314 | |
| 315 | uint32_t i; |
| 316 | if (pContext->FindNativeByName(entry->name(), &i) != SP_ERROR_NONE) |
| 317 | return; |
| 318 | |
| 319 | const sp_native_t *native = pContext->GetNative(i); |
| 320 | if (!native) |
| 321 | return; |
| 322 | |
| 323 | if (native->status == SP_NATIVE_BOUND) |
| 324 | return; |
| 325 | |
| 326 | BindNativeToPlugin(pPlugin, native, i, entry); |
| 327 | } |
| 328 | |
| 329 | void ShareSystem::BindNativeToPlugin(CPlugin *pPlugin, const sp_native_t *native, uint32_t index, |
| 330 | const RefPtr<Native> &pEntry) |
no test coverage detected