这篇教程C++ unsetPendingActivity函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中unsetPendingActivity函数的典型用法代码示例。如果您正苦于以下问题:C++ unsetPendingActivity函数的具体用法?C++ unsetPendingActivity怎么用?C++ unsetPendingActivity使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了unsetPendingActivity函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: LOGvoid FileReader::abort(){ LOG(FileAPI, "FileReader: aborting/n"); if (m_aborting || m_state != LOADING) return; m_aborting = true; // Schedule to have the abort done later since abort() might be called from the event handler and we do not want the resource loading code to be in the stack. scriptExecutionContext()->postTask([this] (ScriptExecutionContext&) { ASSERT(m_state != DONE); terminate(); m_aborting = false; m_error = FileError::create(FileError::ABORT_ERR); fireEvent(eventNames().errorEvent); fireEvent(eventNames().abortEvent); fireEvent(eventNames().loadendEvent); // All possible events have fired and we're done, no more pending activity. unsetPendingActivity(this); });}
开发者ID:houzhenggang,项目名称:webkit,代码行数:25,
示例2: unsetPendingActivityvoid Notification::finalize(){ if (m_state == Closed) return; m_state = Closed; unsetPendingActivity(this);}
开发者ID:3163504123,项目名称:phantomjs,代码行数:7,
示例3: completeAbortvoid FileWriter::didWrite(long long bytes, bool complete){ if (m_operationInProgress == OperationAbort) { completeAbort(); return; } ASSERT(m_readyState == WRITING); ASSERT(m_truncateLength == -1); ASSERT(m_operationInProgress == OperationWrite); ASSERT(bytes + m_bytesWritten > 0); ASSERT(bytes + m_bytesWritten <= m_bytesToWrite); m_bytesWritten += bytes; ASSERT((m_bytesWritten == m_bytesToWrite) || !complete); setPosition(position() + bytes); if (position() > length()) setLength(position()); if (complete) { m_blobBeingWritten.clear(); m_operationInProgress = OperationNone; } // TODO: Throttle to no more frequently than every 50ms. int numAborts = m_numAborts; fireEvent(eventNames().progressEvent); // We could get an abort in the handler for this event. If we do, it's // already handled the cleanup and signalCompletion call. if (complete) { if (numAborts == m_numAborts) signalCompletion(FileError::OK); unsetPendingActivity(this); }}
开发者ID:yang-bo,项目名称:webkit,代码行数:31,
示例4: unsetPendingActivityvoid Notification::finishLoading(){ if (m_state == Loading) { if (m_notificationCenter->presenter() && m_notificationCenter->presenter()->show(this)) m_state = Showing; } unsetPendingActivity(this);}
开发者ID:achellies,项目名称:WinCEWebKit,代码行数:8,
示例5: scriptExecutionContextvoid SharedWorkerScriptLoader::notifyFinished(){ // Hand off the just-loaded code to the repository to start up the worker thread. if (m_scriptLoader->failed()) m_worker->dispatchLoadErrorEvent(); else DefaultSharedWorkerRepository::instance().workerScriptLoaded(*m_proxy, scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), m_port.release()); // This frees this object - must be the last action in this function. unsetPendingActivity(this);}
开发者ID:halfkiss,项目名称:ComponentSuperAccessor,代码行数:11,
示例6: dispatchEventvoid Worker::notifyFinished(){ if (m_scriptLoader->failed()) dispatchEvent(Event::create(eventNames().errorEvent, false, true)); else m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script()); m_scriptLoader = 0; unsetPendingActivity(this);}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:11,
示例7: dispatchEventvoid Worker::notifyFinished(){ if (m_scriptLoader->failed()) dispatchEvent(Event::create(eventNames().errorEvent, false, true)); else { const ContentSecurityPolicyResponseHeaders& contentSecurityPolicyResponseHeaders = m_contentSecurityPolicyResponseHeaders ? m_contentSecurityPolicyResponseHeaders.value() : scriptExecutionContext()->contentSecurityPolicy()->responseHeaders(); m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), contentSecurityPolicyResponseHeaders, m_shouldBypassMainWorldContentSecurityPolicy, DontPauseWorkerGlobalScopeOnStart); InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script()); } m_scriptLoader = nullptr; unsetPendingActivity(this);}
开发者ID:caiolima,项目名称:webkit,代码行数:13,
示例8: dispatchEventvoid Worker::notifyFinished(){ if (m_scriptLoader->failed()) dispatchEvent(Event::create(eventNames().errorEvent, false, true)); else { WorkerThreadStartMode startMode = DontPauseWorkerGlobalScopeOnStart; m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode); InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script()); } m_scriptLoader = nullptr; unsetPendingActivity(this);}
开发者ID:josedealcala,项目名称:webkit,代码行数:13,
示例9: scriptExecutionContextvoid XMLHttpRequest::dropProtection(){ // The XHR object itself holds on to the responseText, and // thus has extra cost even independent of any // responseText or responseXML objects it has handed // out. But it is protected from GC while loading, so this // can't be recouped until the load is done, so only // report the extra cost at that point. JSC::VM* vm = scriptExecutionContext()->vm(); JSC::JSLockHolder lock(vm); vm->heap.reportExtraMemoryCost(m_responseBuilder.length() * 2); unsetPendingActivity(this);}
开发者ID:MYSHLIFE,项目名称:webkit,代码行数:14,
示例10: ASSERTvoid EventSource::abortConnectionAttempt(){ ASSERT(m_state == CONNECTING); if (m_requestInFlight) m_loader->cancel(); else { m_state = CLOSED; unsetPendingActivity(this); } ASSERT(m_state == CLOSED); dispatchEvent(Event::create(eventNames().errorEvent, false, false));}
开发者ID:kodybrown,项目名称:webkit,代码行数:14,
示例11: dispatchEventvoid EventSource::endRequest(){ m_requestInFlight = false; if (!m_failSilently) dispatchEvent(Event::create(eventNames().errorEvent, false, false)); if (!scriptExecutionContext()->isWorkerContext()) cache()->loader()->nonCacheRequestComplete(m_url); if (m_state != CLOSED) scheduleReconnect(); else unsetPendingActivity(this);}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:15,
示例12: dispatchEventvoid Worker::notifyFinished(){ if (m_scriptLoader->failed()) { dispatchEvent(Event::createCancelable(EventTypeNames::error)); } else { WorkerThreadStartMode startMode = DontPauseWorkerGlobalScopeOnStart; if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(executionContext())) startMode = PauseWorkerGlobalScopeOnStart; m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), executionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode); InspectorInstrumentation::scriptImported(executionContext(), m_scriptLoader->identifier(), m_scriptLoader->script()); } m_scriptLoader = nullptr; unsetPendingActivity(this);}
开发者ID:Tkkg1994,项目名称:Platfrom-kccat6,代码行数:15,
示例13: USEvoid XMLHttpRequest::dropProtection(){#if USE(JSC) // The XHR object itself holds on to the responseText, and // thus has extra cost even independent of any // responseText or responseXML objects it has handed // out. But it is protected from GC while loading, so this // can't be recouped until the load is done, so only // report the extra cost at that point. JSC::JSLock lock(JSC::SilenceAssertionsOnly); JSC::JSGlobalData* globalData = scriptExecutionContext()->globalData(); globalData->heap.reportExtraMemoryCost(m_responseBuilder.length() * 2);#endif unsetPendingActivity(this);}
开发者ID:jparound30,项目名称:webkit,代码行数:16,
示例14: deleteMarkedNodesvoid AudioContext::clear(){ // We have to release our reference to the destination node before the context will ever be deleted since the destination node holds a reference to the context. if (m_destinationNode) m_destinationNode.clear(); // Audio thread is dead. Nobody will schedule node deletion action. Let's do it ourselves. do { deleteMarkedNodes(); m_nodesToDelete.appendVector(m_nodesMarkedForDeletion); m_nodesMarkedForDeletion.clear(); } while (m_nodesToDelete.size()); // It was set in constructCommon. unsetPendingActivity(this);}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:16,
示例15: scriptExecutionContextvoid XMLHttpRequest::dropProtection(){ // The XHR object itself holds on to the responseText, and // thus has extra cost even independent of any // responseText or responseXML objects it has handed // out. But it is protected from GC while loading, so this // can't be recouped until the load is done, so only // report the extra cost at that point. JSC::VM& vm = scriptExecutionContext()->vm(); JSC::JSLockHolder lock(vm); // FIXME: Adopt reportExtraMemoryVisited, and switch to reportExtraMemoryAllocated. // https://bugs.webkit.org/show_bug.cgi?id=142595 vm.heap.deprecatedReportExtraMemory(m_responseBuilder.length() * 2); unsetPendingActivity(this);}
开发者ID:st3fan,项目名称:webkit,代码行数:16,
示例16: unsetPendingActivityvoid EventSource::close(){ if (m_state == CLOSED) return; if (m_reconnectTimer.isActive()) { m_reconnectTimer.stop(); unsetPendingActivity(this); } m_state = CLOSED; m_failSilently = true; if (m_requestInFlight) m_loader->cancel();}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:16,
示例17: ASSERTvoid Worker::notifyFinished(CachedResource* resource){ ASSERT(resource == m_cachedScript.get()); if (m_cachedScript->errorOccurred()) dispatchErrorEvent(); else { String userAgent = document()->frame() ? document()->frame()->loader()->userAgent(m_scriptURL) : String(); RefPtr<WorkerThread> thread = WorkerThread::create(m_scriptURL, userAgent, m_cachedScript->script(), m_messagingProxy); m_messagingProxy->workerThreadCreated(thread); thread->start(); } m_cachedScript->removeClient(this); m_cachedScript = 0; unsetPendingActivity(this);}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:17,
注:本文中的unsetPendingActivity函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ unsetenv函数代码示例 C++ unsetCursor函数代码示例 |