MFH: r433722

www/chromium: fix segfault which prevents to load some websites.

PR:		207298

Approved by:	ports-secteam (blanket)
This commit is contained in:
Carlos J. Puga Medina 2017-02-09 11:59:06 +00:00
parent c747a5dda5
commit 835d249757
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2017Q1/; revision=433723
13 changed files with 139 additions and 6 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= chromium
PORTVERSION= 56.0.2924.87
PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} # default, but needed to get distinfo correct if TEST is on

View File

@ -0,0 +1,11 @@
--- apps/ui/views/app_window_frame_view.cc.orig 2017-02-02 02:02:46 UTC
+++ apps/ui/views/app_window_frame_view.cc
@@ -132,7 +132,7 @@ gfx::Rect AppWindowFrameView::GetBoundsF
gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const {
gfx::Rect window_bounds = client_bounds;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
// Get the difference between the widget's client area bounds and window
// bounds, and grow |window_bounds| by that amount.
gfx::Insets native_frame_insets =

View File

@ -1,11 +1,23 @@
--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2017-01-26 00:49:09 UTC
--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2017-02-02 02:02:50 UTC
+++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -95,7 +95,7 @@
#include "components/user_manager/user_manager.h"
#endif
-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
+#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_FREEBSD))
+#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD))
#include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
#endif
@@ -651,9 +651,11 @@ bool StartupBrowserCreator::ProcessCmdLi
}
#endif // OS_CHROMEOS
+#if 0 /* XXX */
#if defined(TOOLKIT_VIEWS) && defined(USE_X11)
ui::TouchFactory::SetTouchDeviceListFromCommandLine();
#endif
+#endif
#if defined(OS_MACOSX)
if (web_app::MaybeRebuildShortcut(command_line))

View File

@ -0,0 +1,29 @@
--- chrome/browser/ui/views/accelerator_table.cc.orig 2017-02-02 02:02:50 UTC
+++ chrome/browser/ui/views/accelerator_table.cc
@@ -72,7 +72,7 @@ const AcceleratorMapping kAcceleratorMap
{ ui::VKEY_S, ui::EF_CONTROL_DOWN, IDC_SAVE_PAGE },
{ ui::VKEY_9, kPlatformModifier, IDC_SELECT_LAST_TAB },
{ ui::VKEY_NUMPAD9, kPlatformModifier, IDC_SELECT_LAST_TAB },
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
{ ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
{ ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB },
{ ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT },
@@ -100,7 +100,7 @@ const AcceleratorMapping kAcceleratorMap
{ ui::VKEY_NUMPAD7, kPlatformModifier, IDC_SELECT_TAB_6 },
{ ui::VKEY_8, kPlatformModifier, IDC_SELECT_TAB_7 },
{ ui::VKEY_NUMPAD8, kPlatformModifier, IDC_SELECT_TAB_7 },
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
{ ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
{ ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0 },
{ ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1 },
@@ -149,7 +149,7 @@ const AcceleratorMapping kAcceleratorMap
{ ui::VKEY_F11, ui::EF_NONE, IDC_FULLSCREEN },
// Platform-specific key maps.
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
{ ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK },
{ ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD },
{ ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME },

View File

@ -0,0 +1,11 @@
--- chrome/browser/ui/views/app_list/linux/app_list_linux.cc.orig 2017-02-02 02:02:50 UTC
+++ chrome/browser/ui/views/app_list/linux/app_list_linux.cc
@@ -91,7 +91,7 @@ void AppListLinux::MoveNearCursor(app_li
view->SetBubbleArrow(views::BubbleBorder::FLOAT);
AppListPositioner::ScreenEdge edge;
-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
// In the Unity desktop environment, special case SCREEN_EDGE_LEFT. It is
// always on the left side in Unity, but ShelfLocationInDisplay will not
// detect this if the shelf is hidden.

View File

@ -1,11 +1,11 @@
--- content/browser/memory/memory_coordinator_impl.cc.orig 2017-01-26 00:49:13 UTC
--- content/browser/memory/memory_coordinator_impl.cc.orig 2017-02-02 02:02:53 UTC
+++ content/browser/memory/memory_coordinator_impl.cc
@@ -116,8 +116,12 @@ void RecordMetricsOnStateChange(base::Me
struct MemoryCoordinatorSingletonTraits
: public base::LeakySingletonTraits<MemoryCoordinator> {
static MemoryCoordinator* New() {
+#if defined(OS_BSD)
+ return NULL;
+ return nullptr;
+#else
return new MemoryCoordinatorImpl(base::ThreadTaskRunnerHandle::Get(),
CreateMemoryMonitor());

View File

@ -0,0 +1,11 @@
--- device/bluetooth/BUILD.gn.orig 2017-02-02 02:02:54 UTC
+++ device/bluetooth/BUILD.gn
@@ -193,7 +193,7 @@ component("bluetooth") {
]
}
- if (is_chromeos || is_linux) {
+ if (is_chromeos || (is_linux && !is_bsd)) {
if (use_dbus) {
sources += [
"bluez/bluetooth_adapter_bluez.cc",

View File

@ -0,0 +1,11 @@
--- device/gamepad/gamepad_provider.cc.orig 2017-02-02 02:02:54 UTC
+++ device/gamepad/gamepad_provider.cc
@@ -145,7 +145,7 @@ void GamepadProvider::Initialize(std::un
monitor->AddDevicesChangedObserver(this);
polling_thread_.reset(new base::Thread("Gamepad polling thread"));
-#if defined(OS_LINUX)
+#if defined(OS_LINUX) || defined(OS_BSD)
// On Linux, the data fetcher needs to watch file descriptors, so the message
// loop needs to be a libevent loop.
const base::MessageLoop::Type kMessageLoopType = base::MessageLoop::TYPE_IO;

View File

@ -0,0 +1,11 @@
--- device/media_transfer_protocol/media_transfer_protocol_daemon_client.h.orig 2017-02-02 02:02:54 UTC
+++ device/media_transfer_protocol/media_transfer_protocol_daemon_client.h
@@ -19,7 +19,7 @@
#include "base/macros.h"
#include "build/build_config.h"
-#if !defined(OS_LINUX)
+#if !defined(OS_LINUX) && !defined(OS_BSD)
#error "Only used on Linux and ChromeOS"
#endif

View File

@ -0,0 +1,11 @@
--- services/ui/public/cpp/gles2_context.cc.orig 2017-02-02 02:02:57 UTC
+++ services/ui/public/cpp/gles2_context.cc
@@ -46,7 +46,7 @@ bool GLES2Context::Initialize(
gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get();
gpu::GpuControl* gpu_control = command_buffer_proxy_impl_.get();
- constexpr gpu::SharedMemoryLimits default_limits;
+ constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits();
gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer));
if (!gles2_helper_->Initialize(default_limits.command_buffer_size))
return false;

View File

@ -0,0 +1,11 @@
--- services/ui/surfaces/surfaces_context_provider.cc.orig 2017-02-02 02:02:57 UTC
+++ services/ui/surfaces/surfaces_context_provider.cc
@@ -78,7 +78,7 @@ bool SurfacesContextProvider::BindToCurr
gpu::CommandBuffer* command_buffer = command_buffer_proxy_impl_.get();
gles2_helper_.reset(new gpu::gles2::GLES2CmdHelper(command_buffer));
- constexpr gpu::SharedMemoryLimits default_limits;
+ constexpr gpu::SharedMemoryLimits default_limits = gpu::SharedMemoryLimits();
if (!gles2_helper_->Initialize(default_limits.command_buffer_size))
return false;
gles2_helper_->SetAutomaticFlushes(false);

View File

@ -1,11 +1,11 @@
--- ui/gfx/font_fallback_linux.cc.orig 2017-01-26 00:49:31 UTC
--- ui/gfx/font_fallback_linux.cc.orig 2017-02-02 02:03:13 UTC
+++ ui/gfx/font_fallback_linux.cc
@@ -15,6 +15,10 @@
#include "base/memory/ptr_util.h"
#include "ui/gfx/font.h"
+#if defined(OS_BSD)
+# include <unistd.h>
+#include <unistd.h>
+#endif
+
namespace gfx {

View File

@ -0,0 +1,14 @@
--- v8/src/globals.h.orig 2017-02-02 02:04:00 UTC
+++ v8/src/globals.h
@@ -182,7 +182,11 @@ const size_t kCodeRangeAreaAlignment = 2
const size_t kMaximalCodeRangeSize = 512 * MB;
const size_t kCodeRangeAreaAlignment = 64 * KB; // OS page on PPC Linux
#else
+#if defined(__FreeBSD__)
+const size_t kMaximalCodeRangeSize = 256 * MB;
+#else
const size_t kMaximalCodeRangeSize = 512 * MB;
+#endif
const size_t kCodeRangeAreaAlignment = 4 * KB; // OS page.
#endif
#if V8_OS_WIN