Bug 985733 - Make assignments into typed arrays use ToNumber-style semantics. r=sfink, r=jandem
This commit is contained in:
@@ -5030,11 +5030,13 @@ baseops::SetPropertyHelper(typename ExecutionModeTraits<mode>::ContextType cxArg
|
||||
// conversions.
|
||||
if (vp.isObject())
|
||||
return false;
|
||||
if (!NonObjectToNumber(cxArg, vp, &d))
|
||||
return false;
|
||||
} else {
|
||||
if (!ToNumber(cxArg->asJSContext(), vp, &d))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!ToDoubleForTypedArray(cxArg, vp, &d))
|
||||
return false;
|
||||
|
||||
TypedArrayObject::setElement(obj->as<TypedArrayObject>(), index, d);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user