[seed] Fixing GType constructor exception
- From: Danilo Cesar Lemes de Paula <danilocesar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seed] Fixing GType constructor exception
- Date: Thu, 6 Oct 2016 17:47:44 +0000 (UTC)
commit ddac8d8757ca74e3f7b25e4e3ca17e733b8294db
Author: Danilo Cesar Lemes de Paula <danilo cesar collabora co uk>
Date: Thu Oct 6 13:59:00 2016 -0300
Fixing GType constructor exception
When a constructor raises an exception it needs to return NULL.
WebKitAPI excepts an JSObjectRef for object constructor, we can't
return a JSValueRef with a NULL value and expect that webkit will be OK
with that.
Fixing this also fix some tests that were XFAIL-ing and
now passes.
libseed/seed-gtype.c | 2 +-
tests/javascript/gtypes/Makefile.am | 1 -
2 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/libseed/seed-gtype.c b/libseed/seed-gtype.c
index 55f9e62..3417cf2 100644
--- a/libseed/seed-gtype.c
+++ b/libseed/seed-gtype.c
@@ -807,7 +807,7 @@ seed_gtype_constructor_invoked(JSContextRef ctx,
seed_make_exception(ctx, exception, "TypeError",
"GType constructor expected GType for parent");
- return (JSObjectRef) JSValueMakeNull(ctx);
+ return NULL;
}
// TODO: GType is of variable length, so this is an incorrect fix
diff --git a/tests/javascript/gtypes/Makefile.am b/tests/javascript/gtypes/Makefile.am
index 320184b..11bc873 100644
--- a/tests/javascript/gtypes/Makefile.am
+++ b/tests/javascript/gtypes/Makefile.am
@@ -32,7 +32,6 @@ TESTS = \
gtype-signal.js
XFAIL_TESTS = \
- gtype-typerror.js \
$(NULL)
-include $(top_srcdir)/git.mk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]