| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7cbbd68 commit d4ef922
14 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -450,6 +450,7 @@ | |||
| 450 | 450 | 'src/node_perf_common.h', | |
| 451 | 451 | 'src/node_persistent.h', | |
| 452 | 452 | 'src/node_platform.h', | |
| 453 | + 'src/node_process.h', | ||
| 453 | 454 | 'src/node_revert.h', | |
| 454 | 455 | 'src/node_root_certs.h', | |
| 455 | 456 | 'src/node_stat_watcher.h', | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,6 +7,7 @@ | |||
| 7 | 7 | #include "node_native_module.h" | |
| 8 | 8 | #include "node_options-inl.h" | |
| 9 | 9 | #include "node_platform.h" | |
| 10 | + #include "node_process.h" | ||
| 10 | 11 | #include "node_worker.h" | |
| 11 | 12 | #include "tracing/agent.h" | |
| 12 | 13 | #include "tracing/traced_value.h" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,6 +9,7 @@ | |||
| 9 | 9 | #include "node/inspector/protocol/Protocol.h" | |
| 10 | 10 | #include "node_errors.h" | |
| 11 | 11 | #include "node_internals.h" | |
| 12 | + #include "node_process.h" | ||
| 12 | 13 | #include "node_url.h" | |
| 13 | 14 | #include "v8-inspector.h" | |
| 14 | 15 | #include "v8-platform.h" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -30,6 +30,7 @@ | |||
| 30 | 30 | #include "node_options-inl.h" | |
| 31 | 31 | #include "node_perf.h" | |
| 32 | 32 | #include "node_platform.h" | |
| 33 | + #include "node_process.h" | ||
| 33 | 34 | #include "node_revert.h" | |
| 34 | 35 | #include "node_version.h" | |
| 35 | 36 | #include "tracing/traced_value.h" | |
@@ -586,9 +587,9 @@ void Exit(const FunctionCallbackInfo<Value>& args) { | |||
| 586 | 587 | } | |
| 587 | 588 | ||
| 588 | 589 | static Maybe<bool> ProcessEmitWarningGeneric(Environment* env, | |
| 589 | - const char* warning, | ||
| 590 | - const char* type = nullptr, | ||
| 591 | - const char* code = nullptr) { | ||
| 590 | + const char* warning, | ||
| 591 | + const char* type = nullptr, | ||
| 592 | + const char* code = nullptr) { | ||
| 592 | 593 | HandleScope handle_scope(env->isolate()); | |
| 593 | 594 | Context::Scope context_scope(env->context()); | |
| 594 | 595 | ||
@@ -746,12 +747,10 @@ void RunBootstrapping(Environment* env) { | |||
| 746 | 747 | ||
| 747 | 748 | // Setting global properties for the bootstrappers to use: | |
| 748 | 749 | // - global | |
| 749 | - // - process._rawDebug | ||
| 750 | 750 | // Expose the global object as a property on itself | |
| 751 | 751 | // (Allows you to set stuff on `global` from anywhere in JavaScript.) | |
| 752 | 752 | global->Set(context, FIXED_ONE_BYTE_STRING(env->isolate(), "global"), global) | |
| 753 | 753 | .FromJust(); | |
| 754 | - env->SetMethod(process, "_rawDebug", RawDebug); | ||
| 755 | 754 | ||
| 756 | 755 | // Create binding loaders | |
| 757 | 756 | std::vector<Local<String>> loaders_params = { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,16 +19,17 @@ | |||
| 19 | 19 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | |
| 20 | 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 21 | 21 | ||
| 22 | + #include "node_crypto.h" | ||
| 22 | 23 | #include "node.h" | |
| 23 | 24 | #include "node_buffer.h" | |
| 24 | - #include "node_errors.h" | ||
| 25 | 25 | #include "node_constants.h" | |
| 26 | - #include "node_crypto.h" | ||
| 27 | 26 | #include "node_crypto_bio.h" | |
| 28 | - #include "node_crypto_groups.h" | ||
| 29 | 27 | #include "node_crypto_clienthello-inl.h" | |
| 30 | - #include "node_mutex.h" | ||
| 28 | + #include "node_crypto_groups.h" | ||
| 29 | + #include "node_errors.h" | ||
| 31 | 30 | #include "node_internals.h" | |
| 31 | + #include "node_mutex.h" | ||
| 32 | + #include "node_process.h" | ||
| 32 | 33 | #include "tls_wrap.h" // TLSWrap | |
| 33 | 34 | ||
| 34 | 35 | #include "async_wrap-inl.h" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | - #include "node_internals.h" | ||
| 2 | 1 | #include "node_errors.h" | |
| 2 | + #include "node_internals.h" | ||
| 3 | + #include "node_process.h" | ||
| 3 | 4 | ||
| 4 | 5 | #ifdef __APPLE__ | |
| 5 | 6 | #include <crt_externs.h> | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,11 +19,13 @@ | |||
| 19 | 19 | // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | |
| 20 | 20 | // USE OR OTHER DEALINGS IN THE SOFTWARE. | |
| 21 | 21 | ||
| 22 | + #include "node_file.h" | ||
| 22 | 23 | #include "aliased_buffer.h" | |
| 23 | 24 | #include "node_buffer.h" | |
| 24 | 25 | #include "node_internals.h" | |
| 26 | + #include "node_process.h" | ||
| 25 | 27 | #include "node_stat_watcher.h" | |
| 26 | - #include "node_file.h" | ||
| 28 | + | ||
| 27 | 29 | #include "tracing/trace_event.h" | |
| 28 | 30 | ||
| 29 | 31 | #include "req_wrap-inl.h" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,10 +123,6 @@ void RegisterSignalHandler(int signal, | |||
| 123 | 123 | bool reset_handler = false); | |
| 124 | 124 | #endif | |
| 125 | 125 | ||
| 126 | - v8::Local<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context, | ||
| 127 | - v8::Isolate* isolate, | ||
| 128 | - v8::Local<v8::Value> data); | ||
| 129 | - | ||
| 130 | 126 | std::string GetHumanReadableProcessName(); | |
| 131 | 127 | void GetHumanReadableProcessName(char (*name)[1024]); | |
| 132 | 128 | ||
@@ -180,16 +176,6 @@ namespace task_queue { | |||
| 180 | 176 | void PromiseRejectCallback(v8::PromiseRejectMessage message); | |
| 181 | 177 | } // namespace task_queue | |
| 182 | 178 | ||
| 183 | - v8::Maybe<bool> ProcessEmitWarning(Environment* env, const char* fmt, ...); | ||
| 184 | - v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env, | ||
| 185 | - const char* warning, | ||
| 186 | - const char* deprecation_code); | ||
| 187 | - | ||
| 188 | - v8::Local<v8::Object> CreateProcessObject( | ||
| 189 | - Environment* env, | ||
| 190 | - const std::vector<std::string>& args, | ||
| 191 | - const std::vector<std::string>& exec_args); | ||
| 192 | - | ||
| 193 | 179 | enum Endianness { | |
| 194 | 180 | kLittleEndian, // _Not_ LITTLE_ENDIAN, clashes with endian.h. | |
| 195 | 181 | kBigEndian | |
@@ -371,23 +357,6 @@ void DisposePlatform(); | |||
| 371 | 357 | ||
| 372 | 358 | // Functions defined in node.cc that are exposed via the bootstrapper object | |
| 373 | 359 | ||
| 374 | - void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args); | ||
| 375 | - | ||
| 376 | - void DebugPortGetter(v8::Local<v8::Name> property, | ||
| 377 | - const v8::PropertyCallbackInfo<v8::Value>& info); | ||
| 378 | - void DebugPortSetter(v8::Local<v8::Name> property, | ||
| 379 | - v8::Local<v8::Value> value, | ||
| 380 | - const v8::PropertyCallbackInfo<void>& info); | ||
| 381 | - | ||
| 382 | - void GetParentProcessId(v8::Local<v8::Name> property, | ||
| 383 | - const v8::PropertyCallbackInfo<v8::Value>& info); | ||
| 384 | - | ||
| 385 | - void ProcessTitleGetter(v8::Local<v8::Name> property, | ||
| 386 | - const v8::PropertyCallbackInfo<v8::Value>& info); | ||
| 387 | - void ProcessTitleSetter(v8::Local<v8::Name> property, | ||
| 388 | - v8::Local<v8::Value> value, | ||
| 389 | - const v8::PropertyCallbackInfo<void>& info); | ||
| 390 | - | ||
| 391 | 360 | #if defined(__POSIX__) && !defined(__ANDROID__) && !defined(__CloudABI__) | |
| 392 | 361 | #define NODE_IMPLEMENTS_POSIX_CREDENTIALS 1 | |
| 393 | 362 | #endif // __POSIX__ && !defined(__ANDROID__) && !defined(__CloudABI__) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,12 +1,13 @@ | |||
| 1 | - #include "debug_utils.h" | ||
| 2 | 1 | #include "node_messaging.h" | |
| 3 | - #include "node_internals.h" | ||
| 2 | + #include "async_wrap-inl.h" | ||
| 3 | + #include "async_wrap.h" | ||
| 4 | + #include "debug_utils.h" | ||
| 4 | 5 | #include "node_buffer.h" | |
| 5 | 6 | #include "node_errors.h" | |
| 6 | - #include "util.h" | ||
| 7 | + #include "node_internals.h" | ||
| 8 | + #include "node_process.h" | ||
| 7 | 9 | #include "util-inl.h" | |
| 8 | - #include "async_wrap.h" | ||
| 9 | - #include "async_wrap-inl.h" | ||
| 10 | + #include "util.h" | ||
| 10 | 11 | ||
| 11 | 12 | using v8::Array; | |
| 12 | 13 | using v8::ArrayBuffer; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,32 @@ | |||
| 1 | + #ifndef SRC_NODE_PROCESS_H_ | ||
| 2 | + #define SRC_NODE_PROCESS_H_ | ||
| 3 | + | ||
| 4 | + #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | ||
| 5 | + | ||
| 6 | + #include "v8.h" | ||
| 7 | + | ||
| 8 | + namespace node { | ||
| 9 | + | ||
| 10 | + v8::Local<v8::Object> CreateEnvVarProxy(v8::Local<v8::Context> context, | ||
| 11 | + v8::Isolate* isolate, | ||
| 12 | + v8::Local<v8::Value> data); | ||
| 13 | + | ||
| 14 | + // Most of the time, it's best to use `console.error` to write | ||
| 15 | + // to the process.stderr stream. However, in some cases, such as | ||
| 16 | + // when debugging the stream.Writable class or the process.nextTick | ||
| 17 | + // function, it is useful to bypass JavaScript entirely. | ||
| 18 | + void RawDebug(const v8::FunctionCallbackInfo<v8::Value>& args); | ||
| 19 | + | ||
| 20 | + v8::Maybe<bool> ProcessEmitWarning(Environment* env, const char* fmt, ...); | ||
| 21 | + v8::Maybe<bool> ProcessEmitDeprecationWarning(Environment* env, | ||
| 22 | + const char* warning, | ||
| 23 | + const char* deprecation_code); | ||
| 24 | + | ||
| 25 | + v8::Local<v8::Object> CreateProcessObject( | ||
| 26 | + Environment* env, | ||
| 27 | + const std::vector<std::string>& args, | ||
| 28 | + const std::vector<std::string>& exec_args); | ||
| 29 | + | ||
| 30 | + } // namespace node | ||
| 31 | + #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS | ||
| 32 | + #endif // SRC_NODE_PROCESS_H_ | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments