Skip to content
This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Commit a6bdd8f

Browse files
author
Julien Gilli
committed
Merge remote-tracking branch 'upstream/v0.10' into v0.12
Conflicts: deps/v8/src/log-utils.cc
2 parents a35ba2f + ad06848 commit a6bdd8f

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

deps/v8/src/log-utils.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
#include "src/log-utils.h"
88
#include "src/string-stream.h"
9+
#include "version.h"
910

1011
namespace v8 {
1112
namespace internal {
@@ -50,6 +51,14 @@ void Log::Initialize(const char* log_file_name) {
5051
OpenFile(log_file_name);
5152
}
5253
}
54+
55+
if (output_handle_ != NULL) {
56+
Log::MessageBuilder msg(this);
57+
msg.Append("v8-version,%d,%d,%d,%d,%d\n", Version::GetMajor(),
58+
Version::GetMinor(), Version::GetBuild(), Version::GetPatch(),
59+
Version::IsCandidate());
60+
msg.WriteToLogFile();
61+
}
5362
}
5463

5564

lib/url.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,8 @@ Url.prototype.resolveObject = function(relative) {
639639
// then it must NOT get a trailing slash.
640640
var last = srcPath.slice(-1)[0];
641641
var hasTrailingSlash = (
642-
(result.host || relative.host) && (last === '.' || last === '..') ||
643-
last === '');
642+
(result.host || relative.host || srcPath.length > 1) &&
643+
(last === '.' || last === '..') || last === '');
644644

645645
// strip single dots, resolve double dots to parent dir
646646
// if the path tries to go above the root, `up` ends up > 0

test/simple/test-url.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,6 +1178,14 @@ var relativeTests = [
11781178
['/foo/bar/baz/', 'quux/baz', '/foo/bar/baz/quux/baz'],
11791179
['/foo/bar/baz', '../../../../../../../../quux/baz', '/quux/baz'],
11801180
['/foo/bar/baz', '../../../../../../../quux/baz', '/quux/baz'],
1181+
['/foo', '.', '/'],
1182+
['/foo', '..', '/'],
1183+
['/foo/', '.', '/foo/'],
1184+
['/foo/', '..', '/'],
1185+
['/foo/bar', '.', '/foo/'],
1186+
['/foo/bar', '..', '/'],
1187+
['/foo/bar/', '.', '/foo/bar/'],
1188+
['/foo/bar/', '..', '/foo/'],
11811189
['foo/bar', '../../../baz', '../../baz'],
11821190
['foo/bar/', '../../../baz', '../baz'],
11831191
['http://example.com/b//c//d;p?q#blarg', 'https:#hash2', 'https:///#hash2'],

0 commit comments

Comments
 (0)