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

Commit

Permalink
chakrashim,src,test: fix build issues
Browse files Browse the repository at this point in the history
Chakra changes
* Removed the "inspector" subdirectory from chakrashim
* Integrated inspector build into chakrashim.gyp
* Enabled native inspector tests
* Cleaned up the node.gyp/node.gypi files
* Updated regexes in test-repl.js for Chakra
* Added flaky-tests parameter in Makefile

V8 changes
* Fixed node.gyp file issue related to upstream inspector refactor
* Fixed env-inl.h to build correctly for both V8 and Linux
* Fixed test issue in test-repl.js for V8

PR-URL: #241
Reviewed-By: Sandeep Agarwal <saagarwa@microsoft.com>
Reviewed-By: Kunal Pathak <Kunal.Pathak@microsoft.com>
  • Loading branch information
kfarnung committed May 12, 2017
1 parent 7e6de45 commit f9f10b4
Show file tree
Hide file tree
Showing 213 changed files with 154 additions and 197 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ test: all
$(MAKE) build-addons
$(MAKE) build-addons-napi
$(MAKE) cctest
$(PYTHON) tools/test.py --mode=release -J \
$(PYTHON) tools/test.py --mode=release --flaky-tests=$(FLAKY_TESTS) -J \
doctool inspector known_issues message pseudo-tty parallel sequential $(CI_NATIVE_SUITES)
$(MAKE) lint

Expand Down
13 changes: 12 additions & 1 deletion deps/chakrashim/chakrashim.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
'lib/chakra_debug.js',
'lib/chakra_inspector.js'
],
'v8_enable_inspector%': 0,
},

'includes': [
'src/inspector/inspector.gypi'
],
'targets': [
{
'target_name': 'chakrashim',
Expand Down Expand Up @@ -48,6 +51,14 @@
'OTHER_CFLAGS': [ '-fexceptions' ],
},
}],
['v8_enable_inspector==1', {
'sources': [
'<@(inspector_all_sources)'
],
'dependencies': [
'src/inspector/inspector.gyp:protocol_generated_sources',
],
}],
],
'msvs_use_library_dependency_inputs': 1,

Expand Down
5 changes: 0 additions & 5 deletions deps/chakrashim/include/v8.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,11 +693,6 @@ class Global : public PersistentBase<T> {
other._weakWrapper = nullptr;
}

template <class S>
static Global<S> New(Isolate* isolate, Local<S> that) {
return Global<S>(isolate, that);
}

V8_INLINE ~Global() { this->Reset(); }

template <class S>
Expand Down
12 changes: 0 additions & 12 deletions deps/chakrashim/inspector/README.md

This file was deleted.

72 changes: 0 additions & 72 deletions deps/chakrashim/inspector/src/inspector/inspector.gypi

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@

{
'variables': {
'protocol_path': '../../third_party/WebKit/Source/platform/inspector_protocol',
'protocol_path': '../../third_party/inspector_protocol',
},
'includes': [
'inspector.gypi',
'../../third_party/WebKit/Source/platform/inspector_protocol/inspector_protocol.gypi',
'<(PRODUCT_DIR)/../../../third_party/inspector_protocol/inspector_protocol.gypi',
],
'targets': [
{ 'target_name': 'protocol_compatibility',
'type': 'none',
'conditions': [
['want_separate_host_toolset==1', {
'toolsets': ['host', 'target'],
}, {
'toolsets': ['target'],
}]
],
'actions': [
{
'action_name': 'protocol_compatibility',
Expand All @@ -35,6 +42,13 @@
{ 'target_name': 'protocol_generated_sources',
'type': 'none',
'dependencies': [ 'protocol_compatibility' ],
'conditions': [
['want_separate_host_toolset==1', {
'toolsets': ['host', 'target'],
}, {
'toolsets': ['target'],
}]
],
'actions': [
{
'action_name': 'protocol_generated_sources',
Expand All @@ -57,24 +71,5 @@
},
]
},
{
'target_name': 'standalone_inspector',
'type': 'static_library',
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)',
'<(SHARED_INTERMEDIATE_DIR)/include',
'../../include',
'../..',
'../../../'
],
'sources': [
'<@(inspector_all_sources)'
],
'dependencies': [
'protocol_generated_sources',
'../../../chakracore.gyp:chakracore#host',
'../../../chakrashim.gyp:chakrashim',
],
},
],
}
72 changes: 72 additions & 0 deletions deps/chakrashim/src/inspector/inspector.gypi
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

{
'variables': {
'inspector_generated_sources': [
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Forward.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Protocol.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Console.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Debugger.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Runtime.h',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.cpp',
'<(SHARED_INTERMEDIATE_DIR)/src/inspector/protocol/Schema.h',
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Debugger.h',
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Runtime.h',
'<(SHARED_INTERMEDIATE_DIR)/include/inspector/Schema.h',
],

'inspector_all_sources': [
'<@(inspector_generated_sources)',
'include/v8-inspector.h',
'include/v8-inspector-protocol.h',
'src/inspector/inspected-context.cc',
'src/inspector/inspected-context.h',
'src/inspector/java-script-call-frame.cc',
'src/inspector/java-script-call-frame.h',
'src/inspector/protocol-platform.h',
'src/inspector/script-breakpoint.h',
'src/inspector/search-util.cc',
'src/inspector/search-util.h',
'src/inspector/string-16.cc',
'src/inspector/string-16.h',
'src/inspector/string-util.cc',
'src/inspector/string-util.h',
'src/inspector/v8-console.cc',
'src/inspector/v8-console.h',
'src/inspector/v8-console-agent-impl.cc',
'src/inspector/v8-console-agent-impl.h',
'src/inspector/v8-console-message.cc',
'src/inspector/v8-console-message.h',
'src/inspector/v8-debugger.cc',
'src/inspector/v8-debugger.h',
'src/inspector/v8-debugger-agent-impl.cc',
'src/inspector/v8-debugger-agent-impl.h',
'src/inspector/v8-debugger-script.cc',
'src/inspector/v8-debugger-script.h',
'src/inspector/v8-function-call.cc',
'src/inspector/v8-function-call.h',
'src/inspector/v8-inspector-impl.cc',
'src/inspector/v8-inspector-impl.h',
'src/inspector/v8-inspector-session-impl.cc',
'src/inspector/v8-inspector-session-impl.h',
'src/inspector/v8-internal-value-type.cc',
'src/inspector/v8-internal-value-type.h',
'src/inspector/v8-regex.cc',
'src/inspector/v8-regex.h',
'src/inspector/v8-runtime-agent-impl.cc',
'src/inspector/v8-runtime-agent-impl.h',
'src/inspector/v8-schema-agent-impl.cc',
'src/inspector/v8-schema-agent-impl.h',
'src/inspector/v8-stack-trace-impl.cc',
'src/inspector/v8-stack-trace-impl.h',
'src/inspector/v8-value-copier.cc',
'src/inspector/v8-value-copier.h',
]
}
}
7 changes: 7 additions & 0 deletions deps/chakrashim/third_party/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
V8 Inspector support for Node.js
================================

* inspector_protocol: vendored from https://chromium.googlesource.com/chromium/src/third_party/WebKit/Source/platform/inspector_protocol
* jinja2: vendored from https://github.com/mitsuhiko/jinja2
* The `tests/` directory `ext/jinja.el` file have been deleted.
* markupsafe: vendored from https://github.com/mitsuhiko/markupsafe
60 changes: 30 additions & 30 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@
'conditions': [
[ 'node_engine=="chakracore"', {
'inputs': [
'deps/chakrashim/inspector/src/inspector/js_protocol.json',
'deps/chakrashim/src/inspector/js_protocol.json',
],
}, {
'inputs': [
Expand Down Expand Up @@ -662,34 +662,6 @@
'deps/v8/include'
],
'conditions' : [
['v8_enable_inspector==1', {
'sources': [
'test/cctest/test_inspector_socket.cc',
'test/cctest/test_inspector_socket_server.cc'
],
'conditions': [
[ 'node_shared_zlib=="false"', {
'dependencies': [
'deps/zlib/zlib.gyp:zlib',
]
}],
[ 'node_shared_openssl=="false"', {
'dependencies': [
'deps/openssl/openssl.gyp:openssl'
]
}],
[ 'node_shared_http_parser=="false"', {
'dependencies': [
'deps/http_parser/http_parser.gyp:http_parser'
]
}],
[ 'node_shared_libuv=="false"', {
'dependencies': [
'deps/uv/uv.gyp:libuv'
]
}]
]
}],
['node_use_v8_platform=="true"', {
'dependencies': [
'deps/v8/src/v8.gyp:v8_libplatform',
Expand All @@ -699,12 +671,40 @@
}],
['node_engine=="chakracore"', {
'include_dirs': [
'deps/chakrashim' # include/v8_platform.h
'deps/chakrashim/include'
],
'sources!': [
'test/cctest/test_environment.cc', # TODO: Enable these test for node-chakracore
]
}],
['v8_enable_inspector==1', {
'sources': [
'test/cctest/test_inspector_socket.cc',
'test/cctest/test_inspector_socket_server.cc'
],
'conditions': [
[ 'node_shared_zlib=="false"', {
'dependencies': [
'deps/zlib/zlib.gyp:zlib',
]
}],
[ 'node_shared_openssl=="false"', {
'dependencies': [
'deps/openssl/openssl.gyp:openssl'
]
}],
[ 'node_shared_http_parser=="false"', {
'dependencies': [
'deps/http_parser/http_parser.gyp:http_parser'
]
}],
[ 'node_shared_libuv=="false"', {
'dependencies': [
'deps/uv/uv.gyp:libuv'
]
}]
]
}],
[ 'node_use_dtrace=="true" and OS!="mac" and OS!="linux"', {
'copies': [{
'destination': '<(OBJ_DIR)/cctest/src',
Expand Down
Loading

0 comments on commit f9f10b4

Please sign in to comment.