Skip to content

Commit

Permalink
napi: Fix merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jasongin committed Feb 1, 2017
1 parent bc36c37 commit 6e70e77
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 35 deletions.
4 changes: 2 additions & 2 deletions src/node_jsvmapi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ void napi_clear_last_error() {
}

const napi_extended_error_info* napi_get_last_error_info() {
static_assert(sizeof(error_messages) / sizeof(*error_messages) == napi_status_last,
static_assert(sizeof(error_messages) / sizeof(*error_messages) == napi_status_last,
"Count of error messages must match count of error values");
assert(static_last_error.error_code < napi_status_last);

Expand Down Expand Up @@ -594,7 +594,7 @@ napi_status napi_create_function(

napi_status napi_create_constructor(
napi_env e,
char* utf8name,
const char* utf8name,
napi_callback cb,
void* data,
int property_count,
Expand Down
8 changes: 4 additions & 4 deletions src/node_jsvmapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ NODE_EXTERN void napi_module_register(void* mod);

#if defined(_MSC_VER)
#pragma section(".CRT$XCU", read)
#define NODE_C_CTOR(fn) \
#define NODE_ABI_CTOR(fn) \
static void __cdecl fn(void); \
__declspec(dllexport, allocate(".CRT$XCU")) \
void (__cdecl*fn ## _)(void) = fn; \
static void __cdecl fn(void)
#else
#define NODE_C_CTOR(fn) \
#define NODE_ABI_CTOR(fn) \
static void fn(void) __attribute__((constructor)); \
static void fn(void)
#endif
Expand All @@ -91,7 +91,7 @@ NODE_EXTERN void napi_module_register(void* mod);
priv, \
NULL \
}; \
NODE_C_CTOR(_register_ ## modname) { \
NODE_ABI_CTOR(_register_ ## modname) { \
napi_module_register(&_module); \
} \
}
Expand Down Expand Up @@ -287,7 +287,7 @@ NODE_EXTERN napi_status napi_wrap(napi_env e, napi_value jsObject, void* nativeO
NODE_EXTERN napi_status napi_unwrap(napi_env e, napi_value jsObject, void** result);

NODE_EXTERN napi_status napi_create_constructor(napi_env e,
char* utf8name,
const char* utf8name,
napi_callback cb,
void* data,
int property_count,
Expand Down
7 changes: 0 additions & 7 deletions test/addons-abi/test_exception/test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict';

try {
var test_exception = require( "./build/Release/test_exception" );
var assert = require( "assert" );
var theError = new Error( "Some error" );
Expand Down Expand Up @@ -47,9 +46,3 @@ assert.strictEqual( undefined, caughtError,
// Test that the exception state remains clear when no exception is thrown
assert.strictEqual( test_exception.wasPending(), false,
"VM was not marked as having an exception pending when none was allowed through" );

}
catch (e) {
console.log(e);
process.stdin.resume();
}
35 changes: 13 additions & 22 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ set enable_vtune_arg=
set configure_flags=
set build_addons=
set dll=
set build_addon_abi=
set build_addons_abi=

:next-arg
if "%1"=="" goto args-done
Expand All @@ -58,15 +58,10 @@ if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
if /i "%1"=="noetw" set noetw=1&goto arg-ok
if /i "%1"=="noperfctr" set noperfctr=1&goto arg-ok
if /i "%1"=="licensertf" set licensertf=1&goto arg-ok
<<<<<<< HEAD
if /i "%1"=="test" set test_args=%test_args% addons addon-abi doctool known_issues message parallel sequential -J&set jslint=1&set build_addons=1&goto arg-ok
if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap addons addon-abi doctool inspector known_issues message sequential parallel&set cctest_args=%cctest_args% --gtest_output=tap:cctest.tap&set build_addons=1&goto arg-ok
=======
if /i "%1"=="test" set test_args=%test_args% addons addons-abi doctool known_issues message parallel sequential -J&set jslint=1&set build_addons=1&set build_addon_abi=1&goto arg-ok
if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap addons addons-abi doctool known_issues message sequential parallel&set build_addons=1&set build_addon_abi=1&goto arg-ok
>>>>>>> 6e481bb... Change naming addon-abi to addons-abi
if /i "%1"=="test" set test_args=%test_args% addons addons-abi doctool known_issues message parallel sequential -J&set jslint=1&set build_addons=1&set build_addons_abi=1&goto arg-ok
if /i "%1"=="test-ci" set test_args=%test_args% %test_ci_args% -p tap --logfile test.tap addons addons-abi doctool inspector known_issues message sequential parallel&set cctest_args=%cctest_args% --gtest_output=tap:cctest.tap&set build_addons=1&set build_addons_abi=1&goto arg-ok
if /i "%1"=="test-addons" set test_args=%test_args% addons&set build_addons=1&goto arg-ok
if /i "%1"=="test-addons-abi" set test_args=%test_args% addons-abi&set build_addon_abi=1&goto arg-ok
if /i "%1"=="test-addons-abi" set test_args=%test_args% addons-abi&set build_addons_abi=1&goto arg-ok
if /i "%1"=="test-simple" set test_args=%test_args% sequential parallel -J&goto arg-ok
if /i "%1"=="test-message" set test_args=%test_args% message&goto arg-ok
if /i "%1"=="test-gc" set test_args=%test_args% gc&set buildnodeweak=1&goto arg-ok
Expand Down Expand Up @@ -320,17 +315,7 @@ if not exist "%node_exe%" (
echo Failed to find node.exe
goto build-addons-abi
)
echo Building add-ons

:build-addons-abi
if not defined build_addons_abi goto run-tests
if not exist "%node_exe%" (
echo Failed to find node.exe
goto run-tests
)
echo Building add-ons


echo Building addons
:: clear
for /d %%F in (test\addons\??_*) do (
rd /s /q %%F
Expand All @@ -346,8 +331,14 @@ for /d %%F in (test\addons\*) do (
--nodedir="%cd%"
if !errorlevel! neq 0 exit /b !errorlevel!
)
if not defined build_addon_abi goto run-tests
echo Building add-ons

:build-addons-abi
if not defined build_addons_abi goto run-tests
if not exist "%node_exe%" (
echo Failed to find node.exe
goto run-tests
)
echo Building addons-abi
:: clear
for /d %%F in (test\addons-abi\??_*) do (
rd /s /q %%F
Expand Down

0 comments on commit 6e70e77

Please sign in to comment.