Commit 30ad0caf authored by abarth@webkit.org's avatar abarth@webkit.org

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

        Reviewed by David Levin.

        Page*.cpp and objc_runtime.mm should play nice with strict OwnPtrs
        https://bugs.webkit.org/show_bug.cgi?id=59374

        * bridge/objc/objc_runtime.mm:
        (JSC::Bindings::callObjCFallbackObject):
        * page/Page.cpp:
        (WebCore::Page::Page):
        (WebCore::Page::initGroup):
        * page/PageGroup.cpp:
        (WebCore::PageGroup::addUserScriptToWorld):
        (WebCore::PageGroup::addUserStyleSheetToWorld):
        * page/mac/PageMac.cpp:
        (WebCore::Page::addSchedulePair):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@84822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent e4bb90ed
2011-04-25 Adam Barth <abarth@webkit.org>
Reviewed by David Levin.
Page*.cpp and objc_runtime.mm should play nice with strict OwnPtrs
https://bugs.webkit.org/show_bug.cgi?id=59374
* bridge/objc/objc_runtime.mm:
(JSC::Bindings::callObjCFallbackObject):
* page/Page.cpp:
(WebCore::Page::Page):
(WebCore::Page::initGroup):
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
* page/mac/PageMac.cpp:
(WebCore::Page::addSchedulePair):
2011-04-25 Geoffrey Garen <ggaren@apple.com>
Build fix: This time for sure!
......@@ -236,7 +236,7 @@ static EncodedJSValue JSC_HOST_CALL callObjCFallbackObject(ExecState* exec)
if ([targetObject respondsToSelector:@selector(invokeUndefinedMethodFromWebScript:withArguments:)]){
ObjcClass* objcClass = static_cast<ObjcClass*>(objcInstance->getClass());
OwnPtr<ObjcMethod> fallbackMethod(new ObjcMethod(objcClass->isa(), @selector(invokeUndefinedMethodFromWebScript:withArguments:)));
OwnPtr<ObjcMethod> fallbackMethod(adoptPtr(new ObjcMethod(objcClass->isa(), @selector(invokeUndefinedMethodFromWebScript:withArguments:))));
const Identifier& nameIdentifier = static_cast<ObjcFallbackObjectImp*>(exec->callee())->propertyName();
RetainPtr<CFStringRef> name(AdoptCF, CFStringCreateWithCharacters(0, nameIdentifier.characters(), nameIdentifier.length()));
fallbackMethod->setJavaScriptName(name.get());
......
......@@ -173,7 +173,7 @@ Page::Page(const PageClients& pageClients)
allPages->add(this);
if (pageClients.pluginHalterClient) {
m_pluginHalter.set(new PluginHalter(pageClients.pluginHalterClient));
m_pluginHalter = adoptPtr(new PluginHalter(pageClients.pluginHalterClient));
m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
}
......@@ -376,7 +376,7 @@ void Page::initGroup()
{
ASSERT(!m_singlePageGroup);
ASSERT(!m_group);
m_singlePageGroup.set(new PageGroup(this));
m_singlePageGroup = adoptPtr(new PageGroup(this));
m_group = m_singlePageGroup.get();
}
......
......@@ -282,9 +282,9 @@ void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& sourc
{
ASSERT_ARG(world, world);
OwnPtr<UserScript> userScript(new UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames));
OwnPtr<UserScript> userScript = adoptPtr(new UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames));
if (!m_userScripts)
m_userScripts.set(new UserScriptMap);
m_userScripts = adoptPtr(new UserScriptMap);
UserScriptVector*& scriptsInWorld = m_userScripts->add(world, 0).first->second;
if (!scriptsInWorld)
scriptsInWorld = new UserScriptVector;
......@@ -299,9 +299,9 @@ void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& s
{
ASSERT_ARG(world, world);
OwnPtr<UserStyleSheet> userStyleSheet(new UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level));
OwnPtr<UserStyleSheet> userStyleSheet = adoptPtr(new UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level));
if (!m_userStyleSheets)
m_userStyleSheets.set(new UserStyleSheetMap);
m_userStyleSheets = adoptPtr(new UserStyleSheetMap);
UserStyleSheetVector*& styleSheetsInWorld = m_userStyleSheets->add(world, 0).first->second;
if (!styleSheetsInWorld)
styleSheetsInWorld = new UserStyleSheetVector;
......
......@@ -40,7 +40,7 @@ void Page::addSchedulePair(PassRefPtr<SchedulePair> prpPair)
RefPtr<SchedulePair> pair = prpPair;
if (!m_scheduledRunLoopPairs)
m_scheduledRunLoopPairs.set(new SchedulePairHashSet);
m_scheduledRunLoopPairs = adoptPtr(new SchedulePairHashSet);
m_scheduledRunLoopPairs->add(pair);
#ifndef BUILDING_ON_TIGER
......
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