Source/JavaScriptCore/API/JSValueRef.cpp

@@JSStringRef JSValueToStringCopy(JSContextRef ctx, JSValueRef value, JSValueRef*
422422
423423 RefPtr<OpaqueJSString> stringRef(OpaqueJSString::create(jsValue.toString(exec)->value(exec)));
424424 if (handleExceptionIfNeeded(exec, exception) == ExceptionStatus::DidThrow)
425  stringRef.clear();
 425 stringRef = nullptr;
426426 return stringRef.release().leakRef();
427427}
428428

Source/JavaScriptCore/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * API/JSValueRef.cpp:
 9 (JSValueToStringCopy):
 10 * bytecode/CallLinkInfo.cpp:
 11 (JSC::CallLinkInfo::clearStub):
 12 * bytecode/StructureStubInfo.h:
 13 (JSC::StructureStubInfo::reset):
 14 * dfg/DFGGraph.h:
 15 (JSC::DFG::Graph::killBlock):
 16 * dfg/DFGOperations.cpp:
 17 * inspector/ConsoleMessage.cpp:
 18 (Inspector::ConsoleMessage::clear):
 19 * inspector/JSGlobalObjectInspectorController.cpp:
 20 (Inspector::JSGlobalObjectInspectorController::disconnectFrontend):
 21 * inspector/agents/InspectorAgent.cpp:
 22 (Inspector::InspectorAgent::willDestroyFrontendAndBackend):
 23 * inspector/agents/InspectorConsoleAgent.cpp:
 24 (Inspector::InspectorConsoleAgent::willDestroyFrontendAndBackend):
 25 * inspector/agents/InspectorDebuggerAgent.cpp:
 26 (Inspector::InspectorDebuggerAgent::willDestroyFrontendAndBackend):
 27 * inspector/agents/JSGlobalObjectRuntimeAgent.cpp:
 28 (Inspector::JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend):
 29 * runtime/Executable.cpp:
 30 (JSC::ExecutableBase::clearCode):
 31 (JSC::EvalExecutable::clearCode):
 32 (JSC::ProgramExecutable::clearCode):
 33 (JSC::FunctionExecutable::clearCode):
 34 * runtime/JSLock.cpp:
 35 (JSC::JSLockHolder::~JSLockHolder):
 36 * runtime/Structure.cpp:
 37 (JSC::Structure::pin):
 38
1392015-07-03 Yusuke Suzuki <utatane.tea@gmail.com>
240
341 Relax builtin JS restriction about try-catch

Source/JavaScriptCore/bytecode/CallLinkInfo.cpp

@@void CallLinkInfo::clearStub()
4343 return;
4444
4545 m_stub->clearCallNodesFor(this);
46  m_stub.clear();
 46 m_stub = nullptr;
4747}
4848
4949void CallLinkInfo::unlink(RepatchBuffer& repatchBuffer)

Source/JavaScriptCore/bytecode/StructureStubInfo.h

@@struct StructureStubInfo {
149149 {
150150 deref();
151151 accessType = access_unset;
152  stubRoutine.clear();
153  watchpoints.clear();
 152 stubRoutine = nullptr;
 153 watchpoints = nullptr;
154154 }
155155
156156 void deref();

Source/JavaScriptCore/debugger/Debugger.cpp

@@public:
117117 {
118118 if (m_debugger.m_currentDebuggerCallFrame) {
119119 m_debugger.m_currentDebuggerCallFrame->invalidate();
120  m_debugger.m_currentDebuggerCallFrame = 0;
 120 m_debugger.m_currentDebuggerCallFrame = nullptr;
121121 }
122122 }
123123

Source/JavaScriptCore/dfg/DFGGraph.h

@@public:
443443
444444 void killBlock(BlockIndex blockIndex)
445445 {
446  m_blocks[blockIndex].clear();
 446 m_blocks[blockIndex] = nullptr;
447447 }
448448
449449 void killBlock(BasicBlock* basicBlock)

Source/JavaScriptCore/dfg/DFGOperations.cpp

@@char* JIT_OPERATION triggerOSREntryNow(
14471447
14481448 // OSR entry failed. Oh no! This implies that we need to retry. We retry
14491449 // without exponential backoff and we only do this for the entry code block.
1450  jitCode->osrEntryBlock.clear();
 1450 jitCode->osrEntryBlock = nullptr;
14511451 jitCode->osrEntryRetry = 0;
14521452 return 0;
14531453 }

Source/JavaScriptCore/inspector/ConsoleMessage.cpp

@@void ConsoleMessage::clear()
273273 m_message = ASCIILiteral("<message collected>");
274274
275275 if (m_arguments)
276  m_arguments.clear();
 276 m_arguments = nullptr;
277277}
278278
279279JSC::ExecState* ConsoleMessage::scriptState() const

Source/JavaScriptCore/inspector/JSGlobalObjectInspectorController.cpp

@@void JSGlobalObjectInspectorController::disconnectFrontend(DisconnectReason reas
131131 m_agents.willDestroyFrontendAndBackend(reason);
132132
133133 m_backendDispatcher->clearFrontend();
134  m_backendDispatcher.clear();
 134 m_backendDispatcher = nullptr;
135135 m_frontendChannel = nullptr;
136136
137137 m_isAutomaticInspection = false;

Source/JavaScriptCore/inspector/agents/InspectorAgent.cpp

@@void InspectorAgent::didCreateFrontendAndBackend(FrontendChannel* frontendChanne
5757void InspectorAgent::willDestroyFrontendAndBackend(DisconnectReason)
5858{
5959 m_frontendDispatcher = nullptr;
60  m_backendDispatcher.clear();
 60 m_backendDispatcher = nullptr;
6161
6262 m_pendingEvaluateTestCommands.clear();
6363

Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.cpp

@@void InspectorConsoleAgent::didCreateFrontendAndBackend(FrontendChannel* fronten
6464void InspectorConsoleAgent::willDestroyFrontendAndBackend(DisconnectReason)
6565{
6666 m_frontendDispatcher = nullptr;
67  m_backendDispatcher.clear();
 67 m_backendDispatcher = nullptr;
6868
6969 String errorString;
7070 disable(errorString);

Source/JavaScriptCore/inspector/agents/InspectorDebuggerAgent.cpp

@@void InspectorDebuggerAgent::didCreateFrontendAndBackend(FrontendChannel* fronte
7777void InspectorDebuggerAgent::willDestroyFrontendAndBackend(DisconnectReason reason)
7878{
7979 m_frontendDispatcher = nullptr;
80  m_backendDispatcher.clear();
 80 m_backendDispatcher = nullptr;
8181
8282 bool skipRecompile = reason == DisconnectReason::InspectedTargetDestroyed;
8383 disable(skipRecompile);

Source/JavaScriptCore/inspector/agents/JSGlobalObjectRuntimeAgent.cpp

@@void JSGlobalObjectRuntimeAgent::didCreateFrontendAndBackend(FrontendChannel* fr
4949void JSGlobalObjectRuntimeAgent::willDestroyFrontendAndBackend(DisconnectReason reason)
5050{
5151 m_frontendDispatcher = nullptr;
52  m_backendDispatcher.clear();
 52 m_backendDispatcher = nullptr;
5353
5454 InspectorRuntimeAgent::willDestroyFrontendAndBackend(reason);
5555}

Source/JavaScriptCore/parser/Parser.cpp

@@template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVarDeclarati
491491 JSToken lastIdentToken;
492492 do {
493493 lastIdent = 0;
494  lastPattern = 0;
 494 lastPattern = TreeDestructuringPattern(0);
495495 JSTokenLocation location(tokenLocation());
496496 next();
497497 TreeExpression node = 0;

@@template <class TreeBuilder> TreeStatement Parser<LexerType>::parseForStatement(
894894 declsEnd = lastTokenEndPosition();
895895 if (pattern && (match(INTOKEN) || (match(IDENT) && *m_token.m_data.ident == m_vm->propertyNames->of)))
896896 goto enumerationLoop;
897  pattern = 0;
 897 pattern = TreeDestructuringPattern(0);
898898 restoreSavePoint(savePoint);
899899 }
900900 m_allowsIn = false;

Source/JavaScriptCore/runtime/Executable.cpp

@@void ExecutableBase::destroy(JSCell* cell)
5252void ExecutableBase::clearCode()
5353{
5454#if ENABLE(JIT)
55  m_jitCodeForCall.clear();
56  m_jitCodeForConstruct.clear();
 55 m_jitCodeForCall = nullptr;
 56 m_jitCodeForConstruct = nullptr;
5757 m_jitCodeForCallWithArityCheck = MacroAssemblerCodePtr();
5858 m_jitCodeForConstructWithArityCheck = MacroAssemblerCodePtr();
5959 m_jitCodeForCallWithArityCheckAndPreserveRegs = MacroAssemblerCodePtr();

@@void EvalExecutable::unlinkCalls()
464464
465465void EvalExecutable::clearCode()
466466{
467  m_evalCodeBlock.clear();
 467 m_evalCodeBlock = nullptr;
468468 m_unlinkedEvalCodeBlock.clear();
469469 Base::clearCode();
470470}

@@void ProgramExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
543543
544544void ProgramExecutable::clearCode()
545545{
546  m_programCodeBlock.clear();
 546 m_programCodeBlock = nullptr;
547547 m_unlinkedProgramCodeBlock.clear();
548548 Base::clearCode();
549549}

@@void FunctionExecutable::clearUnlinkedCodeForRecompilation()
587587
588588void FunctionExecutable::clearCode()
589589{
590  m_codeBlockForCall.clear();
591  m_codeBlockForConstruct.clear();
 590 m_codeBlockForCall = nullptr;
 591 m_codeBlockForConstruct = nullptr;
592592 Base::clearCode();
593593}
594594

Source/JavaScriptCore/runtime/JSLock.cpp

@@void JSLockHolder::init()
7373JSLockHolder::~JSLockHolder()
7474{
7575 RefPtr<JSLock> apiLock(&m_vm->apiLock());
76  m_vm.clear();
 76 m_vm = nullptr;
7777 apiLock->unlock();
7878}
7979

Source/JavaScriptCore/runtime/Structure.cpp

@@void Structure::pin()
737737 ASSERT(propertyTable());
738738 setIsPinnedPropertyTable(true);
739739 clearPreviousID();
740  m_nameInPrevious.clear();
 740 m_nameInPrevious = nullptr;
741741}
742742
743743void Structure::allocateRareData(VM& vm)

Source/WTF/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * wtf/RefPtr.h:
 9 (WTF::RefPtr::release): Deleted.
 10 (WTF::RefPtr<T>::leakRef): Deleted.
 11
1122015-07-01 Alex Christensen <achristensen@webkit.org>
213
314 Re-enable WebGL on WinCairo

Source/WTF/wtf/RefPtr.h

@@public:
7777
7878 RefPtr& operator=(const RefPtr&);
7979 RefPtr& operator=(T*);
 80 RefPtr& operator=(std::nullptr_t);
8081 RefPtr& operator=(const PassRefPtr<T>&);
8182 template<typename U> RefPtr& operator=(const RefPtr<U>&);
8283 template<typename U> RefPtr& operator=(const PassRefPtr<U>&);

@@template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(T* optr)
141142 return *this;
142143}
143144
 145template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(std::nullptr_t)
 146{
 147 derefIfNotNull(std::exchange(m_ptr, nullptr));
 148 return *this;
 149}
 150
144151template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(const PassRefPtr<T>& o)
145152{
146153 RefPtr ptr = o;

Source/WTF/wtf/text/StringBuilder.h

@@public:
264264 {
265265 m_length = 0;
266266 m_string = String();
267  m_buffer = 0;
 267 m_buffer = nullptr;
268268 m_bufferCharacters8 = 0;
269269 m_is8Bit = true;
270270 }

Source/WebCore/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * Modules/indexeddb/IDBCursor.cpp:
 9 (WebCore::IDBCursor::close):
 10 * Modules/indexeddb/IDBDatabaseBackend.cpp:
 11 (WebCore::IDBDatabaseBackend::transactionFinished):
 12 * Modules/indexeddb/IDBObjectStore.cpp:
 13 * Modules/indexeddb/IDBOpenDBRequest.cpp:
 14 (WebCore::IDBOpenDBRequest::dispatchEvent):
 15 * Modules/indexeddb/IDBRequest.cpp:
 16 (WebCore::IDBRequest::abort):
 17 (WebCore::IDBRequest::setPendingCursor):
 18 (WebCore::IDBRequest::onError):
 19 (WebCore::IDBRequest::onSuccessInternal):
 20 (WebCore::IDBRequest::transactionDidFinishAndDispatch):
 21 * Modules/indexeddb/IDBTransaction.cpp:
 22 (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
 23 * Modules/mediasource/MediaSource.cpp:
 24 (WebCore::MediaSource::setReadyState):
 25 (WebCore::MediaSource::stop):
 26 * Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp:
 27 (WebCore::RTCSessionDescriptionRequestImpl::clear):
 28 * Modules/mediastream/RTCStatsRequestImpl.cpp:
 29 (WebCore::RTCStatsRequestImpl::clear):
 30 * Modules/mediastream/RTCVoidRequestImpl.cpp:
 31 (WebCore::RTCVoidRequestImpl::clear):
 32 * Modules/webaudio/AudioContext.cpp:
 33 (WebCore::AudioContext::clear):
 34 * Modules/webdatabase/SQLTransactionBackend.cpp:
 35 (WebCore::SQLTransactionBackend::releaseOriginLockIfNeeded):
 36 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
 37 (WebCore::WorkerThreadableWebSocketChannel::disconnect):
 38 * bindings/js/WebCoreJSClientData.h:
 39 (WebCore::WebCoreJSClientData::~WebCoreJSClientData):
 40 * bindings/js/WorkerScriptController.cpp:
 41 (WebCore::WorkerScriptController::~WorkerScriptController):
 42 * contentextensions/ContentExtensionParser.cpp:
 43 (WebCore::ContentExtensions::parseRuleList):
 44 * css/CSSParser.cpp:
 45 (WebCore::CSSParser::parseFillPosition):
 46 (WebCore::CSSParser::parse2ValuesFillPosition):
 47 (WebCore::CSSParser::popRuleData):
 48 (WebCore::CSSParser::markRuleBodyStart):
 49 * dom/Document.cpp:
 50 (WebCore::Document::detachParser):
 51 (WebCore::Document::clearScriptedAnimationController):
 52 (WebCore::Document::updateHoverActiveState):
 53 * dom/DocumentMarker.h:
 54 (WebCore::DocumentMarker::clearDetails):
 55 * dom/Element.cpp:
 56 (WebCore::Element::cloneAttributesFromElement):
 57 * dom/NodeIterator.cpp:
 58 (WebCore::NodeIterator::NodePointer::clear):
 59 (WebCore::NodeIterator::detach):
 60 * dom/Position.h:
 61 (WebCore::Position::clear):
 62 * dom/RangeBoundaryPoint.h:
 63 (WebCore::RangeBoundaryPoint::clear):
 64 * dom/SpaceSplitString.h:
 65 (WebCore::SpaceSplitString::clear):
 66 * dom/StyledElement.cpp:
 67 (WebCore::StyledElement::setInlineStyleFromString):
 68 (WebCore::StyledElement::styleAttributeChanged):
 69 * editing/AlternativeTextController.cpp:
 70 (WebCore::AlternativeTextController::startAlternativeTextUITimer):
 71 (WebCore::AlternativeTextController::stopAlternativeTextUITimer):
 72 (WebCore::AlternativeTextController::applyPendingCorrection):
 73 (WebCore::AlternativeTextController::timerFired):
 74 (WebCore::AlternativeTextController::handleAlternativeTextUIResult):
 75 * editing/EditingStyle.cpp:
 76 (WebCore::EditingStyle::clear):
 77 * editing/Editor.cpp:
 78 (WebCore::Editor::clearLastEditCommand):
 79 * editing/FrameSelection.cpp:
 80 (WebCore::FrameSelection::prepareForDestruction):
 81 * editing/FrameSelection.h:
 82 (WebCore::FrameSelection::clearTypingStyle):
 83 * editing/SpellChecker.cpp:
 84 (WebCore::SpellChecker::didCheck):
 85 * html/BaseChooserOnlyDateAndTimeInputType.cpp:
 86 (WebCore::BaseChooserOnlyDateAndTimeInputType::didEndChooser):
 87 * html/FileInputType.cpp:
 88 (WebCore::FileInputType::setValue):
 89 * html/HTMLCanvasElement.cpp:
 90 (WebCore::HTMLCanvasElement::clearPresentationCopy):
 91 (WebCore::HTMLCanvasElement::clearCopiedImage):
 92 * html/HTMLPlugInElement.cpp:
 93 (WebCore::HTMLPlugInElement::willDetachRenderers):
 94 (WebCore::HTMLPlugInElement::resetInstance):
 95 * html/TextFieldInputType.cpp:
 96 (WebCore::TextFieldInputType::updatePlaceholderText):
 97 * html/canvas/WebGLRenderingContextBase.cpp:
 98 (WebCore::WebGLRenderingContextBase::destroyGraphicsContext3D):
 99 * inspector/InspectorApplicationCacheAgent.cpp:
 100 (WebCore::InspectorApplicationCacheAgent::willDestroyFrontendAndBackend):
 101 * inspector/InspectorCSSAgent.cpp:
 102 (WebCore::InspectorCSSAgent::willDestroyFrontendAndBackend):
 103 * inspector/InspectorController.cpp:
 104 (WebCore::InspectorController::disconnectFrontend):
 105 * inspector/InspectorDOMAgent.cpp:
 106 (WebCore::InspectorDOMAgent::willDestroyFrontendAndBackend):
 107 * inspector/InspectorDOMDebuggerAgent.cpp:
 108 (WebCore::InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend):
 109 * inspector/InspectorDOMStorageAgent.cpp:
 110 (WebCore::InspectorDOMStorageAgent::willDestroyFrontendAndBackend):
 111 * inspector/InspectorDatabaseAgent.cpp:
 112 (WebCore::InspectorDatabaseAgent::willDestroyFrontendAndBackend):
 113 * inspector/InspectorIndexedDBAgent.cpp:
 114 (WebCore::InspectorIndexedDBAgent::willDestroyFrontendAndBackend):
 115 * inspector/InspectorLayerTreeAgent.cpp:
 116 (WebCore::InspectorLayerTreeAgent::willDestroyFrontendAndBackend):
 117 * inspector/InspectorOverlay.cpp:
 118 (WebCore::InspectorOverlay::hideHighlight):
 119 (WebCore::InspectorOverlay::highlightNodeList):
 120 (WebCore::InspectorOverlay::highlightNode):
 121 * inspector/InspectorPageAgent.cpp:
 122 (WebCore::InspectorPageAgent::willDestroyFrontendAndBackend):
 123 (WebCore::InspectorPageAgent::disable):
 124 * inspector/InspectorReplayAgent.cpp:
 125 (WebCore::InspectorReplayAgent::willDestroyFrontendAndBackend):
 126 * inspector/InspectorResourceAgent.cpp:
 127 (WebCore::InspectorResourceAgent::willDestroyFrontendAndBackend):
 128 * inspector/InspectorStyleSheet.cpp:
 129 (WebCore::InspectorStyleSheetForInlineStyle::didModifyElementAttribute):
 130 (WebCore::InspectorStyleSheetForInlineStyle::setStyleText):
 131 (WebCore::InspectorStyleSheetForInlineStyle::ensureParsedDataReady):
 132 * inspector/InspectorTimelineAgent.cpp:
 133 (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
 134 * inspector/InspectorWorkerAgent.cpp:
 135 (WebCore::InspectorWorkerAgent::willDestroyFrontendAndBackend):
 136 * inspector/PageRuntimeAgent.cpp:
 137 (WebCore::PageRuntimeAgent::willDestroyFrontendAndBackend):
 138 * inspector/WebInjectedScriptManager.cpp:
 139 (WebCore::WebInjectedScriptManager::disconnect):
 140 * inspector/WorkerInspectorController.cpp:
 141 (WebCore::WorkerInspectorController::disconnectFrontend):
 142 * inspector/WorkerRuntimeAgent.cpp:
 143 (WebCore::WorkerRuntimeAgent::willDestroyFrontendAndBackend):
 144 * loader/FrameLoader.cpp:
 145 (WebCore::FrameLoader::didBeginDocument):
 146 * loader/cache/CachedCSSStyleSheet.cpp:
 147 (WebCore::CachedCSSStyleSheet::destroyDecodedData):
 148 (WebCore::CachedCSSStyleSheet::restoreParsedStyleSheet):
 149 * loader/cache/CachedImage.cpp:
 150 (WebCore::CachedImage::clearImage):
 151 * loader/cache/CachedRawResource.cpp:
 152 (WebCore::CachedRawResource::clear):
 153 * loader/cache/CachedResource.cpp:
 154 (WebCore::CachedResource::error):
 155 * loader/icon/IconRecord.cpp:
 156 (WebCore::IconRecord::setImageData):
 157 * page/EventHandler.cpp:
 158 (WebCore::EventHandler::clear):
 159 (WebCore::EventHandler::handleTouchEvent):
 160 * page/Page.cpp:
 161 (WebCore::Page::refreshPlugins):
 162 * platform/audio/mac/CARingBuffer.cpp:
 163 (WebCore::CARingBuffer::deallocate):
 164 * platform/graphics/Font.cpp:
 165 (WebCore::Font::mathData):
 166 * platform/graphics/FontCache.cpp:
 167 (WebCore::FontCache::getVerticalData):
 168 * platform/graphics/GraphicsContext.cpp:
 169 (WebCore::GraphicsContext::setStrokeColor):
 170 (WebCore::GraphicsContext::setFillColor):
 171 (WebCore::GraphicsContext::setStrokePattern):
 172 (WebCore::GraphicsContext::setFillPattern):
 173 (WebCore::GraphicsContext::setStrokeGradient):
 174 (WebCore::GraphicsContext::setFillGradient):
 175 * platform/graphics/cairo/BackingStoreBackendCairoX11.cpp:
 176 (WebCore::BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11):
 177 * platform/graphics/cairo/BitmapImageCairo.cpp:
 178 (WebCore::FrameData::clear):
 179 * platform/graphics/filters/FilterEffect.cpp:
 180 (WebCore::FilterEffect::clearResult):
 181 (WebCore::FilterEffect::transformResultColorSpace):
 182 * platform/graphics/gstreamer/ImageGStreamerCairo.cpp:
 183 (ImageGStreamer::~ImageGStreamer):
 184 * platform/graphics/texmap/BitmapTextureGL.cpp:
 185 (WebCore::BitmapTextureGL::applyFilters):
 186 * platform/graphics/texmap/TextureMapperGL.cpp:
 187 (WebCore::TextureMapperGL::bindDefaultSurface):
 188 * platform/graphics/texmap/TextureMapperLayer.cpp:
 189 (WebCore::TextureMapperLayer::paintWithIntermediateSurface):
 190 * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
 191 (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
 192 * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
 193 (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
 194 * platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp:
 195 (WebCore::CoordinatedImageBacking::releaseSurfaceIfNeeded):
 196 * platform/gtk/GamepadsGtk.cpp:
 197 (WebCore::GamepadsGtk::unregisterDevice):
 198 * rendering/InlineFlowBox.cpp:
 199 (WebCore::InlineFlowBox::computeOverflow):
 200 * rendering/RenderBox.cpp:
 201 (WebCore::RenderBox::clearOverflow):
 202 * rendering/RenderBoxRegionInfo.h:
 203 (WebCore::RenderBoxRegionInfo::clearOverflow):
 204 * rendering/style/FillLayer.h:
 205 (WebCore::FillLayer::clearMaskImage):
 206 (WebCore::FillLayer::clearImage):
 207 * svg/SVGTRefElement.cpp:
 208 (WebCore::SVGTRefTargetEventListener::detach):
 209 * testing/Internals.cpp:
 210 (WebCore::Internals::closeDummyInspectorFrontend):
 211 * workers/WorkerEventQueue.cpp:
 212 (WebCore::WorkerEventQueue::EventDispatcher::dispatch):
 213 (WebCore::WorkerEventQueue::EventDispatcher::cancel):
 214 * xml/XMLHttpRequest.cpp:
 215 (WebCore::XMLHttpRequest::responseBlob):
 216 (WebCore::XMLHttpRequest::responseArrayBuffer):
 217 (WebCore::XMLHttpRequest::clearResponseBuffers):
 218 * xml/XSLTProcessor.cpp:
 219 (WebCore::XSLTProcessor::reset):
 220
12212015-07-03 Kyounga Ra <kyounga@alticast.com>
2222
3223 Memory leak for a protected Element having pending events in ImageLoader.

Source/WebCore/Modules/indexeddb/IDBCursor.cpp

@@void IDBCursor::close()
259259 m_transactionNotifier.cursorFinished();
260260 if (m_request) {
261261 m_request->finishCursor();
262  m_request.clear();
 262 m_request = nullptr;
263263 }
264264}
265265

Source/WebCore/Modules/indexeddb/IDBDatabaseBackend.cpp

@@void IDBDatabaseBackend::transactionFinished(IDBTransactionBackend* rawTransacti
333333 m_transactions.remove(transaction->id());
334334 if (transaction->mode() == IndexedDB::TransactionMode::VersionChange) {
335335 ASSERT(transaction.get() == m_runningVersionChangeTransaction.get());
336  m_runningVersionChangeTransaction.clear();
 336 m_runningVersionChangeTransaction = nullptr;
337337 }
338338}
339339

Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp

@@private:
337337 // Now that we are done indexing, tell the backend to go
338338 // back to processing tasks of type NormalTask.
339339 m_databaseBackend->setIndexesReady(m_transactionId, m_objectStoreId, indexIds);
340  m_databaseBackend.clear();
 340 m_databaseBackend = nullptr;
341341 }
342342
343343 }

Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.cpp

@@bool IDBOpenDBRequest::dispatchEvent(PassRefPtr<Event> event)
142142 // If the connection closed between onUpgradeNeeded and the delivery of the "success" event,
143143 // an "error" event should be fired instead.
144144 if (event->type() == eventNames().successEvent && m_result->type() == IDBAny::IDBDatabaseType && m_result->idbDatabase()->isClosePending()) {
145  m_result.clear();
 145 m_result = nullptr;
146146 onError(IDBDatabaseError::create(IDBDatabaseException::AbortError, "The connection was closed."));
147147 return false;
148148 }

Source/WebCore/Modules/indexeddb/IDBRequest.cpp

@@void IDBRequest::abort()
170170 m_enqueuedEvents.clear();
171171
172172 m_errorCode = 0;
173  m_error.clear();
 173 m_error = nullptr;
174174 m_errorMessage = String();
175  m_result.clear();
 175 m_result = nullptr;
176176 onError(IDBDatabaseError::create(IDBDatabaseException::AbortError));
177177 m_requestAborted = true;
178178}

@@void IDBRequest::setPendingCursor(PassRefPtr<IDBCursor> cursor)
194194 ASSERT(cursor == getResultCursor());
195195
196196 m_pendingCursor = cursor;
197  m_result.clear();
 197 m_result = nullptr;
198198 m_readyState = PENDING;
199199 m_errorCode = 0;
200  m_error.clear();
 200 m_error = nullptr;
201201 m_errorMessage = String();
202202 m_transaction->registerRequest(this);
203203}

@@void IDBRequest::onError(PassRefPtr<IDBDatabaseError> error)
256256 m_errorCode = error->code();
257257 m_errorMessage = error->message();
258258 m_error = DOMError::create(IDBDatabaseException::getErrorName(error->idbCode()));
259  m_pendingCursor.clear();
 259 m_pendingCursor = nullptr;
260260 enqueueEvent(Event::create(eventNames().errorEvent, true, true));
261261}
262262

@@void IDBRequest::onSuccessInternal(const Deprecated::ScriptValue& value)
404404 m_result = IDBAny::create(value);
405405 if (m_pendingCursor) {
406406 m_pendingCursor->close();
407  m_pendingCursor.clear();
 407 m_pendingCursor = nullptr;
408408 }
409409 enqueueEvent(createSuccessEvent());
410410}

@@void IDBRequest::transactionDidFinishAndDispatch()
553553 ASSERT(m_transaction->isVersionChange());
554554 ASSERT(m_readyState == DONE);
555555 ASSERT(scriptExecutionContext());
556  m_transaction.clear();
 556 m_transaction = nullptr;
557557 m_readyState = PENDING;
558558}
559559

Source/WebCore/Modules/indexeddb/IDBTransaction.cpp

@@void IDBTransaction::OpenCursorNotifier::cursorFinished()
240240 if (m_cursor) {
241241 m_transaction->unregisterOpenCursor(m_cursor);
242242 m_cursor = nullptr;
243  m_transaction.clear();
 243 m_transaction = nullptr;
244244 }
245245}
246246

Source/WebCore/Modules/mediasource/MediaSource.cpp

@@void MediaSource::setReadyState(const AtomicString& state)
394394 LOG(MediaSource, "MediaSource::setReadyState(%p) : %s -> %s", this, oldState.string().ascii().data(), state.string().ascii().data());
395395
396396 if (state == closedKeyword()) {
397  m_private.clear();
 397 m_private = nullptr;
398398 m_mediaElement = nullptr;
399399 m_duration = MediaTime::invalidTime();
400400 }

@@void MediaSource::stop()
811811 m_asyncEventQueue.close();
812812 if (!isClosed())
813813 setReadyState(closedKeyword());
814  m_private.clear();
 814 m_private = nullptr;
815815}
816816
817817bool MediaSource::canSuspendForPageCache() const

Source/WebCore/Modules/mediastream/RTCSessionDescriptionRequestImpl.cpp

@@bool RTCSessionDescriptionRequestImpl::canSuspendForPageCache() const
9797
9898void RTCSessionDescriptionRequestImpl::clear()
9999{
100  m_successCallback.clear();
101  m_errorCallback.clear();
 100 m_successCallback = nullptr;
 101 m_errorCallback = nullptr;
102102}
103103
104104} // namespace WebCore

Source/WebCore/Modules/mediastream/RTCStatsRequestImpl.cpp

@@bool RTCStatsRequestImpl::canSuspendForPageCache() const
104104
105105void RTCStatsRequestImpl::clear()
106106{
107  m_successCallback.clear();
 107 m_successCallback = nullptr;
108108}
109109
110110

Source/WebCore/Modules/mediastream/RTCVoidRequestImpl.cpp

@@bool RTCVoidRequestImpl::canSuspendForPageCache() const
9494
9595void RTCVoidRequestImpl::clear()
9696{
97  m_successCallback.clear();
98  m_errorCallback.clear();
 97 m_successCallback = nullptr;
 98 m_errorCallback = nullptr;
9999}
100100
101101} // namespace WebCore

Source/WebCore/Modules/webaudio/AudioContext.cpp

@@void AudioContext::clear()
231231{
232232 // 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.
233233 if (m_destinationNode)
234  m_destinationNode.clear();
 234 m_destinationNode = nullptr;
235235
236236 // Audio thread is dead. Nobody will schedule node deletion action. Let's do it ourselves.
237237 do {

Source/WebCore/Modules/webdatabase/SQLTransactionBackend.cpp

@@void SQLTransactionBackend::releaseOriginLockIfNeeded()
845845{
846846 if (m_originLock) {
847847 m_originLock->unlock();
848  m_originLock.clear();
 848 m_originLock = nullptr;
849849 }
850850}
851851

Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp

@@void WorkerThreadableWebSocketChannel::fail(const String& reason)
126126void WorkerThreadableWebSocketChannel::disconnect()
127127{
128128 m_bridge->disconnect();
129  m_bridge.clear();
 129 m_bridge = nullptr;
130130}
131131
132132void WorkerThreadableWebSocketChannel::suspend()

Source/WebCore/bindings/js/ScriptController.cpp

@@ScriptController::~ScriptController()
102102 if (m_cacheableBindingRootObject) {
103103 JSLockHolder lock(JSDOMWindowBase::commonVM());
104104 m_cacheableBindingRootObject->invalidate();
105  m_cacheableBindingRootObject = 0;
 105 m_cacheableBindingRootObject = nullptr;
106106 }
107107
108108 // It's likely that destroying m_windowShells will create a lot of garbage.

@@void ScriptController::clearScriptObjects()
489489
490490 if (m_bindingRootObject) {
491491 m_bindingRootObject->invalidate();
492  m_bindingRootObject = 0;
 492 m_bindingRootObject = nullptr;
493493 }
494494
495495#if ENABLE(NETSCAPE_PLUGIN_API)

@@void ScriptController::clearScriptObjects()
498498 // script object properly.
499499 // This shouldn't cause any problems for plugins since they should have already been stopped and destroyed at this point.
500500 _NPN_DeallocateObject(m_windowScriptNPObject);
501  m_windowScriptNPObject = 0;
 501 m_windowScriptNPObject = nullptr;
502502 }
503503#endif
504504}

Source/WebCore/bindings/js/WebCoreJSClientData.h

@@public:
4444 ASSERT(m_worldSet.contains(m_normalWorld.get()));
4545 ASSERT(m_worldSet.size() == 1);
4646 ASSERT(m_normalWorld->hasOneRef());
47  m_normalWorld.clear();
 47 m_normalWorld = nullptr;
4848 ASSERT(m_worldSet.isEmpty());
4949 }
5050

Source/WebCore/bindings/js/WorkerScriptController.cpp

@@WorkerScriptController::~WorkerScriptController()
6262{
6363 JSLockHolder lock(vm());
6464 m_workerGlobalScopeWrapper.clear();
65  m_vm.clear();
 65 m_vm = nullptr;
6666}
6767
6868void WorkerScriptController::initScript()

Source/WebCore/bridge/runtime_object.cpp

@@void RuntimeObject::invalidate()
5959 ASSERT(m_instance);
6060 if (m_instance)
6161 m_instance->willInvalidateRuntimeObject();
62  m_instance = 0;
 62 m_instance = nullptr;
6363}
6464
6565EncodedJSValue RuntimeObject::fallbackObjectGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName)

Source/WebCore/contentextensions/ContentExtensionParser.cpp

@@std::error_code parseRuleList(const String& rules, Vector<ContentExtensionRule>&
277277 ExecState* exec = globalObject->globalExec();
278278 auto error = loadEncodedRules(*exec, rules, ruleList);
279279
280  vm.clear();
 280 vm = nullptr;
281281
282282 if (error)
283283 return error;

Source/WebCore/css/CSSParser.cpp

@@void CSSParser::parseFillPosition(CSSParserValueList& valueList, RefPtr<CSSValue
45024502 if (value2)
45034503 valueList.next();
45044504 else {
4505  value1.clear();
 4505 value1 = nullptr;
45064506 return;
45074507 }
45084508
45094509 RefPtr<CSSPrimitiveValue> parsedValue1 = downcast<CSSPrimitiveValue>(value1.get());
45104510 RefPtr<CSSPrimitiveValue> parsedValue2 = downcast<CSSPrimitiveValue>(value2.get());
45114511
4512  value1.clear();
4513  value2.clear();
 4512 value1 = nullptr;
 4513 value2 = nullptr;
45144514
45154515 // Per CSS3 syntax, <position> can't have 'center' as its second keyword as we have more arguments to follow.
45164516 if (parsedValue2->getValueID() == CSSValueCenter)

@@void CSSParser::parse2ValuesFillPosition(CSSParserValueList& valueList, RefPtr<C
45494549 valueList.next();
45504550 else {
45514551 if (!inShorthand()) {
4552  value1.clear();
 4552 value1 = nullptr;
45534553 return;
45544554 }
45554555 }

@@struct ShadowParseContext {
75877587 }
75887588
75897589 // Now reset for the next shadow value.
7590  x = 0;
7591  y = 0;
 7590 x = nullptr;
 7591 y = nullptr;
75927592 blur = nullptr;
75937593 spread = nullptr;
75947594 style = nullptr;

@@PassRefPtr<CSSRuleSourceData> CSSParser::popRuleData()
1218412184 return nullptr;
1218512185
1218612186 ASSERT(!m_currentRuleDataStack->isEmpty());
12187  m_currentRuleData.clear();
 12187 m_currentRuleData = nullptr;
1218812188 RefPtr<CSSRuleSourceData> data = m_currentRuleDataStack->last();
1218912189 m_currentRuleDataStack->removeLast();
1219012190 return data.release();

@@void CSSParser::markRuleBodyStart()
1260512605{
1260612606 if (!isExtractingSourceData())
1260712607 return;
12608  m_currentRuleData.clear();
 12608 m_currentRuleData = nullptr;
1260912609 unsigned offset = tokenStartOffset();
1261012610 if (tokenStartChar() == '{')
1261112611 ++offset; // Skip the rule body opening brace.

Source/WebCore/css/CSSValuePool.cpp

@@void CSSValuePool::drain()
153153 m_fontFamilyValueCache.clear();
154154
155155 for (int i = 0; i < numCSSValueKeywords; ++i)
156  m_identifierValueCache[i] = 0;
 156 m_identifierValueCache[i] = nullptr;
157157
158158 for (int i = 0; i < maximumCacheableIntegerValue; ++i) {
159  m_pixelValueCache[i] = 0;
160  m_percentValueCache[i] = 0;
161  m_numberValueCache[i] = 0;
 159 m_pixelValueCache[i] = nullptr;
 160 m_percentValueCache[i] = nullptr;
 161 m_numberValueCache[i] = nullptr;
162162 }
163163}
164164

Source/WebCore/css/StyleProperties.cpp

@@String StyleProperties::getLayeredShorthandValue(const StylePropertyShorthand& s
397397 // Color only belongs in the last layer.
398398 if (shorthand.properties()[j] == CSSPropertyBackgroundColor) {
399399 if (i != numLayers - 1)
400  value = 0;
 400 value = nullptr;
401401 } else if (i) // Other singletons only belong in the first layer.
402  value = 0;
 402 value = nullptr;
403403 }
404404 }
405405

Source/WebCore/dom/Document.cpp

@@void Document::detachParser()
24242424 if (!m_parser)
24252425 return;
24262426 m_parser->detach();
2427  m_parser.clear();
 2427 m_parser = nullptr;
24282428}
24292429
24302430void Document::cancelParsing()

@@void Document::clearScriptedAnimationController()
58825882 // FIXME: consider using ActiveDOMObject.
58835883 if (m_scriptedAnimationController)
58845884 m_scriptedAnimationController->clearDocumentPointer();
5885  m_scriptedAnimationController.clear();
 5885 m_scriptedAnimationController = nullptr;
58865886}
58875887#endif
58885888

@@void Document::updateHoverActiveState(const HitTestRequest& request, Element* in
63006300 curr->setActive(false);
63016301 m_userActionElements.setInActiveChain(curr, false);
63026302 }
6303  m_activeElement.clear();
 6303 m_activeElement = nullptr;
63046304 } else {
63056305 Element* newActiveElement = innerElementInDocument;
63066306 if (!oldActiveElement && newActiveElement && request.active() && !request.touchMove()) {

Source/WebCore/dom/DocumentMarker.h

@@public:
131131 DocumentMarkerDetails* details() const;
132132
133133 void setActiveMatch(bool);
134  void clearDetails() { m_details.clear(); }
 134 void clearDetails() { m_details = nullptr; }
135135
136136 // Offset modifications are done by DocumentMarkerController.
137137 // Other classes should not call following setters.

Source/WebCore/dom/DocumentStyleSheetCollection.cpp

@@CSSStyleSheet* DocumentStyleSheetCollection::pageUserSheet()
104104void DocumentStyleSheetCollection::clearPageUserSheet()
105105{
106106 if (m_pageUserSheet) {
107  m_pageUserSheet = 0;
 107 m_pageUserSheet = nullptr;
108108 m_document.styleResolverChanged(DeferRecalcStyle);
109109 }
110110}

Source/WebCore/dom/Element.cpp

@@void Element::cloneAttributesFromElement(const Element& other)
32073207
32083208 other.synchronizeAllAttributes();
32093209 if (!other.m_elementData) {
3210  m_elementData.clear();
 3210 m_elementData = nullptr;
32113211 return;
32123212 }
32133213

Source/WebCore/dom/MutationObserverRegistration.cpp

@@void MutationObserverRegistration::clearTransientRegistrations()
8989 m_transientRegistrationNodes = nullptr;
9090
9191 ASSERT(m_registrationNodeKeepAlive);
92  m_registrationNodeKeepAlive = 0; // Balanced in observeSubtreeNodeWillDetach.
 92 m_registrationNodeKeepAlive = nullptr; // Balanced in observeSubtreeNodeWillDetach.
9393}
9494
9595void MutationObserverRegistration::unregisterAndDelete(MutationObserverRegistration* registry)

Source/WebCore/dom/NodeIterator.cpp

@@NodeIterator::NodePointer::NodePointer(PassRefPtr<Node> n, bool b)
4545
4646void NodeIterator::NodePointer::clear()
4747{
48  node.clear();
 48 node = nullptr;
4949}
5050
5151bool NodeIterator::NodePointer::moveToNext(Node* root)

@@void NodeIterator::detach()
151151{
152152 root()->document().detachNodeIterator(this);
153153 m_detached = true;
154  m_referenceNode.node.clear();
 154 m_referenceNode.node = nullptr;
155155}
156156
157157void NodeIterator::nodeWillBeRemoved(Node& removedNode)

Source/WebCore/dom/Position.h

@@public:
9292
9393 AnchorType anchorType() const { return static_cast<AnchorType>(m_anchorType); }
9494
95  void clear() { m_anchorNode.clear(); m_offset = 0; m_anchorType = PositionIsOffsetInAnchor; m_isLegacyEditingPosition = false; }
 95 void clear() { m_anchorNode = nullptr; m_offset = 0; m_anchorType = PositionIsOffsetInAnchor; m_isLegacyEditingPosition = false; }
9696
9797 // These are always DOM compliant values. Editing positions like [img, 0] (aka [img, before])
9898 // will return img->parentNode() and img->computeNodeIndex() from these functions.

Source/WebCore/dom/ProcessingInstruction.cpp

@@void ProcessingInstruction::removedFrom(ContainerNode& insertionPoint)
281281 if (m_sheet) {
282282 ASSERT(m_sheet->ownerNode() == this);
283283 m_sheet->clearOwnerNode();
284  m_sheet = 0;
 284 m_sheet = nullptr;
285285 }
286286
287287 // If we're in document teardown, then we don't need to do any notification of our sheet's removal.

Source/WebCore/dom/RangeBoundaryPoint.h

@@inline int RangeBoundaryPoint::offset() const
112112
113113inline void RangeBoundaryPoint::clear()
114114{
115  m_containerNode.clear();
 115 m_containerNode = nullptr;
116116 m_offsetInContainer = 0;
117  m_childBeforeBoundary = 0;
 117 m_childBeforeBoundary = nullptr;
118118}
119119
120120inline void RangeBoundaryPoint::set(PassRefPtr<Node> container, int offset, Node* childBefore)

@@inline void RangeBoundaryPoint::setToStartOfNode(PassRefPtr<Node> container)
149149 ASSERT(container);
150150 m_containerNode = container;
151151 m_offsetInContainer = 0;
152  m_childBeforeBoundary = 0;
 152 m_childBeforeBoundary = nullptr;
153153}
154154
155155inline void RangeBoundaryPoint::setToEndOfNode(PassRefPtr<Node> container)

@@inline void RangeBoundaryPoint::setToEndOfNode(PassRefPtr<Node> container)
158158 m_containerNode = container;
159159 if (m_containerNode->offsetInCharacters()) {
160160 m_offsetInContainer = m_containerNode->maxCharacterOffset();
161  m_childBeforeBoundary = 0;
 161 m_childBeforeBoundary = nullptr;
162162 } else {
163163 m_childBeforeBoundary = m_containerNode->lastChild();
164164 m_offsetInContainer = m_childBeforeBoundary ? invalidOffset : 0;

Source/WebCore/dom/SpaceSplitString.h

@@public:
105105 bool operator!=(const SpaceSplitString& other) const { return m_data != other.m_data; }
106106
107107 void set(const AtomicString&, bool shouldFoldCase);
108  void clear() { m_data.clear(); }
 108 void clear() { m_data = nullptr; }
109109
110110 bool contains(const AtomicString& string) const { return m_data && m_data->contains(string); }
111111 bool containsAll(const SpaceSplitString& names) const { return !names.m_data || (m_data && m_data->containsAll(*names.m_data)); }

Source/WebCore/dom/StyledElement.cpp

@@inline void StyledElement::setInlineStyleFromString(const AtomicString& newStyle
185185 // We reconstruct the property set instead of mutating if there is no CSSOM wrapper.
186186 // This makes wrapperless property sets immutable and so cacheable.
187187 if (inlineStyle && !is<MutableStyleProperties>(*inlineStyle))
188  inlineStyle.clear();
 188 inlineStyle = nullptr;
189189
190190 if (!inlineStyle)
191191 inlineStyle = CSSParser::parseInlineStyleDeclaration(newStyleString, this);

@@void StyledElement::styleAttributeChanged(const AtomicString& newStyleString, At
202202 if (newStyleString.isNull()) {
203203 if (PropertySetCSSStyleDeclaration* cssomWrapper = inlineStyleCSSOMWrapper())
204204 cssomWrapper->clearParentElement();
205  ensureUniqueElementData().m_inlineStyle.clear();
 205 ensureUniqueElementData().m_inlineStyle = nullptr;
206206 } else if (reason == ModifiedByCloning || document().contentSecurityPolicy()->allowInlineStyle(document().url(), startLineNumber))
207207 setInlineStyleFromString(newStyleString);
208208

Source/WebCore/dom/default/PlatformMessagePortChannel.cpp

@@void PlatformMessagePortChannel::closeInternal()
183183{
184184 MutexLocker lock(m_mutex);
185185 // Disentangle ourselves from the other end. We still maintain a reference to our incoming queue, since previously-existing messages should still be delivered.
186  m_remotePort = 0;
187  m_entangledChannel = 0;
188  m_outgoingQueue = 0;
 186 m_remotePort = nullptr;
 187 m_entangledChannel = nullptr;
 188 m_outgoingQueue = nullptr;
189189}
190190
191191} // namespace WebCore

Source/WebCore/editing/AlternativeTextController.cpp

@@void AlternativeTextController::startAlternativeTextUITimer(AlternativeTextType
147147
148148 // If type is PanelTypeReversion, then the new range has been set. So we shouldn't clear it.
149149 if (type == AlternativeTextTypeCorrection)
150  m_alternativeTextInfo.rangeWithAlternative.clear();
 150 m_alternativeTextInfo.rangeWithAlternative = nullptr;
151151 m_alternativeTextInfo.type = type;
152152 m_timer.startOneShot(correctionPanelTimerInterval);
153153}

@@void AlternativeTextController::startAlternativeTextUITimer(AlternativeTextType
155155void AlternativeTextController::stopAlternativeTextUITimer()
156156{
157157 m_timer.stop();
158  m_alternativeTextInfo.rangeWithAlternative.clear();
 158 m_alternativeTextInfo.rangeWithAlternative = nullptr;
159159}
160160
161161void AlternativeTextController::stopPendingCorrection(const VisibleSelection& oldSelection)

@@void AlternativeTextController::applyPendingCorrection(const VisibleSelection& s
183183 if (doApplyCorrection)
184184 handleAlternativeTextUIResult(dismissSoon(ReasonForDismissingAlternativeTextAccepted));
185185 else
186  m_alternativeTextInfo.rangeWithAlternative.clear();
 186 m_alternativeTextInfo.rangeWithAlternative = nullptr;
187187}
188188
189189bool AlternativeTextController::hasPendingCorrection() const

@@void AlternativeTextController::timerFired()
359359 Vector<String> suggestions;
360360 textChecker()->getGuessesForWord(m_alternativeTextInfo.originalText, paragraphText, suggestions);
361361 if (suggestions.isEmpty()) {
362  m_alternativeTextInfo.rangeWithAlternative.clear();
 362 m_alternativeTextInfo.rangeWithAlternative = nullptr;
363363 break;
364364 }
365365 String topSuggestion = suggestions.first();

@@void AlternativeTextController::handleAlternativeTextUIResult(const String& resu
422422 break;
423423 }
424424
425  m_alternativeTextInfo.rangeWithAlternative.clear();
 425 m_alternativeTextInfo.rangeWithAlternative = nullptr;
426426}
427427
428428bool AlternativeTextController::isAutomaticSpellingCorrectionEnabled()

Source/WebCore/editing/ApplyBlockElementCommand.cpp

@@void ApplyBlockElementCommand::formatSelection(const VisiblePosition& startOfSel
143143 // Don't put the next paragraph in the blockquote we just created for this paragraph unless
144144 // the next paragraph is in the same cell.
145145 if (enclosingCell && enclosingCell != enclosingNodeOfType(endOfNextParagraph.deepEquivalent(), &isTableCell))
146  blockquoteForNextIndent = 0;
 146 blockquoteForNextIndent = nullptr;
147147
148148 // indentIntoBlockquote could move more than one paragraph if the paragraph
149149 // is in a list item or a table. As a result, endAfterSelection could refer to a position

Source/WebCore/editing/DeleteSelectionCommand.cpp

@@void DeleteSelectionCommand::saveTypingStyleState()
302302 if (enclosingNodeOfType(m_selectionToDelete.start(), isMailBlockquote))
303303 m_deleteIntoBlockquoteStyle = EditingStyle::create(m_selectionToDelete.end());
304304 else
305  m_deleteIntoBlockquoteStyle = 0;
 305 m_deleteIntoBlockquoteStyle = nullptr;
306306}
307307
308308bool DeleteSelectionCommand::handleSpecialCaseBRDelete()

@@void DeleteSelectionCommand::calculateTypingStyleAfterDelete()
728728 // If we deleted into a blockquote, but are now no longer in a blockquote, use the alternate typing style
729729 if (m_deleteIntoBlockquoteStyle && !enclosingNodeOfType(m_endingPosition, isMailBlockquote, CanCrossEditingBoundary))
730730 m_typingStyle = m_deleteIntoBlockquoteStyle;
731  m_deleteIntoBlockquoteStyle = 0;
 731 m_deleteIntoBlockquoteStyle = nullptr;
732732
733733 m_typingStyle->prepareToApplyAt(m_endingPosition);
734734 if (m_typingStyle->isEmpty())
735  m_typingStyle = 0;
 735 m_typingStyle = nullptr;
736736 // This is where we've deleted all traces of a style but not a whole paragraph (that's handled above).
737737 // In this case if we start typing, the new characters should have the same style as the just deleted ones,
738738 // but, if we change the selection, come back and start typing that style should be lost. Also see

Source/WebCore/editing/EditingStyle.cpp

@@void EditingStyle::overrideTypingStyleAt(const EditingStyle& style, const Positi
638638
639639void EditingStyle::clear()
640640{
641  m_mutableStyle.clear();
 641 m_mutableStyle = nullptr;
642642 m_shouldUseFixedDefaultFontSize = false;
643643 m_fontSizeDelta = NoFontDelta;
644644 setUnderlineChange(TextDecorationChange::None);

Source/WebCore/editing/Editor.cpp

@@void Editor::removeFormattingAndStyle()
828828
829829void Editor::clearLastEditCommand()
830830{
831  m_lastEditCommand.clear();
 831 m_lastEditCommand = nullptr;
832832}
833833#if PLATFORM(IOS)
834834// If the selection is adjusted from UIKit without closing the typing, the typing command may

@@void Editor::unappliedEditing(PassRefPtr<EditCommandComposition> cmd)
10661066
10671067 m_alternativeTextController->respondToUnappliedEditing(cmd.get());
10681068
1069  m_lastEditCommand = 0;
 1069 m_lastEditCommand = nullptr;
10701070 if (client())
10711071 client()->registerRedoStep(cmd);
10721072 respondToChangedContents(newSelection);

@@void Editor::reappliedEditing(PassRefPtr<EditCommandComposition> cmd)
10841084
10851085 updateEditorUINowIfScheduled();
10861086
1087  m_lastEditCommand = 0;
 1087 m_lastEditCommand = nullptr;
10881088 if (client())
10891089 client()->registerUndoStep(cmd);
10901090 respondToChangedContents(newSelection);

@@void Editor::setComposition(const String& text, SetCompositionMode mode)
17271727 if (text.isEmpty() && mode != CancelComposition)
17281728 TypingCommand::deleteSelection(document(), 0);
17291729
1730  m_compositionNode = 0;
 1730 m_compositionNode = nullptr;
17311731 m_customCompositionUnderlines.clear();
17321732
17331733 insertTextForConfirmedComposition(text);

@@void Editor::setComposition(const String& text, const Vector<CompositionUnderlin
18021802 if (text.isEmpty())
18031803 TypingCommand::deleteSelection(document(), TypingCommand::PreventSpellChecking);
18041804
1805  m_compositionNode = 0;
 1805 m_compositionNode = nullptr;
18061806 m_customCompositionUnderlines.clear();
18071807
18081808 if (!text.isEmpty()) {

Source/WebCore/editing/FrameSelection.cpp

@@void FrameSelection::prepareForDestruction()
13591359 view->clearSelection();
13601360
13611361 setSelectionWithoutUpdatingAppearance(VisibleSelection(), defaultSetSelectionOptions(), AlignCursorOnScrollIfNeeded, CharacterGranularity);
1362  m_previousCaretNode.clear();
 1362 m_previousCaretNode = nullptr;
13631363}
13641364
13651365void FrameSelection::setStart(const VisiblePosition &pos, EUserTriggered trigger)

Source/WebCore/editing/FrameSelection.h

@@inline EditingStyle* FrameSelection::typingStyle() const
359359
360360inline void FrameSelection::clearTypingStyle()
361361{
362  m_typingStyle.clear();
 362 m_typingStyle = nullptr;
363363}
364364
365365inline void FrameSelection::setTypingStyle(PassRefPtr<EditingStyle> style)

Source/WebCore/editing/IndentOutdentCommand.cpp

@@void IndentOutdentCommand::formatSelection(const VisiblePosition& startOfSelecti
232232void IndentOutdentCommand::formatRange(const Position& start, const Position& end, const Position&, RefPtr<Element>& blockquoteForNextIndent)
233233{
234234 if (tryIndentingAsListItem(start, end))
235  blockquoteForNextIndent = 0;
 235 blockquoteForNextIndent = nullptr;
236236 else
237237 indentIntoBlockquote(start, end, blockquoteForNextIndent);
238238}

Source/WebCore/editing/ReplaceSelectionCommand.cpp

@@inline void ReplaceSelectionCommand::InsertedNodes::willRemoveNodePreservingChil
354354inline void ReplaceSelectionCommand::InsertedNodes::willRemoveNode(Node* node)
355355{
356356 if (m_firstNodeInserted == node && m_lastNodeInserted == node) {
357  m_firstNodeInserted = 0;
358  m_lastNodeInserted = 0;
 357 m_firstNodeInserted = nullptr;
 358 m_lastNodeInserted = nullptr;
359359 } else if (m_firstNodeInserted == node)
360360 m_firstNodeInserted = NodeTraversal::nextSkippingChildren(*m_firstNodeInserted);
361361 else if (m_lastNodeInserted == node)

Source/WebCore/editing/SpellChecker.cpp

@@void SpellChecker::didCheck(int sequence, const Vector<TextCheckingResult>& resu
214214 if (m_lastProcessedSequence < sequence)
215215 m_lastProcessedSequence = sequence;
216216
217  m_processingRequest.clear();
 217 m_processingRequest = nullptr;
218218 if (!m_requestQueue.isEmpty())
219219 m_timerToProcessQueuedRequest.startOneShot(0);
220220}

Source/WebCore/editing/TextCheckingHelper.cpp

@@void TextCheckingParagraph::expandRangeToNextEnd()
146146void TextCheckingParagraph::invalidateParagraphRangeValues()
147147{
148148 m_checkingStart = m_checkingEnd = -1;
149  m_offsetAsRange = 0;
 149 m_offsetAsRange = nullptr;
150150 m_text = String();
151151}
152152

Source/WebCore/fileapi/FileReader.cpp

@@void FileReader::readInternal(Blob* blob, FileReaderLoader::ReadType type, Excep
140140 m_blob = blob;
141141 m_readType = type;
142142 m_state = LOADING;
143  m_error = 0;
 143 m_error = nullptr;
144144
145145 m_loader = std::make_unique<FileReaderLoader>(m_readType, this);
146146 m_loader->setEncoding(m_encoding);

Source/WebCore/fileapi/FileReaderLoader.cpp

@@void FileReaderLoader::terminate()
121121
122122void FileReaderLoader::cleanup()
123123{
124  m_loader = 0;
 124 m_loader = nullptr;
125125
126126 // If we get any error, we do not need to keep a buffer around.
127127 if (m_errorCode) {
128  m_rawData = 0;
 128 m_rawData = nullptr;
129129 m_stringResult = "";
130130 }
131131}

Source/WebCore/history/HistoryItem.cpp

@@void HistoryItem::reset()
196196
197197 m_itemSequenceNumber = generateSequenceNumber();
198198
199  m_stateObject = 0;
 199 m_stateObject = nullptr;
200200 m_documentSequenceNumber = generateSequenceNumber();
201201
202  m_formData = 0;
 202 m_formData = nullptr;
203203 m_formContentType = String();
204204
205205 clearChildren();

@@void HistoryItem::setFormInfoFromRequest(const ResourceRequest& request)
524524 m_formData = request.httpBody();
525525 m_formContentType = request.httpContentType();
526526 } else {
527  m_formData = 0;
 527 m_formData = nullptr;
528528 m_formContentType = String();
529529 }
530530}

Source/WebCore/html/BaseChooserOnlyDateAndTimeInputType.cpp

@@void BaseChooserOnlyDateAndTimeInputType::didChooseValue(const String& value)
9898
9999void BaseChooserOnlyDateAndTimeInputType::didEndChooser()
100100{
101  m_dateTimeChooser.clear();
 101 m_dateTimeChooser = nullptr;
102102}
103103
104104void BaseChooserOnlyDateAndTimeInputType::closeDateTimeChooser()

Source/WebCore/html/FTPDirectoryDocument.cpp

@@void FTPDirectoryDocumentParser::finish()
411411 m_carryOver = String();
412412 }
413413
414  m_tableElement = 0;
 414 m_tableElement = nullptr;
415415 fastFree(m_buffer);
416416
417417 HTMLDocumentParser::finish();

Source/WebCore/html/FileInputType.cpp

@@void FileInputType::setValue(const String&, bool, TextFieldEventBehavior)
250250{
251251 // FIXME: Should we clear the file list, or replace it with a new empty one here? This is observable from JavaScript through custom properties.
252252 m_fileList->clear();
253  m_icon.clear();
 253 m_icon = nullptr;
254254 element().setNeedsStyleRecalc();
255255}
256256

Source/WebCore/html/HTMLCanvasElement.cpp

@@void HTMLCanvasElement::makePresentationCopy()
423423
424424void HTMLCanvasElement::clearPresentationCopy()
425425{
426  m_presentedImage.clear();
 426 m_presentedImage = nullptr;
427427}
428428
429429void HTMLCanvasElement::setSurfaceSize(const IntSize& size)

@@void HTMLCanvasElement::clearImageBuffer() const
644644
645645void HTMLCanvasElement::clearCopiedImage()
646646{
647  m_copiedImage.clear();
 647 m_copiedImage = nullptr;
648648 m_didClearImageBuffer = false;
649649}
650650

Source/WebCore/html/HTMLLinkElement.cpp

@@void HTMLLinkElement::clearSheet()
264264 ASSERT(m_sheet);
265265 ASSERT(m_sheet->ownerNode() == this);
266266 m_sheet->clearOwnerNode();
267  m_sheet = 0;
 267 m_sheet = nullptr;
268268}
269269
270270Node::InsertionNotificationRequest HTMLLinkElement::insertedInto(ContainerNode& insertionPoint)

Source/WebCore/html/HTMLMediaElement.cpp

@@HTMLMediaElement::~HTMLMediaElement()
457457
458458 if (m_mediaController) {
459459 m_mediaController->removeMediaElement(this);
460  m_mediaController = 0;
 460 m_mediaController = nullptr;
461461 }
462462
463463#if ENABLE(MEDIA_SOURCE)

@@void HTMLMediaElement::prepareForLoad()
942942
943943 // 1 - Abort any already-running instance of the resource selection algorithm for this element.
944944 m_loadState = WaitingForSource;
945  m_currentSourceNode = 0;
 945 m_currentSourceNode = nullptr;
946946
947947 // 2 - If there are any tasks from the media element's media element event task source in
948948 // one of the task queues, then remove those tasks.

@@void HTMLMediaElement::prepareForLoad()
10061006 setPlaybackRate(defaultPlaybackRate());
10071007
10081008 // 6 - Set the error attribute to null and the autoplaying flag to true.
1009  m_error = 0;
 1009 m_error = nullptr;
10101010 m_autoplaying = true;
10111011
10121012 // 7 - Invoke the media element's resource selection algorithm.

@@void HTMLMediaElement::selectMediaResource()
11011101 if (auto firstSource = childrenOfType<HTMLSourceElement>(*this).first()) {
11021102 mode = children;
11031103 m_nextChildNodeToConsider = firstSource;
1104  m_currentSourceNode = 0;
 1104 m_currentSourceNode = nullptr;
11051105 } else {
11061106 // Otherwise the media element has neither a src attribute nor a source element
11071107 // child: set the networkState to NETWORK_EMPTY, and abort these steps; the

@@void HTMLMediaElement::loadResource(const URL& initialURL, ContentType& contentT
12771277 else {
12781278 // Forget our reference to the MediaSource, so we leave it alone
12791279 // while processing remainder of load failure.
1280  m_mediaSource = 0;
 1280 m_mediaSource = nullptr;
12811281 mediaLoadingFailed(MediaPlayer::FormatError);
12821282 }
12831283 } else

@@void HTMLMediaElement::noneSupported()
18001800
18011801 stopPeriodicTimers();
18021802 m_loadState = WaitingForSource;
1803  m_currentSourceNode = 0;
 1803 m_currentSourceNode = nullptr;
18041804
18051805 // 4.8.10.5
18061806 // 6 - Reaching this step indicates that the media resource failed to load or that the given

@@void HTMLMediaElement::closeMediaSource()
29392939 return;
29402940
29412941 m_mediaSource->close();
2942  m_mediaSource = 0;
 2942 m_mediaSource = nullptr;
29432943}
29442944#endif
29452945

@@check_again:
41124112 m_currentSourceNode = source;
41134113 m_nextChildNodeToConsider = source->nextSibling();
41144114 } else {
4115  m_currentSourceNode = 0;
4116  m_nextChildNodeToConsider = 0;
 4115 m_currentSourceNode = nullptr;
 4116 m_nextChildNodeToConsider = nullptr;
41174117 }
41184118
41194119#if !LOG_DISABLED

@@void HTMLMediaElement::sourceWasRemoved(HTMLSourceElement* source)
41934193 // Clear the current source node pointer, but don't change the movie as the spec says:
41944194 // 4.8.8 - Dynamically modifying a source element and its attribute when the element is already
41954195 // inserted in a video or audio element will have no effect.
4196  m_currentSourceNode = 0;
 4196 m_currentSourceNode = nullptr;
41974197 LOG(Media, "HTMLMediaElement::sourceRemoved(%p) - m_currentSourceNode set to 0", this);
41984198 }
41994199}

@@void HTMLMediaElement::userCancelledLoad()
47954795 setShouldDelayLoadEvent(false);
47964796
47974797 // 6 - Abort the overall resource selection algorithm.
4798  m_currentSourceNode = 0;
 4798 m_currentSourceNode = nullptr;
47994799
48004800 // Reset m_readyState since m_player is gone.
48014801 m_readyState = HAVE_NOTHING;

@@void HTMLMediaElement::clearMediaPlayer(int flags)
48124812
48134813#if USE(PLATFORM_TEXT_TRACK_MENU)
48144814 if (platformTextTrackMenu()) {
4815  m_platformMenu->setClient(0);
4816  m_platformMenu = 0;
 4815 m_platformMenu->setClient(nullptr);
 4816 m_platformMenu = nullptr;
48174817 }
48184818#endif
48194819

Source/WebCore/html/HTMLPlugInElement.cpp

@@bool HTMLPlugInElement::willRespondToMouseClickEvents()
104104
105105void HTMLPlugInElement::willDetachRenderers()
106106{
107  m_instance.clear();
 107 m_instance = nullptr;
108108
109109 if (m_isCapturingMouseEvents) {
110110 if (Frame* frame = document().frame())

@@void HTMLPlugInElement::willDetachRenderers()
122122
123123void HTMLPlugInElement::resetInstance()
124124{
125  m_instance.clear();
 125 m_instance = nullptr;
126126}
127127
128128PassRefPtr<JSC::Bindings::Instance> HTMLPlugInElement::getInstance()

Source/WebCore/html/HTMLTableElement.cpp

@@void HTMLTableElement::parseAttribute(const QualifiedName& name, const AtomicStr
402402 HTMLElement::parseAttribute(name, value);
403403
404404 if (bordersBefore != cellBorders() || oldPadding != m_padding) {
405  m_sharedCellStyle = 0;
 405 m_sharedCellStyle = nullptr;
406406 bool cellChanged = false;
407407 for (Node* child = firstChild(); child; child = child->nextSibling())
408408 cellChanged |= setTableCellsChanged(child);

Source/WebCore/html/PluginDocument.cpp

@@void PluginDocument::setPluginElement(PassRefPtr<HTMLPlugInElement> element)
168168void PluginDocument::detachFromPluginElement()
169169{
170170 // Release the plugin Element so that we don't have a circular reference.
171  m_pluginElement = 0;
172  frame()->loader().client().redirectDataToPlugin(0);
 171 m_pluginElement = nullptr;
 172 frame()->loader().client().redirectDataToPlugin(nullptr);
173173}
174174
175175void PluginDocument::cancelManualPluginLoad()

Source/WebCore/html/TextFieldInputType.cpp

@@void TextFieldInputType::updatePlaceholderText()
462462 if (placeholderText.isEmpty()) {
463463 if (m_placeholder) {
464464 m_placeholder->parentNode()->removeChild(m_placeholder.get(), ASSERT_NO_EXCEPTION);
465  m_placeholder.clear();
 465 m_placeholder = nullptr;
466466 }
467467 return;
468468 }

Source/WebCore/html/ValidationMessage.cpp

@@void ValidationMessage::deleteBubbleTree()
235235{
236236 ASSERT(!validationMessageClient());
237237 if (m_bubble) {
238  m_messageHeading = 0;
239  m_messageBody = 0;
 238 m_messageHeading = nullptr;
 239 m_messageBody = nullptr;
240240 m_element->userAgentShadowRoot()->removeChild(m_bubble.get(), ASSERT_NO_EXCEPTION);
241  m_bubble = 0;
 241 m_bubble = nullptr;
242242 }
243243 m_message = String();
244244}

Source/WebCore/html/canvas/WebGLProgram.cpp

@@void WebGLProgram::deleteObjectImpl(GraphicsContext3D* context3d, Platform3DObje
5858 context3d->deleteProgram(obj);
5959 if (m_vertexShader) {
6060 m_vertexShader->onDetached(context3d);
61  m_vertexShader = 0;
 61 m_vertexShader = nullptr;
6262 }
6363 if (m_fragmentShader) {
6464 m_fragmentShader->onDetached(context3d);
65  m_fragmentShader = 0;
 65 m_fragmentShader = nullptr;
6666 }
6767}
6868

@@bool WebGLProgram::detachShader(WebGLShader* shader)
148148 case GraphicsContext3D::VERTEX_SHADER:
149149 if (m_vertexShader != shader)
150150 return false;
151  m_vertexShader = 0;
 151 m_vertexShader = nullptr;
152152 return true;
153153 case GraphicsContext3D::FRAGMENT_SHADER:
154154 if (m_fragmentShader != shader)
155155 return false;
156  m_fragmentShader = 0;
 156 m_fragmentShader = nullptr;
157157 return true;
158158 default:
159159 return false;

Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp

@@void WebGLRenderingContextBase::initializeNewContext()
494494 m_unpackFlipY = false;
495495 m_unpackPremultiplyAlpha = false;
496496 m_unpackColorspaceConversion = GraphicsContext3D::BROWSER_DEFAULT_WEBGL;
497  m_boundArrayBuffer = 0;
498  m_currentProgram = 0;
499  m_framebufferBinding = 0;
500  m_renderbufferBinding = 0;
 497 m_boundArrayBuffer = nullptr;
 498 m_currentProgram = nullptr;
 499 m_framebufferBinding = nullptr;
 500 m_renderbufferBinding = nullptr;
501501 m_depthMask = true;
502502 m_stencilEnabled = false;
503503 m_stencilMask = 0xFFFFFFFF;

@@void WebGLRenderingContextBase::destroyGraphicsContext3D()
623623 if (m_context) {
624624 m_context->setContextLostCallback(nullptr);
625625 m_context->setErrorMessageCallback(nullptr);
626  m_context.clear();
 626 m_context = nullptr;
627627 }
628628}
629629

@@void WebGLRenderingContextBase::deleteBuffer(WebGLBuffer* buffer)
14791479 if (!deleteObject(buffer))
14801480 return;
14811481 if (m_boundArrayBuffer == buffer)
1482  m_boundArrayBuffer = 0;
 1482 m_boundArrayBuffer = nullptr;
14831483
14841484 m_boundVertexArrayObject->unbindBuffer(buffer);
14851485}

@@void WebGLRenderingContextBase::deleteFramebuffer(WebGLFramebuffer* framebuffer)
14891489 if (!deleteObject(framebuffer))
14901490 return;
14911491 if (framebuffer == m_framebufferBinding) {
1492  m_framebufferBinding = 0;
 1492 m_framebufferBinding = nullptr;
14931493 m_context->bindFramebuffer(GraphicsContext3D::FRAMEBUFFER, 0);
14941494 }
14951495}

@@void WebGLRenderingContextBase::deleteRenderbuffer(WebGLRenderbuffer* renderbuff
15061506 if (!deleteObject(renderbuffer))
15071507 return;
15081508 if (renderbuffer == m_renderbufferBinding)
1509  m_renderbufferBinding = 0;
 1509 m_renderbufferBinding = nullptr;
15101510 if (m_framebufferBinding)
15111511 m_framebufferBinding->removeAttachmentFromBoundFramebuffer(renderbuffer);
15121512}

Source/WebCore/html/canvas/WebGLVertexArrayObjectBase.cpp

@@void WebGLVertexArrayObjectBase::unbindBuffer(PassRefPtr<WebGLBuffer> buffer)
7676{
7777 if (m_boundElementArrayBuffer == buffer) {
7878 m_boundElementArrayBuffer->onDetached(context()->graphicsContext3D());
79  m_boundElementArrayBuffer = 0;
 79 m_boundElementArrayBuffer = nullptr;
8080 }
8181
8282 for (size_t i = 0; i < m_vertexAttribState.size(); ++i) {

@@void WebGLVertexArrayObjectBase::unbindBuffer(PassRefPtr<WebGLBuffer> buffer)
9595 state.originalStride = 0;
9696 state.offset = 0;
9797 } else
98  state.bufferBinding = 0;
 98 state.bufferBinding = nullptr;
9999 }
100100 }
101101}

Source/WebCore/html/track/TextTrack.cpp

@@TextTrackCueList* TextTrack::cues()
245245 // http://www.whatwg.org/specs/web-apps/current-work/#dom-texttrack-cues
246246 if (m_mode != disabledKeyword())
247247 return ensureTextTrackCueList();
248  return 0;
 248 return nullptr;
249249}
250250
251251void TextTrack::removeAllCues()

@@void TextTrack::removeAllCues()
257257 m_client->textTrackRemoveCues(this, m_cues.get());
258258
259259 for (size_t i = 0; i < m_cues->length(); ++i)
260  m_cues->item(i)->setTrack(0);
 260 m_cues->item(i)->setTrack(nullptr);
261261
262  m_cues = 0;
 262 m_cues = nullptr;
263263}
264264
265265TextTrackCueList* TextTrack::activeCues() const

@@TextTrackCueList* TextTrack::activeCues() const
272272 // http://www.whatwg.org/specs/web-apps/current-work/#dom-texttrack-activecues
273273 if (m_cues && m_mode != disabledKeyword())
274274 return m_cues->activeCues();
275  return 0;
 275 return nullptr;
276276}
277277
278278void TextTrack::addCue(PassRefPtr<TextTrackCue> prpCue, ExceptionCode& ec)

Source/WebCore/html/track/VTTCue.cpp

@@void VTTCue::setText(const String& text)
482482 willChange();
483483 // Clear the document fragment but don't bother to create it again just yet as we can do that
484484 // when it is requested.
485  m_webVTTNodeTree = 0;
 485 m_webVTTNodeTree = nullptr;
486486 m_content = text;
487487 didChange();
488488}

Source/WebCore/inspector/InspectorApplicationCacheAgent.cpp

@@void InspectorApplicationCacheAgent::didCreateFrontendAndBackend(FrontendChannel
5858void InspectorApplicationCacheAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
5959{
6060 m_frontendDispatcher = nullptr;
61  m_backendDispatcher.clear();
 61 m_backendDispatcher = nullptr;
6262
6363 m_instrumentingAgents->setInspectorApplicationCacheAgent(nullptr);
6464}

Source/WebCore/inspector/InspectorCSSAgent.cpp

@@void InspectorCSSAgent::didCreateFrontendAndBackend(Inspector::FrontendChannel*
360360void InspectorCSSAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
361361{
362362 m_frontendDispatcher = nullptr;
363  m_backendDispatcher.clear();
 363 m_backendDispatcher = nullptr;
364364
365365 resetNonPersistentData();
366366}

Source/WebCore/inspector/InspectorController.cpp

@@void InspectorController::disconnectFrontend(DisconnectReason reason)
263263 m_agents.willDestroyFrontendAndBackend(reason);
264264
265265 m_backendDispatcher->clearFrontend();
266  m_backendDispatcher.clear();
 266 m_backendDispatcher = nullptr;
267267 m_frontendChannel = nullptr;
268268
269269 m_isAutomaticInspection = false;

Source/WebCore/inspector/InspectorDOMAgent.cpp

@@void InspectorDOMAgent::didCreateFrontendAndBackend(Inspector::FrontendChannel*
238238void InspectorDOMAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
239239{
240240 m_frontendDispatcher = nullptr;
241  m_backendDispatcher.clear();
 241 m_backendDispatcher = nullptr;
242242
243243 m_history.reset();
244244 m_domEditor.reset();

@@void InspectorDOMAgent::reset()
272272 discardBindings();
273273 if (m_revalidateStyleAttrTask)
274274 m_revalidateStyleAttrTask->reset();
275  m_document = 0;
 275 m_document = nullptr;
276276}
277277
278278void InspectorDOMAgent::setDOMListener(DOMListener* listener)

Source/WebCore/inspector/InspectorDOMDebuggerAgent.cpp

@@void InspectorDOMDebuggerAgent::didCreateFrontendAndBackend(Inspector::FrontendC
109109
110110void InspectorDOMDebuggerAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
111111{
112  m_backendDispatcher.clear();
 112 m_backendDispatcher = nullptr;
113113
114114 disable();
115115}

Source/WebCore/inspector/InspectorDOMStorageAgent.cpp

@@void InspectorDOMStorageAgent::didCreateFrontendAndBackend(Inspector::FrontendCh
7676void InspectorDOMStorageAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
7777{
7878 m_frontendDispatcher = nullptr;
79  m_backendDispatcher.clear();
 79 m_backendDispatcher = nullptr;
8080
8181 ErrorString unused;
8282 disable(unused);

Source/WebCore/inspector/InspectorDatabaseAgent.cpp

@@void InspectorDatabaseAgent::didCreateFrontendAndBackend(Inspector::FrontendChan
231231void InspectorDatabaseAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
232232{
233233 m_frontendDispatcher = nullptr;
234  m_backendDispatcher.clear();
 234 m_backendDispatcher = nullptr;
235235
236236 ErrorString unused;
237237 disable(unused);

Source/WebCore/inspector/InspectorIndexedDBAgent.cpp

@@void InspectorIndexedDBAgent::didCreateFrontendAndBackend(Inspector::FrontendCha
582582
583583void InspectorIndexedDBAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
584584{
585  m_backendDispatcher.clear();
 585 m_backendDispatcher = nullptr;
586586
587587 ErrorString unused;
588588 disable(unused);

Source/WebCore/inspector/InspectorLayerTreeAgent.cpp

@@void InspectorLayerTreeAgent::didCreateFrontendAndBackend(Inspector::FrontendCha
6565void InspectorLayerTreeAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
6666{
6767 m_frontendDispatcher = nullptr;
68  m_backendDispatcher.clear();
 68 m_backendDispatcher = nullptr;
6969
7070 ErrorString unused;
7171 disable(unused);

Source/WebCore/inspector/InspectorOverlay.cpp

@@void InspectorOverlay::setPausedInDebuggerMessage(const String* message)
243243
244244void InspectorOverlay::hideHighlight()
245245{
246  m_highlightNode.clear();
247  m_highlightNodeList.clear();
248  m_highlightQuad.reset();
 246 m_highlightNode = nullptr;
 247 m_highlightNodeList = nullptr;
 248 m_highlightQuad = nullptr;
249249 update();
250250}
251251

@@void InspectorOverlay::highlightNodeList(PassRefPtr<NodeList> nodes, const Highl
253253{
254254 m_nodeHighlightConfig = highlightConfig;
255255 m_highlightNodeList = nodes;
256  m_highlightNode.clear();
 256 m_highlightNode = nullptr;
257257 update();
258258}
259259

@@void InspectorOverlay::highlightNode(Node* node, const HighlightConfig& highligh
261261{
262262 m_nodeHighlightConfig = highlightConfig;
263263 m_highlightNode = node;
264  m_highlightNodeList.clear();
 264 m_highlightNodeList = nullptr;
265265 update();
266266}
267267

Source/WebCore/inspector/InspectorPageAgent.cpp

@@void InspectorPageAgent::didCreateFrontendAndBackend(Inspector::FrontendChannel*
348348void InspectorPageAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
349349{
350350 m_frontendDispatcher = nullptr;
351  m_backendDispatcher.clear();
 351 m_backendDispatcher = nullptr;
352352
353353 ErrorString unused;
354354 disable(unused);

@@void InspectorPageAgent::enable(ErrorString&)
374374void InspectorPageAgent::disable(ErrorString&)
375375{
376376 m_enabled = false;
377  m_scriptsToEvaluateOnLoad.clear();
 377 m_scriptsToEvaluateOnLoad = nullptr;
378378 m_instrumentingAgents->setInspectorPageAgent(nullptr);
379379
380380 ErrorString unused;

Source/WebCore/inspector/InspectorReplayAgent.cpp

@@void InspectorReplayAgent::didCreateFrontendAndBackend(Inspector::FrontendChanne
193193void InspectorReplayAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
194194{
195195 m_frontendDispatcher = nullptr;
196  m_backendDispatcher.clear();
 196 m_backendDispatcher = nullptr;
197197
198198 m_instrumentingAgents->setInspectorReplayAgent(nullptr);
199199

Source/WebCore/inspector/InspectorResourceAgent.cpp

@@void InspectorResourceAgent::didCreateFrontendAndBackend(Inspector::FrontendChan
181181void InspectorResourceAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason)
182182{
183183 m_frontendDispatcher = nullptr;
184  m_backendDispatcher.clear();
 184 m_backendDispatcher = nullptr;
185185
186186 ErrorString unused;
187187 disable(unused);

Source/WebCore/inspector/InspectorStyleSheet.cpp

@@void InspectorStyleSheetForInlineStyle::didModifyElementAttribute()
12611261 m_isStyleTextValid = false;
12621262 if (m_element->isStyledElement() && m_element->style() != m_inspectorStyle->cssStyle())
12631263 m_inspectorStyle = InspectorStyle::create(InspectorCSSId(id(), 0), inlineStyle(), this);
1264  m_ruleSourceData.clear();
 1264 m_ruleSourceData = nullptr;
12651265}
12661266
12671267bool InspectorStyleSheetForInlineStyle::getText(String* result) const

@@bool InspectorStyleSheetForInlineStyle::setStyleText(CSSStyleDeclaration* style,
12851285
12861286 m_styleText = text;
12871287 m_isStyleTextValid = true;
1288  m_ruleSourceData.clear();
 1288 m_ruleSourceData = nullptr;
12891289 return !ec;
12901290}
12911291

@@bool InspectorStyleSheetForInlineStyle::ensureParsedDataReady()
13041304 // The "style" property value can get changed indirectly, e.g. via element.style.borderWidth = "2px".
13051305 const String& currentStyleText = elementStyleText();
13061306 if (m_styleText != currentStyleText) {
1307  m_ruleSourceData.clear();
 1307 m_ruleSourceData = nullptr;
13081308 m_styleText = currentStyleText;
13091309 m_isStyleTextValid = true;
13101310 }

Source/WebCore/inspector/InspectorTimelineAgent.cpp

@@void InspectorTimelineAgent::didCreateFrontendAndBackend(Inspector::FrontendChan
103103void InspectorTimelineAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason reason)
104104{
105105 m_frontendDispatcher = nullptr;
106  m_backendDispatcher.clear();
 106 m_backendDispatcher = nullptr;
107107
108108 m_instrumentingAgents->setPersistentInspectorTimelineAgent(nullptr);
109109

Source/WebCore/inspector/InspectorWorkerAgent.cpp

@@void InspectorWorkerAgent::willDestroyFrontendAndBackend(Inspector::DisconnectRe
127127 disable(unused);
128128
129129 m_frontendDispatcher = nullptr;
130  m_backendDispatcher.clear();
 130 m_backendDispatcher = nullptr;
131131}
132132
133133void InspectorWorkerAgent::enable(ErrorString&)

Source/WebCore/inspector/PageRuntimeAgent.cpp

@@void PageRuntimeAgent::didCreateFrontendAndBackend(Inspector::FrontendChannel* f
6969void PageRuntimeAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason reason)
7070{
7171 m_frontendDispatcher = nullptr;
72  m_backendDispatcher.clear();
 72 m_backendDispatcher = nullptr;
7373
7474 String unused;
7575 disable(unused);

Source/WebCore/inspector/WebInjectedScriptManager.cpp

@@void WebInjectedScriptManager::disconnect()
4444 InjectedScriptManager::disconnect();
4545
4646 m_commandLineAPIHost->disconnect();
47  m_commandLineAPIHost.clear();
 47 m_commandLineAPIHost = nullptr;
4848}
4949
5050void WebInjectedScriptManager::didCreateInjectedScript(InjectedScript injectedScript)

Source/WebCore/inspector/WorkerInspectorController.cpp

@@void WorkerInspectorController::disconnectFrontend(Inspector::DisconnectReason r
126126
127127 m_agents.willDestroyFrontendAndBackend(reason);
128128 m_backendDispatcher->clearFrontend();
129  m_backendDispatcher.clear();
 129 m_backendDispatcher = nullptr;
130130 m_frontendChannel = nullptr;
131131}
132132

Source/WebCore/inspector/WorkerRuntimeAgent.cpp

@@void WorkerRuntimeAgent::didCreateFrontendAndBackend(Inspector::FrontendChannel*
6060
6161void WorkerRuntimeAgent::willDestroyFrontendAndBackend(Inspector::DisconnectReason reason)
6262{
63  m_backendDispatcher.clear();
 63 m_backendDispatcher = nullptr;
6464
6565 InspectorRuntimeAgent::willDestroyFrontendAndBackend(reason);
6666}

Source/WebCore/loader/DocumentLoader.cpp

@@void DocumentLoader::getIconLoadDecisionForIconURL(const String& urlString)
15241524void DocumentLoader::continueIconLoadWithDecision(IconLoadDecision decision)
15251525{
15261526 ASSERT(m_iconLoadDecisionCallback);
1527  m_iconLoadDecisionCallback = 0;
 1527 m_iconLoadDecisionCallback = nullptr;
15281528 if (m_frame)
15291529 m_frame->loader().icon().continueLoadWithDecision(decision);
15301530}

Source/WebCore/loader/DocumentThreadableLoader.cpp

@@PassRefPtr<DocumentThreadableLoader> DocumentThreadableLoader::create(Document&
6464{
6565 RefPtr<DocumentThreadableLoader> loader = adoptRef(new DocumentThreadableLoader(document, client, LoadAsynchronously, request, options));
6666 if (!loader->m_resource)
67  loader = 0;
 67 loader = nullptr;
6868 return loader.release();
6969}
7070

Source/WebCore/loader/DocumentWriter.cpp

@@void DocumentWriter::replaceDocument(const String& source, Document* ownerDocume
9090
9191void DocumentWriter::clear()
9292{
93  m_decoder = 0;
 93 m_decoder = nullptr;
9494 m_hasReceivedSomeData = false;
9595 if (!m_encodingWasChosenByUser)
9696 m_encoding = String();

@@void DocumentWriter::end()
245245 if (!m_parser)
246246 return;
247247 m_parser->finish();
248  m_parser = 0;
 248 m_parser = nullptr;
249249}
250250
251251void DocumentWriter::setEncoding(const String& name, bool userChosen)

Source/WebCore/loader/FrameLoader.cpp

@@void FrameLoader::didBeginDocument(bool dispatch)
692692
693693 if (m_pendingStateObject) {
694694 m_frame.document()->statePopped(m_pendingStateObject.get());
695  m_pendingStateObject.clear();
 695 m_pendingStateObject = nullptr;
696696 }
697697
698698 if (dispatch)

@@void FrameLoader::checkCompleted()
818818
819819 // OK, completed.
820820 m_isComplete = true;
821  m_requestedHistoryItem = 0;
 821 m_requestedHistoryItem = nullptr;
822822 m_frame.document()->setReadyState(Document::Complete);
823823
824824#if PLATFORM(IOS)

@@void FrameLoader::setupForReplace()
11371137 m_client.revertToProvisionalState(m_documentLoader.get());
11381138 setState(FrameStateProvisional);
11391139 m_provisionalDocumentLoader = m_documentLoader;
1140  m_documentLoader = 0;
 1140 m_documentLoader = nullptr;
11411141 detachChildren();
11421142}
11431143

Source/WebCore/loader/ProgressTracker.cpp

@@void ProgressTracker::reset()
113113 m_lastNotifiedProgressTime = std::chrono::steady_clock::time_point();
114114 m_finalProgressChangedSent = false;
115115 m_numProgressTrackedFrames = 0;
116  m_originatingProgressFrame = 0;
 116 m_originatingProgressFrame = nullptr;
117117
118118 m_heartbeatsWithNoProgress = 0;
119119 m_totalBytesReceivedBeforePreviousHeartbeat = 0;

Source/WebCore/loader/ResourceLoader.cpp

@@void ResourceLoader::releaseResources()
9090 // has been deallocated and also to avoid reentering this method.
9191 Ref<ResourceLoader> protect(*this);
9292
93  m_frame = 0;
94  m_documentLoader = 0;
 93 m_frame = nullptr;
 94 m_documentLoader = nullptr;
9595
9696 // We need to set reachedTerminalState to true before we release
9797 // the resources to prevent a double dealloc of WebView <rdar://problem/4372628>

@@void ResourceLoader::releaseResources()
104104 // Clear out the ResourceHandle's client so that it doesn't try to call
105105 // us back after we release it, unless it has been replaced by someone else.
106106 if (m_handle->client() == this)
107  m_handle->setClient(0);
108  m_handle = 0;
 107 m_handle->setClient(nullptr);
 108 m_handle = nullptr;
109109 }
110110
111  m_resourceData = 0;
 111 m_resourceData = nullptr;
112112 m_deferredRequest = ResourceRequest();
113113}
114114

@@void ResourceLoader::setDefersLoading(bool defers)
225225FrameLoader* ResourceLoader::frameLoader() const
226226{
227227 if (!m_frame)
228  return 0;
 228 return nullptr;
229229 return &m_frame->loader();
230230}
231231

@@void ResourceLoader::setDataBufferingPolicy(DataBufferingPolicy dataBufferingPol
244244
245245 // Reset any already buffered data
246246 if (dataBufferingPolicy == DoNotBufferData)
247  m_resourceData = 0;
 247 m_resourceData = nullptr;
248248}
249249
250250void ResourceLoader::willSwitchToSubstituteResource()

@@void ResourceLoader::cancel(const ResourceError& error)
530530 m_documentLoader->cancelPendingSubstituteLoad(this);
531531 if (m_handle) {
532532 m_handle->cancel();
533  m_handle = 0;
 533 m_handle = nullptr;
534534 }
535535 cleanupForError(nonNullError);
536536 }

Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp

@@void ApplicationCacheGroup::stopLoading()
327327 m_manifestHandle->setClient(0);
328328
329329 m_manifestHandle->cancel();
330  m_manifestHandle = 0;
 330 m_manifestHandle = nullptr;
331331 }
332332
333333 if (m_currentHandle) {

@@void ApplicationCacheGroup::stopLoading()
338338 m_currentHandle->setClient(0);
339339
340340 m_currentHandle->cancel();
341  m_currentHandle = 0;
 341 m_currentHandle = nullptr;
342342 }
343343
344344 // FIXME: Resetting just a tiny part of the state in this function is confusing. Callers have to take care of a lot more.
345  m_cacheBeingUpdated = 0;
 345 m_cacheBeingUpdated = nullptr;
346346 m_pendingEntries.clear();
347347}
348348

@@void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
521521 m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data(), newestCachedResource->path()));
522522 m_pendingEntries.remove(m_currentHandle->firstRequest().url());
523523 m_currentHandle->cancel();
524  m_currentHandle = 0;
 524 m_currentHandle = nullptr;
525525 // Load the next resource, if any.
526526 startLoadingEntry();
527527 return;

@@void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
538538 } else if (response.httpStatusCode() == 404 || response.httpStatusCode() == 410) {
539539 // Skip this resource. It is dropped from the cache.
540540 m_currentHandle->cancel();
541  m_currentHandle = 0;
 541 m_currentHandle = nullptr;
542542 m_pendingEntries.remove(url);
543543 // Load the next resource, if any.
544544 startLoadingEntry();

@@void ApplicationCacheGroup::didReceiveResponse(ResourceHandle* handle, const Res
551551 m_cacheBeingUpdated->addResource(ApplicationCacheResource::create(url, newestCachedResource->response(), type, newestCachedResource->data(), newestCachedResource->path()));
552552 m_pendingEntries.remove(m_currentHandle->firstRequest().url());
553553 m_currentHandle->cancel();
554  m_currentHandle = 0;
 554 m_currentHandle = nullptr;
555555 // Load the next resource, if any.
556556 startLoadingEntry();
557557 }

@@void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double fini
595595 ASSERT(m_cacheBeingUpdated);
596596
597597 m_cacheBeingUpdated->addResource(m_currentResource.release());
598  m_currentHandle = 0;
 598 m_currentHandle = nullptr;
599599
600600 // While downloading check to see if we have exceeded the available quota.
601601 // We can stop immediately if we have already previously failed

@@void ApplicationCacheGroup::didFinishLoading(ResourceHandle* handle, double fini
603603 // of the quota being reached and decided not to increase it then.
604604 // FIXME: Should we break earlier and prevent redownloading on later page loads?
605605 if (m_originQuotaExceededPreviously && m_availableSpaceInQuota < m_cacheBeingUpdated->estimatedSizeInStorage()) {
606  m_currentResource = 0;
 606 m_currentResource = nullptr;
607607 m_frame->document()->addConsoleMessage(MessageSource::AppCache, MessageLevel::Error, ASCIILiteral("Application Cache update failed, because size quota was exceeded."));
608608 cacheUpdateFailed();
609609 return;

@@void ApplicationCacheGroup::didFail(ResourceHandle* handle, const ResourceError&
631631 url.removeFragmentIdentifier();
632632
633633 ASSERT(!m_currentResource || !m_pendingEntries.contains(url));
634  m_currentResource = 0;
 634 m_currentResource = nullptr;
635635 m_pendingEntries.remove(url);
636636
637637 if ((type & ApplicationCacheResource::Explicit) || (type & ApplicationCacheResource::Fallback)) {

@@void ApplicationCacheGroup::didFinishLoadingManifest()
695695 return;
696696 }
697697
698  m_manifestHandle = 0;
 698 m_manifestHandle = nullptr;
699699
700700 // Check if the manifest was not modified.
701701 if (isUpgradeAttempt) {

@@void ApplicationCacheGroup::didFinishLoadingManifest()
706706 (newestManifest->data()->size() == m_manifestResource->data()->size() && !memcmp(newestManifest->data()->data(), m_manifestResource->data()->data(), newestManifest->data()->size()))) {
707707
708708 m_completionType = NoUpdate;
709  m_manifestResource = 0;
 709 m_manifestResource = nullptr;
710710 deliverDelayedMainResources();
711711
712712 return;

@@void ApplicationCacheGroup::didReachOriginQuota(int64_t totalSpaceNeeded)
782782void ApplicationCacheGroup::cacheUpdateFailed()
783783{
784784 stopLoading();
785  m_manifestResource = 0;
 785 m_manifestResource = nullptr;
786786
787787 // Wait for master resource loads to finish.
788788 m_completionType = Failure;

@@void ApplicationCacheGroup::manifestNotFound()
807807 stopLoading();
808808
809809 ASSERT(m_pendingEntries.isEmpty());
810  m_manifestResource = 0;
 810 m_manifestResource = nullptr;
811811
812812 while (!m_pendingMasterResourceLoaders.isEmpty()) {
813813 HashSet<DocumentLoader*>::iterator it = m_pendingMasterResourceLoaders.begin();

Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp

@@void CachedCSSStyleSheet::destroyDecodedData()
138138 return;
139139
140140 m_parsedStyleSheetCache->removedFromMemoryCache();
141  m_parsedStyleSheetCache.clear();
 141 m_parsedStyleSheetCache = nullptr;
142142
143143 setDecodedSize(0);
144144}

@@void CachedCSSStyleSheet::destroyDecodedData()
146146PassRefPtr<StyleSheetContents> CachedCSSStyleSheet::restoreParsedStyleSheet(const CSSParserContext& context, CachePolicy cachePolicy)
147147{
148148 if (!m_parsedStyleSheetCache)
149  return 0;
 149 return nullptr;
150150 if (!m_parsedStyleSheetCache->subresourcesAllowReuse(cachePolicy)) {
151151 m_parsedStyleSheetCache->removedFromMemoryCache();
152  m_parsedStyleSheetCache.clear();
153  return 0;
 152 m_parsedStyleSheetCache = nullptr;
 153 return nullptr;
154154 }
155155
156156 ASSERT(m_parsedStyleSheetCache->isCacheable());

@@PassRefPtr<StyleSheetContents> CachedCSSStyleSheet::restoreParsedStyleSheet(cons
158158
159159 // Contexts must be identical so we know we would get the same exact result if we parsed again.
160160 if (m_parsedStyleSheetCache->parserContext() != context)
161  return 0;
 161 return nullptr;
162162
163163 didAccessDecodedData(monotonicallyIncreasingTime());
164164

Source/WebCore/loader/cache/CachedImage.cpp

@@inline void CachedImage::clearImage()
365365 // If our Image has an observer, it's always us so we need to clear the back pointer
366366 // before dropping our reference.
367367 if (m_image)
368  m_image->setImageObserver(0);
369  m_image.clear();
 368 m_image->setImageObserver(nullptr);
 369 m_image = nullptr;
370370}
371371
372372void CachedImage::addIncrementalDataBuffer(SharedBuffer& data)

@@void CachedImage::destroyDecodedData()
458458{
459459 bool canDeleteImage = !m_image || (m_image->hasOneRef() && m_image->isBitmapImage());
460460 if (canDeleteImage && !isLoading() && !hasClients()) {
461  m_image = 0;
 461 m_image = nullptr;
462462 setDecodedSize(0);
463463 } else if (m_image && !errorOccurred())
464464 m_image->destroyDecodedData();

Source/WebCore/loader/cache/CachedRawResource.cpp

@@bool CachedRawResource::canReuse(const ResourceRequest& newRequest) const
268268
269269void CachedRawResource::clear()
270270{
271  m_data.clear();
 271 m_data = nullptr;
272272 setEncodedSize(0);
273273 if (m_loader)
274274 m_loader->clearResourceData();

Source/WebCore/loader/cache/CachedResource.cpp

@@void CachedResource::error(CachedResource::Status status)
317317{
318318 setStatus(status);
319319 ASSERT(errorOccurred());
320  m_data.clear();
 320 m_data = nullptr;
321321
322322 setLoading(false);
323323 checkNotify();

Source/WebCore/loader/icon/IconRecord.cpp

@@void IconRecord::setImageData(PassRefPtr<SharedBuffer> data)
7171 // Copy the provided data into the buffer of the new Image object.
7272 if (!m_image->setData(data, true)) {
7373 LOG(IconDatabase, "Manual image data for iconURL '%s' FAILED - it was probably invalid image data", m_iconURL.ascii().data());
74  m_image.clear();
 74 m_image = nullptr;
7575 }
7676
7777 m_dataSet = true;

Source/WebCore/page/EventHandler.cpp

@@void EventHandler::clear()
485485 m_mousePositionIsUnknown = true;
486486 m_lastKnownMousePosition = IntPoint();
487487 m_lastKnownMouseGlobalPosition = IntPoint();
488  m_mousePressNode = 0;
 488 m_mousePressNode = nullptr;
489489 m_mousePressed = false;
490490 m_capturesDragging = false;
491491 m_capturingMouseEventsElement = nullptr;

@@void EventHandler::clear()
494494#endif
495495#if ENABLE(TOUCH_EVENTS) && !ENABLE(IOS_TOUCH_EVENTS)
496496 m_originatingTouchPointTargets.clear();
497  m_originatingTouchPointDocument.clear();
 497 m_originatingTouchPointDocument = nullptr;
498498 m_originatingTouchPointTargetKey = 0;
499499#endif
500500 m_maxMouseMovedDuration = 0;

@@bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
39943994 }
39953995 m_touchPressed = touches->length() > 0;
39963996 if (allTouchReleased)
3997  m_originatingTouchPointDocument.clear();
 3997 m_originatingTouchPointDocument = nullptr;
39983998
39993999 // Now iterate the changedTouches list and m_targets within it, sending events to the targets as required.
40004000 bool swallowedEvent = false;

Source/WebCore/page/Page.cpp

@@void Page::refreshPlugins(bool reload)
516516 Vector<Ref<Frame>> framesNeedingReload;
517517
518518 for (auto& page : *allPages) {
519  page->m_pluginData.clear();
 519 page->m_pluginData = nullptr;
520520
521521 if (!reload)
522522 continue;

Source/WebCore/platform/audio/mac/CARingBuffer.cpp

@@void CARingBuffer::allocate(uint32_t channelCount, size_t bytesPerFrame, size_t
8686void CARingBuffer::deallocate()
8787{
8888 if (m_buffers)
89  m_buffers.clear();
 89 m_buffers = nullptr;
9090
9191 m_channelCount = 0;
9292 m_capacityBytes = 0;

Source/WebCore/platform/graphics/Font.cpp

@@const OpenTypeMathData* Font::mathData() const
363363 if (!m_mathData) {
364364 m_mathData = OpenTypeMathData::create(m_platformData);
365365 if (!m_mathData->hasMathData())
366  m_mathData.clear();
 366 m_mathData = nullptr;
367367 }
368368 return m_mathData.get();
369369}

Source/WebCore/platform/graphics/FontCache.cpp

@@PassRefPtr<OpenTypeVerticalData> FontCache::getVerticalData(const FontFileKey& k
320320
321321 RefPtr<OpenTypeVerticalData> verticalData = OpenTypeVerticalData::create(platformData);
322322 if (!verticalData->isOpenType())
323  verticalData.clear();
 323 verticalData = nullptr;
324324 fontVerticalDataCache.set(key, verticalData);
325325 return verticalData;
326326}

Source/WebCore/platform/graphics/GraphicsContext.cpp

@@void GraphicsContext::setStrokeColor(const Color& color, ColorSpace colorSpace)
178178{
179179 m_state.strokeColor = color;
180180 m_state.strokeColorSpace = colorSpace;
181  m_state.strokeGradient.clear();
182  m_state.strokePattern.clear();
 181 m_state.strokeGradient = nullptr;
 182 m_state.strokePattern = nullptr;
183183 setPlatformStrokeColor(color, colorSpace);
184184}
185185

@@void GraphicsContext::setFillColor(const Color& color, ColorSpace colorSpace)
245245{
246246 m_state.fillColor = color;
247247 m_state.fillColorSpace = colorSpace;
248  m_state.fillGradient.clear();
249  m_state.fillPattern.clear();
 248 m_state.fillGradient = nullptr;
 249 m_state.fillPattern = nullptr;
250250 setPlatformFillColor(color, colorSpace);
251251}
252252

@@void GraphicsContext::setAntialiasedFontDilationEnabled(bool antialiasedFontDila
269269
270270void GraphicsContext::setStrokePattern(Ref<Pattern>&& pattern)
271271{
272  m_state.strokeGradient.clear();
 272 m_state.strokeGradient = nullptr;
273273 m_state.strokePattern = WTF::move(pattern);
274274}
275275
276276void GraphicsContext::setFillPattern(Ref<Pattern>&& pattern)
277277{
278  m_state.fillGradient.clear();
 278 m_state.fillGradient = nullptr;
279279 m_state.fillPattern = WTF::move(pattern);
280280}
281281
282282void GraphicsContext::setStrokeGradient(Ref<Gradient>&& gradient)
283283{
284284 m_state.strokeGradient = WTF::move(gradient);
285  m_state.strokePattern.clear();
 285 m_state.strokePattern = nullptr;
286286}
287287
288288void GraphicsContext::setFillGradient(Ref<Gradient>&& gradient)
289289{
290290 m_state.fillGradient = WTF::move(gradient);
291  m_state.fillPattern.clear();
 291 m_state.fillPattern = nullptr;
292292}
293293
294294void GraphicsContext::beginTransparencyLayer(float opacity)

Source/WebCore/platform/graphics/MediaPlayer.cpp

@@bool MediaPlayer::load(const URL& url, const ContentType& contentType, const Str
314314 m_contentMIMETypeWasInferredFromExtension = false;
315315
316316#if ENABLE(MEDIA_SOURCE)
317  m_mediaSource = 0;
 317 m_mediaSource = nullptr;
318318#endif
319319#if ENABLE(MEDIA_STREAM)
320  m_mediaStream = 0;
 320 m_mediaStream = nullptr;
321321#endif
322322
323323 // If the MIME type is missing or is not meaningful, try to figure it out from the URL.

Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp

@@void GraphicsLayerCA::updateContentsImage()
22082208 } else {
22092209 // No image.
22102210 // m_contentsLayer will be removed via updateSublayerList.
2211  m_contentsLayer = 0;
 2211 m_contentsLayer = nullptr;
22122212 }
22132213}
22142214

Source/WebCore/platform/graphics/cairo/BackingStoreBackendCairoX11.cpp

@@BackingStoreBackendCairoX11::BackingStoreBackendCairoX11(unsigned long rootWindo
4343BackingStoreBackendCairoX11::~BackingStoreBackendCairoX11()
4444{
4545 // The pixmap needs to exist when the surface is destroyed, so begin by clearing it.
46  m_surface.clear();
 46 m_surface = nullptr;
4747}
4848
4949void BackingStoreBackendCairoX11::scroll(const IntRect& scrollRect, const IntSize& scrollOffset)

Source/WebCore/platform/graphics/cairo/BitmapImageCairo.cpp

@@bool FrameData::clear(bool clearMetadata)
159159 m_haveMetadata = false;
160160
161161 if (m_frame) {
162  m_frame.clear();
 162 m_frame = nullptr;
163163 return true;
164164 }
165165 return false;

Source/WebCore/platform/graphics/filters/FilterEffect.cpp

@@void FilterEffect::clearResult()
245245 if (m_imageBufferResult)
246246 m_imageBufferResult.reset();
247247 if (m_unmultipliedImageResult)
248  m_unmultipliedImageResult.clear();
 248 m_unmultipliedImageResult = nullptr;
249249 if (m_premultipliedImageResult)
250  m_premultipliedImageResult.clear();
 250 m_premultipliedImageResult = nullptr;
251251#if ENABLE(OPENCL)
252252 if (m_openCLImageResult)
253  m_openCLImageResult.clear();
 253 m_openCLImageResult = nullptr;
254254#endif
255255}
256256

@@void FilterEffect::transformResultColorSpace(ColorSpace dstColorSpace)
540540#if ENABLE(OPENCL)
541541 if (openCLImage()) {
542542 if (m_imageBufferResult)
543  m_imageBufferResult.clear();
 543 m_imageBufferResult = nullptr;
544544 FilterContextOpenCL* context = FilterContextOpenCL::context();
545545 ASSERT(context);
546546 context->openCLTransformColorSpace(m_openCLImageResult, absolutePaintRect(), m_resultColorSpace, dstColorSpace);

@@void FilterEffect::transformResultColorSpace(ColorSpace dstColorSpace)
558558 m_resultColorSpace = dstColorSpace;
559559
560560 if (m_unmultipliedImageResult)
561  m_unmultipliedImageResult.clear();
 561 m_unmultipliedImageResult = nullptr;
562562 if (m_premultipliedImageResult)
563  m_premultipliedImageResult.clear();
 563 m_premultipliedImageResult = nullptr;
564564#endif
565565}
566566

Source/WebCore/platform/graphics/gstreamer/ImageGStreamerCairo.cpp

@@ImageGStreamer::ImageGStreamer(GstSample* sample)
7171ImageGStreamer::~ImageGStreamer()
7272{
7373 if (m_image)
74  m_image.clear();
75 
76  m_image = 0;
 74 m_image = nullptr;
7775
7876 // We keep the buffer memory mapped until the image is destroyed because the internal
7977 // cairo_surface_t was created using cairo_image_surface_create_for_data().

Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp

@@PassRefPtr<BitmapTexture> BitmapTextureGL::applyFilters(TextureMapper* textureMa
278278 texmapGL->drawFiltered(*resultSurface.get(), spareSurface.get(), *filter, j);
279279 if (!j && filter->type() == FilterOperation::DROP_SHADOW) {
280280 spareSurface = resultSurface;
281  resultSurface.clear();
 281 resultSurface = nullptr;
282282 }
283283 std::swap(resultSurface, intermediateSurface);
284284 }

Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp

@@void TextureMapperGL::bindDefaultSurface()
691691 data().projectionMatrix = createProjectionMatrix(viewportSize, data().PaintFlags & PaintingMirrored);
692692 m_context3D->viewport(data().viewport[0], data().viewport[1], viewportSize.width(), viewportSize.height());
693693 m_clipStack.apply(m_context3D.get());
694  data().currentSurface.clear();
 694 data().currentSurface = nullptr;
695695}
696696
697697void TextureMapperGL::bindSurface(BitmapTexture *surface)

Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp

@@void TextureMapperLayer::paintWithIntermediateSurface(const TextureMapperPaintOp
408408
409409 if (replicaSurface && options.opacity == 1) {
410410 commitSurface(options, replicaSurface, rect, 1);
411  replicaSurface.clear();
 411 replicaSurface = nullptr;
412412 }
413413
414414 mainSurface = paintIntoSurface(paintOptions, rect.size());

Source/WebCore/platform/graphics/texmap/TextureMapperTiledBackingStore.cpp

@@void TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded(TextureMapp
3939 return;
4040
4141 updateContents(textureMapper, m_image.get(), m_image->size(), enclosingIntRect(m_image->rect()), BitmapTexture::UpdateCannotModifyOriginalImageData);
42  m_image.clear();
 42 m_image = nullptr;
4343}
4444
4545TransformationMatrix TextureMapperTiledBackingStore::adjustedTransformForRect(const FloatRect& targetRect)

Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp

@@void CoordinatedGraphicsLayer::releaseImageBackingIfNeeded()
820820
821821 ASSERT(m_coordinator);
822822 m_coordinatedImageBacking->removeHost(this);
823  m_coordinatedImageBacking.clear();
 823 m_coordinatedImageBacking = nullptr;
824824 m_layerState.imageID = InvalidCoordinatedImageBackingID;
825825 m_layerState.imageChanged = true;
826826}

Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedImageBacking.cpp

@@void CoordinatedImageBacking::releaseSurfaceIfNeeded()
141141{
142142 // We must keep m_surface until UI Process reads m_surface.
143143 // If m_surface exists, it was created in the previous update.
144  m_surface.clear();
 144 m_surface = nullptr;
145145}
146146
147147static const double clearContentsTimerInterval = 3;

Source/WebCore/platform/gtk/GamepadsGtk.cpp

@@void GamepadsGtk::unregisterDevice(String deviceFile)
155155 size_t index = m_slots.find(gamepadDevice);
156156 ASSERT(index != notFound);
157157
158  m_slots[index].clear();
 158 m_slots[index] = nullptr;
159159}
160160
161161void GamepadsGtk::updateGamepadList(GamepadList* into)

Source/WebCore/platform/ios/PlatformSpeechSynthesizerIOS.mm

@@- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didFinishSpeechUtte
179179
180180 // Clear the m_utterance variable in case finish speaking kicks off a new speaking job immediately.
181181 RefPtr<WebCore::PlatformSpeechSynthesisUtterance> platformUtterance = m_utterance;
182  m_utterance = 0;
 182 m_utterance = nullptr;
183183
184184 m_synthesizerObject->client()->didFinishSpeaking(platformUtterance);
185185}

@@- (void)speechSynthesizer:(AVSpeechSynthesizer *)synthesizer didCancelSpeechUtte
213213
214214 // Clear the m_utterance variable in case finish speaking kicks off a new speaking job immediately.
215215 RefPtr<WebCore::PlatformSpeechSynthesisUtterance> platformUtterance = m_utterance;
216  m_utterance = 0;
 216 m_utterance = nullptr;
217217
218218 m_synthesizerObject->client()->didFinishSpeaking(platformUtterance);
219219}

Source/WebCore/platform/mock/PlatformSpeechSynthesizerMock.cpp

@@void PlatformSpeechSynthesizerMock::speakingFinished()
4545{
4646 ASSERT(m_utterance.get());
4747 RefPtr<PlatformSpeechSynthesisUtterance> protect(m_utterance);
48  m_utterance = 0;
 48 m_utterance = nullptr;
4949
5050 client()->didFinishSpeaking(protect);
5151}

@@void PlatformSpeechSynthesizerMock::cancel()
7878
7979 m_speakingFinishedTimer.stop();
8080 client()->speakingErrorOccurred(m_utterance);
81  m_utterance = 0;
 81 m_utterance = nullptr;
8282}
8383
8484void PlatformSpeechSynthesizerMock::pause()

Source/WebCore/platform/network/cf/ResourceRequestCFNet.cpp

@@void ResourceRequest::doUpdateResourceRequest()
295295void ResourceRequest::doUpdateResourceHTTPBody()
296296{
297297 if (!m_cfRequest) {
298  m_httpBody = 0;
 298 m_httpBody = nullptr;
299299 return;
300300 }
301301

Source/WebCore/rendering/InlineFlowBox.cpp

@@void InlineFlowBox::computeOverflow(LayoutUnit lineTop, LayoutUnit lineBottom, G
954954 return;
955955
956956 if (m_overflow)
957  m_overflow.clear();
 957 m_overflow = nullptr;
958958
959959 // Visual overflow just includes overflow for stuff we need to repaint ourselves. Self-painting layers are ignored.
960960 // Layout overflow is used to determine scrolling extent, so it still includes child layers and also factors in

Source/WebCore/rendering/RenderBox.cpp

@@void RenderBox::addVisualOverflow(const LayoutRect& rect)
44974497
44984498void RenderBox::clearOverflow()
44994499{
4500  m_overflow.clear();
 4500 m_overflow = nullptr;
45014501 RenderFlowThread* flowThread = flowThreadContainingBlock();
45024502 if (flowThread)
45034503 flowThread->clearRegionsOverflow(this);

Source/WebCore/rendering/RenderBoxRegionInfo.h

@@public:
5353 void clearOverflow()
5454 {
5555 if (m_overflow)
56  m_overflow.clear();
 56 m_overflow = nullptr;
5757 }
5858
5959private:

Source/WebCore/rendering/RenderCounter.cpp

@@static bool findPlaceForCounter(RenderElement& counterOwner, const AtomicString&
186186 // towards the begining of the document for counters with the same identifier as the one
187187 // we are trying to find a place for. This is the next renderer to be checked.
188188 RenderElement* currentRenderer = previousInPreOrder(counterOwner);
189  previousSibling = 0;
190  RefPtr<CounterNode> previousSiblingProtector = 0;
 189 previousSibling = nullptr;
 190 RefPtr<CounterNode> previousSiblingProtector;
191191
192192 while (currentRenderer) {
193193 CounterNode* currentCounter = makeCounterNode(*currentRenderer, identifier, false);

@@static bool findPlaceForCounter(RenderElement& counterOwner, const AtomicString&
203203 // hence we are the next sibling of that counter if that reset is not a root or
204204 // we are a root node if that reset is a root.
205205 parent = currentCounter->parent();
206  previousSibling = parent ? currentCounter : 0;
 206 previousSibling = parent ? currentCounter : nullptr;
207207 return parent;
208208 }
209209 // We are not a reset node or the previous reset must be on an ancestor of our owner renderer

@@static bool findPlaceForCounter(RenderElement& counterOwner, const AtomicString&
213213 // In these cases the identified previousSibling will be invalid as its parent is different from
214214 // our identified parent.
215215 if (previousSiblingProtector->parent() != currentCounter)
216  previousSiblingProtector = 0;
 216 previousSiblingProtector = nullptr;
217217
218218 previousSibling = previousSiblingProtector.get();
219219 return true;

Source/WebCore/rendering/RenderMenuList.cpp

@@RenderMenuList::~RenderMenuList()
8888#if !PLATFORM(IOS)
8989 if (m_popup)
9090 m_popup->disconnectClient();
91  m_popup = 0;
 91 m_popup = nullptr;
9292#endif
9393}
9494

Source/WebCore/rendering/RenderSearchField.cpp

@@RenderSearchField::~RenderSearchField()
6262{
6363 if (m_searchPopup) {
6464 m_searchPopup->popupMenu()->disconnectClient();
65  m_searchPopup = 0;
 65 m_searchPopup = nullptr;
6666 }
6767}
6868

Source/WebCore/rendering/style/FillLayer.h

@@public:
121121 void setSize(FillSize f) { m_sizeType = f.type; m_sizeLength = f.size; }
122122 void setMaskSourceType(EMaskSourceType m) { m_maskSourceType = m; m_maskSourceTypeSet = true; }
123123
124  void clearMaskImage() { m_maskImageOperation.clear(); }
125  void clearImage() { m_image.clear(); m_imageSet = false; }
 124 void clearMaskImage() { m_maskImageOperation = nullptr; }
 125 void clearImage() { m_image = nullptr; m_imageSet = false; }
126126 void clearXPosition() { m_xPosSet = false; m_backgroundOriginSet = false; }
127127 void clearYPosition() { m_yPosSet = false; m_backgroundOriginSet = false; }
128128

Source/WebCore/rendering/style/RenderStyle.cpp

@@void RenderStyle::setQuotes(PassRefPtr<QuotesData> q)
950950void RenderStyle::clearCursorList()
951951{
952952 if (rareInheritedData->cursorData)
953  rareInheritedData.access()->cursorData = 0;
 953 rareInheritedData.access()->cursorData = nullptr;
954954}
955955
956956void RenderStyle::clearContent()

Source/WebCore/svg/SVGTRefElement.cpp

@@void SVGTRefTargetEventListener::detach()
104104
105105 m_target->removeEventListener(eventNames().DOMSubtreeModifiedEvent, this, false);
106106 m_target->removeEventListener(eventNames().DOMNodeRemovedFromDocumentEvent, this, false);
107  m_target.clear();
 107 m_target = nullptr;
108108}
109109
110110bool SVGTRefTargetEventListener::operator==(const EventListener& listener)

Source/WebCore/testing/Internals.cpp

@@void Internals::closeDummyInspectorFrontend()
17231723 m_frontendChannel = nullptr;
17241724
17251725 m_frontendWindow->close(m_frontendWindow->scriptExecutionContext());
1726  m_frontendWindow.clear();
 1726 m_frontendWindow = nullptr;
17271727}
17281728
17291729void Internals::setJavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec)

Source/WebCore/workers/WorkerEventQueue.cpp

@@public:
6868 return;
6969 m_eventQueue.m_eventDispatcherMap.remove(m_event.get());
7070 m_event->target()->dispatchEvent(m_event);
71  m_event.clear();
 71 m_event = nullptr;
7272 }
7373
7474 void cancel()
7575 {
7676 m_isCancelled = true;
77  m_event.clear();
 77 m_event = nullptr;
7878 }
7979
8080private:

Source/WebCore/workers/WorkerMessagingProxy.cpp

@@void WorkerMessagingProxy::workerGlobalScopeDestroyedInternal()
264264 // WorkerGlobalScopeDestroyedTask is always the last to be performed, so the proxy is not needed for communication
265265 // in either side any more. However, the Worker object may still exist, and it assumes that the proxy exists, too.
266266 m_askedToTerminate = true;
267  m_workerThread = 0;
 267 m_workerThread = nullptr;
268268
269269 InspectorInstrumentation::workerGlobalScopeTerminated(m_scriptExecutionContext.get(), this);
270270

Source/WebCore/workers/WorkerThread.cpp

@@void WorkerThread::workerThread()
171171
172172 // The below assignment will destroy the context, which will in turn notify messaging proxy.
173173 // We cannot let any objects survive past thread exit, because no other thread will run GC or otherwise destroy them.
174  m_workerGlobalScope = 0;
 174 m_workerGlobalScope = nullptr;
175175
176176 // Clean up WebCore::ThreadGlobalData before WTF::WTFThreadData goes away!
177177 threadGlobalData().destroy();

Source/WebCore/xml/XMLHttpRequest.cpp

@@Blob* XMLHttpRequest::responseBlob()
245245 data.append(m_binaryResponseBuilder->data(), m_binaryResponseBuilder->size());
246246 String normalizedContentType = Blob::normalizedContentType(responseMIMEType()); // responseMIMEType defaults to text/xml which may be incorrect.
247247 m_responseBlob = Blob::create(WTF::move(data), normalizedContentType);
248  m_binaryResponseBuilder.clear();
 248 m_binaryResponseBuilder = nullptr;
249249 } else {
250250 // If we errored out or got no data, we still return a blob, just an empty one.
251251 m_responseBlob = Blob::create();

@@ArrayBuffer* XMLHttpRequest::responseArrayBuffer()
265265 m_responseArrayBuffer = m_binaryResponseBuilder->createArrayBuffer();
266266 else
267267 m_responseArrayBuffer = ArrayBuffer::create(nullptr, 0);
268  m_binaryResponseBuilder.clear();
 268 m_binaryResponseBuilder = nullptr;
269269 }
270270
271271 return m_responseArrayBuffer.get();

@@void XMLHttpRequest::clearResponseBuffers()
868868 m_createdDocument = false;
869869 m_responseDocument = nullptr;
870870 m_responseBlob = nullptr;
871  m_binaryResponseBuilder.clear();
872  m_responseArrayBuffer.clear();
 871 m_binaryResponseBuilder = nullptr;
 872 m_responseArrayBuffer = nullptr;
873873 m_responseCacheIsValid = false;
874874}
875875

Source/WebCore/xml/XSLTProcessor.cpp

@@void XSLTProcessor::removeParameter(const String& /*namespaceURI*/, const String
162162
163163void XSLTProcessor::reset()
164164{
165  m_stylesheet.clear();
166  m_stylesheetRootNode.clear();
 165 m_stylesheet = nullptr;
 166 m_stylesheetRootNode = nullptr;
167167 m_parameters.clear();
168168}
169169

Source/WebKit/Storage/StorageAreaSync.cpp

@@void StorageAreaSync::scheduleFinalSync()
8888 ASSERT(isMainThread());
8989 // FIXME: We do this to avoid races, but it'd be better to make things safe without blocking.
9090 blockUntilImportComplete();
91  m_storageArea = 0; // This is done in blockUntilImportComplete() but this is here as a form of documentation that we must be absolutely sure the ref count cycle is broken.
 91 m_storageArea = nullptr; // This is done in blockUntilImportComplete() but this is here as a form of documentation that we must be absolutely sure the ref count cycle is broken.
9292
9393 if (m_syncTimer.isActive())
9494 m_syncTimer.stop();

@@void StorageAreaSync::blockUntilImportComplete()
375375 MutexLocker locker(m_importLock);
376376 while (!m_importComplete)
377377 m_importCondition.wait(m_importLock);
378  m_storageArea = 0;
 378 m_storageArea = nullptr;
379379}
380380
381381void StorageAreaSync::sync(bool clearItems, const HashMap<String, String>& items)

Source/WebKit/mac/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebCoreSupport/WebEditorClient.mm:
 9 (WebEditorClient::didCheckSucceed):
 10
1112015-07-02 Timothy Horton <timothy_horton@apple.com>
212
313 Fix the build.

Source/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm

@@- (void)destroyPlugin
281281 }
282282
283283 _proxy->destroy();
284  _proxy = 0;
 284 _proxy = nullptr;
285285 }
286286
287287 _pluginLayer = 0;

@@- (void)pluginHostDied
432432 downcast<RenderEmbeddedObject>(*_element->renderer()).setPluginUnavailabilityReason(RenderEmbeddedObject::PluginCrashed);
433433
434434 _pluginLayer = nil;
435  _proxy = 0;
 435 _proxy = nullptr;
436436
437437 // No need for us to be layer backed anymore
438438 self.wantsLayer = NO;

Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm

@@void WebEditorClient::didCheckSucceed(int sequence, NSArray* results)
11431143{
11441144 ASSERT_UNUSED(sequence, sequence == m_textCheckingRequest->data().sequence());
11451145 m_textCheckingRequest->didSucceed(core(results, m_textCheckingRequest->data().mask()));
1146  m_textCheckingRequest.clear();
 1146 m_textCheckingRequest = nullptr;
11471147}
11481148#endif
11491149

Source/WebKit/mac/WebCoreSupport/WebUserMediaClient.mm

@@- (void)cancelRequest
142142 if (!_request)
143143 return;
144144
145  _request = 0;
 145 _request = nullptr;
146146#endif
147147
148148}

Source/WebKit/win/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * WebView.cpp:
 9 (WebView::deleteBackingStore):
 10 (WebView::updateBackingStore):
 11
1122015-06-30 Simon Fraser <simon.fraser@apple.com>
213
314 Fix Mac and Windows builds.

Source/WebKit/win/WebView.cpp

@@void WebView::deleteBackingStore()
851851 KillTimer(m_viewWindow, DeleteBackingStoreTimer);
852852 m_deleteBackingStoreTimerActive = false;
853853 }
854  m_backingStoreBitmap.clear();
855  m_backingStoreDirtyRegion.clear();
 854 m_backingStoreBitmap = nullptr;
 855 m_backingStoreDirtyRegion = nullptr;
856856 m_backingStoreSize.cx = m_backingStoreSize.cy = 0;
857857}
858858

@@void WebView::updateBackingStore(FrameView* frameView, HDC dc, bool backingStore
10791079 if (m_uiDelegatePrivate)
10801080 m_uiDelegatePrivate->webViewPainted(this);
10811081
1082  m_backingStoreDirtyRegion.clear();
 1082 m_backingStoreDirtyRegion = nullptr;
10831083 }
10841084
10851085 if (!dc)

Source/WebKit2/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
 9 (WebKit::UniqueIDBDatabase::shutdownBackingStore):
 10 * Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp:
 11 (WebKit::CoordinatedBackingStoreTile::swapBuffers):
 12 * UIProcess/API/efl/EwkView.cpp:
 13 (EwkView::hideContextMenu):
 14 * UIProcess/InspectorServer/WebSocketServerConnection.cpp:
 15 (WebKit::WebSocketServerConnection::didCloseSocketStream):
 16 * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm:
 17 (-[WKCustomProtocolLoader dealloc]):
 18 * UIProcess/ios/WKGeolocationProviderIOS.mm:
 19 (-[WKGeolocationProviderIOS _stopUpdating]):
 20
1212015-07-03 Carlos Garcia Campos <cgarcia@igalia.com>
222
323 REGRESSION(r186025): [SOUP] NetworkCache gets blocked in traverse since r186025

Source/WebKit2/DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp

@@void UniqueIDBDatabase::shutdownBackingStore(UniqueIDBDatabaseShutdownType type,
147147{
148148 ASSERT(!RunLoop::isMain());
149149
150  m_backingStore.clear();
 150 m_backingStore = nullptr;
151151
152152 if (type == UniqueIDBDatabaseShutdownType::DeleteShutdown) {
153153 String dbFilename = UniqueIDBDatabase::calculateAbsoluteDatabaseFilename(databaseDirectory);

Source/WebKit2/PluginProcess/PluginControllerProxy.cpp

@@bool PluginControllerProxy::initialize(const PluginCreationParameters& creationP
126126 // used as an identifier so it's OK to just get a weak reference.
127127 Plugin* plugin = m_plugin.get();
128128
129  m_plugin = 0;
 129 m_plugin = nullptr;
130130
131131 // This will delete the plug-in controller proxy object.
132132 m_connection->removePluginControllerProxy(this, plugin);

@@void PluginControllerProxy::destroy()
156156 Plugin* plugin = m_plugin.get();
157157
158158 m_plugin->destroyPlugin();
159  m_plugin = 0;
 159 m_plugin = nullptr;
160160
161161 platformDestroy();
162162

Source/WebKit2/Shared/ChildProcessProxy.cpp

@@ChildProcessProxy::~ChildProcessProxy()
4242
4343 if (m_processLauncher) {
4444 m_processLauncher->invalidate();
45  m_processLauncher = 0;
 45 m_processLauncher = nullptr;
4646 }
4747}
4848

Source/WebKit2/Shared/CoordinatedGraphics/CoordinatedBackingStore.cpp

@@void CoordinatedBackingStoreTile::swapBuffers(TextureMapper* textureMapper)
5555 texture->reset(m_tileRect.size(), m_surface->supportsAlpha());
5656
5757 m_surface->copyToTexture(texture, m_sourceRect, m_surfaceOffset);
58  m_surface.clear();
 58 m_surface = nullptr;
5959}
6060
6161void CoordinatedBackingStoreTile::setBackBuffer(const IntRect& tileRect, const IntRect& sourceRect, PassRefPtr<CoordinatedSurface> buffer, const IntPoint& offset)

Source/WebKit2/UIProcess/API/efl/EwkView.cpp

@@void EwkView::hideContextMenu()
940940 if (sd->api->context_menu_hide)
941941 sd->api->context_menu_hide(sd);
942942
943  m_contextMenu.clear();
 943 m_contextMenu = nullptr;
944944}
945945
946946void EwkView::requestPopupMenu(WKPopupMenuListenerRef popupMenuListener, const WKRect& rect, WKPopupItemTextDirection textDirection, double pageScaleFactor, WKArrayRef items, int32_t selectedIndex)

Source/WebKit2/UIProcess/API/mac/WKView.mm

@@- (void)_setPromisedDataForAttachment:(NSString *)filename withExtension:(NSStri
35203520
35213521- (void)pasteboardChangedOwner:(NSPasteboard *)pasteboard
35223522{
3523  _data->_promisedImage = 0;
 3523 _data->_promisedImage = nullptr;
35243524 _data->_promisedFilename = "";
35253525 _data->_promisedURL = "";
35263526}

@@- (void)pasteboard:(NSPasteboard *)pasteboard provideDataForType:(NSString *)typ
35313531
35323532 if ([type isEqual:NSTIFFPboardType] && _data->_promisedImage) {
35333533 [pasteboard setData:(NSData *)_data->_promisedImage->getTIFFRepresentation() forType:NSTIFFPboardType];
3534  _data->_promisedImage = 0;
 3534 _data->_promisedImage = nullptr;
35353535 }
35363536}
35373537

Source/WebKit2/UIProcess/InspectorServer/WebSocketServerConnection.cpp

@@void WebSocketServerConnection::sendRawData(const char* data, size_t length)
126126void WebSocketServerConnection::didCloseSocketStream(SocketStreamHandle*)
127127{
128128 // Destroy the SocketStreamHandle now to prevent closing an already closed socket later.
129  m_socket.clear();
 129 m_socket = nullptr;
130130
131131 // Web Socket Mode.
132132 if (m_mode == WebSocket)

Source/WebKit2/UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm

@@- (id)initWithCustomProtocolManagerProxy:(CustomProtocolManagerProxy*)customProt
7676
7777- (void)dealloc
7878{
79  _connection.clear();
 79 _connection = nullptr;
8080 [_urlConnection cancel];
8181 [_urlConnection release];
8282 [super dealloc];

Source/WebKit2/UIProcess/StatisticsRequest.cpp

@@void StatisticsRequest::completedRequest(uint64_t requestID, const StatisticsDat
9595
9696 if (m_outstandingRequests.isEmpty()) {
9797 m_callback->performCallbackWithReturnValue(m_responseDictionary.get());
98  m_callback = 0;
 98 m_callback = nullptr;
9999 }
100100}
101101

Source/WebKit2/UIProcess/WebFrameListenerProxy.cpp

@@WebFrameListenerProxy::~WebFrameListenerProxy()
4242
4343void WebFrameListenerProxy::invalidate()
4444{
45  m_frame = 0;
 45 m_frame = nullptr;
4646}
4747
4848void WebFrameListenerProxy::receivedPolicyDecision(WebCore::PolicyAction action)

@@void WebFrameListenerProxy::receivedPolicyDecision(WebCore::PolicyAction action)
5151 return;
5252
5353 m_frame->receivedPolicyDecision(action, m_listenerID, m_navigation.get());
54  m_frame = 0;
 54 m_frame = nullptr;
5555}
5656
5757} // namespace WebKit

Source/WebKit2/UIProcess/WebFrameProxy.cpp

@@WebFrameProxy::~WebFrameProxy()
5757
5858void WebFrameProxy::webProcessWillShutDown()
5959{
60  m_page = 0;
 60 m_page = nullptr;
6161
6262 if (m_activeListener) {
6363 m_activeListener->invalidate();
64  m_activeListener = 0;
 64 m_activeListener = nullptr;
6565 }
6666}
6767

Source/WebKit2/UIProcess/WebOpenPanelResultListenerProxy.cpp

@@void WebOpenPanelResultListenerProxy::cancel()
8989
9090void WebOpenPanelResultListenerProxy::invalidate()
9191{
92  m_page = 0;
 92 m_page = nullptr;
9393}
9494
9595} // namespace WebKit

Source/WebKit2/UIProcess/WebPageProxy.cpp

@@void WebPageProxy::runOpenPanel(uint64_t frameID, const FileChooserSettings& set
37063706{
37073707 if (m_openPanelResultListener) {
37083708 m_openPanelResultListener->invalidate();
3709  m_openPanelResultListener = 0;
 3709 m_openPanelResultListener = nullptr;
37103710 }
37113711
37123712 WebFrameProxy* frame = m_process->webFrame(frameID);

@@void WebPageProxy::showColorPicker(const WebCore::Color& initialColor, const Int
38083808#if ENABLE(INPUT_TYPE_COLOR_POPOVER)
38093809 // A new popover color well needs to be created (and the previous one destroyed) for
38103810 // each activation of a color element.
3811  m_colorPicker = 0;
 3811 m_colorPicker = nullptr;
38123812#endif
38133813 if (!m_colorPicker)
38143814 m_colorPicker = m_pageClient.createColorPicker(this, initialColor, elementRect);

@@void WebPageProxy::didChooseFilesForOpenPanel(const Vector<String>& fileURLs)
43004300 m_process->send(Messages::WebPage::DidChooseFilesForOpenPanel(fileURLs), m_pageID);
43014301
43024302 m_openPanelResultListener->invalidate();
4303  m_openPanelResultListener = 0;
 4303 m_openPanelResultListener = nullptr;
43044304}
43054305
43064306void WebPageProxy::didCancelForOpenPanel()

@@void WebPageProxy::didCancelForOpenPanel()
43114311 m_process->send(Messages::WebPage::DidCancelForOpenPanel(), m_pageID);
43124312
43134313 m_openPanelResultListener->invalidate();
4314  m_openPanelResultListener = 0;
 4314 m_openPanelResultListener = nullptr;
43154315}
43164316
43174317void WebPageProxy::advanceToNextMisspelling(bool startBeforeSelection)

@@void WebPageProxy::printFinishedCallback(const ResourceError& printError, uint64
47674767void WebPageProxy::focusedFrameChanged(uint64_t frameID)
47684768{
47694769 if (!frameID) {
4770  m_focusedFrame = 0;
 4770 m_focusedFrame = nullptr;
47714771 return;
47724772 }
47734773

@@void WebPageProxy::focusedFrameChanged(uint64_t frameID)
47804780void WebPageProxy::frameSetLargestFrameChanged(uint64_t frameID)
47814781{
47824782 if (!frameID) {
4783  m_frameSetLargestFrame = 0;
 4783 m_frameSetLargestFrame = nullptr;
47844784 return;
47854785 }
47864786

Source/WebKit2/UIProcess/ios/WKGeolocationProviderIOS.mm

@@-(void)_stopUpdating
118118{
119119 _isWebCoreGeolocationActive = NO;
120120 [_coreLocationProvider stop];
121  _lastActivePosition.clear();
 121 _lastActivePosition = nullptr;
122122}
123123
124124-(void)_setEnableHighAccuracy:(BOOL)enableHighAccuracy

Source/WebKit2/WebProcess/InjectedBundle/mac/InjectedBundleMac.mm

@@bool InjectedBundle::initialize(const WebProcessCreationParameters& parameters,
5555 return false;
5656 }
5757
58  m_sandboxExtension = 0;
 58 m_sandboxExtension = nullptr;
5959 }
6060
6161 RetainPtr<CFStringRef> injectedBundlePathStr = m_path.createCFString();

Source/WebKit2/WebProcess/Network/WebResourceLoader.cpp

@@void WebResourceLoader::cancelResourceLoader()
7676
7777void WebResourceLoader::detachFromCoreLoader()
7878{
79  m_coreLoader = 0;
 79 m_coreLoader = nullptr;
8080}
8181
8282void WebResourceLoader::willSendRequest(const ResourceRequest& proposedRequest, const ResourceResponse& redirectResponse)

Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp

@@void NetscapePlugin::cancelStreamLoad(NetscapePluginStream* pluginStream)
277277void NetscapePlugin::removePluginStream(NetscapePluginStream* pluginStream)
278278{
279279 if (pluginStream == m_manualStream) {
280  m_manualStream = 0;
 280 m_manualStream = nullptr;
281281 return;
282282 }
283283

Source/WebKit2/WebProcess/Plugins/PDF/PDFPlugin.mm

@@void PDFPlugin::destroy()
11031103 frameView->removeScrollableArea(this);
11041104 }
11051105
1106  m_activeAnnotation = 0;
1107  m_annotationContainer = 0;
 1106 m_activeAnnotation = nullptr;
 1107 m_annotationContainer = nullptr;
11081108
11091109 destroyScrollbar(HorizontalScrollbar);
11101110 destroyScrollbar(VerticalScrollbar);

@@void PDFPlugin::setActiveAnnotation(PDFAnnotation *annotation)
16041604
16051605 if (annotation) {
16061606 if ([annotation isKindOfClass:pdfAnnotationTextWidgetClass()] && static_cast<PDFAnnotationTextWidget *>(annotation).isReadOnly) {
1607  m_activeAnnotation = 0;
 1607 m_activeAnnotation = nullptr;
16081608 return;
16091609 }
16101610
16111611 m_activeAnnotation = PDFPluginAnnotation::create(annotation, m_pdfLayerController.get(), this);
16121612 m_activeAnnotation->attach(m_annotationContainer.get());
16131613 } else
1614  m_activeAnnotation = 0;
 1614 m_activeAnnotation = nullptr;
16151615}
16161616
16171617bool PDFPlugin::supportsForms()

Source/WebKit2/WebProcess/Plugins/PluginView.cpp

@@void PluginView::Stream::cancel()
166166
167167 m_streamWasCancelled = true;
168168 m_loader->cancel(m_loader->cancelledError());
169  m_loader = 0;
 169 m_loader = nullptr;
170170}
171171
172172static String buildHTTPHeaders(const ResourceResponse& response, long long& expectedContentLength)

@@void PluginView::initializePlugin()
604604
605605void PluginView::didFailToInitializePlugin()
606606{
607  m_plugin = 0;
 607 m_plugin = nullptr;
608608
609609#if ENABLE(NETSCAPE_PLUGIN_API)
610610 String frameURLString = frame()->loader().documentLoader()->responseURL().string();

Source/WebKit2/WebProcess/WebPage/WebPage.cpp

@@void WebPage::close()
930930 }
931931
932932#if ENABLE(FULLSCREEN_API)
933  m_fullScreenManager = 0;
 933 m_fullScreenManager = nullptr;
934934#endif
935935
936936 if (m_activePopupMenu) {
937937 m_activePopupMenu->disconnectFromPage();
938  m_activePopupMenu = 0;
 938 m_activePopupMenu = nullptr;
939939 }
940940
941941 if (m_activeOpenPanelResultListener) {
942942 m_activeOpenPanelResultListener->disconnectFromPage();
943  m_activeOpenPanelResultListener = 0;
 943 m_activeOpenPanelResultListener = nullptr;
944944 }
945945
946946#if ENABLE(INPUT_TYPE_COLOR)
947947 if (m_activeColorChooser) {
948948 m_activeColorChooser->disconnectFromPage();
949  m_activeColorChooser = 0;
 949 m_activeColorChooser = nullptr;
950950 }
951951#endif
952952

@@void WebPage::countStringMatches(const String& string, uint32_t options, uint32_
32703270void WebPage::didChangeSelectedIndexForActivePopupMenu(int32_t newIndex)
32713271{
32723272 changeSelectedIndex(newIndex);
3273  m_activePopupMenu = 0;
 3273 m_activePopupMenu = nullptr;
32743274}
32753275
32763276void WebPage::changeSelectedIndex(int32_t index)

@@void WebPage::didChooseFilesForOpenPanel(const Vector<String>& files)
33063306 return;
33073307
33083308 m_activeOpenPanelResultListener->didChooseFiles(files);
3309  m_activeOpenPanelResultListener = 0;
 3309 m_activeOpenPanelResultListener = nullptr;
33103310}
33113311
33123312void WebPage::didCancelForOpenPanel()
33133313{
3314  m_activeOpenPanelResultListener = 0;
 3314 m_activeOpenPanelResultListener = nullptr;
33153315}
33163316
33173317#if ENABLE(SANDBOX_EXTENSIONS)

@@void WebPage::didSelectItemFromActiveContextMenu(const WebContextMenuItemData& i
34153415 return;
34163416
34173417 m_contextMenu->itemSelected(item);
3418  m_contextMenu = 0;
 3418 m_contextMenu = nullptr;
34193419}
34203420#endif
34213421

Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm

@@void WebPage::syncApplyAutocorrection(const String& correction, const String& or
19781978 while (textForRange.length() && textForRange.length() > originalText.length() && loopCount < maxPositionsAttempts) {
19791979 position = position.next();
19801980 if (position.isNotNull() && position >= frame.selection().selection().start())
1981  range = NULL;
 1981 range = nullptr;
19821982 else
19831983 range = Range::create(*frame.document(), position, frame.selection().selection().start());
19841984 textForRange = (range) ? plainTextReplacingNoBreakSpace(range.get()) : emptyString();

@@void WebPage::elementDidBlur(WebCore::Node* node)
24582458 send(Messages::WebPageProxy::StopAssistingNode());
24592459 m_hasPendingBlurNotification = false;
24602460 });
2461  m_assistedNode = 0;
 2461 m_assistedNode = nullptr;
24622462 }
24632463}
24642464

Source/WebKit2/WebProcess/WebProcess.cpp

@@void WebProcess::networkProcessConnectionClosed(NetworkProcessConnection* connec
10341034 ASSERT(m_networkProcessConnection);
10351035 ASSERT_UNUSED(connection, m_networkProcessConnection == connection);
10361036
1037  m_networkProcessConnection = 0;
 1037 m_networkProcessConnection = nullptr;
10381038
10391039 m_webResourceLoadScheduler->networkProcessCrashed();
10401040}

@@void WebProcess::webToDatabaseProcessConnectionClosed(WebToDatabaseProcessConnec
10511051 ASSERT(m_webToDatabaseProcessConnection);
10521052 ASSERT(m_webToDatabaseProcessConnection == connection);
10531053
1054  m_webToDatabaseProcessConnection = 0;
 1054 m_webToDatabaseProcessConnection = nullptr;
10551055}
10561056
10571057WebToDatabaseProcessConnection* WebProcess::webToDatabaseProcessConnection()

Tools/ChangeLog

 12015-07-02 Chris Dumez <cdumez@apple.com>
 2
 3 Drop RefPtr::clear() method
 4 https://bugs.webkit.org/show_bug.cgi?id=146556
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 * DumpRenderTree/mac/DumpRenderTree.mm:
 9 (runTest):
 10 * DumpRenderTree/win/DumpRenderTree.cpp:
 11 (runTest):
 12 * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
 13 (TestWebKitAPI::TEST):
 14
1152015-07-02 Daniel Bates <dabates@apple.com>
216
317 [iOS] Add WebKitSystemInterface for iOS 8.4

Tools/DumpRenderTree/mac/DumpRenderTree.mm

@@static void runTest(const string& inputLine)
20642064 ASSERT(CFArrayGetCount(openWindowsRef) == 1);
20652065 ASSERT(CFArrayGetValueAtIndex(openWindowsRef, 0) == [[mainFrame webView] window]);
20662066
2067  gTestRunner.clear();
 2067 gTestRunner = nullptr;
20682068
20692069 if (ignoreWebCoreNodeLeaks)
20702070 [WebCoreStatistics stopIgnoringWebCoreNodeLeaks];

Tools/DumpRenderTree/win/DumpRenderTree.cpp

@@static void runTest(const string& inputLine)
11831183
11841184exit:
11851185 removeFontFallbackIfPresent(fallbackPath);
1186  ::gTestRunner.clear();
 1186 ::gTestRunner = nullptr;
11871187
11881188 fputs("#EOF\n", stderr);
11891189 fflush(stderr);

Tools/TestWebKitAPI/Tests/WTF/RefPtr.cpp

2626#include "config.h"
2727
2828#include "RefLogger.h"
 29#include <wtf/CurrentTime.h>
2930#include <wtf/RefPtr.h>
 31#include <wtf/RefCounted.h>
3032
3133namespace TestWebKitAPI {
3234

@@TEST(WTF_RefPtr, Basic)
102104 {
103105 RefPtr<RefLogger> ptr(&a);
104106 ASSERT_EQ(&a, ptr.get());
105  ptr.clear();
 107 ptr = nullptr;
106108 ASSERT_EQ(nullptr, ptr.get());
107109 }
108110 ASSERT_STREQ("ref(a) deref(a) ", takeLogStr().c_str());