From 431eb172f97434a3b0868a610bc14d8ff7d9efd9 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Fri, 16 Jan 2015 13:44:42 +0100 Subject: deps: log V8 version in profiler log file Patch from issue 800293002 authored by ben@strongloop.com Review URL: https://codereview.chromium.org/806143002 PR-URL: https://github.com/joyent/node/pull/9043 Reviewed-by: Trevor Norris Reviewed-By: Timothy J Fontaine --- deps/v8/src/log-utils.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/deps/v8/src/log-utils.cc b/deps/v8/src/log-utils.cc index 5e607daa9..622cc51ae 100644 --- a/deps/v8/src/log-utils.cc +++ b/deps/v8/src/log-utils.cc @@ -29,6 +29,7 @@ #include "log-utils.h" #include "string-stream.h" +#include "version.h" namespace v8 { namespace internal { @@ -136,6 +137,14 @@ void Log::Initialize() { } } } + + if (output_handle_ != NULL) { + LogMessageBuilder msg(logger_); + msg.Append("v8-version,%d,%d,%d,%d,%d\n", Version::GetMajor(), + Version::GetMinor(), Version::GetBuild(), Version::GetPatch(), + Version::IsCandidate()); + msg.WriteToLogFile(); + } } -- cgit v1.2.1 From ad0684807c474db5cda7d28592e34e19910eb7ab Mon Sep 17 00:00:00 2001 From: Amir Saboury Date: Sun, 11 Jan 2015 17:55:12 -0500 Subject: url: reslove urls with . and .. '.' and '..' are directory specs and resolving urls with or without the hostname with '.' and '..' should add a trailing slash to the end of the url. Fixes: https://github.com/joyent/node/issues/8992 PR-URL: https://github.com/joyent/node/pull/9010 Reviewed-by: Trevor Norris --- lib/url.js | 4 ++-- test/simple/test-url.js | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/url.js b/lib/url.js index d5948e450..e991f6d63 100644 --- a/lib/url.js +++ b/lib/url.js @@ -600,8 +600,8 @@ Url.prototype.resolveObject = function(relative) { // then it must NOT get a trailing slash. var last = srcPath.slice(-1)[0]; var hasTrailingSlash = ( - (result.host || relative.host) && (last === '.' || last === '..') || - last === ''); + (result.host || relative.host || srcPath.length > 1) && + (last === '.' || last === '..') || last === ''); // strip single dots, resolve double dots to parent dir // if the path tries to go above the root, `up` ends up > 0 diff --git a/test/simple/test-url.js b/test/simple/test-url.js index 95f50a23c..6c807930b 100644 --- a/test/simple/test-url.js +++ b/test/simple/test-url.js @@ -1087,6 +1087,14 @@ var relativeTests = [ ['/foo/bar/baz/', 'quux/baz', '/foo/bar/baz/quux/baz'], ['/foo/bar/baz', '../../../../../../../../quux/baz', '/quux/baz'], ['/foo/bar/baz', '../../../../../../../quux/baz', '/quux/baz'], + ['/foo', '.', '/'], + ['/foo', '..', '/'], + ['/foo/', '.', '/foo/'], + ['/foo/', '..', '/'], + ['/foo/bar', '.', '/foo/'], + ['/foo/bar', '..', '/'], + ['/foo/bar/', '.', '/foo/bar/'], + ['/foo/bar/', '..', '/foo/'], ['foo/bar', '../../../baz', '../../baz'], ['foo/bar/', '../../../baz', '../baz'], ['http://example.com/b//c//d;p?q#blarg', 'https:#hash2', 'https:///#hash2'], -- cgit v1.2.1