From ffd4207c30e7db50e1c8235f1dc710e825fed986 Mon Sep 17 00:00:00 2001 From: Itms Date: Fri, 2 Sep 2016 16:40:01 +0000 Subject: [PATCH] SpiderMonkey 38 upgrade: 24/35 Work around upstream API breakage by moving from a define to a const member and not using the namespace explicitly. This is caused by https://bugzilla.mozilla.org/show_bug.cgi?id=896116 and this patch by leper was submitted at https://bugzilla.mozilla.org/show_bug.cgi?id=1236373 This was SVN commit r18678. --- source/simulation2/serialization/BinarySerializer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/simulation2/serialization/BinarySerializer.cpp b/source/simulation2/serialization/BinarySerializer.cpp index 5fd8159f31..2aff99f6d7 100644 --- a/source/simulation2/serialization/BinarySerializer.cpp +++ b/source/simulation2/serialization/BinarySerializer.cpp @@ -145,7 +145,11 @@ void CBinarySerializerScriptImpl::HandleScriptVal(JS::HandleValue val) const JSClass* jsclass = JS_GetClass(obj); if (!jsclass) throw PSERROR_Serialize_ScriptError("JS_GetClass failed"); +// TODO: Remove this workaround for upstream API breakage when updating SpiderMonkey +// See https://bugzilla.mozilla.org/show_bug.cgi?id=1236373 +#define JSCLASS_CACHED_PROTO_WIDTH js::JSCLASS_CACHED_PROTO_WIDTH JSProtoKey protokey = JSCLASS_CACHED_PROTO_KEY(jsclass); +#undef JSCLASS_CACHED_PROTO_WIDTH if (protokey == JSProto_Object) {