Drop RefPtr::clear() method
https://bugs.webkit.org/show_bug.cgi?id=146556
Reviewed by Brady Eidson.
Source/JavaScriptCore:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebCore:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit/mac:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit/win:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WebKit2:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Source/WTF:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.
Also made the "= nullptr;" pattern as efficient as clear()
by providing a operator=(nullptr_t) overload. Local micro-
benchmarking showed that "= nullptr;" used to be ~1.7% slower
than clear().
Tools:
Drop RefPtr::clear() method in favor of "= nullptr;" pattern.