Skip to content

Commit

Permalink
jscoverage: fix build with gcc6 (#29423)
Browse files Browse the repository at this point in the history
  • Loading branch information
disassembler authored and aristidb committed Sep 16, 2017
1 parent 81e650b commit 4285cdb
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkgs/development/tools/misc/jscoverage/default.nix
Expand Up @@ -8,6 +8,10 @@ stdenv.mkDerivation rec {
sha256 = "c45f051cec18c10352f15f9844f47e37e8d121d5fd16680e2dd0f3b4420eb7f4";
};

patches = [
./jsfalse_to_null.patch
];

buildInputs = [ autoconf makedepend perl python unzip zip ];

# It works without MOZ_FIX_LINK_PATHS, circumventing an impurity
Expand Down
26 changes: 26 additions & 0 deletions pkgs/development/tools/misc/jscoverage/jsfalse_to_null.patch
@@ -0,0 +1,26 @@
diff --git i/js/jsstr.cpp w/js/jsstr.cpp
index e662bf1..b18597e 100644
--- i/js/jsstr.cpp
+++ w/js/jsstr.cpp
@@ -3040,7 +3040,7 @@ js_InitStringClass(JSContext *cx, JSObject *obj)
JSVAL_VOID, NULL, NULL,
JSPROP_READONLY | JSPROP_PERMANENT | JSPROP_SHARED, 0, 0,
NULL)) {
- return JS_FALSE;
+ return NULL;
}

return proto;
diff --git i/js/jsxml.cpp w/js/jsxml.cpp
index 5621ede..e00c97d 100644
--- i/js/jsxml.cpp
+++ w/js/jsxml.cpp
@@ -303,7 +303,7 @@ NewXMLNamespace(JSContext *cx, JSString *prefix, JSString *uri, JSBool declared)

obj = js_NewObject(cx, &js_NamespaceClass.base, NULL, NULL);
if (!obj)
- return JS_FALSE;
+ return NULL;
JS_ASSERT(JSVAL_IS_VOID(obj->fslots[JSSLOT_PREFIX]));
JS_ASSERT(JSVAL_IS_VOID(obj->fslots[JSSLOT_URI]));
JS_ASSERT(JSVAL_IS_VOID(obj->fslots[JSSLOT_DECLARED]));

0 comments on commit 4285cdb

Please sign in to comment.