Title: [257787] branches/safari-610.1.6-branch
- Revision
- 257787
- Author
- alanc...@apple.com
- Date
- 2020-03-03 11:10:18 -0800 (Tue, 03 Mar 2020)
Log Message
Cherry-pick r257694. rdar://problem/59957329
Unreviewed, rolling out r257618.
This allegedly causes Safari to crash when closing a window
(see rdar://problem/59922725).
Reverted changeset:
"UIProcess crash after using _prepareForMoveToWindow, then
deallocating the WKWebView before moving to the window"
https://bugs.webkit.org/show_bug.cgi?id=208365
https://trac.webkit.org/changeset/257618
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-610.1.6-branch/Source/WebKit/ChangeLog (257786 => 257787)
--- branches/safari-610.1.6-branch/Source/WebKit/ChangeLog 2020-03-03 19:06:46 UTC (rev 257786)
+++ branches/safari-610.1.6-branch/Source/WebKit/ChangeLog 2020-03-03 19:10:18 UTC (rev 257787)
@@ -1,3 +1,35 @@
+2020-03-03 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r257694. rdar://problem/59957329
+
+ Unreviewed, rolling out r257618.
+
+ This allegedly causes Safari to crash when closing a window
+ (see rdar://problem/59922725).
+
+ Reverted changeset:
+
+ "UIProcess crash after using _prepareForMoveToWindow, then
+ deallocating the WKWebView before moving to the window"
+ https://bugs.webkit.org/show_bug.cgi?id=208365
+ https://trac.webkit.org/changeset/257618
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-03-01 Wenson Hsieh <wenson_hs...@apple.com>
+
+ Unreviewed, rolling out r257618.
+
+ This allegedly causes Safari to crash when closing a window
+ (see rdar://problem/59922725).
+
+ Reverted changeset:
+
+ "UIProcess crash after using _prepareForMoveToWindow, then
+ deallocating the WKWebView before moving to the window"
+ https://bugs.webkit.org/show_bug.cgi?id=208365
+ https://trac.webkit.org/changeset/257618
+
2020-02-28 Adrian Perez de Castro <ape...@igalia.com>
Unreviewed non-unified soures builds fix.
Modified: branches/safari-610.1.6-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (257786 => 257787)
--- branches/safari-610.1.6-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2020-03-03 19:06:46 UTC (rev 257786)
+++ branches/safari-610.1.6-branch/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2020-03-03 19:10:18 UTC (rev 257787)
@@ -201,7 +201,6 @@
WebKit::WebViewImpl *_impl;
BOOL _didRegisterForLookupPopoverCloseNotifications;
- __weak NSWindow *_observingWindow;
}
- (instancetype)initWithView:(NSView *)view impl:(WebKit::WebViewImpl&)impl;
@@ -238,8 +237,6 @@
NSNotificationCenter *workspaceNotificationCenter = [[NSWorkspace sharedWorkspace] notificationCenter];
[workspaceNotificationCenter removeObserver:self name:NSWorkspaceActiveSpaceDidChangeNotification object:nil];
- [self setWindowToObserve:nil];
-
[super dealloc];
}
@@ -302,14 +299,6 @@
[window removeObserver:self forKeyPath:@"titlebarAppearsTransparent" context:keyValueObservingContext];
}
-- (void)setWindowToObserve:(NSWindow *)window
-{
- if (_observingWindow)
- [self stopObserving:_observingWindow];
- _observingWindow = window;
- [self startObserving:window];
-}
-
- (void)startObservingFontPanel
{
[[NSFontPanel sharedFontPanel] addObserver:self forKeyPath:@"visible" options:0 context:keyValueObservingContext];
@@ -2220,7 +2209,9 @@
clearAllEditCommands();
- [m_windowVisibilityObserver setWindowToObserve:window];
+ NSWindow *stopObservingWindow = m_targetWindowForMovePreparation ? m_targetWindowForMovePreparation : [m_view window];
+ [m_windowVisibilityObserver stopObserving:stopObservingWindow];
+ [m_windowVisibilityObserver startObserving:window];
}
void WebViewImpl::viewDidMoveToWindow()
Modified: branches/safari-610.1.6-branch/Tools/ChangeLog (257786 => 257787)
--- branches/safari-610.1.6-branch/Tools/ChangeLog 2020-03-03 19:06:46 UTC (rev 257786)
+++ branches/safari-610.1.6-branch/Tools/ChangeLog 2020-03-03 19:10:18 UTC (rev 257787)
@@ -1,3 +1,35 @@
+2020-03-03 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r257694. rdar://problem/59957329
+
+ Unreviewed, rolling out r257618.
+
+ This allegedly causes Safari to crash when closing a window
+ (see rdar://problem/59922725).
+
+ Reverted changeset:
+
+ "UIProcess crash after using _prepareForMoveToWindow, then
+ deallocating the WKWebView before moving to the window"
+ https://bugs.webkit.org/show_bug.cgi?id=208365
+ https://trac.webkit.org/changeset/257618
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@257694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-03-01 Wenson Hsieh <wenson_hs...@apple.com>
+
+ Unreviewed, rolling out r257618.
+
+ This allegedly causes Safari to crash when closing a window
+ (see rdar://problem/59922725).
+
+ Reverted changeset:
+
+ "UIProcess crash after using _prepareForMoveToWindow, then
+ deallocating the WKWebView before moving to the window"
+ https://bugs.webkit.org/show_bug.cgi?id=208365
+ https://trac.webkit.org/changeset/257618
+
2020-02-28 Aakash Jain <aakash_j...@apple.com>
EWS fails to retry build in case of kill-old-processes exception
Modified: branches/safari-610.1.6-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm (257786 => 257787)
--- branches/safari-610.1.6-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm 2020-03-03 19:06:46 UTC (rev 257786)
+++ branches/safari-610.1.6-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/PrepareForMoveToWindow.mm 2020-03-03 19:10:18 UTC (rev 257787)
@@ -76,25 +76,4 @@
TestWebKitAPI::Util::run(&isDone);
}
-TEST(WKWebView, PrepareForMoveToWindowCrashAfterNotMovingToWindow)
-{
- auto webView = adoptNS([[WKWebView alloc] init]);
- RetainPtr<NSWindow> window = adoptNS([[NSWindow alloc] initWithContentRect:[webView frame] styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]);
-
- [webView _prepareForMoveToWindow:window.get() completionHandler:^{ }];
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [webView _prepareForMoveToWindow:window.get() completionHandler:^{ }];
-
- dispatch_async(dispatch_get_main_queue(), ^{
- [window setFrame:NSMakeRect(0, 0, 10, 10) display:YES];
- isDone = true;
- });
- });
-
- webView = nil;
-
- TestWebKitAPI::Util::run(&isDone);
-}
-
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes