Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

deps: fix libuv registry API error handling #517

Merged
merged 2 commits into from
Apr 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 21 additions & 22 deletions deps/uv/src/win/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos_ptr, int* cpu_count_ptr) {
SYSTEM_PROCESSOR_PERFORMANCE_INFORMATION* sppi;
DWORD sppi_size;
SYSTEM_INFO system_info;
DWORD cpu_count, r, i;
DWORD cpu_count, i;
NTSTATUS status;
ULONG result_size;
int err;
Expand Down Expand Up @@ -670,34 +670,33 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos_ptr, int* cpu_count_ptr) {

assert(len > 0 && len < ARRAY_SIZE(key_name));

r = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
key_name,
0,
KEY_QUERY_VALUE,
&processor_key);
if (r != ERROR_SUCCESS) {
err = GetLastError();
err = RegOpenKeyExW(HKEY_LOCAL_MACHINE,
key_name,
0,
KEY_QUERY_VALUE,
&processor_key);
if (err != ERROR_SUCCESS) {
goto error;
}

if (RegQueryValueExW(processor_key,
L"~MHz",
NULL,
NULL,
(BYTE*) &cpu_speed,
&cpu_speed_size) != ERROR_SUCCESS) {
err = GetLastError();
err = RegQueryValueExW(processor_key,
L"~MHz",
NULL,
NULL,
(BYTE*)&cpu_speed,
&cpu_speed_size);
if (err != ERROR_SUCCESS) {
RegCloseKey(processor_key);
goto error;
}

if (RegQueryValueExW(processor_key,
L"ProcessorNameString",
NULL,
NULL,
(BYTE*) &cpu_brand,
&cpu_brand_size) != ERROR_SUCCESS) {
err = GetLastError();
err = RegQueryValueExW(processor_key,
L"ProcessorNameString",
NULL,
NULL,
(BYTE*)&cpu_brand,
&cpu_brand_size);
if (err != ERROR_SUCCESS) {
RegCloseKey(processor_key);
goto error;
}
Expand Down
22 changes: 22 additions & 0 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,25 @@ test-repl-sigint-nested-eval : SKIP
# These tests are failing for Node-Chakracore and should eventually be fixed
test-repl-sigint-nested-eval : SKIP
test-vm-sigint : SKIP

[$jsEngine==chakracore && $system==win32 && $arch==arm]
# These tests depend on Git/Linux tools that don't exist on WoA
test-child-process-double-pipe : SKIP
test-child-process-set-blocking : SKIP
test-child-process-spawn-shell : SKIP
test-child-process-spawn-typeerror : SKIP
test-child-process-spawnsync-input : SKIP
test-child-process-spawnsync-shell : SKIP
test-child-process-stdin : SKIP
test-child-process-stdio-inherit : SKIP
test-handle-wrap-isrefed : SKIP
test-http-chunk-problem : SKIP
test-pipe-head : SKIP
test-process-kill-null : SKIP
test-stdio-closed : SKIP

# These tests try to spawn a detached window, there's not shell on Windows IoT
test-cluster-fork-windowsHide : SKIP

# ChakraCore doesn't support WASM on WoA
test-wasm-simple : SKIP
4 changes: 4 additions & 0 deletions test/sequential/sequential.status
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ test-inspector-port-cluster : PASS, FLAKY
[$jsEngine==chakracore && $system==linux]
# These tests are failing for Node-Chakracore and should eventually be fixed
test-child-process-pass-fd : SKIP

[$jsEngine==chakracore && $system==win32 && $arch==arm]
# Inspector isn't currently supported on WoA
test-inspector-port-zero-cluster : SKIP