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.
This commit is contained in:
Itms 2016-09-02 16:40:01 +00:00
parent ef6d1c77c8
commit ffd4207c30

View file

@ -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)
{