WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
222204
NSError returned by WebKit API should actually conform to NSSecureCoding
https://bugs.webkit.org/show_bug.cgi?id=222204
Summary
NSError returned by WebKit API should actually conform to NSSecureCoding
Alex Christensen
Reported
2021-02-19 14:49:29 PST
NSError returned by WebKit API should actually conform to NSSecureCoding
Attachments
Patch
(7.53 KB, patch)
2021-02-19 14:52 PST
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2021-02-19 14:52:37 PST
Created
attachment 421037
[details]
Patch
Alex Christensen
Comment 2
2021-02-19 14:52:40 PST
<
rdar://problem/63893583
>
Chris Dumez
Comment 3
2021-02-19 15:14:25 PST
Comment on
attachment 421037
[details]
Patch r=me.
EWS
Comment 4
2021-02-19 16:26:34 PST
Committed
r273181
: <
https://commits.webkit.org/r273181
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 421037
[details]
.
Darin Adler
Comment 5
2021-02-19 18:27:07 PST
Comment on
attachment 421037
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=421037&action=review
> Source/WebKit/UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm:80 > + return [super init];
What is the advantage of calling [super init] here rather than [self init]?
Alex Christensen
Comment 6
2021-02-22 11:02:27 PST
In this case, I think they are equivalent. I count 16 calls of [self init] and 464 calls of [super init] in WebKit.
Darin Adler
Comment 7
2021-02-22 11:04:40 PST
(In reply to Alex Christensen from
comment #6
)
> In this case, I think they are equivalent. I count 16 calls of [self init] > and 464 calls of [super init] in WebKit.
I think there are two differences: 1) Calling [super init] calls the init method in the superclass. If the class itself has an init method, it’s ignored, and if the class supports subclassing, the subclass's init method is ignored. 2) Calling [self init] is slightly faster?
Darin Adler
Comment 8
2021-02-22 11:05:09 PST
Typically we only call [super init] in implementations of init methods that do *not* want to call the init in this class.
Alex Christensen
Comment 9
2021-02-22 11:09:11 PST
The pattern I'm familiar with is this: if (!(self = [super init])) return nil; // Initialize all the things in self that are specific to this subclass return self; In this case there is nothing special to initialize in this subclass because all members are default-initialized C++ classes, so I want to return the result of [super init] without doing anything additional to self. I still think in this case the two are equivalent.
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