| Summary: | Fix crash in Bleacher Report due to bad JSObjectRef passed to API | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Keith Miller <keith_miller> | ||||||||
| Component: | New Bugs | Assignee: | Keith Miller <keith_miller> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, ews-watchlist, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer, ysuzuki | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Keith Miller
2022-03-17 14:35:43 PDT
Created attachment 455029 [details]
Patch
Created attachment 455030 [details]
Patch
Comment on attachment 455030 [details]
Patch
r=me
Can you file a bug removing this and putting FIXME comment on this? Comment on attachment 455030 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455030&action=review > Source/JavaScriptCore/ChangeLog:11 > + short curcuiting to the non-typed array return value, 0. While technically valid /curcuiting/circuiting/ Comment on attachment 455030 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455030&action=review > Source/JavaScriptCore/ChangeLog:3 > + Fix crash in Bleecher Report due to bad JSObjectRef passed to API in various places, "Bleecher" => "Bleacher" Comment on attachment 455030 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455030&action=review > Source/JavaScriptCore/API/JSTypedArray.cpp:375 > +inline static bool isBleecherReport() > +{ > + auto bundleID = CFBundleGetIdentifier(CFBundleGetMainBundle()); > + return bundleID > + && CFEqual(bundleID, CFSTR("com.bleacherreport.TeamStream")) > + && !linkedOnOrAfter(SDKVersion::FirstWithoutBleecherReportQuirk); > +} Can we cache this result using std::once? Comment on attachment 455030 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=455030&action=review >> Source/JavaScriptCore/API/JSTypedArray.cpp:375 >> +} > > Can we cache this result using std::once? I'm fairly sure that the fact that `shouldntCrash` is static should handle that? Created attachment 455033 [details]
Patch for landing
Committed r291448 (248571@main): <https://commits.webkit.org/248571@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 455033 [details]. Comment on attachment 455033 [details] Patch for landing View in context: https://bugs.webkit.org/attachment.cgi?id=455033&action=review > Source/JavaScriptCore/API/JSTypedArray.cpp:369 > +inline static bool isBleecherReport() Typo: Bleacher, not Bleecher. > Source/WTF/wtf/cocoa/RuntimeApplicationChecksCocoa.h:89 > + FirstWithoutBleecherReportQuirk = DYLD_IOS_VERSION_16_0, Ditto. |