Skip to content
Permalink
Browse files
REGRESSION (r166853): fast/preloader/document-write.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=130942

Reviewed by Anders Carlsson.

Source/WebCore:
* style/StyleResolveTree.cpp:
(WebCore::Style::suspendMemoryCacheClientCalls): Use a RefPtr to the main
frame as a weak pointer to a Page that will work unless the page is destroyed.
The old code tried to do it with a RefPtr to a document, but as the FIXME
points out, that won't work if the document is disassociated with its frame.

LayoutTests:
* platform/mac/TestExpectations: Turned the test back on.

Canonical link: https://commits.webkit.org/150825@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168580 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
darinadler committed May 10, 2014
1 parent 1393f06 commit 8841d184fb8c10122c96f027973126165d054f77
Showing 4 changed files with 26 additions and 7 deletions.
@@ -1,3 +1,12 @@
2014-05-10 Darin Adler <darin@apple.com>

REGRESSION (r166853): fast/preloader/document-write.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=130942

Reviewed by Anders Carlsson.

* platform/mac/TestExpectations: Turned the test back on.

2014-05-09 Dean Jackson <dino@apple.com>

-webkit-filter prevents rendering at retina scale
@@ -1352,8 +1352,6 @@ webkit.org/b/130971 media/track/track-remove-track.html [ Pass Crash Failure ]

webkit.org/b/130972 transitions/3d/interrupted-transition.html [ Pass Failure Timeout ]

webkit.org/b/130942 fast/preloader/document-write.html [ Pass Failure ]

webkit.org/b/118153 compositing/repaint/positioned-movement.html [ Pass Failure ]

webkit.org/b/131715 transitions/cancel-transition.html [ Pass Failure ]
@@ -1,3 +1,16 @@
2014-05-10 Darin Adler <darin@apple.com>

REGRESSION (r166853): fast/preloader/document-write.html is very flaky
https://bugs.webkit.org/show_bug.cgi?id=130942

Reviewed by Anders Carlsson.

* style/StyleResolveTree.cpp:
(WebCore::Style::suspendMemoryCacheClientCalls): Use a RefPtr to the main
frame as a weak pointer to a Page that will work unless the page is destroyed.
The old code tried to do it with a RefPtr to a document, but as the FIXME
points out, that won't work if the document is disassociated with its frame.

2014-05-10 Anders Carlsson <andersca@apple.com>

Block exceptions when trying to convert attributed strings to RTF and RTFD
@@ -34,6 +34,7 @@
#include "FlowThreadController.h"
#include "InsertionPoint.h"
#include "LoaderStrategy.h"
#include "MainFrame.h"
#include "NodeRenderStyle.h"
#include "NodeRenderingTraversal.h"
#include "NodeTraversal.h"
@@ -987,11 +988,9 @@ static void suspendMemoryCacheClientCalls(Document& document)

page->setMemoryCacheClientCallsEnabled(false);

RefPtr<Document> protectedDocument = &document;
postResolutionCallbackQueue().append([protectedDocument]{
// FIXME: If the document becomes unassociated with the page during style resolution
// then this won't work and the memory cache client calls will be permanently disabled.
if (Page* page = protectedDocument->page())
RefPtr<MainFrame> protectedMainFrame = &page->mainFrame();
postResolutionCallbackQueue().append([protectedMainFrame]{
if (Page* page = protectedMainFrame->page())
page->setMemoryCacheClientCallsEnabled(true);
});
}

0 comments on commit 8841d18

Please sign in to comment.