From bc744f6bf13d3f8c8487f6d692632fb238a77ccd Mon Sep 17 00:00:00 2001 From: Jon Coppeard Date: Fri, 13 Dec 2013 09:32:19 +0000 Subject: [PATCH] Bug 945285 - Don't verify post barriers if store buffer is disabled r=sfink --- js/src/gc/Verifier.cpp | 4 +++- js/src/jit-test/tests/gc/bug-945285.js | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 js/src/jit-test/tests/gc/bug-945285.js diff --git a/js/src/gc/Verifier.cpp b/js/src/gc/Verifier.cpp index 6e7732e507d4..9cd3710e57e5 100644 --- a/js/src/gc/Verifier.cpp +++ b/js/src/gc/Verifier.cpp @@ -830,10 +830,11 @@ MaybeVerifyPreBarriers(JSRuntime *rt, bool always) static void MaybeVerifyPostBarriers(JSRuntime *rt, bool always) { +#ifdef JSGC_GENERATIONAL if (rt->gcZeal() != ZealVerifierPostValue) return; - if (rt->mainThread.suppressGC) + if (rt->mainThread.suppressGC || !rt->gcStoreBuffer.isEnabled()) return; if (VerifyPostTracer *trc = (VerifyPostTracer *)rt->gcVerifyPostData) { @@ -843,6 +844,7 @@ MaybeVerifyPostBarriers(JSRuntime *rt, bool always) EndVerifyPostBarriers(rt); } StartVerifyPostBarriers(rt); +#endif } void diff --git a/js/src/jit-test/tests/gc/bug-945285.js b/js/src/jit-test/tests/gc/bug-945285.js new file mode 100644 index 000000000000..c2d83d215f82 --- /dev/null +++ b/js/src/jit-test/tests/gc/bug-945285.js @@ -0,0 +1,3 @@ +gczeal(11); +function callback(obj) {} +setObjectMetadataCallback(callback);