Changeset 84822 in webkit


Ignore:
Timestamp:
Apr 25, 2011 4:08:40 PM (13 years ago)
Author:
abarth@webkit.org
Message:

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):
Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84820 r84822  
     12011-04-25  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by David Levin.
     4
     5        Page*.cpp and objc_runtime.mm should play nice with strict OwnPtrs
     6        https://bugs.webkit.org/show_bug.cgi?id=59374
     7
     8        * bridge/objc/objc_runtime.mm:
     9        (JSC::Bindings::callObjCFallbackObject):
     10        * page/Page.cpp:
     11        (WebCore::Page::Page):
     12        (WebCore::Page::initGroup):
     13        * page/PageGroup.cpp:
     14        (WebCore::PageGroup::addUserScriptToWorld):
     15        (WebCore::PageGroup::addUserStyleSheetToWorld):
     16        * page/mac/PageMac.cpp:
     17        (WebCore::Page::addSchedulePair):
     18
    1192011-04-25  Geoffrey Garen  <ggaren@apple.com>
    220
  • trunk/Source/WebCore/bridge/objc/objc_runtime.mm

    r79240 r84822  
    237237    if ([targetObject respondsToSelector:@selector(invokeUndefinedMethodFromWebScript:withArguments:)]){
    238238        ObjcClass* objcClass = static_cast<ObjcClass*>(objcInstance->getClass());
    239         OwnPtr<ObjcMethod> fallbackMethod(new ObjcMethod(objcClass->isa(), @selector(invokeUndefinedMethodFromWebScript:withArguments:)));
     239        OwnPtr<ObjcMethod> fallbackMethod(adoptPtr(new ObjcMethod(objcClass->isa(), @selector(invokeUndefinedMethodFromWebScript:withArguments:))));
    240240        const Identifier& nameIdentifier = static_cast<ObjcFallbackObjectImp*>(exec->callee())->propertyName();
    241241        RetainPtr<CFStringRef> name(AdoptCF, CFStringCreateWithCharacters(0, nameIdentifier.characters(), nameIdentifier.length()));
  • trunk/Source/WebCore/page/Page.cpp

    r84371 r84822  
    174174
    175175    if (pageClients.pluginHalterClient) {
    176         m_pluginHalter.set(new PluginHalter(pageClients.pluginHalterClient));
     176        m_pluginHalter = adoptPtr(new PluginHalter(pageClients.pluginHalterClient));
    177177        m_pluginHalter->setPluginAllowedRunTime(m_settings->pluginAllowedRunTime());
    178178    }
     
    377377    ASSERT(!m_singlePageGroup);
    378378    ASSERT(!m_group);
    379     m_singlePageGroup.set(new PageGroup(this));
     379    m_singlePageGroup = adoptPtr(new PageGroup(this));
    380380    m_group = m_singlePageGroup.get();
    381381}
  • trunk/Source/WebCore/page/PageGroup.cpp

    r84091 r84822  
    283283    ASSERT_ARG(world, world);
    284284
    285     OwnPtr<UserScript> userScript(new UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames));
     285    OwnPtr<UserScript> userScript = adoptPtr(new UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames));
    286286    if (!m_userScripts)
    287         m_userScripts.set(new UserScriptMap);
     287        m_userScripts = adoptPtr(new UserScriptMap);
    288288    UserScriptVector*& scriptsInWorld = m_userScripts->add(world, 0).first->second;
    289289    if (!scriptsInWorld)
     
    300300    ASSERT_ARG(world, world);
    301301
    302     OwnPtr<UserStyleSheet> userStyleSheet(new UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level));
     302    OwnPtr<UserStyleSheet> userStyleSheet = adoptPtr(new UserStyleSheet(source, url, whitelist, blacklist, injectedFrames, level));
    303303    if (!m_userStyleSheets)
    304         m_userStyleSheets.set(new UserStyleSheetMap);
     304        m_userStyleSheets = adoptPtr(new UserStyleSheetMap);
    305305    UserStyleSheetVector*& styleSheetsInWorld = m_userStyleSheets->add(world, 0).first->second;
    306306    if (!styleSheetsInWorld)
  • trunk/Source/WebCore/page/mac/PageMac.cpp

    r30786 r84822  
    4141
    4242    if (!m_scheduledRunLoopPairs)
    43         m_scheduledRunLoopPairs.set(new SchedulePairHashSet);
     43        m_scheduledRunLoopPairs = adoptPtr(new SchedulePairHashSet);
    4444    m_scheduledRunLoopPairs->add(pair);
    4545
Note: See TracChangeset for help on using the changeset viewer.