summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/icecat-CVE-2015-2708-pt4.patch
blob: eb2295f5acd2b32361d67fc8bb33beffcba496e5 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From e6082e031f0fa2a4a7a63ff124c6f22aeb75393d Mon Sep 17 00:00:00 2001
From: Terrence Cole <terrence@mozilla.com>
Date: Fri, 10 Apr 2015 08:58:26 -0700
Subject: [PATCH] Bug 1152177 - Make jsid and Value pre barriers symetrical.
 r=jonco, a=abillings

---
 js/src/gc/Barrier.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h
index 7efd785..9fc6bd0 100644
--- a/js/src/gc/Barrier.h
+++ b/js/src/gc/Barrier.h
@@ -1062,6 +1062,8 @@ class BarrieredId
                 JS_ASSERT(obj == JSID_TO_OBJECT(value));
             }
         } else if (JSID_IS_STRING(value)) {
+            if (StringIsPermanentAtom(JSID_TO_STRING(value)))
+                return;
             JSString *str = JSID_TO_STRING(value);
             JS::shadow::Zone *shadowZone = ShadowZoneOfStringFromAnyThread(str);
             if (shadowZone->needsBarrier()) {
-- 
2.2.1