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

Issue 10344010: Canonicalize the reference_dir also when canonicalizing a path (Closed)

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

Description

Canonicalize the reference_dir also when canonicalizing a path Committed: https://code.google.com/p/dart/source/detail?r=7265

Patch Set 1 #

Total comments: 6

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -14 lines) Patch
M bin/dartutils.cc View 1 1 chunk +13 lines, -11 lines 0 comments Download
M tests/vm/vm.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
siva
8 years, 7 months ago (2012-05-02 22:49:40 UTC) #1
cshapiro
lgtm http://codereview.chromium.org/10344010/diff/1/bin/dartutils.cc File bin/dartutils.cc (right): http://codereview.chromium.org/10344010/diff/1/bin/dartutils.cc#newcode240 bin/dartutils.cc:240: char* path_sep = strrchr(canonical_path, File::PathSeparator()[0]); Since there is ...
8 years, 7 months ago (2012-05-03 00:17:21 UTC) #2
siva
8 years, 7 months ago (2012-05-03 00:46:05 UTC) #3
http://codereview.chromium.org/10344010/diff/1/bin/dartutils.cc
File bin/dartutils.cc (right):

http://codereview.chromium.org/10344010/diff/1/bin/dartutils.cc#newcode240
bin/dartutils.cc:240: char* path_sep = strrchr(canonical_path,
File::PathSeparator()[0]);
On 2012/05/03 00:17:21, cshapiro wrote:
> Since there is no equivalent of the STL string .rfind method in the C standard
> library, maybe add a ASSERT(strlen(File::PathSeparator()) == 1) just in case?

Done.

http://codereview.chromium.org/10344010/diff/1/bin/dartutils.cc#newcode247
bin/dartutils.cc:247: intptr_t len = snprintf(NULL, 0, "%s%s%s",
Agree, maybe we could add a method in utils.

On 2012/05/03 00:17:21, cshapiro wrote:
> As an aside, we really need an abstraction to do this.  For example, glibc has
a
> function called asprintf which allocates a formatted string.

http://codereview.chromium.org/10344010/diff/1/bin/dartutils.cc#newcode256
bin/dartutils.cc:256: if  (canonical_path == NULL) {
Removed.

On 2012/05/03 00:17:21, cshapiro wrote:
> horizontal whitespace

Powered by Google App Engine
This is Rietveld 408576698