Commit 1cd90f74 authored by thakis@chromium.org's avatar thakis@chromium.org

CrOs: Remove 2 static initializers and 2 exit time destructors.

Turn on -Wexit-time-destructors for (most of) the chrome target.

BUG=101600,94925
TEST=none
TBR=stevenjb

Review URL: http://codereview.chromium.org/8547005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110954 0039d316-1c4b-4281-b951-d872f2087c98
parent 79f06c73
......@@ -32,11 +32,11 @@ const int kThrobDurationMs = 750;
// Network strength bars images.
const int kNumBarsImages = 5;
SkBitmap kBarsImagesAnimating[kNumBarsImages - 1];
SkBitmap* kBarsImagesAnimating[kNumBarsImages - 1];
// Network strength arcs images.
const int kNumArcsImages = 5;
SkBitmap kArcsImagesAnimating[kNumArcsImages - 1];
SkBitmap* kArcsImagesAnimating[kNumArcsImages - 1];
// Badge offsets. If a badge is large enough that it won't fit within the icon
// when using the right or bottom offset, it gets shifted inwards so it will.
......@@ -526,7 +526,7 @@ void NetworkMenuIcon::SetConnectingIcon(const Network* network,
double animation) {
int image_count;
BitmapType bitmap_type;
SkBitmap* images;
SkBitmap** images;
if (network->type() == TYPE_WIFI) {
image_count = kNumArcsImages - 1;
......@@ -542,11 +542,12 @@ void NetworkMenuIcon::SetConnectingIcon(const Network* network,
index = max(min(index, image_count - 1), 0);
// Lazily cache images.
if (images[index].empty()) {
if (!images[index]) {
SkBitmap source = GetBitmap(bitmap_type, index + 1);
images[index] = NetworkMenuIcon::GenerateConnectingBitmap(source);
images[index] =
new SkBitmap(NetworkMenuIcon::GenerateConnectingBitmap(source));
}
icon_->set_icon(images[index]);
icon_->set_icon(*images[index]);
}
// Sets up the icon and badges for GenerateBitmap().
......
......@@ -163,6 +163,7 @@
# TODO(joi): Move debugger-related build rules to content/
'target_name': 'debugger',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'chrome_resources.gyp:chrome_extra_resources',
'chrome_resources.gyp:chrome_resources',
......@@ -217,6 +218,7 @@
{
'target_name': 'plugin',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'chrome_resources.gyp:chrome_strings',
'../base/base.gyp:base',
......@@ -234,6 +236,7 @@
{
'target_name': 'utility',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'../base/base.gyp:base',
'../content/content.gyp:content_utility',
......@@ -259,6 +262,7 @@
# or from compiling a stub implementation.
'target_name': 'syncapi_core',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'sources': [
'browser/sync/engine/syncapi_internal.cc',
'browser/sync/engine/syncapi_internal.h',
......@@ -323,6 +327,7 @@
# Provides the API that Chrome services use to talk to sync.
'target_name': 'syncapi_service',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'sources': [
'browser/sync/api/syncable_service.cc',
'browser/sync/api/syncable_service.h',
......@@ -356,6 +361,7 @@
{
'target_name': 'sync',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'sources': [
'browser/sync/engine/all_status.cc',
'browser/sync/engine/all_status.h',
......@@ -554,6 +560,7 @@
{
'target_name': 'sync_notifier',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'sources': [
'browser/sync/notifier/cache_invalidation_packet_handler.cc',
'browser/sync/notifier/cache_invalidation_packet_handler.h',
......@@ -597,6 +604,7 @@
{
'target_name': 'service',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'chrome_resources.gyp:chrome_strings',
'common',
......@@ -687,6 +695,7 @@
{
'target_name': 'ipclist',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'test_support_common',
'../skia/skia.gyp:skia',
......@@ -705,6 +714,7 @@
{
'target_name': 'helper_app',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'product_name': '<(mac_product_name) Helper',
'mac_bundle': 1,
'dependencies': [
......@@ -820,6 +830,7 @@
# itself is responsible for producing bundles.
'target_name': 'app_mode_app',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'product_name': '<(mac_product_name) App Mode Loader',
'sources': [
'app/app_mode_loader_mac.mm',
......@@ -868,6 +879,7 @@
# build without actually linking to the resulting library.
'target_name': 'interpose_dependency_shim',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'plugin_carbon_interpose',
],
......@@ -891,6 +903,7 @@
# dylib for interposing Carbon calls in the plugin process.
'target_name': 'plugin_carbon_interpose',
'type': 'shared_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'chrome_dll',
],
......@@ -930,6 +943,7 @@
{
'target_name': 'infoplist_strings_tool',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'chrome_resources.gyp:chrome_strings',
'../base/base.gyp:base',
......@@ -948,6 +962,7 @@
{
'target_name': 'convert_dict',
'type': 'executable',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
......@@ -962,6 +977,7 @@
'target_name': 'convert_dict_lib',
'product_name': 'convert_dict',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'include_dirs': [
'..',
],
......
......@@ -7,6 +7,7 @@
{
'target_name': 'browser',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'app/policy/cloud_policy_codegen.gyp:policy',
'autofill_regexes',
......
......@@ -9,6 +9,9 @@
'type': 'static_library',
'variables': {
'chrome_common_target': 1,
# TODO(thakis): Turn this on. Blocked on g_log_function_mapping in
# ipc_message_macros.h. http://crbug.com/101600
#'enable_wexit_time_destructors': 1,
},
'include_dirs': [
'..',
......
......@@ -7,6 +7,7 @@
'targets': [
{
'variables': {
'enable_wexit_time_destructors': 1,
'conditions' : [
['OS=="win" and optimize_with_syzygy==1', {
# On Windows we use build chrome_dll as an intermediate target
......
......@@ -10,6 +10,7 @@
'mac_bundle': 1,
'variables': {
'use_system_xdg_utils%': 0,
'enable_wexit_time_destructors': 1,
},
'sources': [
'app/breakpad_win.cc',
......
......@@ -7,6 +7,7 @@
{
'target_name': 'renderer',
'type': 'static_library',
'variables': { 'enable_wexit_time_destructors': 1, },
'dependencies': [
'common',
'common_net',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment