build: remove dead symlink from MAS build (#24158)

* build: remove dead symlink from MAS build

* chore: new out cache

* build: fixup gn check

* Update node_main.cc

* chore: fix lint
This commit is contained in:
Samuel Attard
2020-06-16 14:19:57 -07:00
committed by GitHub
parent cf284991d8
commit 09c0ee8f87
9 changed files with 121 additions and 28 deletions

View File

@@ -22,9 +22,6 @@
#include "base/strings/string_split.h"
#include "chrome/common/chrome_paths.h"
#include "components/content_settings/core/common/content_settings_pattern.h"
#include "components/crash/core/app/crashpad.h"
#include "components/crash/core/common/crash_key.h"
#include "components/crash/core/common/crash_keys.h"
#include "content/public/common/content_switches.h"
#include "electron/buildflags/buildflags.h"
#include "extensions/common/constants.h"
@@ -33,13 +30,10 @@
#include "services/service_manager/sandbox/switches.h"
#include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
#include "shell/app/electron_content_client.h"
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/browser/api/electron_api_crash_reporter.h"
#include "shell/browser/electron_browser_client.h"
#include "shell/browser/electron_gpu_client.h"
#include "shell/browser/feature_list.h"
#include "shell/browser/relauncher.h"
#include "shell/common/crash_keys.h"
#include "shell/common/electron_paths.h"
#include "shell/common/options_switches.h"
#include "shell/renderer/electron_renderer_client.h"
@@ -64,6 +58,15 @@
#include "v8/include/v8.h"
#endif
#if !defined(MAS_BUILD)
#include "components/crash/core/app/crashpad.h" // nogncheck
#include "components/crash/core/common/crash_key.h"
#include "components/crash/core/common/crash_keys.h"
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/browser/api/electron_api_crash_reporter.h"
#include "shell/common/crash_keys.h"
#endif
namespace electron {
namespace {

View File

@@ -18,19 +18,15 @@
#include "base/strings/utf_string_conversions.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/threading/thread_task_runner_handle.h"
#include "components/crash/core/app/crashpad.h"
#include "content/public/common/content_switches.h"
#include "electron/electron_version.h"
#include "gin/array_buffer.h"
#include "gin/public/isolate_holder.h"
#include "gin/v8_initializer.h"
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/app/uv_task_runner.h"
#include "shell/browser/api/electron_api_crash_reporter.h"
#include "shell/browser/javascript_environment.h"
#include "shell/browser/node_debugger.h"
#include "shell/common/api/electron_bindings.h"
#include "shell/common/crash_keys.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_bindings.h"
#include "shell/common/node_includes.h"
@@ -43,6 +39,13 @@
#include "chrome/child/v8_crashpad_support_win.h"
#endif
#if !defined(MAS_BUILD)
#include "components/crash/core/app/crashpad.h" // nogncheck
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/browser/api/electron_api_crash_reporter.h"
#include "shell/common/crash_keys.h"
#endif
namespace {
// Initialize Node.js cli options to pass to Node.js
@@ -84,6 +87,11 @@ void SetNodeCliFlags() {
ProcessGlobalArgs(&args, nullptr, &errors, node::kDisallowedInEnvironment);
}
#if defined(MAS_BUILD)
void SetCrashKeyStub(const std::string& key, const std::string& value) {}
void ClearCrashKeyStub(const std::string& key) {}
#endif
} // namespace
namespace electron {
@@ -217,10 +225,15 @@ int NodeMain(int argc, char* argv[]) {
#endif
reporter.SetMethod("getParameters", &GetParameters);
#if defined(MAS_BUILD)
reporter.SetMethod("addExtraParameter", &SetCrashKeyStub);
reporter.SetMethod("removeExtraParameter", &ClearCrashKeyStub);
#else
reporter.SetMethod("addExtraParameter",
&electron::crash_keys::SetCrashKey);
reporter.SetMethod("removeExtraParameter",
&electron::crash_keys::ClearCrashKey);
#endif
process.Set("crashReporter", reporter);

View File

@@ -16,25 +16,28 @@
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h"
#include "chrome/common/chrome_paths.h"
#include "components/crash/core/app/crashpad.h"
#include "components/crash/core/common/crash_key.h"
#include "components/upload_list/crash_upload_list.h"
#include "components/upload_list/text_log_upload_list.h"
#include "content/public/common/content_switches.h"
#include "gin/arguments.h"
#include "gin/data_object_builder.h"
#include "services/service_manager/embedder/switches.h"
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/common/crash_keys.h"
#include "shell/common/electron_paths.h"
#include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_converters/time_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_includes.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h"
#if !defined(MAS_BUILD)
#include "chrome/browser/crash_upload_list/crash_upload_list_crashpad.h"
#include "components/crash/core/app/crashpad.h" // nogncheck
#include "components/crash/core/common/crash_key.h"
#include "shell/app/electron_crash_reporter_client.h"
#include "shell/common/crash_keys.h"
#include "third_party/crashpad/crashpad/client/crashpad_info.h" // nogncheck
#endif
#if defined(OS_LINUX)
#include "components/crash/core/app/breakpad_linux.h"
@@ -62,6 +65,14 @@ namespace api {
namespace crash_reporter {
#if defined(MAS_BUILD)
namespace {
void NoOp() {}
} // namespace
#endif
bool IsCrashReporterEnabled() {
return g_crash_reporter_initialized;
}
@@ -203,8 +214,13 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
gin_helper::Dictionary dict(context->GetIsolate(), exports);
dict.SetMethod("start", &electron::api::crash_reporter::Start);
#if defined(MAS_BUILD)
dict.SetMethod("addExtraParameter", &electron::api::crash_reporter::NoOp);
dict.SetMethod("removeExtraParameter", &electron::api::crash_reporter::NoOp);
#else
dict.SetMethod("addExtraParameter", &electron::crash_keys::SetCrashKey);
dict.SetMethod("removeExtraParameter", &electron::crash_keys::ClearCrashKey);
#endif
dict.SetMethod("getParameters", &GetParameters);
dict.SetMethod("getUploadedReports", &GetUploadedReports);
dict.SetMethod("setUploadToServer", &SetUploadToServer);

View File

@@ -169,12 +169,12 @@
#include "content/public/common/child_process_host.h"
#endif
#if defined(OS_LINUX)
#if defined(OS_LINUX) && !defined(MAS_BUILD)
#include "base/debug/leak_annotations.h"
#include "components/crash/content/browser/crash_handler_host_linux.h"
#include "components/crash/core/app/breakpad_linux.h"
#include "components/crash/core/app/crash_switches.h"
#include "components/crash/core/app/crashpad.h"
#include "components/crash/core/app/breakpad_linux.h" // nogncheck
#include "components/crash/core/app/crash_switches.h" // nogncheck
#include "components/crash/core/app/crashpad.h" // nogncheck
#endif
using content::BrowserThread;

View File

@@ -3,10 +3,13 @@
// found in the LICENSE file.
#include "base/bind.h"
#include "shell/common/crash_keys.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_includes.h"
#if !defined(MAS_BUILD)
#include "shell/common/crash_keys.h"
#endif
namespace {
v8::Local<v8::Value> GetParameters(v8::Isolate* isolate) {