Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(389)

Issue 2533223002: Copy dictionary keys and values in enumeration in TransferNamedProperties (Closed)

Created:
4 years ago by Camillo Bruni
Modified:
4 years ago
Reviewers:
Igor Sheludko
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Copy dictionary keys and values in enumeration in TransferNamedProperties During bootstrapping when installing the global object we copy over the properties from the snapshotted global object to the one created from a provided template. Originally Genesis::TransferNamedProperties just iterated over the entries, making the final order hash and thus platform dependent. This CL fixes this by sorting the keys by enumeration index before copying them to the destination object and thus making the key enumaration on the global object platform independent. Drive-by-fix: avoid crash when printing the global object during bootstrapping. BUG=chromium:669029 Committed: https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2 Cr-Commit-Position: refs/heads/master@{#41502}

Patch Set 1 #

Total comments: 1

Patch Set 2 : rip out sorting code #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -205 lines) Patch
M src/api.cc View 1 chunk +0 lines, -1 line 0 comments Download
M src/bootstrapper.cc View 1 1 chunk +43 lines, -38 lines 0 comments Download
M src/objects.h View 1 3 chunks +4 lines, -15 lines 0 comments Download
M src/objects.cc View 1 7 chunks +40 lines, -149 lines 0 comments Download
M src/objects-printer.cc View 3 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 20 (13 generated)
Camillo Bruni
PTAL
4 years ago (2016-11-29 09:00:39 UTC) #5
Igor Sheludko
https://codereview.chromium.org/2533223002/diff/1/src/objects.cc File src/objects.cc (right): https://codereview.chromium.org/2533223002/diff/1/src/objects.cc#newcode18373 src/objects.cc:18373: Handle<FixedArray> Dictionary<Derived, Shape, Key>::GetOrderedKeyIndices( We already have Dictionary::BuildIterationIndicesArray() which ...
4 years ago (2016-12-05 15:26:06 UTC) #8
Camillo Bruni
PTAL again.
4 years ago (2016-12-05 16:33:07 UTC) #11
Igor Sheludko
lgtm
4 years ago (2016-12-05 17:09:53 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2533223002/20001
4 years ago (2016-12-05 20:14:38 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-05 20:17:21 UTC) #18
commit-bot: I haz the power
4 years ago (2016-12-05 20:17:53 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/7036eec6f7488e205c5583293e98e9f201d506b2
Cr-Commit-Position: refs/heads/master@{#41502}

Powered by Google App Engine
This is Rietveld 408576698