Changeset 85515 in webkit
- Timestamp:
- May 2, 2011 1:37:15 PM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r85512 r85515 1 2011-05-02 Adam Barth <abarth@webkit.org> 2 3 Reviewed by David Levin. 4 5 PLATFORM(MAC) should (almost!) build with strict PassOwnPtr 6 https://bugs.webkit.org/show_bug.cgi?id=59924 7 8 * css/CSSGrammar.y: 9 * platform/graphics/mac/SimpleFontDataMac.mm: 10 - Memory management for the font cache is somewhat... complext. 11 This will require some careful thought to sort out. 12 1 13 2011-05-02 Levi Weintraub <leviw@chromium.org> 2 14 -
trunk/Source/WebCore/css/CSSGrammar.y
r85077 r85515 1451 1451 CSSParserFunction* f = p->createFloatingFunction(); 1452 1452 f->name = $1; 1453 f->args = p->sinkFloatingValueList($3);1453 f->args = adoptPtr(p->sinkFloatingValueList($3)); 1454 1454 $$.id = 0; 1455 1455 $$.unit = CSSParserValue::Function; … … 1460 1460 CSSParserFunction* f = p->createFloatingFunction(); 1461 1461 f->name = $1; 1462 f->args = 0;1462 f->args = nullptr; 1463 1463 $$.id = 0; 1464 1464 $$.unit = CSSParserValue::Function; … … 1569 1569 CSSParserFunction* f = p->createFloatingFunction(); 1570 1570 f->name = $1; 1571 f->args = p->sinkFloatingValueList($3);1571 f->args = adoptPtr(p->sinkFloatingValueList($3)); 1572 1572 $$.id = 0; 1573 1573 $$.unit = CSSParserValue::Function; … … 1594 1594 CSSParserFunction* f = p->createFloatingFunction(); 1595 1595 f->name = $1; 1596 f->args = p->sinkFloatingValueList($3);1596 f->args = adoptPtr(p->sinkFloatingValueList($3)); 1597 1597 $$.id = 0; 1598 1598 $$.unit = CSSParserValue::Function; -
trunk/Source/WebCore/platform/graphics/mac/SimpleFontDataMac.mm
r85036 r85515 29 29 30 30 #import "config.h" 31 32 // FIXME: Remove this define! 33 #define LOOSE_PASS_OWN_PTR 34 31 35 #import "SimpleFontData.h" 32 36 -
trunk/Source/WebKit/mac/ChangeLog
r85484 r85515 1 2011-05-02 Adam Barth <abarth@webkit.org> 2 3 Reviewed by David Levin. 4 5 PLATFORM(MAC) should (almost!) build with strict PassOwnPtr 6 https://bugs.webkit.org/show_bug.cgi?id=59924 7 8 * History/WebHistory.mm: 9 (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]): 10 * Plugins/WebBaseNetscapePluginView.mm: 11 (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]): 12 * WebCoreSupport/WebFrameLoaderClient.mm: 13 (WebFrameLoaderClient::savePlatformDataToCachedFrame): 14 * WebView/WebView.mm: 15 (-[WebView _injectMailQuirksScript]): 16 (-[WebView _injectOutlookQuirksScript]): 17 (toStringVector): 18 1 19 2011-05-02 Sam Weinig <sam@webkit.org> 2 20 -
trunk/Source/WebKit/mac/History/WebHistory.mm
r85302 r85515 827 827 item->setLastVisitWasHTTPNonGet([method caseInsensitiveCompare:@"GET"] && (![[url scheme] caseInsensitiveCompare:@"http"] || ![[url scheme] caseInsensitiveCompare:@"https"])); 828 828 829 item->setRedirectURLs( 0);829 item->setRedirectURLs(PassOwnPtr<Vector<String> >()); 830 830 831 831 NSArray *entries = [[NSArray alloc] initWithObjects:entry, nil]; -
trunk/Source/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
r85484 r85515 163 163 164 164 _loadManually = loadManually; 165 _haltable = new WebHaltablePlugin(self);165 _haltable = adoptPtr(new WebHaltablePlugin(self)); 166 166 return self; 167 167 } -
trunk/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
r85036 r85515 1206 1206 void WebFrameLoaderClient::savePlatformDataToCachedFrame(CachedFrame* cachedFrame) 1207 1207 { 1208 WebCachedFramePlatformData* webPlatformData = new WebCachedFramePlatformData([m_webFrame->_private->webFrameView documentView]);1209 cachedFrame->setCachedFramePlatformData(webPlatformData );1208 OwnPtr<WebCachedFramePlatformData> webPlatformData = adoptPtr(new WebCachedFramePlatformData([m_webFrame->_private->webFrameView documentView])); 1209 cachedFrame->setCachedFramePlatformData(webPlatformData.release()); 1210 1210 } 1211 1211 -
trunk/Source/WebKit/mac/WebView/WebView.mm
r85036 r85515 643 643 static NSString *mailQuirksScriptContents = leakMailQuirksUserScriptContents(); 644 644 core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]), 645 mailQuirksScriptContents, KURL(), 0, 0, InjectAtDocumentEnd, InjectInAllFrames);645 mailQuirksScriptContents, KURL(), PassOwnPtr<Vector<String> >(), PassOwnPtr<Vector<String> >(), InjectAtDocumentEnd, InjectInAllFrames); 646 646 } 647 647 … … 664 664 static NSString *outlookQuirksScriptContents = leakOutlookQuirksUserScriptContents(); 665 665 core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]), 666 outlookQuirksScriptContents, KURL(), 0, 0, InjectAtDocumentEnd, InjectInAllFrames);666 outlookQuirksScriptContents, KURL(), PassOwnPtr<Vector<String> >(), PassOwnPtr<Vector<String> >(), InjectAtDocumentEnd, InjectInAllFrames); 667 667 } 668 668 … … 2564 2564 NSUInteger count = [patterns count]; 2565 2565 if (count == 0) 2566 return 0;2567 Vector<String>* patternsVector = new Vector<String>;2566 return PassOwnPtr<Vector<String> >(); 2567 OwnPtr<Vector<String> > patternsVector = adoptPtr(new Vector<String>); 2568 2568 for (NSUInteger i = 0; i < count; ++i) { 2569 2569 id entry = [patterns objectAtIndex:i]; … … 2571 2571 patternsVector->append(String((NSString*)entry)); 2572 2572 } 2573 return patternsVector ;2573 return patternsVector.release(); 2574 2574 } 2575 2575 -
trunk/Source/WebKit2/ChangeLog
r85508 r85515 1 2011-05-02 Adam Barth <abarth@webkit.org> 2 3 Reviewed by David Levin. 4 5 PLATFORM(MAC) should (almost!) build with strict PassOwnPtr 6 https://bugs.webkit.org/show_bug.cgi?id=59924 7 8 * Platform/CoreIPC/Connection.cpp: 9 (CoreIPC::Connection::sendSyncMessage): 10 (CoreIPC::Connection::waitForSyncReply): 11 (CoreIPC::Connection::dispatchSyncMessage): 12 * Platform/CoreIPC/Connection.h: 13 (CoreIPC::Connection::Message::releaseArguments): 14 - The memory management for this class is very strange. I wrote a 15 large comment. Hopefully a kind soul will come by and fix it. 16 * Shared/Plugins/Netscape/NetscapePluginModule.cpp: 17 (WebKit::NetscapePluginModule::unload): 18 * UIProcess/API/mac/WKView.mm: 19 (-[WKView _setFindIndicator:fadeOut:]): 20 * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: 21 (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): 22 * WebProcess/InjectedBundle/InjectedBundle.cpp: 23 (WebKit::toStringVector): 24 * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: 25 (WebKit::NetscapePluginStream::stop): 26 * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: 27 (WebKit::WebInspectorFrontendClient::WebInspectorFrontendClient): 28 * WebProcess/WebPage/DrawingArea.cpp: 29 (WebKit::DrawingArea::create): 30 1 31 2011-04-29 Chris Marrin <cmarrin@apple.com> 2 32 -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp
r85503 r85515 388 388 if (!isValid()) { 389 389 didFailToSendSyncMessage(); 390 return 0;390 return PassOwnPtr<ArgumentDecoder>(); 391 391 } 392 392 … … 396 396 if (!m_shouldWaitForSyncReplies) { 397 397 didFailToSendSyncMessage(); 398 return 0;398 return PassOwnPtr<ArgumentDecoder>(); 399 399 } 400 400 … … 458 458 // any more incoming messages. 459 459 if (!isValid()) 460 return 0;460 return PassOwnPtr<ArgumentDecoder>(); 461 461 462 462 // We didn't find a sync reply yet, keep waiting. … … 472 472 m_client->syncMessageSendTimedOut(this); 473 473 474 return 0;474 return PassOwnPtr<ArgumentDecoder>(); 475 475 } 476 476 … … 627 627 628 628 // Create our reply encoder. 629 ArgumentEncoder* replyEncoder = ArgumentEncoder::create(syncRequestID).leakPtr();630 631 // Hand off both the decoder and encoder to the client. .632 SyncReplyMode syncReplyMode = m_client->didReceiveSyncMessage(this, messageID, arguments, replyEncoder );629 OwnPtr<ArgumentEncoder> replyEncoder = ArgumentEncoder::create(syncRequestID); 630 631 // Hand off both the decoder and encoder to the client. 632 SyncReplyMode syncReplyMode = m_client->didReceiveSyncMessage(this, messageID, arguments, replyEncoder.get()); 633 633 634 634 // FIXME: If the message was invalid, we should send back a SyncMessageError. … … 642 642 643 643 // Send the reply. 644 sendSyncReply(replyEncoder );644 sendSyncReply(replyEncoder.release()); 645 645 } 646 646 -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.h
r85503 r85515 186 186 PassOwnPtr<T> releaseArguments() 187 187 { 188 T* arguments = m_arguments;188 OwnPtr<T> arguments = adoptPtr(m_arguments); 189 189 m_arguments = 0; 190 190 191 return arguments ;191 return arguments.release(); 192 192 } 193 193 194 194 private: 195 195 MessageID m_messageID; 196 // The memory management of this class is very unusual. The class acts 197 // as if it has an owning reference to m_arguments (e.g., accepting a 198 // PassOwnPtr in its constructor) in all ways except that it does not 199 // deallocate m_arguments on destruction. 200 // FIXME: Does this leak m_arguments on destruction? 196 201 T* m_arguments; 197 202 }; -
trunk/Source/WebKit2/Shared/Plugins/Netscape/NetscapePluginModule.cpp
r83901 r85515 257 257 ASSERT(!m_isInitialized); 258 258 259 m_module = 0;259 m_module = nullptr; 260 260 } 261 261 -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r85376 r85515 2203 2203 { 2204 2204 if (!findIndicator) { 2205 _data->_findIndicatorWindow = 0;2205 _data->_findIndicatorWindow = nullptr; 2206 2206 return; 2207 2207 } -
trunk/Source/WebKit2/WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm
r84997 r85515 141 141 if (m_rootLayer) { 142 142 m_rootLayer->removeAllChildren(); 143 m_rootLayer = 0;143 m_rootLayer = nullptr; 144 144 } 145 145 return; -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r85019 r85515 213 213 { 214 214 if (!patterns) 215 return 0;215 return PassOwnPtr<Vector<String> >(); 216 216 217 217 size_t size = patterns->size(); 218 218 if (!size) 219 return 0;220 221 Vector<String>* patternsVector = new Vector<String>;219 return PassOwnPtr<Vector<String> >(); 220 221 OwnPtr<Vector<String> > patternsVector = adoptPtr(new Vector<String>); 222 222 patternsVector->reserveInitialCapacity(size); 223 223 for (size_t i = 0; i < size; ++i) { … … 226 226 patternsVector->uncheckedAppend(entry->string()); 227 227 } 228 return patternsVector ;228 return patternsVector.release(); 229 229 } 230 230 -
trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
r84886 r85515 294 294 } 295 295 296 m_deliveryData = 0;296 m_deliveryData = nullptr; 297 297 m_deliveryDataTimer.stop(); 298 298 -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp
r84785 r85515 41 41 42 42 WebInspectorFrontendClient::WebInspectorFrontendClient(WebPage* page, WebPage* inspectorPage) 43 : InspectorFrontendClientLocal(page->corePage()->inspectorController(), inspectorPage->corePage(), new Settings())43 : InspectorFrontendClientLocal(page->corePage()->inspectorController(), inspectorPage->corePage(), adoptPtr(new Settings())) 44 44 , m_page(page) 45 45 { -
trunk/Source/WebKit2/WebProcess/WebPage/DrawingArea.cpp
r84613 r85515 49 49 return DrawingAreaImpl::create(webPage, parameters); 50 50 #else 51 return 0;51 return PassOwnPtr<DrawingArea>(); 52 52 #endif 53 53 case DrawingAreaTypeChunkedUpdate: … … 59 59 } 60 60 61 return 0;61 return PassOwnPtr<DrawingArea>(); 62 62 } 63 63
Note: See TracChangeset
for help on using the changeset viewer.