Merge remote-tracking branch 'origin/master' into custom

This commit is contained in:
Roy Tam 2019-10-25 12:02:58 +08:00
commit f55c7f6d89
11 changed files with 62 additions and 39 deletions

View file

@ -8893,10 +8893,8 @@ IonBuilder::jsop_getimport(PropertyName* name)
if (!emitted) {
// This can happen if we don't have type information.
TypeSet::ObjectKey* staticKey = TypeSet::ObjectKey::get(targetEnv);
TemporaryTypeSet* types = bytecodeTypes(pc);
BarrierKind barrier = PropertyReadNeedsTypeBarrier(analysisContext, constraints(), staticKey,
name, types, /* updateObserved = */ true);
BarrierKind barrier = BarrierKind::TypeSet;
if (!loadStaticSlot(targetEnv, barrier, types, shape->slot()))
return false;

View file

@ -184,6 +184,11 @@ FileAsTypedArray(JSContext* cx, JS::HandleString pathnameStr)
return nullptr;
JS_ReportErrorUTF8(cx, "can't seek start of %s", pathname.ptr());
} else {
if (len > INT32_MAX) {
JS_ReportErrorUTF8(cx, "file %s is too large for a Uint8Array",
pathname.ptr());
return nullptr;
}
obj = JS_NewUint8Array(cx, len);
if (!obj)
return nullptr;