Skip to content

Commit

Permalink
Fix build errors due to unused values and declarations
Browse files Browse the repository at this point in the history
Unreviewed build fixes.

* Source/JavaScriptCore/b3/B3Value.cpp: Guard B3ValueInternal::alwaysDumpConstructionSite
  with ASSERT_ENABLED, as it is used only inside assertions.
* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::cannotBeIdentPartOrEscapeStart): Mark as [[maybe_unused]].
  reached by other code.
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp: Guard
  WasmB3IRGeneratorInternal::traceExecutionIncludesConstructionSite with
  ASSERT_ENABLED, as it is used only inside assertions.
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransformer.cpp: Guard
  AES_CM_128_HMAC_SHA256_NONCE_SIZE with ASSERT_ENABLED, as it is used only
  inside assertions.
* Source/WebCore/css/parser/CSSSelectorParser.cpp: Add missing
  CSSParserIdioms.h header.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: Remove
  variable checkContextLossHandlingDelay, as it it unused in the code.
* Source/WebCore/layout/formattingContexts/table/TableLayout.cpp: Add
  missing RenderStyleInlines.h header, to solve a linker error.
* Source/WebCore/page/OpportunisticTaskScheduler.h: Add missing
  JavaScriptCore/MarkedSpace.h header inclusion.
* Source/WebCore/platform/mediastream/RealtimeMediaSourceCenter.cpp:
  Guard deviceChangeDebounceTimerInterval variable with !USE(GSTREAMER),
  as it is unused when using GStreamer for multimedia.
* Source/WebCore/svg/SVGClipPathElement.cpp: Add missing
  SVGElementInlines.h header inclusion, to solve a linker error.
* Source/WebKit/Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp:
  Guard c_defaultRefreshRate with !HAVE(DISPLAY_LINK), as it is unused
  with DisplayLink enabled.
* Source/WebKit/WebProcess/MediaStream/UserMediaPermissionRequestManager.cpp:
  Remove focusedActiveWindow, as it is not used in the code.

Canonical link: https://commits.webkit.org/271093@main
  • Loading branch information
aperezdc committed Nov 24, 2023
1 parent aa809c0 commit 5266976
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/JavaScriptCore/b3/B3Value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@

namespace JSC { namespace B3 {

#if ASSERT_ENABLED
namespace B3ValueInternal {
constexpr bool alwaysDumpConstructionSite = false;
}

#if ASSERT_ENABLED
String Value::generateCompilerConstructionSite()
{
StringPrintStream s;
Expand Down
4 changes: 2 additions & 2 deletions Source/JavaScriptCore/runtime/LiteralParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ ALWAYS_INLINE JSString* LiteralParser<CharType>::makeJSString(VM& vm, typename L
return jsString(vm, Identifier::fromString(vm, token->stringStart16, token->stringOrIdentifierLength).string());
}

static ALWAYS_INLINE bool cannotBeIdentPartOrEscapeStart(LChar)
[[maybe_unused]] static ALWAYS_INLINE bool cannotBeIdentPartOrEscapeStart(LChar)
{
RELEASE_ASSERT_NOT_REACHED();
}

static ALWAYS_INLINE bool cannotBeIdentPartOrEscapeStart(UChar)
[[maybe_unused]] static ALWAYS_INLINE bool cannotBeIdentPartOrEscapeStart(UChar)
{
RELEASE_ASSERT_NOT_REACHED();
}
Expand Down
4 changes: 3 additions & 1 deletion Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,10 @@ namespace WasmB3IRGeneratorInternal {
static constexpr bool verbose = false;
static constexpr bool verboseInlining = false;
static constexpr bool traceExecution = false;
static constexpr bool traceExecutionIncludesConstructionSite = false;
static constexpr bool traceStackValues = false;
#if ASSERT_ENABLED
static constexpr bool traceExecutionIncludesConstructionSite = false;
#endif
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@

namespace WebCore {

#if ASSERT_ENABLED
static constexpr unsigned AES_CM_128_HMAC_SHA256_NONCE_SIZE = 12;
#endif

static inline void writeUInt64(uint8_t* data, uint64_t value, uint8_t valueLength)
{
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/css/parser/CSSSelectorParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#include "config.h"
#include "CSSSelectorParser.h"

#include "CSSParserIdioms.h"
#include "CSSParserSelector.h"
#include "CSSSelector.h"
#include "CommonAtomStrings.h"
Expand Down
1 change: 0 additions & 1 deletion Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ WTF_MAKE_ISO_ALLOCATED_IMPL(WebGLRenderingContextBase);

static constexpr Seconds secondsBetweenRestoreAttempts { 1_s };
static constexpr int maxGLErrorsAllowedToConsole = 256;
static constexpr Seconds checkContextLossHandlingDelay { 3_s };
static constexpr size_t maxActiveContexts = 16;
static constexpr size_t maxActiveWorkerContexts = 4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

#include "LayoutBox.h"
#include "LayoutBoxGeometry.h"
#include "RenderStyleInlines.h"
#include "TableFormattingGeometry.h"

namespace WebCore {
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/OpportunisticTaskScheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "RunLoopObserver.h"
#include <JavaScriptCore/EdenGCActivityCallback.h>
#include <JavaScriptCore/FullGCActivityCallback.h>
#include <JavaScriptCore/MarkedSpace.h>
#include <wtf/CheckedPtr.h>
#include <wtf/MonotonicTime.h>
#include <wtf/RefCounted.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@

namespace WebCore {

#if !USE(GSTREAMER)
static const Seconds deviceChangeDebounceTimerInterval { 200_ms };
#endif

RealtimeMediaSourceCenter& RealtimeMediaSourceCenter::singleton()
{
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/svg/SVGClipPathElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "RenderSVGResourceClipper.h"
#include "RenderSVGText.h"
#include "RenderStyleInlines.h"
#include "SVGElementInlines.h"
#include "SVGNames.h"
#include "StyleResolver.h"
#include <wtf/IsoMallocInlines.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
namespace WebKit {
using namespace WebCore;

#if !HAVE(DISPLAY_LINK)
static constexpr unsigned c_defaultRefreshRate = 60000;
#endif

#if HAVE(DISPLAY_LINK)
Ref<ThreadedCompositor> ThreadedCompositor::create(Client& client, PlatformDisplayID displayID, const IntSize& viewportSize, float scaleFactor, bool flipY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
namespace WebKit {
using namespace WebCore;

static constexpr OptionSet<ActivityState> focusedActiveWindow = { ActivityState::IsFocused, ActivityState::WindowIsActive };

UserMediaPermissionRequestManager::UserMediaPermissionRequestManager(WebPage& page)
: m_page(page)
{
Expand Down

0 comments on commit 5266976

Please sign in to comment.