Bug 224511 - Move cloneUBreakIterator declaration to IntlWorkaround.h
Summary: Move cloneUBreakIterator declaration to IntlWorkaround.h
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ross Kirsling
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-13 14:41 PDT by Ross Kirsling
Modified: 2021-04-13 17:25 PDT (History)
9 users (show)

See Also:


Attachments
Patch (7.96 KB, patch)
2021-04-13 14:44 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch (9.19 KB, patch)
2021-04-13 15:59 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff
Patch for landing (9.19 KB, patch)
2021-04-13 15:59 PDT, Ross Kirsling
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Kirsling 2021-04-13 14:41:48 PDT
Move cloneUBreakIterator declaration to IntlWorkaround.h
Comment 1 Ross Kirsling 2021-04-13 14:44:46 PDT
Created attachment 425915 [details]
Patch
Comment 2 Yusuke Suzuki 2021-04-13 15:05:33 PDT
Comment on attachment 425915 [details]
Patch

r=me
Comment 3 Darin Adler 2021-04-13 15:05:47 PDT
Comment on attachment 425915 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=425915&action=review

> Source/JavaScriptCore/runtime/IntlSegmenter.h:29
> +#include "IntlWorkaround.h"

This include should be added to the two .cpp files that use it, not to a header.

Also, don’t forget to remove the declaration of cloneUBreakIterator from this header.

> Source/JavaScriptCore/runtime/IntlWorkaround.h:28
> +#include <unicode/utypes.h>

It’s possible we could use a forward declaration for this too:

    typedef enum UErrorCode UErrorCode;

But not an important optimization, so never mind.
Comment 4 Darin Adler 2021-04-13 15:26:19 PDT
Oops, bugs.webkit.org overwrite Yusuke's review flag with a darin? flag. Not intentional.
Comment 5 Ross Kirsling 2021-04-13 15:59:36 PDT Comment hidden (obsolete)
Comment 6 Ross Kirsling 2021-04-13 15:59:57 PDT
Created attachment 425926 [details]
Patch for landing
Comment 7 Ross Kirsling 2021-04-13 16:04:56 PDT
(In reply to Darin Adler from comment #3)
> > Source/JavaScriptCore/runtime/IntlWorkaround.h:28
> > +#include <unicode/utypes.h>
> 
> It’s possible we could use a forward declaration for this too:
> 
>     typedef enum UErrorCode UErrorCode;
> 
> But not an important optimization, so never mind.

Yeah, I wanted to do so, but clang gave me "error: ISO C++ forbids forward references to 'enum' types".
Comment 8 EWS 2021-04-13 17:24:57 PDT
Committed r275920 (236483@main): <https://commits.webkit.org/236483@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425926 [details].
Comment 9 Radar WebKit Bug Importer 2021-04-13 17:25:17 PDT
<rdar://problem/76618968>