Skip to content
  • aroben@apple.com's avatar
    Allow implicit conversion from nullptr_t to PassOwnPtr · 71e211b2
    aroben@apple.com authored
    This makes it a lot easier to write code that just wants a null PassOwnPtr, especially in
    strict PassOwnPtr mode.
    
    Fixes <http://webkit.org/b/59964> Implicit conversion from std::nullptr_t to PassOwnPtr
    doesn't work, but should
    
    Reviewed by Adam Barth.
    
    Source/JavaScriptCore:
    
    * wtf/PassOwnPtr.h:
    (WTF::PassOwnPtr::PassOwnPtr): Added a non-explicit constructor that takes a nullptr_t.
    
    * wtf/MessageQueue.h:
    (WTF::::waitForMessageFilteredWithTimeout):
    (WTF::::tryGetMessage):
    Use the new implicit conversion.
    
    Source/WebCore:
    
    Take advantage of implicit conversion from nullptr_t to PassOwnPtr
    
    * bindings/js/ScheduledAction.cpp:
    * css/CSSStyleSelector.cpp:
    * css/MediaList.cpp:
    * css/MediaQueryMatcher.cpp:
    * css/SVGCSSStyleSelector.cpp:
    * dom/MessagePort.cpp:
    * html/InputType.cpp:
    * html/canvas/WebGLRenderingContext.cpp:
    * inspector/InspectorStyleSheet.cpp:
    * page/ContextMenuController.cpp:
    * page/Page.cpp:
    * platform/PlatformGestureRecognizer.cpp:
    * platform/PurgeableBuffer.h:
    * platform/graphics/ImageBuffer.h:
    * platform/leveldb/LevelDBDatabase.cpp:
    * platform/mac/PurgeableBufferMac.cpp:
    * platform/text/RegularExpression.cpp:
    * rendering/RenderTheme.cpp:
    * rendering/RenderThemeMac.mm:
    * rendering/style/RenderStyle.h:
    * rendering/style/SVGRenderStyleDefs.cpp:
    * rendering/style/ShadowData.cpp:
    * rendering/style/StyleRareInheritedData.cpp:
    * rendering/style/StyleRareNonInheritedData.cpp:
    * rendering/svg/RenderSVGResourcePattern.cpp:
    
    Source/WebKit/chromium:
    
    Take advantage of implicit conversion from nullptr_t to PassOwnPtr
    
    * src/WebMediaPlayerClientImpl.cpp:
    
    Source/WebKit/mac:
    
    Take advantage of implicit conversion from nullptr_t to PassOwnPtr
    
    * History/WebHistory.mm:
    * Plugins/WebNetscapePluginEventHandler.mm:
    * WebView/WebView.mm:
    
    Source/WebKit2:
    
    Take advantage of implicit conversion from nullptr_t to PassOwnPtr
    
    * Platform/CoreIPC/Connection.cpp:
    * UIProcess/qt/WebContextMenuProxyQt.cpp:
    * WebProcess/InjectedBundle/InjectedBundle.cpp:
    * WebProcess/WebPage/DrawingArea.cpp:
    
    Tools:
    
    Take advantage of implicit nullptr_t -> PassOwnPtr conversion
    
    * DumpRenderTree/chromium/CppBoundClass.h:
    * DumpRenderTree/chromium/WebViewHost.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    71e211b2