[gjs: 4/9] engine: delete context if hosted code can't be defined
- From: Philip Chimento <pchimento src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs: 4/9] engine: delete context if hosted code can't be defined
- Date: Tue, 6 Nov 2018 04:06:12 +0000 (UTC)
commit 57e72b9b6e11aca3e8228ff7319cf99651fb7b78
Author: Marco Trevisan (Treviño) <mail 3v1n0 net>
Date: Sat Oct 13 16:39:11 2018 -0500
engine: delete context if hosted code can't be defined
gjs/engine.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gjs/engine.cpp b/gjs/engine.cpp
index 4f50e417..6cfccc4b 100644
--- a/gjs/engine.cpp
+++ b/gjs/engine.cpp
@@ -306,8 +306,10 @@ gjs_create_js_context(GjsContext *js_context)
if (!cx)
return nullptr;
- if (!JS::InitSelfHostedCode(cx))
+ if (!JS::InitSelfHostedCode(cx)) {
+ JS_DestroyContext(cx);
return nullptr;
+ }
// commented are defaults in moz-24
JS_SetNativeStackQuota(cx, 1024 * 1024);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]