WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 198256
Fix opensource build of testapi
https://bugs.webkit.org/show_bug.cgi?id=198256
Summary
Fix opensource build of testapi
Tadeu Zagallo
Reported
2019-05-26 07:24:22 PDT
...
Attachments
Patch
(4.09 KB, patch)
2019-05-26 07:40 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Patch
(4.13 KB, patch)
2019-05-26 23:02 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Patch for landing
(4.14 KB, patch)
2019-05-27 14:22 PDT
,
Tadeu Zagallo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Tadeu Zagallo
Comment 1
2019-05-26 07:40:53 PDT
Created
attachment 370649
[details]
Patch
Alexey Proskuryakov
Comment 2
2019-05-26 20:43:59 PDT
Looks like this regresses TestWebKitAPI._WKDownload.DownloadMonitorCancel?
Alexey Proskuryakov
Comment 3
2019-05-26 20:44:54 PDT
Looking at the patch, it appears impossible. Must be a bad case of flakiness.
Alexey Proskuryakov
Comment 4
2019-05-26 20:54:44 PDT
Comment on
attachment 370649
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=370649&action=review
> Source/JavaScriptCore/API/JSScript.mm:87 > - createError([NSString stringWithFormat:@"Cache path `%s` does not contain in a valid directory", systemPath.utf8().data()], error); > + createError([NSString stringWithFormat:@"Cache path `%s` does not contain in a valid directory", systemPath.ascii().data()], error);
The post-commit comment was that you should use %@ instead of %s. Obviously, you cannot just use %@ as a replacement, because it expects an Objective-C object. But you cannot use ascii() either, because the path may not be all ASCII. In this case, it's probably easiest to convert systemPath to an NSString, and then format with %@. In more performance sensitive cases, we'd probably want to stick with WTF.
Tadeu Zagallo
Comment 5
2019-05-26 23:02:49 PDT
Created
attachment 370672
[details]
Patch
Tadeu Zagallo
Comment 6
2019-05-26 23:08:51 PDT
Comment on
attachment 370649
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=370649&action=review
>> Source/JavaScriptCore/API/JSScript.mm:87 >> + createError([NSString stringWithFormat:@"Cache path `%s` does not contain in a valid directory", systemPath.ascii().data()], error); > > The post-commit comment was that you should use %@ instead of %s. Obviously, you cannot just use %@ as a replacement, because it expects an Objective-C object. But you cannot use ascii() either, because the path may not be all ASCII. > > In this case, it's probably easiest to convert systemPath to an NSString, and then format with %@. In more performance sensitive cases, we'd probably want to stick with WTF.
Oh, now I see that WTF::String has a conversion operator to NSString. I've updated the patch, thanks!
Alexey Proskuryakov
Comment 7
2019-05-27 13:09:06 PDT
Comment on
attachment 370672
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=370672&action=review
> Source/JavaScriptCore/API/JSScript.mm:80 > + createError([NSString stringWithFormat:@"Cache path `%@` already exists and is not a file", static_cast<NSString*>(systemPath)], error);
Please add a space between NSString and the star, since this is an Objective-C class name.
> Source/JavaScriptCore/API/JSScript.mm:87 > + createError([NSString stringWithFormat:@"Cache path `%@` does not contain in a valid directory", static_cast<NSString*>(systemPath)], error);
Ditto.
> Source/JavaScriptCore/API/JSScript.mm:92 > + createError([NSString stringWithFormat:@"Cache directory `%@` is not a directory or does not exist", static_cast<NSString*>(directory)], error);
Ditto.
Tadeu Zagallo
Comment 8
2019-05-27 14:22:08 PDT
Created
attachment 370708
[details]
Patch for landing
WebKit Commit Bot
Comment 9
2019-05-27 14:51:46 PDT
Comment on
attachment 370708
[details]
Patch for landing Clearing flags on attachment: 370708 Committed
r245800
: <
https://trac.webkit.org/changeset/245800
>
WebKit Commit Bot
Comment 10
2019-05-27 14:51:48 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 11
2019-05-27 14:52:21 PDT
<
rdar://problem/51163764
>
Aakash Jain
Comment 12
2019-05-28 02:47:44 PDT
(In reply to Alexey Proskuryakov from
comment #3
)
> Looking at the patch, it appears impossible. Must be a bad case of flakiness.
https://bugs.webkit.org/show_bug.cgi?id=198288
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug