SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893.

- Remove JSVAL_ZERO and JSVAL_NULL
https://bugzilla.mozilla.org/show_bug.cgi?id=1177825
- Remove *_TO_JSVAL https://bugzilla.mozilla.org/show_bug.cgi?id=1177892
- Drop support for parent object in the deserializer
https://bugzilla.mozilla.org/show_bug.cgi?id=1136345,
https://bugzilla.mozilla.org/show_bug.cgi?id=805052
- Correctly use boolean values in JS::RuntimeOptionsRef
- Use JS_FN instead of JS_FS: in future versions, JS_FS is not public
because it isn't supposed to be used in JSAPI code
- Allow to select flags for global objects, and correctly mark progress
bars in the loading screen as not readonly+permanent
- Remove empty JSI_props in IGUIObject

Reviewed By: wraitii, elexis
Differential Revision: https://code.wildfiregames.com/D1716
This was SVN commit r22052.
This commit is contained in:
Itms
2019-01-13 16:37:41 +00:00
parent 651cf8b364
commit db5d4bb5f1
10 changed files with 53 additions and 60 deletions
@@ -1,4 +1,4 @@
/* Copyright (C) 2017 Wildfire Games.
/* Copyright (C) 2019 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -167,12 +167,7 @@ JS::Value CStdDeserializer::ReadScriptVal(const char* UNUSED(name), JS::HandleOb
if (!proto)
throw PSERROR_Deserialize_ScriptError("Failed to find serializable prototype for object");
JS::RootedObject parent(cx, JS_GetParent(proto));
if (!proto || !parent)
throw PSERROR_Deserialize_ScriptError();
// TODO: Remove support for parent since this is dropped upstream SpiderMonkey
obj.set(JS_NewObjectWithGivenProto(cx, nullptr, proto, parent));
obj.set(JS_NewObjectWithGivenProto(cx, nullptr, proto));
if (!obj)
throw PSERROR_Deserialize_ScriptError("JS_NewObject failed");