Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
Fix for CVE-2020-16009 (Inappropriate implementation in V8 in Google …
Browse files Browse the repository at this point in the history
…Chrome)
  • Loading branch information
kiwibrowser authored Nov 5, 2020
1 parent 66341b7 commit dba3e12
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion v8/src/map-updater.cc
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,17 @@ MapUpdater::State MapUpdater::FindTargetMap() {
}
Representation tmp_representation = tmp_details.representation();
if (!old_details.representation().fits_into(tmp_representation)) {
break;
// Try updating the field in-place to a generalized type.
Representation generalized =
tmp_representation.generalize(old_details.representation());
if (!tmp_representation.CanBeInPlaceChangedTo(generalized)) {
break;
}
Handle<Map> field_owner(tmp_map->FindFieldOwner(isolate_, i), isolate_);
tmp_representation = generalized;
GeneralizeField(field_owner, i, tmp_details.constness(),
tmp_representation,
handle(tmp_descriptors->GetFieldType(i), isolate_));
}

if (tmp_details.location() == kField) {
Expand Down

0 comments on commit dba3e12

Please sign in to comment.