Skip to content

Commit

Permalink
Fix !ENABLE(SERVICE_WORKER) build following 267251@main
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260703

Unreviewed build fix.

* Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml:
* Source/WebCore/Modules/cookie-store/CookieStoreManager.cpp:
* Source/WebCore/Modules/cookie-store/CookieStoreManager.h:
* Source/WebCore/Modules/cookie-store/CookieStoreManager.idl:
* Source/WebCore/Modules/cookie-store/ExtendableCookieChangeEvent.cpp:
* Source/WebCore/Modules/cookie-store/ExtendableCookieChangeEvent.h:
* Source/WebCore/Modules/cookie-store/ExtendableCookieChangeEvent.idl:
* Source/WebCore/Modules/cookie-store/ExtendableCookieChangeEventInit.h:
* Source/WebCore/Modules/cookie-store/ExtendableCookieChangeEventInit.idl:
* Source/WebCore/dom/EventNames.in:

Canonical link: https://commits.webkit.org/267269@main
  • Loading branch information
rkirsling committed Aug 25, 2023
1 parent 9e05696 commit f93b5aa
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 4 deletions.
1 change: 1 addition & 0 deletions Source/WTF/Scripts/Preferences/UnifiedWebPreferences.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1807,6 +1807,7 @@ CookieStoreAPIExtendedAttributesEnabled:
CookieStoreAPIServiceWorkerEnabled:
type: bool
category: dom
condition: ENABLE(SERVICE_WORKER)
status: testable
humanReadableName: "Cookie Store API for Service Workers"
humanReadableDescription: "Enable Cookie Store API for Service Workers"
Expand Down
4 changes: 4 additions & 0 deletions Source/WebCore/Modules/cookie-store/CookieStoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "config.h"
#include "CookieStoreManager.h"

#if ENABLE(SERVICE_WORKER)

#include "CookieStoreGetOptions.h"
#include "JSDOMPromiseDeferred.h"
#include <wtf/Ref.h>
Expand Down Expand Up @@ -58,3 +60,5 @@ void CookieStoreManager::unsubscribe(Vector<CookieStoreGetOptions>&&, Ref<Deferr
}

} // namespace WebCore

#endif // ENABLE(SERVICE_WORKER)
4 changes: 4 additions & 0 deletions Source/WebCore/Modules/cookie-store/CookieStoreManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#pragma once

#if ENABLE(SERVICE_WORKER)

#include <wtf/Forward.h>
#include <wtf/RefCounted.h>

Expand All @@ -47,3 +49,5 @@ class CookieStoreManager : public RefCounted<CookieStoreManager> {
};

} // namespace WebCore

#endif // ENABLE(SERVICE_WORKER)
5 changes: 3 additions & 2 deletions Source/WebCore/Modules/cookie-store/CookieStoreManager.idl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
* THE POSSIBILITY OF SUCH DAMAGE.
*/

// https://wicg.github.io/cookie-store/#cookiestoremanager
// https://wicg.github.io/cookie-store/#cookiestoremanager

[
[
Conditional=SERVICE_WORKER,
EnabledBySetting=CookieStoreAPIEnabled&CookieStoreAPIServiceWorkerEnabled,
Exposed=(ServiceWorker,Window),
SecureContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "config.h"
#include "ExtendableCookieChangeEvent.h"

#if ENABLE(SERVICE_WORKER)

#include "CookieListItem.h"
#include "ExtendableCookieChangeEventInit.h"
#include <wtf/IsoMallocInlines.h>
Expand Down Expand Up @@ -55,3 +57,5 @@ EventInterface ExtendableCookieChangeEvent::eventInterface() const
}

} // namespace WebCore

#endif // ENABLE(SERVICE_WORKER)
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#pragma once

#if ENABLE(SERVICE_WORKER)

#include "ExtendableCookieChangeEventInit.h"
#include "ExtendableEvent.h"
#include <wtf/IsoMalloc.h>
Expand Down Expand Up @@ -55,3 +57,5 @@ class ExtendableCookieChangeEvent final : public ExtendableEvent {
};

} // namespace WebCore

#endif // ENABLE(SERVICE_WORKER)
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
// https://wicg.github.io/cookie-store/#extendablecookiechangeevent

[
Conditional=SERVICE_WORKER,
EnabledBySetting=CookieStoreAPIEnabled&CookieStoreAPIServiceWorkerEnabled,
Exposed=ServiceWorker
] interface ExtendableCookieChangeEvent : ExtendableEvent {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#pragma once

#if ENABLE(SERVICE_WORKER)

#include "CookieListItem.h"
#include "ExtendableEventInit.h"
#include <wtf/Vector.h>
Expand All @@ -37,3 +39,5 @@ struct ExtendableCookieChangeEventInit : ExtendableEventInit {
};

} // namespace WebCore

#endif // ENABLE(SERVICE_WORKER)
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@

typedef sequence<CookieListItem> CookieList;

dictionary ExtendableCookieChangeEventInit : ExtendableEventInit {
[
Conditional=SERVICE_WORKER,
] dictionary ExtendableCookieChangeEventInit : ExtendableEventInit {
CookieList changed;
CookieList deleted;
};
2 changes: 1 addition & 1 deletion Source/WebCore/dom/EventNames.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ CSSAnimationEvent
CSSTransitionEvent
CustomEvent
DragEvent
ExtendableCookieChangeEvent
ExtendableCookieChangeEvent conditional=SERVICE_WORKER
ExtendableEvent conditional=SERVICE_WORKER
ExtendableMessageEvent conditional=SERVICE_WORKER
ErrorEvent
Expand Down

0 comments on commit f93b5aa

Please sign in to comment.