Skip to content

Commit

Permalink
Merge pull request #654 from emutavchi/wpe-2.22-build-fix
Browse files Browse the repository at this point in the history
Build fix for wpe-2.22
  • Loading branch information
woutermeek authored Jun 12, 2020
2 parents 4cb896a + 41259b7 commit e044951
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,6 @@ void AppendPipeline::setAppendState(AppendState newAppendState)
GST_TRACE("%s --> %s", dumpAppendState(oldAppendState), dumpAppendState(newAppendState));

bool ok = false;
bool mustCheckEndOfAppend = false;

switch (oldAppendState) {
case AppendState::NotStarted:
Expand Down Expand Up @@ -665,9 +664,6 @@ void AppendPipeline::setAppendState(AppendState newAppendState)

ASSERT(ok);

if (mustCheckEndOfAppend)
checkEndOfAppend();

if (nextAppendState != AppendState::Invalid)
setAppendState(nextAppendState);
}
Expand Down
20 changes: 4 additions & 16 deletions Source/WebKit/PlatformWPE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ list(APPEND WebProcess_SOURCES
WebProcess/EntryPoint/unix/WebProcessMain.cpp
)

if (USE_WPEWEBKIT_BACKEND_WESTEROS)
list(INSERT WebProcess_LIBRARIES 0 ${WAYLAND_EGL_LIBRARIES})
list(INSERT WebProcess_LIBRARIES 0 ${WAYLAND_LIBRARIES})
list(REMOVE_ITEM WebProcess_LIBRARIES wayland-server)
endif ()

list(APPEND NetworkProcess_SOURCES
NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp
)
Expand Down Expand Up @@ -309,20 +303,14 @@ list(APPEND WebKit_LIBRARIES
WEBKIT_BUILD_INSPECTOR_GRESOURCES(${DERIVED_SOURCES_WEBINSPECTORUI_DIR})

if (ENABLE_BREAKPAD)
list(APPEND WebProcess_INCLUDE_DIRECTORIES
list(APPEND WebKit_INCLUDE_DIRECTORIES
${BREAKPAD_INCLUDE_DIRS}
)

list(APPEND WebProcess_LIBRARIES
list(APPEND WebKit_LIBRARIES
${BREAKPAD_LIBRARIES}
)

list(APPEND NetworkProcess_INCLUDE_DIRECTORIES
${BREAKPAD_INCLUDE_DIRS}
)

list(APPEND NetworkProcess_LIBRARIES
${BREAKPAD_LIBRARIES}
list(APPEND WebKit_SOURCES
Shared/unix/BreakpadExceptionHandler.cpp
)
endif ()

Expand Down
48 changes: 48 additions & 0 deletions Source/WebKit/Shared/unix/BreakpadExceptionHandler.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* If not stated otherwise in this file or this component's license file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#if defined (USE_BREAKPAD)
#include "config.h"
#include "BreakpadExceptionHandler.h"
#include <client/linux/handler/exception_handler.h>
#include <signal.h>

namespace WebKit
{
// called by 'google_breakpad::ExceptionHandler' on every crash
static bool breakpadCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, bool succeeded)
{
(void) descriptor;
(void) context;
return succeeded;
}

void installExceptionHandler()
{
#ifdef SIGPIPE
signal (SIGPIPE, SIG_IGN);
#endif
static google_breakpad::ExceptionHandler* excHandler = NULL;
delete excHandler;
const char* BREAKPAD_MINIDUMP_DIR = "/opt/minidumps";
excHandler = new google_breakpad::ExceptionHandler(google_breakpad::MinidumpDescriptor(BREAKPAD_MINIDUMP_DIR), NULL, breakpadCallback, NULL, true, -1);
}
}
#endif

31 changes: 31 additions & 0 deletions Source/WebKit/Shared/unix/BreakpadExceptionHandler.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* If not stated otherwise in this file or this component's license file the
* following copyright and licenses apply:
*
* Copyright 2020 RDK Management
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#pragma once

#if defined (USE_BREAKPAD)
#include <WebKit/WKBase.h>

namespace WebKit {

WK_EXPORT void installExceptionHandler();

} // namespace WebKit

#endif // defined (USE_BREAKPAD)
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include "WebAutomationSessionMacros.h"
#include "WebPageProxy.h"

#include <wpe/wpe.h>

namespace WebKit {
using namespace WebCore;

Expand Down
1 change: 1 addition & 0 deletions Source/WebKit/webkitglib-symbols.map
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ global:
"bmalloc::vmPageSize()::cached";
"WebKit::WebKitExtensionManager::singleton()";
"WebKit::WebKitExtensionManager::initialize(WebKit::InjectedBundle*, API::Object*)";
"WebKit::installExceptionHandler()";
};
local:
*;
Expand Down
36 changes: 0 additions & 36 deletions Source/cmake/Findwesteros-egl.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions Source/cmake/OptionsWPE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ if (USE_WPEWEBKIT_BACKEND_BCM_RPI)
endif ()

if (USE_WPEWEBKIT_BACKEND_WESTEROS)
find_package(Wayland REQUIRED)
find_package(WaylandEGL REQUIRED)
find_package(westeros REQUIRED)
endif(USE_WPEWEBKIT_BACKEND_WESTEROS)

Expand Down

0 comments on commit e044951

Please sign in to comment.