Merge pull request #12101 from electron/upgrade-node-v9.7.0
Update to node v9.7.0
This commit is contained in:
commit
30405a3441
6 changed files with 27 additions and 18 deletions
|
@ -140,6 +140,11 @@ void AtomBrowserClient::RemoveProcessPreferences(int process_id) {
|
||||||
process_preferences_.erase(process_id);
|
process_preferences_.erase(process_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AtomBrowserClient::IsProcessObserved(int process_id) {
|
||||||
|
base::AutoLock auto_lock(process_preferences_lock_);
|
||||||
|
return process_preferences_.find(process_id) != process_preferences_.end();
|
||||||
|
}
|
||||||
|
|
||||||
bool AtomBrowserClient::IsRendererSandboxed(int process_id) {
|
bool AtomBrowserClient::IsRendererSandboxed(int process_id) {
|
||||||
base::AutoLock auto_lock(process_preferences_lock_);
|
base::AutoLock auto_lock(process_preferences_lock_);
|
||||||
auto it = process_preferences_.find(process_id);
|
auto it = process_preferences_.find(process_id);
|
||||||
|
@ -160,7 +165,11 @@ bool AtomBrowserClient::RendererDisablesPopups(int process_id) {
|
||||||
|
|
||||||
void AtomBrowserClient::RenderProcessWillLaunch(
|
void AtomBrowserClient::RenderProcessWillLaunch(
|
||||||
content::RenderProcessHost* host) {
|
content::RenderProcessHost* host) {
|
||||||
|
// When a render process is crashed, it might be reused.
|
||||||
int process_id = host->GetID();
|
int process_id = host->GetID();
|
||||||
|
if (IsProcessObserved(process_id))
|
||||||
|
return;
|
||||||
|
|
||||||
host->AddFilter(new printing::PrintingMessageFilter(process_id));
|
host->AddFilter(new printing::PrintingMessageFilter(process_id));
|
||||||
host->AddFilter(new TtsMessageFilter(process_id, host->GetBrowserContext()));
|
host->AddFilter(new TtsMessageFilter(process_id, host->GetBrowserContext()));
|
||||||
host->AddFilter(
|
host->AddFilter(
|
||||||
|
|
|
@ -126,6 +126,7 @@ class AtomBrowserClient : public brightray::BrowserClient,
|
||||||
};
|
};
|
||||||
void AddProcessPreferences(int process_id, ProcessPreferences prefs);
|
void AddProcessPreferences(int process_id, ProcessPreferences prefs);
|
||||||
void RemoveProcessPreferences(int process_id);
|
void RemoveProcessPreferences(int process_id);
|
||||||
|
bool IsProcessObserved(int process_id);
|
||||||
bool IsRendererSandboxed(int process_id);
|
bool IsRendererSandboxed(int process_id);
|
||||||
bool RendererUsesNativeWindowOpen(int process_id);
|
bool RendererUsesNativeWindowOpen(int process_id);
|
||||||
bool RendererDisablesPopups(int process_id);
|
bool RendererDisablesPopups(int process_id);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "atom/common/api/locker.h"
|
||||||
#include "atom/common/atom_version.h"
|
#include "atom/common/atom_version.h"
|
||||||
#include "atom/common/chrome_version.h"
|
#include "atom/common/chrome_version.h"
|
||||||
#include "atom/common/native_mate_converters/string16_converter.h"
|
#include "atom/common/native_mate_converters/string16_converter.h"
|
||||||
|
@ -98,17 +99,13 @@ void AtomBindings::OnCallNextTick(uv_async_t* handle) {
|
||||||
self->pending_next_ticks_.begin();
|
self->pending_next_ticks_.begin();
|
||||||
it != self->pending_next_ticks_.end(); ++it) {
|
it != self->pending_next_ticks_.end(); ++it) {
|
||||||
node::Environment* env = *it;
|
node::Environment* env = *it;
|
||||||
// KickNextTick, copied from node.cc:
|
mate::Locker locker(env->isolate());
|
||||||
node::Environment::AsyncCallbackScope callback_scope(env);
|
v8::Context::Scope context_scope(env->context());
|
||||||
if (callback_scope.in_makecallback())
|
node::InternalCallbackScope scope(
|
||||||
continue;
|
env,
|
||||||
node::Environment::TickInfo* tick_info = env->tick_info();
|
v8::Local<v8::Object>(),
|
||||||
if (tick_info->length() == 0)
|
{0, 0},
|
||||||
env->isolate()->RunMicrotasks();
|
node::InternalCallbackScope::kAllowEmptyResource);
|
||||||
v8::Local<v8::Object> process = env->process_object();
|
|
||||||
if (tick_info->length() == 0)
|
|
||||||
tick_info->set_index(0);
|
|
||||||
env->tick_callback_function()->Call(process, 0, nullptr).IsEmpty();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
self->pending_next_ticks_.clear();
|
self->pending_next_ticks_.clear();
|
||||||
|
|
12
common.gypi
12
common.gypi
|
@ -19,7 +19,7 @@
|
||||||
'openssl_fips': '',
|
'openssl_fips': '',
|
||||||
'openssl_no_asm': 1,
|
'openssl_no_asm': 1,
|
||||||
'use_openssl_def': 0,
|
'use_openssl_def': 0,
|
||||||
'OPENSSL_PRODUCT': 'libopenssl.a',
|
'openssl_product': 'libopenssl.a',
|
||||||
'node_release_urlbase': 'https://atom.io/download/electron',
|
'node_release_urlbase': 'https://atom.io/download/electron',
|
||||||
'node_byteorder': '<!(node <(DEPTH)/tools/get-endianness.js)',
|
'node_byteorder': '<!(node <(DEPTH)/tools/get-endianness.js)',
|
||||||
'node_target_type': 'shared_library',
|
'node_target_type': 'shared_library',
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
'uv_library': 'static_library',
|
'uv_library': 'static_library',
|
||||||
'uv_parent_path': 'vendor/node/deps/uv',
|
'uv_parent_path': 'vendor/node/deps/uv',
|
||||||
'uv_use_dtrace': 'false',
|
'uv_use_dtrace': 'false',
|
||||||
'V8_BASE': '',
|
'v8_base': '',
|
||||||
'v8_postmortem_support': 'false',
|
'v8_postmortem_support': 'false',
|
||||||
'v8_enable_i18n_support': 'false',
|
'v8_enable_i18n_support': 'false',
|
||||||
'v8_enable_inspector': '1',
|
'v8_enable_inspector': '1',
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
# Settings to compile node under Windows.
|
# Settings to compile node under Windows.
|
||||||
'target_defaults': {
|
'target_defaults': {
|
||||||
'target_conditions': [
|
'target_conditions': [
|
||||||
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node", "zlib", "nghttp2"]', {
|
['_target_name in ["libuv", "http_parser", "openssl", "openssl-cli", "cares", "node_lib", "zlib", "nghttp2"]', {
|
||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
4003, # not enough actual parameters for macro 'V'
|
4003, # not enough actual parameters for macro 'V'
|
||||||
4013, # 'free' undefined; assuming extern returning int
|
4013, # 'free' undefined; assuming extern returning int
|
||||||
|
@ -61,6 +61,7 @@
|
||||||
4055, # 'type cast' : from data pointer 'void *' to function pointer
|
4055, # 'type cast' : from data pointer 'void *' to function pointer
|
||||||
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
|
4057, # 'function' : 'volatile LONG *' differs in indirection to slightly different base types from 'unsigned long *'
|
||||||
4065, # switch statement contains 'default' but no 'case' labels
|
4065, # switch statement contains 'default' but no 'case' labels
|
||||||
|
4129, # unrecognized character escape sequence
|
||||||
4189, #
|
4189, #
|
||||||
4131, # uses old-style declarator
|
4131, # uses old-style declarator
|
||||||
4133, # incompatible types
|
4133, # incompatible types
|
||||||
|
@ -74,6 +75,7 @@
|
||||||
4232, # address of dllimport 'free' is not static, identity not guaranteed
|
4232, # address of dllimport 'free' is not static, identity not guaranteed
|
||||||
4291, # no matching operator delete found
|
4291, # no matching operator delete found
|
||||||
4295, # array is too small to include a terminating null character
|
4295, # array is too small to include a terminating null character
|
||||||
|
4309, # 'static_cast': truncation of constant value
|
||||||
4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long'
|
4311, # 'type cast': pointer truncation from 'void *const ' to 'unsigned long'
|
||||||
4389, # '==' : signed/unsigned mismatch
|
4389, # '==' : signed/unsigned mismatch
|
||||||
4456, # declaration of 'm' hides previous local declaration
|
4456, # declaration of 'm' hides previous local declaration
|
||||||
|
@ -136,7 +138,7 @@
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['_target_name=="node"', {
|
['_target_name=="node_lib"', {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(libchromiumcontent_src_dir)',
|
'<(libchromiumcontent_src_dir)',
|
||||||
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
|
'<(libchromiumcontent_src_dir)/third_party/icu/source/common',
|
||||||
|
@ -245,7 +247,7 @@
|
||||||
}], # OS=="win"
|
}], # OS=="win"
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['OS=="linux" and _toolset=="target" and _target_name in ["dump_syms", "node"]', {
|
['OS=="linux" and _toolset=="target" and _target_name in ["dump_syms", "node_lib"]', {
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['libchromiumcontent_component==0', {
|
['libchromiumcontent_component==0', {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
|
|
|
@ -245,7 +245,7 @@
|
||||||
'atom_js2c',
|
'atom_js2c',
|
||||||
'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
|
'vendor/pdf_viewer/pdf_viewer.gyp:pdf_viewer',
|
||||||
'brightray/brightray.gyp:brightray',
|
'brightray/brightray.gyp:brightray',
|
||||||
'vendor/node/node.gyp:node',
|
'vendor/node/node.gyp:node_lib',
|
||||||
],
|
],
|
||||||
'defines': [
|
'defines': [
|
||||||
# We need to access internal implementations of Node.
|
# We need to access internal implementations of Node.
|
||||||
|
|
2
vendor/node
vendored
2
vendor/node
vendored
|
@ -1 +1 @@
|
||||||
Subproject commit 3895d8f1ca32edce4c9e04b28948ddbd05c21269
|
Subproject commit 668f3cd06e0b9c24a1aa2d913f22626fff7decd2
|
Loading…
Add table
Add a link
Reference in a new issue