Title: [119276] trunk
- Revision
- 119276
- Author
- [email protected]
- Date
- 2012-06-01 13:23:53 -0700 (Fri, 01 Jun 2012)
Log Message
Improve synchronous XHR disabling
https://bugs.webkit.org/show_bug.cgi?id=88032
Reviewed by Alexey Proskuryakov.
Source/WebCore:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setSyncXHRInDocumentsEnabled): Fix a
copy-and-paste error
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::open): Improves the disabled message, as
suggested in a comment after r118599 was put in the commit queue.
LayoutTests:
Update with new error message.
* fast/xmlhttprequest/xmlhttprequest-sync-disabled-expected.txt:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (119275 => 119276)
--- trunk/LayoutTests/ChangeLog 2012-06-01 20:22:27 UTC (rev 119275)
+++ trunk/LayoutTests/ChangeLog 2012-06-01 20:23:53 UTC (rev 119276)
@@ -1,3 +1,14 @@
+2012-06-01 Mihai Parparita <[email protected]>
+
+ Improve synchronous XHR disabling
+ https://bugs.webkit.org/show_bug.cgi?id=88032
+
+ Reviewed by Alexey Proskuryakov.
+
+ Update with new error message.
+
+ * fast/xmlhttprequest/xmlhttprequest-sync-disabled-expected.txt:
+
2012-06-01 Beth Dakin <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=87774
Modified: trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-sync-disabled-expected.txt (119275 => 119276)
--- trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-sync-disabled-expected.txt 2012-06-01 20:22:27 UTC (rev 119275)
+++ trunk/LayoutTests/fast/xmlhttprequest/xmlhttprequest-sync-disabled-expected.txt 2012-06-01 20:23:53 UTC (rev 119276)
@@ -1,4 +1,4 @@
-CONSOLE MESSAGE: Synchronous XMLHttpRequests cannot be made in the current window context.
+CONSOLE MESSAGE: Synchronous XMLHttpRequests are disabled for this page.
This tests that synchronous XMLHttpRequests fail when they are disabled for documents.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Modified: trunk/Source/WebCore/ChangeLog (119275 => 119276)
--- trunk/Source/WebCore/ChangeLog 2012-06-01 20:22:27 UTC (rev 119275)
+++ trunk/Source/WebCore/ChangeLog 2012-06-01 20:23:53 UTC (rev 119276)
@@ -1,3 +1,17 @@
+2012-06-01 Mihai Parparita <[email protected]>
+
+ Improve synchronous XHR disabling
+ https://bugs.webkit.org/show_bug.cgi?id=88032
+
+ Reviewed by Alexey Proskuryakov.
+
+ * testing/InternalSettings.cpp:
+ (WebCore::InternalSettings::setSyncXHRInDocumentsEnabled): Fix a
+ copy-and-paste error
+ * xml/XMLHttpRequest.cpp:
+ (WebCore::XMLHttpRequest::open): Improves the disabled message, as
+ suggested in a comment after r118599 was put in the commit queue.
+
2012-06-01 Beth Dakin <[email protected]>
https://bugs.webkit.org/show_bug.cgi?id=87774
Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (119275 => 119276)
--- trunk/Source/WebCore/testing/InternalSettings.cpp 2012-06-01 20:22:27 UTC (rev 119275)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp 2012-06-01 20:23:53 UTC (rev 119276)
@@ -371,10 +371,10 @@
settings()->setFixedPositionCreatesStackingContext(creates);
}
-void InternalSettings::setSyncXHRInDocumentsEnabled(bool creates, ExceptionCode& ec)
+void InternalSettings::setSyncXHRInDocumentsEnabled(bool enabled, ExceptionCode& ec)
{
- InternalSettingsGuardForFrameView();
- settings()->setSyncXHRInDocumentsEnabled(creates);
+ InternalSettingsGuardForSettings();
+ settings()->setSyncXHRInDocumentsEnabled(enabled);
}
void InternalSettings::setJavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec)
Modified: trunk/Source/WebCore/xml/XMLHttpRequest.cpp (119275 => 119276)
--- trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2012-06-01 20:22:27 UTC (rev 119275)
+++ trunk/Source/WebCore/xml/XMLHttpRequest.cpp 2012-06-01 20:23:53 UTC (rev 119276)
@@ -486,7 +486,7 @@
if (!async && scriptExecutionContext()->isDocument()) {
if (!document()->settings()->syncXHRInDocumentsEnabled()) {
- logConsoleError(scriptExecutionContext(), "Synchronous XMLHttpRequests cannot be made in the current window context.");
+ logConsoleError(scriptExecutionContext(), "Synchronous XMLHttpRequests are disabled for this page.");
ec = INVALID_ACCESS_ERR;
return;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes