Manage MessagePort, MessagePortChannel and friends through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=128467

Reviewed by Andreas Kling.

Use std::unique_ptr instead of OwnPtr to manage MessagePort, MessagePortArray, MessagePortChannel
and MessagePortChannelArray objects.

* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::initMessageEvent):
* dom/MessageEvent.h:
(WebCore::MessageEvent::create):
* dom/MessagePort.cpp:
(WebCore::MessagePort::postMessage):
(WebCore::MessagePort::disentangle):
(WebCore::MessagePort::entangle):
(WebCore::MessagePort::dispatchMessages):
(WebCore::MessagePort::disentanglePorts):
(WebCore::MessagePort::entanglePorts):
* dom/MessagePort.h:
* dom/MessagePortChannel.h:
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::PlatformMessagePortChannel::EventData::EventData):
(WebCore::MessagePortChannel::createChannel):
(WebCore::MessagePortChannel::postMessageToRemote):
(WebCore::MessagePortChannel::tryGetMessageFromRemote):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::EventData::channels):
* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::PostMessageTimer):
(WebCore::PostMessageTimer::event):
(WebCore::DOMWindow::postMessage):
* workers/DedicatedWorkerGlobalScope.cpp:
(WebCore::DedicatedWorkerGlobalScope::postMessage):
* workers/DefaultSharedWorkerRepository.cpp:
(WebCore::SharedWorkerConnectTask::create):
(WebCore::SharedWorkerConnectTask::SharedWorkerConnectTask):
(WebCore::SharedWorkerConnectTask::performTask):
(WebCore::SharedWorkerScriptLoader::SharedWorkerScriptLoader):
(WebCore::SharedWorkerScriptLoader::notifyFinished):
(WebCore::DefaultSharedWorkerRepository::workerScriptLoaded):
(WebCore::DefaultSharedWorkerRepository::connectToWorker):
* workers/DefaultSharedWorkerRepository.h:
* workers/SharedWorker.cpp:
(WebCore::SharedWorker::create):
* workers/SharedWorkerGlobalScope.cpp:
(WebCore::createConnectEvent):
* workers/SharedWorkerRepository.cpp:
(WebCore::SharedWorkerRepository::connect):
* workers/SharedWorkerRepository.h:
* workers/Worker.cpp:
(WebCore::Worker::postMessage):
* workers/WorkerGlobalScopeProxy.h:
* workers/WorkerMessagingProxy.cpp:
(WebCore::MessageWorkerGlobalScopeTask::create):
(WebCore::MessageWorkerGlobalScopeTask::MessageWorkerGlobalScopeTask):
(WebCore::MessageWorkerGlobalScopeTask::performTask):
(WebCore::MessageWorkerTask::create):
(WebCore::MessageWorkerTask::MessageWorkerTask):
(WebCore::MessageWorkerTask::performTask):
(WebCore::WorkerMessagingProxy::postMessageToWorkerObject):
(WebCore::WorkerMessagingProxy::postMessageToWorkerGlobalScope):
* workers/WorkerMessagingProxy.h:
* workers/WorkerObjectProxy.h:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163744 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed, rolling out r163737.
http://trac.webkit.org/changeset/163737
https://bugs.webkit.org/show_bug.cgi?id=128491

Caused 8+ tests to fail on Mavericks and Mountain Lion bots
(Requested by rniwa on #webkit).

* runtime/JSString.h:
(JSC::jsSingleCharacterString):
(JSC::jsSingleCharacterSubstring):
(JSC::jsString):
(JSC::jsSubstring8):
* runtime/SmallStrings.cpp:
(JSC::SmallStringsStorage::SmallStringsStorage):
(JSC::SmallStrings::SmallStrings):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163745 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Manage MutationObserverInterestGroup through std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=128468

Reviewed by Andreas Kling.

Use std::unique_ptr instead of OwnPtr for managing MutationObserverInterestGroup objects.

* css/PropertySetCSSStyleDeclaration.cpp:
* dom/CharacterData.cpp:
(WebCore::CharacterData::dispatchModifiedEvent):
* dom/ChildListMutationScope.cpp:
(WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator):
* dom/ChildListMutationScope.h:
(WebCore::ChildListMutationAccumulator::hasObservers):
* dom/Element.cpp:
(WebCore::Element::willModifyAttribute):
* dom/MutationObserverInterestGroup.cpp:
(WebCore::MutationObserverInterestGroup::createIfNeeded):
* dom/MutationObserverInterestGroup.h:
(WebCore::MutationObserverInterestGroup::createForChildListMutation):
(WebCore::MutationObserverInterestGroup::createForCharacterDataMutation):
(WebCore::MutationObserverInterestGroup::createForAttributesMutation):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163746 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Switch the rest of CSS code from OwnPtr over to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=128471

Reviewed by Andreas Kling.

Replace the remaining uses of OwnPtr in the CSS code with std::unique_ptr, covering
the CSSParser, CSSParserSelector and CSSSelector classes and a few additional, closely related classes.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore::CSSParser::parseSheet):
(WebCore::CSSParser::parseDeclaration):
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::markSupportsRuleHeaderStart):
(WebCore::CSSParser::createKeyframesRule):
(WebCore::CSSParser::createStyleRule):
(WebCore::CSSParser::rewriteSpecifiersWithElementName):
(WebCore::CSSParser::rewriteSpecifiers):
* css/CSSParser.h:
* css/CSSParserValues.cpp:
(WebCore::CSSParserSelector::CSSParserSelector):
(WebCore::CSSParserSelector::~CSSParserSelector):
(WebCore::CSSParserSelector::adoptSelectorVector):
(WebCore::CSSParserSelector::insertTagHistory):
(WebCore::CSSParserSelector::appendTagHistory):
(WebCore::CSSParserSelector::prependTagSelector):
* css/CSSParserValues.h:
(WebCore::CSSParserSelector::releaseSelector):
(WebCore::CSSParserSelector::setTagHistory):
(WebCore::CSSParserSelector::clearTagHistory):
* css/CSSSelector.cpp:
(WebCore::CSSSelector::setSelectorList):
* css/CSSSelector.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::adoptSelectorVector):
* css/CSSSelectorList.h:
* css/CSSValueList.cpp:
* css/StyleRule.cpp:
(WebCore::StyleRuleRegion::StyleRuleRegion):
* css/StyleRule.h:
(WebCore::StyleRule::parserAdoptSelectorVector):
(WebCore::StyleRulePage::parserAdoptSelectorVector):
(WebCore::StyleRuleRegion::create):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163747 268f45cc-cd09-0410-ab3c-d52691b4dbfc