Collect samples for unresponsive web processes
https://bugs.webkit.org/show_bug.cgi?id=112409

Tools:

Reviewed by Tim Horton.

When we detect that a subprocess was unresponsive, run the 'sample'
tool on that process, for the Mac port.

The sample will be linked to from the results.html page, next
to the crash log link.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._look_for_new_crash_logs): Before looking for crash logs,
look for samples on disk.
* Scripts/webkitpy/layout_tests/controllers/test_result_writer.py:
(TestResultWriter):
(TestResultWriter.copy_sample_file): Teach TestResultWriter about
-sample.txt files, and have it copy their contents to a new file
next to the test that spawned them (as we do for crash logs).
* Scripts/webkitpy/layout_tests/port/base.py:
(Port.look_for_new_samples): Base class does nothing for sampling.
* Scripts/webkitpy/layout_tests/port/driver.py:
(Driver._check_for_driver_crash): Kick off a sample if we detected
that the subprocess was unresponsive.
* Scripts/webkitpy/layout_tests/port/mac.py:
(MacPort.sample_file_path): Utility to generate the file path
to the generated sample files at the top level of layout-test-results.
(MacPort.look_for_new_crash_logs): Fix typo
(MacPort.look_for_new_samples): New function to find sample files.
(MacPort.sample_process): Use the utility function to get the file path.

LayoutTests:

Reviewed by Tim Horton.

Add links for samples, which some platforms will show for unresponsive WebProcess timeouts.

* fast/harness/results.html:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145916 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IndexedDB: Handle success events arriving after context stopped
https://bugs.webkit.org/show_bug.cgi?id=112451

Reviewed by Tony Chang.

Source/WebCore:

In multiprocess ports, events from the back-end can arrive in the form of
onXXX() calls after the script execution context has stopped. These need to
be ignored. This was already done in most cases, but missing for two overloads
of IDBRequest::onSuccess() - void and int64_t.

Test: webkit_unit_test IDBRequestTest.EventsAfterStopping

* Modules/indexeddb/IDBRequest.cpp:
(WebCore::IDBRequest::onSuccess): Early return if context has stopped.
(WebCore::IDBRequest::onSuccessInternal): ASSERT() that callers have checked context.

Source/WebKit/chromium:

* tests/IDBRequestTest.cpp:
(WebKit::TEST_F): Add cases for onSuccess() and onSuccess(int64_t)


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Unreviewed build fix. Rename local variable which was colliding with class method.

* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayer::clone):

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