document.write during window.onload can trigger DumpRenderTree to dump the render tree
https://bugs.webkit.org/show_bug.cgi?id=109465

Reviewed by Eric Seidel.

Source/WebCore:

This patch is a partial revert of
http://trac.webkit.org/changeset/142378. It's not safe to call
checkComplete during the load event. We'll need to find another way of
calling checkComplete at the right time.

Test: fast/parser/document-write-during-load.html

* dom/Document.cpp:
(WebCore::Document::decrementActiveParserCount):

LayoutTests:

* fast/parser/document-write-during-load-expected.txt: Added.
* fast/parser/document-write-during-load.html: Added.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142492 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[WK2][Notifications] Missing early return in populateCopyOfNotificationPermissions
https://bugs.webkit.org/show_bug.cgi?id=108459

Patch by Claudio Saavedra <csaavedra@igalia.com> on 2013-02-11
Reviewed by Alexey Proskuryakov.

* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions):
Providers might return 0 and we will end up with a null-pointer dereference.
Early check against this.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@142493 268f45cc-cd09-0410-ab3c-d52691b4dbfc