Title: [172219] trunk/Source/WebCore
- Revision
- 172219
- Author
- [email protected]
- Date
- 2014-08-07 11:46:43 -0700 (Thu, 07 Aug 2014)
Log Message
Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
https://bugs.webkit.org/show_bug.cgi?id=135688
<rdar://problem/17886686>
Reviewed by Maciej Stachowiak.
Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
function may not be executed and hence Gmail will not display the list of messages and
will subsequently display an error message.
When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
may still load the main resource, say if substitute data is available for it, and defer executing
tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
of pending tasks for the associated Document. This list of pending tasks is never processed when
a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
execute a SQLTransactionCallback function that was deferred.
Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
lack of _javascript_ script execution (since substitute data wasn't loaded and hence any _javascript_
script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
it's sufficient to only defer executing tasks when either there are existing pending tasks or the
active DOM objects for the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
* dom/Document.cpp:
(WebCore::Document::postTask):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (172218 => 172219)
--- trunk/Source/WebCore/ChangeLog 2014-08-07 18:23:13 UTC (rev 172218)
+++ trunk/Source/WebCore/ChangeLog 2014-08-07 18:46:43 UTC (rev 172219)
@@ -1,3 +1,32 @@
+2014-08-07 Daniel Bates <[email protected]>
+
+ Sometimes Gmail cannot load messages, particularly on refresh ("...the application ran into an unexpected error...")
+ https://bugs.webkit.org/show_bug.cgi?id=135688
+ <rdar://problem/17886686>
+
+ Reviewed by Maciej Stachowiak.
+
+ Fixes an issue where gmail.com may fail to load the list of messages. In particular, a SQLTransactionCallback
+ function may not be executed and hence Gmail will not display the list of messages and
+ will subsequently display an error message.
+
+ When a WebKit client defers loading of a page (e.g. -[WebView setDefersCallbacks:YES]), WebCore
+ may still load the main resource, say if substitute data is available for it, and defer executing
+ tasks, such as a SQLTransactionCallback function, by appending such tasks to the end of the list
+ of pending tasks for the associated Document. This list of pending tasks is never processed when
+ a client subsequently allows loading (e.g. -[WebView setDefersCallbacks:NO])). Therefore, we never
+ execute a SQLTransactionCallback function that was deferred.
+
+ Ideally WebCore would defer loading of substitute data when a WebKit client requests that loading
+ be deferred and hence a SQLTransactionCallback function would be deferred as a consequence of the
+ lack of _javascript_ script execution (since substitute data wasn't loaded and hence any _javascript_
+ script contained in the substitute data that initiates a SQL transaction isn't executed). For now,
+ it's sufficient to only defer executing tasks when either there are existing pending tasks or the
+ active DOM objects for the document are suspended (e.g. Document::suspendActiveDOMObjects() was called).
+
+ * dom/Document.cpp:
+ (WebCore::Document::postTask):
+
2014-08-07 Zalan Bujtas <[email protected]>
border-radius on html does not render properly.
Modified: trunk/Source/WebCore/dom/Document.cpp (172218 => 172219)
--- trunk/Source/WebCore/dom/Document.cpp 2014-08-07 18:23:13 UTC (rev 172218)
+++ trunk/Source/WebCore/dom/Document.cpp 2014-08-07 18:46:43 UTC (rev 172219)
@@ -4915,8 +4915,10 @@
if (!document)
return;
- Page* page = document->page();
- if ((page && page->defersLoading()) || !document->m_pendingTasks.isEmpty())
+ if (document->activeDOMObjectsAreStopped())
+ return;
+
+ if (document->activeDOMObjectsAreSuspended() || !document->m_pendingTasks.isEmpty())
document->m_pendingTasks.append(WTF::move(*task.release()));
else
task->performTask(*document);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes