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 233841
[iOS] Web content process sometimes crashes under WebPage::positionInformation()
https://bugs.webkit.org/show_bug.cgi?id=233841
Summary
[iOS] Web content process sometimes crashes under WebPage::positionInformation()
Wenson Hsieh
Reported
2021-12-03 16:05:10 PST
rdar://85917212
Attachments
Patch
(6.15 KB, patch)
2021-12-03 16:14 PST
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2021-12-03 16:14:45 PST
Created
attachment 445911
[details]
Patch
Geoffrey Garen
Comment 2
2021-12-03 16:21:05 PST
Comment on
attachment 445911
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=445911&action=review
r=me
> Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:87 > +static CGPoint gSwizzledLocationInView = CGPoint { 100, 100 }; > static CGPoint swizzledLocationInView(id, SEL, UIView *) > { > - return CGPointMake(100, 100); > + return gSwizzledLocationInView; > }
Nit: The most efficient thing to do here is "return CGPoint { 100, 100 }". On all modern hardware, that will just fill two registers with constants and return. Maybe that's the best thing to do. If we do have a specific motivation to use a constant, I'd suggest putting the static inside the function and marking it const, to reduce its scope / potential for incorrect usage.
Wenson Hsieh
Comment 3
2021-12-03 16:22:53 PST
(In reply to Geoffrey Garen from
comment #2
)
> Comment on
attachment 445911
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=445911&action=review
> > r=me > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:87 > > +static CGPoint gSwizzledLocationInView = CGPoint { 100, 100 }; > > static CGPoint swizzledLocationInView(id, SEL, UIView *) > > { > > - return CGPointMake(100, 100); > > + return gSwizzledLocationInView; > > } > > Nit: > > The most efficient thing to do here is "return CGPoint { 100, 100 }". On all > modern hardware, that will just fill two registers with constants and > return. Maybe that's the best thing to do. > > If we do have a specific motivation to use a constant, I'd suggest putting > the static inside the function and marking it const, to reduce its scope / > potential for incorrect usage.
Ah, so I pulled this out into a variable because I needed to be able to change this to another value (500, 500) for the new test below.
Geoffrey Garen
Comment 4
2021-12-03 16:26:00 PST
Comment on
attachment 445911
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=445911&action=review
>>> Tools/TestWebKitAPI/Tests/WebKitCocoa/ImageAnalysisTests.mm:87 >>> } >> >> Nit: >> >> The most efficient thing to do here is "return CGPoint { 100, 100 }". On all modern hardware, that will just fill two registers with constants and return. Maybe that's the best thing to do. >> >> If we do have a specific motivation to use a constant, I'd suggest putting the static inside the function and marking it const, to reduce its scope / potential for incorrect usage. > > Ah, so I pulled this out into a variable because I needed to be able to change this to another value (500, 500) for the new test below.
Oh, lol, I totally missed that! Seems fine as-is.
Wenson Hsieh
Comment 5
2021-12-03 17:00:16 PST
Comment on
attachment 445911
[details]
Patch Thanks for the review!
EWS
Comment 6
2021-12-03 17:36:01 PST
Committed
r286522
(
244856@main
): <
https://commits.webkit.org/244856@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 445911
[details]
.
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