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

Issue 10230001: Explicitly initialize Bigint members after uninitialized allocations. (Closed)

Created:
8 years, 8 months ago by cshapiro
Modified:
8 years, 8 months ago
Reviewers:
siva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Explicitly initialize Bigint members after uninitialized allocations. Committed: https://code.google.com/p/dart/source/detail?r=6988

Patch Set 1 #

Patch Set 2 : finish a rename #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+8 lines, -4 lines) Patch
M runtime/vm/raw_object.h View 1 chunk +2 lines, -0 lines 0 comments Download
M runtime/vm/snapshot.cc View 1 1 chunk +6 lines, -4 lines 3 comments Download

Messages

Total messages: 4 (0 generated)
cshapiro
8 years, 8 months ago (2012-04-26 03:30:15 UTC) #1
siva
LGTM http://codereview.chromium.org/10230001/diff/2001/runtime/vm/snapshot.cc File runtime/vm/snapshot.cc (right): http://codereview.chromium.org/10230001/diff/2001/runtime/vm/snapshot.cc#newcode255 runtime/vm/snapshot.cc:255: obj->ptr()->signed_length_ = bigint_length; why not add a set_allocated_length() ...
8 years, 8 months ago (2012-04-26 04:45:04 UTC) #2
cshapiro
http://codereview.chromium.org/10230001/diff/2001/runtime/vm/snapshot.cc File runtime/vm/snapshot.cc (right): http://codereview.chromium.org/10230001/diff/2001/runtime/vm/snapshot.cc#newcode255 runtime/vm/snapshot.cc:255: obj->ptr()->signed_length_ = bigint_length; Hmm... I tried to make the ...
8 years, 8 months ago (2012-04-26 06:34:53 UTC) #3
siva
8 years, 8 months ago (2012-04-26 17:17:44 UTC) #4
http://codereview.chromium.org/10230001/diff/2001/runtime/vm/snapshot.cc
File runtime/vm/snapshot.cc (right):

http://codereview.chromium.org/10230001/diff/2001/runtime/vm/snapshot.cc#newc...
runtime/vm/snapshot.cc:255: obj->ptr()->signed_length_ = bigint_length;
Agree, I didn't realize we already had a NoGCScope around the caller.

Maybe in a different CL, I will add an assertion in each of this functions so
that there is no confusion.

On 2012/04/26 06:34:53, cshapiro wrote:
> Hmm... I tried to make the code look like the rest of the code in the snapshot
> reader.
> 
> The NoGCScope seemed unnecessary because of the assert on line 249 and because
> the entire read is wrapped in a NoGCScope on line 130.
> 
> We have a SetLength but it does something different than one would expect.  It
> is confusing to me why we have these two length values in the first place.  
> Let's talk about this off-line.

Powered by Google App Engine
This is Rietveld 408576698