helpers: Destroy GjsContext before exit

This will be required in the upcoming version of GJS.

https://bugzilla.gnome.org/show_bug.cgi?id=775374
This commit is contained in:
Philip Chimento 2016-11-29 16:24:44 -08:00
parent 04adeec8f5
commit 56b20ef779
2 changed files with 6 additions and 0 deletions

View File

@ -30,6 +30,7 @@ main (int argc, char *argv[])
{
g_message("Failed to defined ARGV: %s", error->message);
g_error_free (error);
g_object_unref (context);
return 1;
}
@ -43,9 +44,11 @@ main (int argc, char *argv[])
{
g_message ("Execution of main.js threw exception: %s", error->message);
g_error_free (error);
g_object_unref (context);
return status;
}
g_object_unref (context);
return 0;
}

View File

@ -30,6 +30,7 @@ main (int argc, char *argv[])
{
g_message("Failed to define ARGV: %s", error->message);
g_error_free (error);
g_object_unref (context);
return 1;
}
@ -44,9 +45,11 @@ main (int argc, char *argv[])
{
g_message ("Execution of main.js threw exception: %s", error->message);
g_error_free (error);
g_object_unref (context);
return status;
}
g_object_unref (context);
return 0;
}