summaryrefslogtreecommitdiff
path: root/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch')
-rw-r--r--net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch b/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch
new file mode 100644
index 000000000000..fc23ef2cf8e5
--- /dev/null
+++ b/net-libs/libproxy/files/libproxy-0.4.15-mozjs-52-2.patch
@@ -0,0 +1,23 @@
+From a9b052c6e30101fb0b702917f245a3e2a2f08366 Mon Sep 17 00:00:00 2001
+From: Laurent Bigonville <bigon@bigon.be>
+Date: Tue, 2 Oct 2018 10:22:56 +0200
+Subject: [PATCH] Add call to JS::InitSelfHostedCode()
+
+This is needed otherwise mozjs crashes
+---
+ libproxy/modules/pacrunner_mozjs.cpp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/libproxy/modules/pacrunner_mozjs.cpp b/libproxy/modules/pacrunner_mozjs.cpp
+index ed07c69..38e7d46 100644
+--- a/libproxy/modules/pacrunner_mozjs.cpp
++++ b/libproxy/modules/pacrunner_mozjs.cpp
+@@ -118,6 +118,8 @@ class mozjs_pacrunner : public pacrunner {
+ // Initialize Javascript context
+ if (!(this->jsctx = JS_NewContext(1024 * 1024))) goto error;
+ {
++ if (!JS::InitSelfHostedCode(this->jsctx)) goto error;
++
+ JS::RootedValue rval(this->jsctx);
+ JS::CompartmentOptions compart_opts;
+