void SQLTransactionClient::didCommitWriteTransaction(DatabaseBackendBase* database)
{
    ExecutionContext* executionContext = database->databaseContext()->executionContext();
    if (!executionContext->isContextThread()) {
        executionContext->postTask(createCrossThreadTask(&databaseModified, PassRefPtrWillBeRawPtr<DatabaseBackendBase>(database)));
        return;
    }

    databaseModified(database);
}
void SQLTransactionClient::didCommitWriteTransaction(Database* database)
{
    String originIdentifier = createDatabaseIdentifierFromSecurityOrigin(database->securityOrigin());
    String databaseName = database->stringIdentifier();
    ExecutionContext* executionContext = database->databaseContext()->executionContext();
    if (!executionContext->isContextThread()) {
        executionContext->postTask(BLINK_FROM_HERE, createCrossThreadTask(&databaseModified, originIdentifier, databaseName));
    } else {
        databaseModified(originIdentifier, databaseName);
    }
}
void NetworkStateNotifier::setWebConnectionImpl(WebConnectionType type, double maxBandwidthMbps)
{
    ASSERT(isMainThread());

    MutexLocker locker(m_mutex);
    if (m_type == type && m_maxBandwidthMbps == maxBandwidthMbps)
        return;
    m_type = type;
    m_maxBandwidthMbps = maxBandwidthMbps;

    for (const auto& entry : m_observers) {
        ExecutionContext* context = entry.key;
        context->postTask(BLINK_FROM_HERE, createCrossThreadTask(&NetworkStateNotifier::notifyObserversOfConnectionChangeOnContext, this, type, maxBandwidthMbps));
    }
}