Skip to content

Commit

Permalink
[gin] Add crash key to track whether Ignition is enabled
Browse files Browse the repository at this point in the history
BUG=v8:4868

Review-Url: https://codereview.chromium.org/2086863002
Cr-Commit-Position: refs/heads/master@{#401959}
  • Loading branch information
rmcilroy authored and Commit bot committed Jun 24, 2016
1 parent b12d602 commit 462e47e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions blimp/engine/app/blimp_engine_crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ size_t RegisterEngineCrashKeys() {
{ "subresource_url", crash_keys::kLargeSize },
{ "total-discardable-memory-allocated", crash_keys::kSmallSize },

// gin/:
{ "v8-ignition", crash_keys::kSmallSize },

// Temporary for http://crbug.com/575245.
{ "commit_frame_id", crash_keys::kSmallSize },
{ "commit_proxy_id", crash_keys::kSmallSize },
Expand Down
3 changes: 3 additions & 0 deletions chrome/common/crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ size_t RegisterChromeCrashKeys() {
#endif
{ kZeroEncodeDetails, kSmallSize },

// gin/:
{ "v8-ignition", kSmallSize },

// Temporary for http://crbug.com/575245.
{ "swapout_frame_id", kSmallSize },
{ "swapout_proxy_id", kSmallSize },
Expand Down
3 changes: 3 additions & 0 deletions chromecast/crash/cast_crash_keys.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ size_t RegisterCastCrashKeys() {
{ "subresource_url", kLargeSize },
{ "total-discardable-memory-allocated", kSmallSize },

// gin/:
{ "v8-ignition", kSmallSize },

// Copied from common/crash_keys. Remove when
// http://crbug.com/598854 is resolved.

Expand Down
6 changes: 6 additions & 0 deletions gin/v8_initializer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include <memory>

#include "base/debug/alias.h"
#include "base/debug/crash_logging.h"
#include "base/feature_list.h"
#include "base/files/file.h"
#include "base/files/file_path.h"
Expand Down Expand Up @@ -429,7 +430,9 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
v8::V8::SetFlagsFromString(flag, sizeof(flag) - 1);
}

const char* ignition_enabled_crash_key = "N";
if (ShouldUseIgnition()) {
ignition_enabled_crash_key = "Y";
std::string flag("--ignition");
v8::V8::SetFlagsFromString(flag.c_str(), static_cast<int>(flag.size()));

Expand All @@ -445,6 +448,9 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
lazy_flag.c_str(), static_cast<int>(lazy_flag.size()));
}
}
static const char kIgnitionEnabledKey[] = "v8-ignition";
base::debug::SetCrashKeyValue(kIgnitionEnabledKey,
ignition_enabled_crash_key);


#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
Expand Down

0 comments on commit 462e47e

Please sign in to comment.