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

Commit

Permalink
src,build: added todo for isolate_data
Browse files Browse the repository at this point in the history
isolate_data is created before setting the context. However
it fails for chakracore because chakrashim calls `JsPointerToString`
internally to populate properties for isolate_data. For now I have
add `#ifdef` to set context before creating isolate_data. But this
need to be fixed in future.

vcbuild.bat passes `--without-inspector` if engine is chakracore

PR-URL: #79
Reviewed-By: Jianchun Xu <Jianchun.Xu@microsoft.com>
  • Loading branch information
kunalspathak committed Jun 16, 2016
1 parent 0402b9e commit 8b48ffd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deps/chakrashim/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#define V8_MAJOR_VERSION 5
#define V8_MINOR_VERSION 0
#define V8_BUILD_NUMBER 71
#define V8_PATCH_LEVEL 35
#define V8_PATCH_LEVEL 52

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
13 changes: 11 additions & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4279,10 +4279,18 @@ static void StartNodeInstance(void* arg) {
Locker locker(isolate);
Isolate::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
#ifndef NODE_ENGINE_CHAKRACORE
IsolateData isolate_data(isolate, instance_data->event_loop(),
array_buffer_allocator.zero_fill_field());
#endif
Local<Context> context = Context::New(isolate);
Context::Scope context_scope(context);
// CHAKRA-TODO : fix this to create isolate_data before setting context
#if defined(NODE_ENGINE_CHAKRACORE)
IsolateData isolate_data(isolate, instance_data->event_loop(),
array_buffer_allocator.zero_fill_field());

#endif
Environment env(&isolate_data, context);
env.Start(instance_data->argc(),
instance_data->argv(),
Expand Down Expand Up @@ -4314,9 +4322,10 @@ static void StartNodeInstance(void* arg) {
do {
v8::platform::PumpMessageLoop(default_platform, isolate);
more = uv_run(env.event_loop(), UV_RUN_ONCE);

if (more == false) {
v8::platform::PumpMessageLoop(default_platform, isolate);

EmitBeforeExit(&env);

// Emit `beforeExit` if the loop became alive either after emitting
// event, or after running some callbacks.
Expand Down Expand Up @@ -4403,4 +4412,4 @@ int Start(int argc, char** argv) {
}


} // namespace node
} // namespace node
2 changes: 1 addition & 1 deletion vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if "%i18n_arg%"=="full-icu" set configure_flags=%configure_flags% --with-intl=fu
if "%i18n_arg%"=="small-icu" set configure_flags=%configure_flags% --with-intl=small-icu
if "%i18n_arg%"=="intl-none" set configure_flags=%configure_flags% --with-intl=none
if "%i18n_arg%"=="without-intl" set configure_flags=%configure_flags% --without-intl
if "%engine%"=="chakracore" set configure_flags=%configure_flags% --without-intl
if "%engine%"=="chakracore" set configure_flags=%configure_flags% --without-intl --without-inspector

if defined config_flags set configure_flags=%configure_flags% %config_flags%

Expand Down

0 comments on commit 8b48ffd

Please sign in to comment.