Remove copyRef() calls added in r243163
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 16:13:30 +0000 (16:13 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 20 Mar 2019 16:13:30 +0000 (16:13 +0000)
commitdfe12ef63520032499465573e92690cf368fd74b
tree85f2c653b4868e02c823a45e567e9db8b77c5c79
parent7a16f2634ca15f8897206a28410c9a2138d7dbbf
Remove copyRef() calls added in r243163
https://bugs.webkit.org/show_bug.cgi?id=195962

Patch by Michael Catanzaro <mcatanzaro@igalia.com> on 2019-03-20
Reviewed by Chris Dumez.

Source/JavaScriptCore:

As best I can tell, may be a GCC 9 bug. It shouldn't warn about this case because the return
value is noncopyable and the WTFMove() is absolutely required. We can avoid the warning
without refcount churn by introducing an intermediate variable.

* inspector/scripts/codegen/cpp_generator_templates.py:

Source/WebCore:

The first two cases here can just directly return the RefPtr.

In the third case, we have to work around a GCC 6 bug because GCC 6 is unable to pick the
right constructor to use, unlike modern compilers.

* Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::bodyAsFormData const):
(WebCore::FetchBody::take):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243204 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/inspector/scripts/codegen/cpp_generator_templates.py
Source/WebCore/ChangeLog
Source/WebCore/Modules/fetch/FetchBody.cpp