From a580d15ad3bb43af6157b77522b11a9dedb8b3a9 Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 1 May 2014 12:03:38 +0200 Subject: [PATCH] Bug 1003918 followup - Fix non-unified builds. r=red --- js/src/jit/VMFunctions.cpp | 6 ++++++ js/src/jit/VMFunctions.h | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 9911f93f488a..709ae84060ab 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -1096,6 +1096,12 @@ SetDenseElement(JSContext *cx, HandleObject obj, int32_t index, HandleValue valu return SetObjectElement(cx, obj, indexVal, value, strict); } +void +AutoDetectInvalidation::setReturnOverride() +{ + cx_->runtime()->jitRuntime()->setIonReturnOverride(*rval_); +} + #ifdef DEBUG void AssertValidObjectPtr(JSContext *cx, JSObject *obj) diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h index 2aff05a7948d..e343b3186409 100644 --- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -556,6 +556,8 @@ class AutoDetectInvalidation Value *rval_; bool disabled_; + void setReturnOverride(); + public: AutoDetectInvalidation(JSContext *cx, Value *rval, IonScript *ionScript = nullptr); @@ -566,7 +568,7 @@ class AutoDetectInvalidation ~AutoDetectInvalidation() { if (!disabled_ && ionScript_->invalidated()) - cx_->runtime()->jitRuntime()->setIonReturnOverride(*rval_); + setReturnOverride(); } };