Skip to content

Commit

Permalink
Build fix for watchOS and tvOS.
Browse files Browse the repository at this point in the history
Unreviewed build fix.

* Source/WebKit/WebProcess/Extensions/Bindings/Cocoa/JSWebExtensionWrapperCocoa.mm:
Guard JSValue category by JSC_OBJC_API_ENABLED.
* Source/WebKit/WebProcess/Extensions/Bindings/JSWebExtensionWrapper.h:
Moved JSValue category outside ENABLE(WK_WEB_EXTENSIONS).

Canonical link: https://commits.webkit.org/273979@main
  • Loading branch information
xeenon committed Feb 2, 2024
1 parent 78cb9d9 commit d6da4ee
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,12 @@ JSValueRef deserializeJSONString(JSContextRef context, NSString *jsonString)

} // namespace WebKit

#endif // ENABLE(WK_WEB_EXTENSIONS)

using namespace WebKit;

#if JSC_OBJC_API_ENABLED

@implementation JSValue (WebKitExtras)

- (NSString *)_toJSONString
Expand Down Expand Up @@ -413,4 +417,4 @@ - (void)_awaitThenableResolutionWithCompletionHandler:(void (^)(JSValue *result,

@end

#endif // ENABLE(WK_WEB_EXTENSIONS)
#endif // JSC_OBJC_API_ENABLED
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,16 @@

#pragma once

#if ENABLE(WK_WEB_EXTENSIONS)

#include "Logging.h"
#include "WebFrame.h"
#include "WebPage.h"
#include <JavaScriptCore/JSRetainPtr.h>
#include <JavaScriptCore/JavaScriptCore.h>
#include <wtf/WeakPtr.h>

OBJC_CLASS JSValue;
OBJC_CLASS NSString;

#ifdef __OBJC__
#if JSC_OBJC_API_ENABLED && defined(__OBJC__)

@interface JSValue (WebKitExtras)
- (NSString *)_toJSONString;
Expand All @@ -51,7 +48,9 @@ OBJC_CLASS NSString;
- (void)_awaitThenableResolutionWithCompletionHandler:(void (^)(JSValue *result, JSValue *error))completionHandler;
@end

#endif // __OBJC__
#endif // JSC_OBJC_API_ENABLED && defined(__OBJC__)

#if ENABLE(WK_WEB_EXTENSIONS)

namespace WebKit {

Expand Down

0 comments on commit d6da4ee

Please sign in to comment.