mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 882905 - Remove hasVersion from js::CompartmentOptions. r=luke
This commit is contained in:
parent
ed24e324cd
commit
87f528fd90
@ -3162,16 +3162,18 @@ SameZoneAs(JSObject *obj)
|
||||
|
||||
struct JS_PUBLIC_API(CompartmentOptions) {
|
||||
ZoneSpecifier zoneSpec;
|
||||
bool hasVersion;
|
||||
JSVersion version;
|
||||
|
||||
explicit CompartmentOptions() : zoneSpec(JS::FreshZone)
|
||||
, hasVersion(false)
|
||||
, version(JSVERSION_UNKNOWN)
|
||||
{}
|
||||
|
||||
CompartmentOptions &setZone(ZoneSpecifier spec) { zoneSpec = spec; return *this; }
|
||||
CompartmentOptions &setVersion(JSVersion version_) { hasVersion = true; version = version_; return *this; }
|
||||
CompartmentOptions &setVersion(JSVersion version_) {
|
||||
JS_ASSERT(version_ != JSVERSION_UNKNOWN);
|
||||
version = version_;
|
||||
return *this;
|
||||
}
|
||||
};
|
||||
|
||||
} /* namespace JS */
|
||||
|
@ -1529,7 +1529,7 @@ JSContext::findVersion() const
|
||||
if (JSScript *script = currentScript(NULL, ALLOW_CROSS_COMPARTMENT))
|
||||
return script->getVersion();
|
||||
|
||||
if (compartment() && compartment()->options().hasVersion)
|
||||
if (compartment() && compartment()->options().version != JSVERSION_UNKNOWN)
|
||||
return compartment()->options().version;
|
||||
|
||||
return runtime()->defaultVersion();
|
||||
|
Loading…
Reference in New Issue
Block a user