void PluginProcess::setMinimumLifetime(double lifetime) { if (lifetime <= 0.0) return; disableTermination(); m_minimumLifetimeTimer.startOneShot(lifetime); }
void WebProcess::createWebPage(uint64_t pageID, const WebPageCreationParameters& parameters) { // It is necessary to check for page existence here since during a window.open() (or targeted // link) the WebPage gets created both in the synchronous handler and through the normal way. HashMap<uint64_t, RefPtr<WebPage> >::AddResult result = m_pageMap.add(pageID, 0); if (result.isNewEntry) { ASSERT(!result.iterator->value); result.iterator->value = WebPage::create(pageID, parameters); // Balanced by an enableTermination in removeWebPage. disableTermination(); } ASSERT(result.iterator->value); }
void PluginProcess::createWebProcessConnection() { bool didHaveAnyWebProcessConnections = !m_webProcessConnections.isEmpty(); #if OS(DARWIN) // Create the listening port. mach_port_t listeningPort; mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &listeningPort); // Create a listening connection. RefPtr<WebProcessConnection> connection = WebProcessConnection::create(IPC::Connection::Identifier(listeningPort)); if (m_audioHardwareListener) { if (m_audioHardwareListener->hardwareActivity() == WebCore::AudioHardwareActivityType::IsActive) connection->audioHardwareDidBecomeActive(); else if (m_audioHardwareListener->hardwareActivity() == WebCore::AudioHardwareActivityType::IsInactive) connection->audioHardwareDidBecomeInactive(); } m_webProcessConnections.append(connection.release()); IPC::Attachment clientPort(listeningPort, MACH_MSG_TYPE_MAKE_SEND); parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientPort, m_supportsAsynchronousPluginInitialization), 0); #elif USE(UNIX_DOMAIN_SOCKETS) IPC::Connection::SocketPair socketPair = IPC::Connection::createPlatformConnection(); RefPtr<WebProcessConnection> connection = WebProcessConnection::create(socketPair.server); m_webProcessConnections.append(connection.release()); IPC::Attachment clientSocket(socketPair.client); parentProcessConnection()->send(Messages::PluginProcessProxy::DidCreateWebProcessConnection(clientSocket, m_supportsAsynchronousPluginInitialization), 0); #else notImplemented(); #endif if (NetscapePluginModule* module = netscapePluginModule()) { if (!didHaveAnyWebProcessConnections) { // Increment the load count. This is matched by a call to decrementLoadCount in removeWebProcessConnection. // We do this so that the plug-in module's NP_Shutdown won't be called until right before exiting. module->incrementLoadCount(); } } disableTermination(); }
void NetworkProcess::didCreateDownload() { disableTermination(); }
void WebProcess::didCreateDownload() { disableTermination(); }