WebKit Bugzilla
Attachment 348696 Details for
Bug 187658
: REGRESSION: Layout Test http/tests/security/bypassing-cors-checks-for-extension-urls.html is Flaky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-187658-20180831183809.patch (text/plain), 7.00 KB, created by
youenn fablet
on 2018-08-31 18:38:11 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-08-31 18:38:11 PDT
Size:
7.00 KB
patch
obsolete
>Subversion Revision: 235563 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 6eb68cd8c3ffed65f3457f7f38d11938db22402b..6a0a2acc291b4ffcdd04126de5b1beff58b77360 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2018-08-31 Youenn Fablet <youenn@apple.com> >+ >+ REGRESSION: Layout Test http/tests/security/bypassing-cors-checks-for-extension-urls.html is Flaky >+ https://bugs.webkit.org/show_bug.cgi?id=187658 >+ <rdar://problem/42306442> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test is flaky as a previous test was setting the isRunningUserScripts state on the Page and it was never reset. >+ This patch moves this state to the topDocument so that it will be reset for every navigation. >+ Covered by existing test being no longer flaky. >+ >+ * dom/Document.h: >+ (WebCore::Document::setAsRunningUserScripts): >+ (WebCore::Document::isRunningUserScripts const): >+ * loader/DocumentThreadableLoader.cpp: >+ (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): >+ * page/Frame.cpp: >+ (WebCore::Frame::injectUserScriptImmediately): >+ * page/Page.h: >+ (WebCore::Page::setAsRunningUserScripts): Deleted. >+ (WebCore::Page::isRunningUserScripts const): Deleted. >+ * testing/Internals.cpp: >+ (WebCore::Internals::setAsRunningUserScripts): >+ > 2018-08-31 Youenn Fablet <youenn@apple.com> > > Move stats gathering out of LibWebRTCMediaEndpoint >diff --git a/Source/WebCore/dom/Document.h b/Source/WebCore/dom/Document.h >index 22769442f0c55dd28c9a387b75719a158c5a5919..daafe68dc6edaa83fa896234065a72cdd232822e 100644 >--- a/Source/WebCore/dom/Document.h >+++ b/Source/WebCore/dom/Document.h >@@ -1486,6 +1486,9 @@ public: > void updateMainArticleElementAfterLayout(); > bool hasMainArticleElement() const { return !!m_mainArticleElement; } > >+ void setAsRunningUserScripts() { m_isRunningUserScripts = true; } >+ bool isRunningUserScripts() const { return m_isRunningUserScripts; } >+ > protected: > enum ConstructionFlags { Synthesized = 1, NonRenderedPlaceholder = 1 << 1 }; > Document(Frame*, const URL&, unsigned = DefaultDocumentClass, unsigned constructionFlags = 0); >@@ -2015,6 +2018,8 @@ private: > #endif > > std::unique_ptr<UserGestureIndicator> m_temporaryUserGesture; >+ >+ bool m_isRunningUserScripts { false }; > }; > > Element* eventTargetElementForDocument(Document*); >diff --git a/Source/WebCore/loader/DocumentThreadableLoader.cpp b/Source/WebCore/loader/DocumentThreadableLoader.cpp >index 42d7ee96aaf7d9ef56f1d4cb245b34eca03392a0..373549005bf4b1e09cc90e440738d0e40095f7a2 100644 >--- a/Source/WebCore/loader/DocumentThreadableLoader.cpp >+++ b/Source/WebCore/loader/DocumentThreadableLoader.cpp >@@ -146,7 +146,7 @@ DocumentThreadableLoader::DocumentThreadableLoader(Document& document, Threadabl > if (shouldSetHTTPHeadersToKeep()) > m_options.httpHeadersToKeep = httpHeadersToKeepFromCleaning(request.httpHeaderFields()); > >- if (document.page() && document.page()->isRunningUserScripts() && SchemeRegistry::isUserExtensionScheme(request.url().protocol().toStringWithoutCopying())) { >+ if (document.topDocument().isRunningUserScripts() && SchemeRegistry::isUserExtensionScheme(request.url().protocol().toStringWithoutCopying())) { > m_options.mode = FetchOptions::Mode::NoCors; > m_options.filteringPolicy = ResponseFilteringPolicy::Disable; > } >diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp >index 2b87d607105112431b39e908602647246cb7fdd7..efe62ae3b091432ffd49da2c38ce95c4f3c33169 100644 >--- a/Source/WebCore/page/Frame.cpp >+++ b/Source/WebCore/page/Frame.cpp >@@ -749,8 +749,8 @@ void Frame::injectUserScriptImmediately(DOMWrapperWorld& world, const UserScript > return; > if (!UserContentURLPattern::matchesPatterns(document->url(), script.whitelist(), script.blacklist())) > return; >- if (m_page) >- m_page->setAsRunningUserScripts(); >+ >+ document->topDocument().setAsRunningUserScripts(); > loader().client().willInjectUserScript(world); > m_script->evaluateInWorld(ScriptSourceCode(script.source(), script.url()), world); > } >diff --git a/Source/WebCore/page/Page.h b/Source/WebCore/page/Page.h >index 8f7b127e1c404a1cea19b2cbac4afc4c60d40419..dba4f0f08271eb75b9f36b5c4d031f8e8d6f3946 100644 >--- a/Source/WebCore/page/Page.h >+++ b/Source/WebCore/page/Page.h >@@ -453,9 +453,6 @@ public: > void setResourceUsageOverlayVisible(bool); > #endif > >- void setAsRunningUserScripts() { m_isRunningUserScripts = true; } >- bool isRunningUserScripts() const { return m_isRunningUserScripts; } >- > void setDebugger(JSC::Debugger*); > JSC::Debugger* debugger() const { return m_debugger; } > >@@ -908,7 +905,6 @@ private: > std::optional<ApplicationManifest> m_applicationManifest; > #endif > >- bool m_isRunningUserScripts { false }; > bool m_shouldEnableICECandidateFilteringByDefault { true }; > }; > >diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp >index 49fc7c061f99b4b57bc7e0476e495fcebec50e80..227a38ac395ab853d2f3b9627e99dbc170d3a9c6 100644 >--- a/Source/WebCore/testing/Internals.cpp >+++ b/Source/WebCore/testing/Internals.cpp >@@ -4317,8 +4317,7 @@ void Internals::setQuickLookPassword(const String& password) > > void Internals::setAsRunningUserScripts(Document& document) > { >- if (document.page()) >- document.page()->setAsRunningUserScripts(); >+ document.topDocument().setAsRunningUserScripts(); > } > > #if ENABLE(WEBGL) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 16fdaaa0a76c7895cb54208c3adffdd86075f475..be03cf30edb933d36c681493c1a6475d0217d0bb 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2018-08-31 Youenn Fablet <youenn@apple.com> >+ >+ REGRESSION: Layout Test http/tests/security/bypassing-cors-checks-for-extension-urls.html is Flaky >+ https://bugs.webkit.org/show_bug.cgi?id=187658 >+ <rdar://problem/42306442> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/mac-wk2/TestExpectations: >+ > 2018-08-31 Youenn Fablet <youenn@apple.com> > > IDBRequest and IDBCursor should not hold strong references to JSValue >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index 8eebfdfff757c8c226aa1fc2b8f8c20c164395f2..428c0e8fe17cd575ab505cc00521d11ffd823f1f 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -834,8 +834,6 @@ webkit.org/b/183705 http/tests/workers/service/client-added-to-clients-when-rest > webkit.org/b/183705 http/tests/workers/service/client-removed-from-clients-while-in-page-cache.html [ Pass Failure ] > webkit.org/b/183705 http/tests/workers/service/serviceworkerclients-matchAll.https.html [ Pass Failure ] > >-webkit.org/b/187658 http/tests/security/bypassing-cors-checks-for-extension-urls.html [ Pass Failure ] >- > [ Mojave+ ] fast/canvas/webgl/context-update-on-display-configuration.html [ Pass ] > > # skip manual payment-request tests
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187658
: 348696