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

Issue 7826: Initialize the variable to a valid value. (Closed)

Created:
12 years, 2 months ago by Feng Qian
Modified:
9 years, 7 months ago
Reviewers:
iposva
CC:
v8-dev
Visibility:
Public.

Description

Initialize the variable to a valid value. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=541

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M src/factory.cc View 1 chunk +1 line, -1 line 1 comment Download

Messages

Total messages: 2 (0 generated)
Feng Qian
TBR
12 years, 2 months ago (2008-10-21 19:53:25 UTC) #1
iposva
12 years, 2 months ago (2008-10-21 20:13:39 UTC) #2
See comment in line. Generally this LGTM, but I really think we should add a
NO_TYPE or INVALID_TYPE to the InstanceType enum.

http://codereview.chromium.org/7826/diff/1/2
File src/factory.cc (right):

http://codereview.chromium.org/7826/diff/1/2#newcode686
Line 686: InstanceType type = JS_OBJECT_TYPE;  // initialize to a valid value
I would prefer to see a NO_TYPE in the InstanceType enum to be able to clearly
indicate that this variable initialization is expected to be overridden. I
understand that there currently is no such invalid InstanceType.

Powered by Google App Engine
This is Rietveld 408576698