Title: [248207] releases/WebKitGTK/webkit-2.24/Source
Revision
248207
Author
[email protected]
Date
2019-08-03 20:22:12 -0700 (Sat, 03 Aug 2019)

Log Message

Merge r243204 - Remove copyRef() calls added in r243163
https://bugs.webkit.org/show_bug.cgi?id=195962

Patch by Michael Catanzaro <[email protected]> on 2019-03-20
Reviewed by Chris Dumez.

Source/_javascript_Core:

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):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog (248206 => 248207)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog	2019-08-04 03:22:09 UTC (rev 248206)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/ChangeLog	2019-08-04 03:22:12 UTC (rev 248207)
@@ -1,3 +1,16 @@
+2019-03-20  Michael Catanzaro  <[email protected]>
+
+        Remove copyRef() calls added in r243163
+        https://bugs.webkit.org/show_bug.cgi?id=195962
+
+        Reviewed by Chris Dumez.
+
+        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:
+
 2019-03-19  Michael Catanzaro  <[email protected]>
 
         Build cleanly with GCC 9

Modified: releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/inspector/scripts/codegen/cpp_generator_templates.py (248206 => 248207)


--- releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/inspector/scripts/codegen/cpp_generator_templates.py	2019-08-04 03:22:09 UTC (rev 248206)
+++ releases/WebKitGTK/webkit-2.24/Source/_javascript_Core/inspector/scripts/codegen/cpp_generator_templates.py	2019-08-04 03:22:12 UTC (rev 248207)
@@ -230,8 +230,9 @@
             COMPILE_ASSERT(STATE == AllFieldsSet, result_is_not_ready);
             COMPILE_ASSERT(sizeof(${objectType}) == sizeof(JSON::Object), cannot_cast);
 
-            Ref<JSON::Object> result = m_result.releaseNonNull();
-            return reinterpret_cast<Ref<${objectType}>*>(&result)->copyRef();
+            Ref<JSON::Object> jsonResult = m_result.releaseNonNull();
+            auto result = WTFMove(*reinterpret_cast<Ref<${objectType}>*>(&jsonResult));
+            return result;
         }
     };
 

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog (248206 => 248207)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog	2019-08-04 03:22:09 UTC (rev 248206)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog	2019-08-04 03:22:12 UTC (rev 248207)
@@ -1,3 +1,19 @@
+2019-03-20  Michael Catanzaro  <[email protected]>
+
+        Remove copyRef() calls added in r243163
+        https://bugs.webkit.org/show_bug.cgi?id=195962
+
+        Reviewed by Chris Dumez.
+
+        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):
+
 2019-03-19  Michael Catanzaro  <[email protected]>
 
         Build cleanly with GCC 9

Modified: releases/WebKitGTK/webkit-2.24/Source/WebCore/Modules/fetch/FetchBody.cpp (248206 => 248207)


--- releases/WebKitGTK/webkit-2.24/Source/WebCore/Modules/fetch/FetchBody.cpp	2019-08-04 03:22:09 UTC (rev 248206)
+++ releases/WebKitGTK/webkit-2.24/Source/WebCore/Modules/fetch/FetchBody.cpp	2019-08-04 03:22:12 UTC (rev 248207)
@@ -243,7 +243,7 @@
     if (isBlob()) {
         auto body = FormData::create();
         body->appendBlob(blobBody().url());
-        return body.copyRef();
+        return body;
     }
     if (isArrayBuffer())
         return FormData::create(arrayBufferBody().data(), arrayBufferBody().byteLength());
@@ -253,7 +253,7 @@
         ASSERT(!context.isWorkerGlobalScope());
         auto body = makeRef(const_cast<FormData&>(formDataBody()));
         body->generateFiles(&downcast<Document>(context));
-        return body.copyRef();
+        return body;
     }
     if (auto* data = ""
         return FormData::create(data->data(), data->size());
@@ -274,7 +274,7 @@
     if (isBlob()) {
         auto body = FormData::create();
         body->appendBlob(blobBody().url());
-        return body.copyRef();
+        return TakenData { WTFMove(body) };
     }
 
     if (isFormData())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to