Title: [266577] trunk/Source/_javascript_Core
Revision
266577
Author
carlo...@webkit.org
Date
2020-09-03 22:19:20 -0700 (Thu, 03 Sep 2020)

Log Message

Unreviewed. [GLIB] Add missing return

There's no change in behavior because jsObjectCall() returns undefined in case of failure, but fixes a memory leak.

* API/glib/JSCValue.cpp:
(jsc_value_object_invoke_methodv):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/glib/JSCValue.cpp (266576 => 266577)


--- trunk/Source/_javascript_Core/API/glib/JSCValue.cpp	2020-09-04 05:13:53 UTC (rev 266576)
+++ trunk/Source/_javascript_Core/API/glib/JSCValue.cpp	2020-09-04 05:19:20 UTC (rev 266577)
@@ -1010,7 +1010,7 @@
 
     auto result = jsObjectCall(jsContext, function, JSC::JSCCallbackFunction::Type::Method, object, arguments, &exception);
     if (jscContextHandleExceptionIfNeeded(priv->context.get(), exception))
-        jsc_value_new_undefined(priv->context.get());
+        return jsc_value_new_undefined(priv->context.get());
 
     return jscContextGetOrCreateValue(priv->context.get(), result).leakRef();
 }

Modified: trunk/Source/_javascript_Core/ChangeLog (266576 => 266577)


--- trunk/Source/_javascript_Core/ChangeLog	2020-09-04 05:13:53 UTC (rev 266576)
+++ trunk/Source/_javascript_Core/ChangeLog	2020-09-04 05:19:20 UTC (rev 266577)
@@ -1,3 +1,12 @@
+2020-09-03  Carlos Garcia Campos  <cgar...@igalia.com>
+
+        Unreviewed. [GLIB] Add missing return
+
+        There's no change in behavior because jsObjectCall() returns undefined in case of failure, but fixes a memory leak.
+
+        * API/glib/JSCValue.cpp:
+        (jsc_value_object_invoke_methodv):
+
 2020-09-02  Yusuke Suzuki  <ysuz...@apple.com>
 
         [JSC] Cache toString / valueOf / @@toPrimitive for major cases
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to