Allow synchronous XHRs to be disabled in documents
Created attachment 144166 [details] Patch
Please wait for approval from abarth@webkit.org, dglazkov@chromium.org, fishd@chromium.org, jamesr@chromium.org or tkent@chromium.org before submitting, as this patch contains changes to the Chromium public API. See also https://trac.webkit.org/wiki/ChromiumWebKitAPI.
Are we disabling them in extensions or something? I support this change, but I'm curious why we'd have it.
(In reply to comment #3) > Are we disabling them in extensions or something? I support this change, but I'm curious why we'd have it. Yeah, for apps. See https://chromiumcodereview.appspot.com/10443047 for the Chromium side that uses this.
Comment on attachment 144166 [details] Patch LGTM.
Comment on attachment 144166 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=144166&action=review > Source/WebCore/xml/XMLHttpRequest.cpp:489 > + logConsoleError(scriptExecutionContext(), "Synchronous XMLHttpRequests cannot be made in the current window context."); Is there a way to explain the reason to authors seeing this? The current wording is a bit misleading (cannot be made in current context, so it can be made in another? what do I do to enable them again?)
Maybe "Synchronous XMLHttpRequests are disabled for this page" ?
Comment on attachment 144166 [details] Patch Clearing flags on attachment: 144166 Committed r118599: <http://trac.webkit.org/changeset/118599>
All reviewed patches have been landed. Closing bug.
This made a lot of tests "flaky" on bots, because the setting leaks from the added test to all future ones: --- /Volumes/Data/slave/lion-intel-release-tests-wk2/build/layout-test-results/fast/xpath/4XPath/Borrowed/od_20000608-expected.txt +++ /Volumes/Data/slave/lion-intel-release-tests-wk2/build/layout-test-results/fast/xpath/4XPath/Borrowed/od_20000608-actual.txt @@ -1,6 +1,6 @@ -PASS nodeset.snapshotLength is 0 -PASS nodeset.snapshotLength is 12 -PASS successfullyParsed is true +CONSOLE MESSAGE: Synchronous XMLHttpRequests cannot be made in the current window context. +CONSOLE MESSAGE: line 67: INVALID_ACCESS_ERR: DOM Exception 15: A parameter or an operation was not supported by the underlying object. +FAIL successfullyParsed should be true (of type boolean). Was undefined (of type undefined). TEST COMPLETE
Filed bug 87783 about that.