Diff
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog (276699 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog 2021-04-28 09:32:22 UTC (rev 276699)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/ChangeLog 2021-04-28 09:32:34 UTC (rev 276700)
@@ -1,3 +1,20 @@
+2021-04-13 Ross Kirsling <[email protected]>
+
+ Move cloneUBreakIterator declaration to IntlWorkaround.h
+ https://bugs.webkit.org/show_bug.cgi?id=224511
+
+ Reviewed by Yusuke Suzuki.
+
+ Follow up to r275856. There's ultimately no reason IntlWorkaround.cpp needs to be headerless;
+ this was tied to some confusion about how to successfully include ubrk.h in two different ways.
+
+ * _javascript_Core.xcodeproj/project.pbxproj:
+ * runtime/IntlSegmenter.cpp:
+ * runtime/IntlSegmenter.h:
+ * runtime/IntlSegments.cpp:
+ * runtime/IntlWorkaround.cpp:
+ * runtime/IntlWorkaround.h: Added.
+
2021-04-12 Ross Kirsling <[email protected]>
ICU 69 deprecates ubrk_safeClone in favor of ubrk_clone
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (276699 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2021-04-28 09:32:22 UTC (rev 276699)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj 2021-04-28 09:32:34 UTC (rev 276700)
@@ -1401,6 +1401,7 @@
A1D792FD1B43864B004516F5 /* IntlNumberFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A1D792F71B43864B004516F5 /* IntlNumberFormat.h */; };
A1D792FF1B43864B004516F5 /* IntlNumberFormatConstructor.h in Headers */ = {isa = PBXBuildFile; fileRef = A1D792F91B43864B004516F5 /* IntlNumberFormatConstructor.h */; };
A1D793011B43864B004516F5 /* IntlNumberFormatPrototype.h in Headers */ = {isa = PBXBuildFile; fileRef = A1D792FB1B43864B004516F5 /* IntlNumberFormatPrototype.h */; };
+ A321AA6D2626359B0023ADA2 /* IntlWorkaround.h in Headers */ = {isa = PBXBuildFile; fileRef = A321AA6C2626359B0023ADA2 /* IntlWorkaround.h */; };
A38D250E25800D440042BFDD /* JSArrayBufferPrototypeInlines.h in Headers */ = {isa = PBXBuildFile; fileRef = A38D250D25800D430042BFDD /* JSArrayBufferPrototypeInlines.h */; };
A3EE8543262514B000FC9B8D /* IntlWorkaround.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A37619402625127C00CBCBA9 /* IntlWorkaround.cpp */; };
A3FF9BC72234749100B1A9AB /* YarrFlags.h in Headers */ = {isa = PBXBuildFile; fileRef = A3FF9BC52234746600B1A9AB /* YarrFlags.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -4415,6 +4416,7 @@
A1E0451B1C25B4B100BB663C /* StringPrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = StringPrototype.js; sourceTree = "<group>"; };
A1FE1EB01C2C537E00A289FF /* DatePrototype.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = DatePrototype.js; sourceTree = "<group>"; };
A27958D7FA1142B0AC9E364D /* WasmContextInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WasmContextInlines.h; sourceTree = "<group>"; };
+ A321AA6C2626359B0023ADA2 /* IntlWorkaround.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlWorkaround.h; sourceTree = "<group>"; };
A37619402625127C00CBCBA9 /* IntlWorkaround.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IntlWorkaround.cpp; sourceTree = "<group>"; };
A38D250D25800D430042BFDD /* JSArrayBufferPrototypeInlines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSArrayBufferPrototypeInlines.h; sourceTree = "<group>"; };
A3AFF92B245A3CF900C9BA3B /* IntlLocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntlLocale.h; sourceTree = "<group>"; };
@@ -7466,6 +7468,7 @@
E3F2193224C7882A003AE453 /* IntlSegmentsPrototype.cpp */,
E3F2193624C7882B003AE453 /* IntlSegmentsPrototype.h */,
A37619402625127C00CBCBA9 /* IntlWorkaround.cpp */,
+ A321AA6C2626359B0023ADA2 /* IntlWorkaround.h */,
0F275F2C1ECE079600620D47 /* Intrinsic.cpp */,
86BF642A148DB2B5004DE36A /* Intrinsic.h */,
8B9F6D551D5912FA001C739F /* IterationKind.h */,
@@ -9982,6 +9985,7 @@
E3F2193824C78831003AE453 /* IntlSegmentIteratorPrototype.h in Headers */,
E3F2193924C78834003AE453 /* IntlSegments.h in Headers */,
E3F2193A24C78836003AE453 /* IntlSegmentsPrototype.h in Headers */,
+ A321AA6D2626359B0023ADA2 /* IntlWorkaround.h in Headers */,
860BD801148EA6F200112B2F /* Intrinsic.h in Headers */,
534E03541E53BD2900213F64 /* IntrinsicGetterAccessCase.h in Headers */,
0FDCE1321FB11DA4006F3901 /* IsoAlignedMemoryAllocator.h in Headers */,
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegmenter.cpp (276699 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegmenter.cpp 2021-04-28 09:32:22 UTC (rev 276699)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegmenter.cpp 2021-04-28 09:32:34 UTC (rev 276700)
@@ -28,6 +28,7 @@
#include "IntlObjectInlines.h"
#include "IntlSegments.h"
+#include "IntlWorkaround.h"
#include "JSCInlines.h"
#include "ObjectConstructor.h"
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegmenter.h (276699 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegmenter.h 2021-04-28 09:32:22 UTC (rev 276699)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegmenter.h 2021-04-28 09:32:34 UTC (rev 276700)
@@ -75,8 +75,4 @@
Granularity m_granularity { Granularity::Grapheme };
};
-// Abstraction to call ubrk_safeClone or ubrk_clone depending on ICU version.
-// This is implemented in IntlWorkaround.cpp in order to confine draft API visibility.
-UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
-
} // namespace JSC
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegments.cpp (276699 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegments.cpp 2021-04-28 09:32:22 UTC (rev 276699)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlSegments.cpp 2021-04-28 09:32:34 UTC (rev 276700)
@@ -29,6 +29,7 @@
#include "IntlObjectInlines.h"
#include "IntlSegmentIterator.h"
+#include "IntlWorkaround.h"
#include "JSCInlines.h"
#include "ObjectConstructor.h"
#include <unicode/ucurr.h>
Modified: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.cpp (276699 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.cpp 2021-04-28 09:32:22 UTC (rev 276699)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.cpp 2021-04-28 09:32:34 UTC (rev 276700)
@@ -24,23 +24,20 @@
*/
#include "config.h"
+#include "IntlWorkaround.h"
-#include <unicode/uvernum.h>
-
// ICU 69 introduces draft API ubrk_clone and deprecates ubrk_safeClone.
-#if U_ICU_VERSION_MAJOR_NUM >= 69
-#define HAVE_ICU_UBRK_CLONE 1
-#endif
-
#if defined(U_HIDE_DRAFT_API)
#undef U_HIDE_DRAFT_API
#endif
#include <unicode/ubrk.h>
+#if U_ICU_VERSION_MAJOR_NUM >= 69
+#define HAVE_ICU_UBRK_CLONE 1
+#endif
+
namespace JSC {
-UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
-
UBreakIterator* cloneUBreakIterator(const UBreakIterator* iterator, UErrorCode* status)
{
#if HAVE(ICU_UBRK_CLONE)
Copied: releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.h (from rev 276699, releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.cpp) (0 => 276700)
--- releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.h (rev 0)
+++ releases/WebKitGTK/webkit-2.32/Source/_javascript_Core/runtime/IntlWorkaround.h 2021-04-28 09:32:34 UTC (rev 276700)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2021 Sony Interactive Entertainment Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <unicode/utypes.h>
+
+struct UBreakIterator;
+
+namespace JSC {
+
+UBreakIterator* cloneUBreakIterator(const UBreakIterator*, UErrorCode*);
+
+} // namespace JSC