Commit 34074a93 authored by abarth@webkit.org's avatar abarth@webkit.org

2011-04-25 Adam Barth <abarth@webkit.org>

        Reviewed by David Levin.

        Fix strict OwnPtr violations and whitelist known-tricky files
        https://bugs.webkit.org/show_bug.cgi?id=59421

        With this patch, WebCore builds cleanly with strict OwnPtrs.

        * dom/MessagePort.cpp:
        (WebCore::MessagePort::MessagePort):
        * dom/XMLDocumentParserLibxml2.cpp:
        * page/ContextMenuController.cpp:
        (WebCore::ContextMenuController::ContextMenuController):
        (WebCore::ContextMenuController::clearContextMenu):
        * page/PluginHalter.cpp:
        * platform/graphics/MediaPlayer.cpp:
        * platform/network/ResourceRequestBase.cpp:
        (WebCore::ResourceRequestBase::adopt):
        (WebCore::ResourceRequestBase::copyData):
        * svg/SVGDocumentExtensions.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84881 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent fe2bb215
2011-04-25 Adam Barth <abarth@webkit.org>
Reviewed by David Levin.
Fix strict OwnPtr violations and whitelist known-tricky files
https://bugs.webkit.org/show_bug.cgi?id=59421
With this patch, WebCore builds cleanly with strict OwnPtrs.
* dom/MessagePort.cpp:
(WebCore::MessagePort::MessagePort):
* dom/XMLDocumentParserLibxml2.cpp:
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::ContextMenuController):
(WebCore::ContextMenuController::clearContextMenu):
* page/PluginHalter.cpp:
* platform/graphics/MediaPlayer.cpp:
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::adopt):
(WebCore::ResourceRequestBase::copyData):
* svg/SVGDocumentExtensions.cpp:
2011-04-25 David Levin <levin@chromium.org>
Reviewed by Adam Barth.
......@@ -40,8 +40,7 @@
namespace WebCore {
MessagePort::MessagePort(ScriptExecutionContext& scriptExecutionContext)
: m_entangledChannel(0)
, m_started(false)
: m_started(false)
, m_closed(false)
, m_scriptExecutionContext(&scriptExecutionContext)
{
......
......@@ -25,6 +25,10 @@
*/
#include "config.h"
// FIXME: Remove this define!
#define LOOSE_OWN_PTR
#include "XMLDocumentParser.h"
#include "CDATASection.h"
......
......@@ -76,7 +76,6 @@ namespace WebCore {
ContextMenuController::ContextMenuController(Page* page, ContextMenuClient* client)
: m_page(page)
, m_client(client)
, m_contextMenu(0)
{
ASSERT_ARG(page, page);
ASSERT_ARG(client, client);
......@@ -89,7 +88,7 @@ ContextMenuController::~ContextMenuController()
void ContextMenuController::clearContextMenu()
{
m_contextMenu.set(0);
m_contextMenu.clear();
if (m_menuProvider)
m_menuProvider->contextMenuCleared();
m_menuProvider = 0;
......
......@@ -25,6 +25,9 @@
#include "config.h"
// FIXME: Remove this define!
#define LOOSE_OWN_PTR
#include "PluginHalter.h"
#include "HaltablePlugin.h"
......
......@@ -25,6 +25,9 @@
#include "config.h"
// FIXME: Remove this define!
#define LOOSE_OWN_PTR
#if ENABLE(VIDEO)
#include "MediaPlayer.h"
......
......@@ -46,7 +46,7 @@ inline const ResourceRequest& ResourceRequestBase::asResourceRequest() const
PassOwnPtr<ResourceRequest> ResourceRequestBase::adopt(PassOwnPtr<CrossThreadResourceRequestData> data)
{
OwnPtr<ResourceRequest> request(new ResourceRequest());
OwnPtr<ResourceRequest> request = adoptPtr(new ResourceRequest());
request->setURL(data->m_url);
request->setCachePolicy(data->m_cachePolicy);
request->setTimeoutInterval(data->m_timeoutInterval);
......@@ -79,7 +79,7 @@ PassOwnPtr<ResourceRequest> ResourceRequestBase::adopt(PassOwnPtr<CrossThreadRes
PassOwnPtr<CrossThreadResourceRequestData> ResourceRequestBase::copyData() const
{
OwnPtr<CrossThreadResourceRequestData> data(new CrossThreadResourceRequestData());
OwnPtr<CrossThreadResourceRequestData> data = adoptPtr(new CrossThreadResourceRequestData());
data->m_url = url().copy();
data->m_cachePolicy = cachePolicy();
data->m_timeoutInterval = timeoutInterval();
......
......@@ -21,6 +21,9 @@
#include "config.h"
// FIXME: Remove this define!
#define LOOSE_OWN_PTR
#if ENABLE(SVG)
#include "SVGDocumentExtensions.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment