这篇教程C++ ASSERT_ARG函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ASSERT_ARG函数的典型用法代码示例。如果您正苦于以下问题:C++ ASSERT_ARG函数的具体用法?C++ ASSERT_ARG怎么用?C++ ASSERT_ARG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ASSERT_ARG函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: ASSERT_ARGvoid PageGroup::removeUserScriptsFromWorld(DOMWrapperWorld* world){ ASSERT_ARG(world, world); if (!m_userScripts) return; UserScriptMap::iterator it = m_userScripts->find(world); if (it == m_userScripts->end()) return; m_userScripts->remove(it);}
开发者ID:gobihun,项目名称:webkit,代码行数:13,
示例2: ASSERT_ARGvoid PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& source, const KURL& url, PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist, UserScriptInjectionTime injectionTime){ ASSERT_ARG(world, world); OwnPtr<UserScript> userScript(new UserScript(source, url, whitelist, blacklist, injectionTime)); if (!m_userScripts) m_userScripts.set(new UserScriptMap); UserScriptVector*& scriptsInWorld = m_userScripts->add(world, 0).first->second; if (!scriptsInWorld) scriptsInWorld = new UserScriptVector; scriptsInWorld->append(userScript.release());}
开发者ID:flwh,项目名称:Alcatel_OT_985_kernel,代码行数:13,
示例3: ASSERT_ARGvoid AsyncScriptRunner::executeScriptSoon(ScriptElement* scriptElement, CachedResourceHandle<CachedScript> cachedScript){ ASSERT_ARG(scriptElement, scriptElement); Element* element = scriptElement->element(); ASSERT(element); ASSERT(element->inDocument()); m_document->incrementLoadEventDelayCount(); m_scriptsToExecuteSoon.append(PendingScript(element, cachedScript.get())); if (!m_timer.isActive()) m_timer.startOneShot(0);}
开发者ID:NewDreamUser2,项目名称:webkit-webcl,代码行数:13,
示例4: ASSERT_ARGvoid DrawingAreaProxyImpl::didUpdateBackingStoreState(uint64_t backingStoreStateID, const UpdateInfo& updateInfo, const LayerTreeContext& layerTreeContext){ ASSERT_ARG(backingStoreStateID, backingStoreStateID <= m_nextBackingStoreStateID); ASSERT_ARG(backingStoreStateID, backingStoreStateID > m_currentBackingStoreStateID); m_currentBackingStoreStateID = backingStoreStateID; m_isWaitingForDidUpdateBackingStoreState = false; // Stop the responsiveness timer that was started in sendUpdateBackingStoreState. m_webPageProxy.process().responsivenessTimer()->stop(); if (layerTreeContext != m_layerTreeContext) { if (!m_layerTreeContext.isEmpty()) { exitAcceleratedCompositingMode(); ASSERT(m_layerTreeContext.isEmpty()); } if (!layerTreeContext.isEmpty()) { enterAcceleratedCompositingMode(layerTreeContext); ASSERT(layerTreeContext == m_layerTreeContext); } } if (m_nextBackingStoreStateID != m_currentBackingStoreStateID) sendUpdateBackingStoreState(RespondImmediately); else m_hasReceivedFirstUpdate = true; if (isInAcceleratedCompositingMode()) { ASSERT(!m_backingStore); return; } // If we have a backing store the right size, reuse it. if (m_backingStore && (m_backingStore->size() != updateInfo.viewSize || m_backingStore->deviceScaleFactor() != updateInfo.deviceScaleFactor)) m_backingStore = nullptr; incorporateUpdate(updateInfo);}
开发者ID:houzhenggang,项目名称:webkit,代码行数:38,
示例5: ASSERT_ARGvoid InspectorConsoleAgent::addConsoleMessage(PassOwnPtr<ConsoleMessage> consoleMessage){ ASSERT_ARG(consoleMessage, consoleMessage); if (m_frontend && m_enabled) consoleMessage->addToFrontend(m_frontend, m_injectedScriptManager, true); m_consoleMessages.append(consoleMessage); if (!m_frontend && m_consoleMessages.size() >= maximumConsoleMessages) { m_expiredConsoleMessageCount += expireConsoleMessagesStep; m_consoleMessages.remove(0, expireConsoleMessagesStep); }}
开发者ID:Drakey83,项目名称:steamlink-sdk,代码行数:14,
示例6: ASSERTvoid DrawingAreaImpl::updateBackingStoreState(uint64_t stateID, bool respondImmediately, float deviceScaleFactor, const WebCore::IntSize& size, const WebCore::IntSize& scrollOffset){ ASSERT(!m_inUpdateBackingStoreState); m_inUpdateBackingStoreState = true; ASSERT_ARG(stateID, stateID >= m_backingStoreStateID); if (stateID != m_backingStoreStateID) { m_backingStoreStateID = stateID; m_shouldSendDidUpdateBackingStoreState = true; m_webPage->setDeviceScaleFactor(deviceScaleFactor); m_webPage->setSize(size); m_webPage->layoutIfNeeded(); m_webPage->scrollMainFrameIfNotAtMaxScrollPosition(scrollOffset); if (m_layerTreeHost) {#if USE(COORDINATED_GRAPHICS) // Coordinated Graphics sets the size of the root layer to contents size. if (!m_webPage->useFixedLayout())#endif m_layerTreeHost->sizeDidChange(m_webPage->size()); } else m_dirtyRegion = m_webPage->bounds(); } else { ASSERT(size == m_webPage->size()); if (!m_shouldSendDidUpdateBackingStoreState) { // We've already sent a DidUpdateBackingStoreState message for this state. We have nothing more to do. m_inUpdateBackingStoreState = false; return; } } // The UI process has updated to a new backing store state. Any Update messages we sent before // this point will be ignored. We wait to set this to false until after updating the page's // size so that any displays triggered by the relayout will be ignored. If we're supposed to // respond to the UpdateBackingStoreState message immediately, we'll do a display anyway in // sendDidUpdateBackingStoreState; otherwise we shouldn't do one right now. m_isWaitingForDidUpdate = false; if (respondImmediately) { // Make sure to resume painting if we're supposed to respond immediately, otherwise we'll just // send back an empty UpdateInfo struct. if (m_isPaintingSuspended) resumePainting(); sendDidUpdateBackingStoreState(); } m_inUpdateBackingStoreState = false;}
开发者ID:fmalita,项目名称:webkit,代码行数:50,
示例7: ASSERT_ARGDWORD WINAPI WorkQueue::unregisterWaitAndDestroyItemCallback(void* context){ ASSERT_ARG(context, context); RefPtr<HandleWorkItem> item = adoptRef(static_cast<HandleWorkItem*>(context)); // Now that we know we're not in a callback function for the wait we're unregistering, we can // make a blocking call to ::UnregisterWaitEx. if (!::UnregisterWaitEx(item->waitHandle(), INVALID_HANDLE_VALUE)) { DWORD error = ::GetLastError(); ASSERT_NOT_REACHED(); } return 0;}
开发者ID:edcwconan,项目名称:webkit,代码行数:14,
示例8: JAVASCRIPTCORE_PROFILE_WILL_EXECUTEvoid ProfileGenerator::willExecute(const CallIdentifier& callIdentifier){ if (JAVASCRIPTCORE_PROFILE_WILL_EXECUTE_ENABLED()) { CString name = callIdentifier.m_name.utf8(); CString url = callIdentifier.m_url.utf8(); JAVASCRIPTCORE_PROFILE_WILL_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.m_lineNumber); } if (!m_originatingGlobalExec) return; ASSERT_ARG(m_currentNode, m_currentNode); m_currentNode = m_currentNode->willExecute(callIdentifier);}
开发者ID:pelegri,项目名称:WebKit-PlayBook,代码行数:14,
示例9: ASSERT_ARGvoid InspectorReplayAgent::removeSessionSegment(ErrorString& errorString, Inspector::Protocol::Replay::SessionIdentifier identifier, int segmentIndex){ ASSERT_ARG(identifier, identifier > 0); ASSERT_ARG(segmentIndex, segmentIndex >= 0); RefPtr<ReplaySession> session = findSession(errorString, identifier); if (!session) return; if (static_cast<size_t>(segmentIndex) >= session->size()) { errorString = ASCIILiteral("Invalid segment index."); return; } if (session == m_page.replayController().loadedSession() && sessionState() != WebCore::SessionState::Inactive) { errorString = ASCIILiteral("Can't modify a loaded session unless the session is inactive."); return; } session->removeSegment(segmentIndex); sessionModified(WTF::move(session));}
开发者ID:EthanK28,项目名称:webkit,代码行数:23,
示例10: ASSERT_ARGvoid PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& source, const KURL& url, const Vector<String>& whitelist, const Vector<String>& blacklist, UserScriptInjectionTime injectionTime, UserContentInjectedFrames injectedFrames){ ASSERT_ARG(world, world); OwnPtr<UserScript> userScript = adoptPtr(new UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames)); if (!m_userScripts) m_userScripts = adoptPtr(new UserScriptMap); OwnPtr<UserScriptVector>& scriptsInWorld = m_userScripts->add(world, nullptr).iterator->value; if (!scriptsInWorld) scriptsInWorld = adoptPtr(new UserScriptVector); scriptsInWorld->append(userScript.release());}
开发者ID:jiezh,项目名称:h5vcc,代码行数:14,
示例11: ASSERT_ARGvoid JavaScriptDebugServer::addListener(JavaScriptDebugListener* listener, Page* page){ ASSERT_ARG(page, page); if (!hasListeners()) Page::setDebuggerForAllPages(this); pair<PageListenersMap::iterator, bool> result = m_pageListenersMap.add(page, 0); if (result.second) result.first->second = new ListenerSet; ListenerSet* listeners = result.first->second; listeners->add(listener);}
开发者ID:Czerrr,项目名称:ISeeBrowser,代码行数:14,
示例12: ASSERT_ARGvoid WKCACFLayer::replaceSublayer(WKCACFLayer* reference, PassRefPtr<WKCACFLayer> newLayer){ ASSERT_ARG(reference, reference); ASSERT_ARG(reference, reference->superlayer() == this); if (reference == newLayer) return; if (!newLayer) { removeSublayer(reference); return; } newLayer->removeFromSuperlayer(); int referenceIndex = indexOfSublayer(reference); ASSERT(referenceIndex != -1); if (referenceIndex == -1) return; // FIXME: Can we make this more efficient? The current CACF API doesn't seem to give us a way to do so. reference->removeFromSuperlayer(); insertSublayer(newLayer, referenceIndex);}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:24,
示例13: ASSERT_ARGbool SharedMemory::createHandle(Handle& handle, Protection protection){ ASSERT_ARG(handle, !handle.m_size); ASSERT_ARG(handle, handle.isNull()); int duplicatedHandle; while ((duplicatedHandle = dup(m_fileDescriptor)) == -1) { if (errno != EINTR) { ASSERT_NOT_REACHED(); return false; } } while ((fcntl(duplicatedHandle, F_SETFD, FD_CLOEXEC | accessModeFile(protection)) == -1)) { if (errno != EINTR) { ASSERT_NOT_REACHED(); while (close(duplicatedHandle) == -1 && errno == EINTR) { } return false; } } handle.m_fileDescriptor = duplicatedHandle; handle.m_size = m_size; return true;}
开发者ID:harlanlewis,项目名称:webkit,代码行数:24,
示例14: createFontCustomPlatformDataFontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer){ ASSERT_ARG(buffer, buffer); buffer->ref(); HFONT font = reinterpret_cast<HFONT>(buffer); cairo_font_face_t* fontFace = cairo_win32_font_face_create_for_hfont(font); if (!fontFace) return 0; static cairo_user_data_key_t bufferKey; cairo_font_face_set_user_data(fontFace, &bufferKey, buffer, releaseData); return new FontCustomPlatformData(fontFace);}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:15,
示例15: ASSERT_ARGbool SharedMemory::createHandle(Handle& handle, Protection){ ASSERT_ARG(handle, handle.isNull()); ASSERT(m_fileDescriptor); // FIXME: Handle the case where the passed Protection is ReadOnly. // See https://bugs.webkit.org/show_bug.cgi?id=131542. int duplicatedHandle = dupCloseOnExec(m_fileDescriptor.value()); if (duplicatedHandle == -1) { ASSERT_NOT_REACHED(); return false; } handle.m_attachment = IPC::Attachment(duplicatedHandle, m_size); return true;}
开发者ID:eocanha,项目名称:webkit,代码行数:16,
示例16: ASSERT_ARGvoid JSProxy::setTarget(VM& vm, JSGlobalObject* globalObject){ ASSERT_ARG(globalObject, globalObject); m_target.set(vm, this, globalObject); setPrototypeDirect(vm, globalObject->getPrototypeDirect()); PrototypeMap& prototypeMap = vm.prototypeMap; if (!prototypeMap.isPrototype(this)) return; // This is slow but constant time. We think it's very rare for a proxy // to be a prototype, and reasonably rare to retarget a proxy, // so slow constant time is OK. for (size_t i = 0; i <= JSFinalObject::maxInlineCapacity(); ++i) prototypeMap.clearEmptyObjectStructureForPrototype(this, i);}
开发者ID:caiolima,项目名称:webkit,代码行数:16,
示例17: ASSERT_ARGvoid PageGroup::removeUserStyleSheetsFromWorld(DOMWrapperWorld* world){ ASSERT_ARG(world, world); if (!m_userStyleSheets) return; UserStyleSheetMap::iterator it = m_userStyleSheets->find(world); if (it == m_userStyleSheets->end()) return; delete it->second; m_userStyleSheets->remove(it); resetUserStyleCacheInAllFrames();}
开发者ID:NewDreamUser2,项目名称:webkit-webcl,代码行数:16,
示例18: ASSERT_ARGvoid PageScriptDebugServer::setJavaScriptPaused(Page* page, bool paused){ ASSERT_ARG(page, page); page->setDefersLoading(paused); for (Frame* frame = &page->mainFrame(); frame; frame = frame->tree().traverseNext()) setJavaScriptPaused(frame, paused); if (InspectorFrontendClient* frontendClient = page->inspectorController().inspectorFrontendClient()) { if (paused) frontendClient->pagePaused(); else frontendClient->pageUnpaused(); }}
开发者ID:edcwconan,项目名称:webkit,代码行数:16,
示例19: createFontCustomPlatformDataFontCustomPlatformData* createFontCustomPlatformData(SharedBuffer* buffer){ ASSERT_ARG(buffer, buffer); ASSERT(T2embedLibrary()); RefPtr<SharedBuffer> sfntBuffer; if (isWOFF(buffer)) { Vector<char> sfnt; if (!convertWOFFToSfnt(buffer, sfnt)) return 0; sfntBuffer = SharedBuffer::adoptVector(sfnt); buffer = sfntBuffer.get(); } // Introduce the font to GDI. AddFontMemResourceEx cannot be used, because it will pollute the process's // font namespace (Windows has no API for creating an HFONT from data without exposing the font to the // entire process first). TTLoadEmbeddedFont lets us override the font family name, so using a unique name // we avoid namespace collisions. String fontName = createUniqueFontName(); // TTLoadEmbeddedFont works only with Embedded OpenType (.eot) data, so we need to create an EOT header // and prepend it to the font data. EOTHeader eotHeader; size_t overlayDst; size_t overlaySrc; size_t overlayLength; if (!getEOTHeader(buffer, eotHeader, overlayDst, overlaySrc, overlayLength)) return 0; HANDLE fontReference; ULONG privStatus; ULONG status; EOTStream eotStream(eotHeader, buffer, overlayDst, overlaySrc, overlayLength); LONG loadEmbeddedFontResult = TTLoadEmbeddedFont(&fontReference, TTLOAD_PRIVATE, &privStatus, LICENSE_PREVIEWPRINT, &status, readEmbedProc, &eotStream, const_cast<LPWSTR>(fontName.charactersWithNullTermination()), 0, 0); if (loadEmbeddedFontResult == E_NONE) fontName = String(); else { fontReference = renameAndActivateFont(buffer, fontName); if (!fontReference) return 0; } return new FontCustomPlatformData(fontReference, fontName);}
开发者ID:azrul2202,项目名称:WebKit-Smartphone,代码行数:47,
示例20: ASSERT_ARGvoid InspectorTimelineAgent::addRecordToTimeline(RefPtr<InspectorObject>&& record, TimelineRecordType type){ ASSERT_ARG(record, record); record->setString("type", Inspector::Protocol::getEnumConstantValue(toProtocol(type))); if (m_recordStack.isEmpty()) { auto recordObject = BindingTraits<Inspector::Protocol::Timeline::TimelineEvent>::runtimeCast(WTF::move(record)); sendEvent(WTF::move(recordObject)); } else { const TimelineRecordEntry& parent = m_recordStack.last(); // Nested paint records are an implementation detail and add no information not already contained in the parent. if (type == TimelineRecordType::Paint && parent.type == type) return; parent.children->pushObject(WTF::move(record)); }}
开发者ID:rhythmkay,项目名称:webkit,代码行数:17,
示例21: ASSERT_ARGPassOwnPtr<FontCustomPlatformData> FontCustomPlatformData::create(SharedBuffer* buffer){ ASSERT_ARG(buffer, buffer); OpenTypeSanitizer sanitizer(buffer); RefPtr<SharedBuffer> transcodeBuffer = sanitizer.sanitize(); if (!transcodeBuffer) return nullptr; // validation failed. buffer = transcodeBuffer.get(); SkMemoryStream* stream = new SkMemoryStream(buffer->getAsSkData().get()); RefPtr<SkTypeface> typeface = adoptRef(SkTypeface::CreateFromStream(stream)); if (!typeface) return nullptr; return adoptPtr(new FontCustomPlatformData(typeface.release()));}
开发者ID:Jamesducque,项目名称:mojo,代码行数:17,
注:本文中的ASSERT_ARG函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ ASSERT_ARGS函数代码示例 C++ ASSERT_ALWAYS函数代码示例 |