WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
182882
[Cocoa][WebKitLegacy] REGRESSION(
r221559
): Coda 2 crashes when switching views
https://bugs.webkit.org/show_bug.cgi?id=182882
Summary
[Cocoa][WebKitLegacy] REGRESSION(r221559): Coda 2 crashes when switching views
Brent Fulgham
Reported
2018-02-16 13:28:45 PST
The refactoring in
Bug 176280
caused WebKit to attempt to message destroyed objects in WebKitLegacy applications. A loop was moved (and rewritten) in the new implementation of (void)_web_makePluginSubviewsPerformSelector:(SEL)selector withObject:(id)object The new code access subviews, copied them, placed them in a smart pointer, then retrieved the bare pointer for use in the Objective C iteration: for (NSView *view in adoptNS([[self subviews] copy]).get()) { ... } This caused the collection being iterated over to be cleaned up during the loop, resulting in a crash.
Attachments
Patch
(1.62 KB, patch)
2018-02-16 13:32 PST
,
Brent Fulgham
mitz: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2018-02-16 13:28:56 PST
<
rdar://problem/35672661
>
Brent Fulgham
Comment 2
2018-02-16 13:32:28 PST
Created
attachment 334064
[details]
Patch
mitz
Comment 3
2018-02-16 13:52:46 PST
Comment on
attachment 334064
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=334064&action=review
> Source/WebKitLegacy/mac/WebView/WebHTMLView.mm:1430 > + auto subViewsCopy = adoptNS([self.subviews copy]);
Lowercase v.
Brent Fulgham
Comment 4
2018-02-16 13:56:18 PST
Committed
r228580
: <
https://trac.webkit.org/changeset/228580
>
Brent Fulgham
Comment 5
2018-02-16 13:57:16 PST
Comment on
attachment 334064
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=334064&action=review
>> Source/WebKitLegacy/mac/WebView/WebHTMLView.mm:1430 >> + auto subViewsCopy = adoptNS([self.subviews copy]); > > Lowercase v.
Will do! Thanks!
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