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:
    * platfor...
    71e211b2