RESOLVED FIXED Bug 131318
Web Replay: memoize fallback time values for document.lastModified
https://bugs.webkit.org/show_bug.cgi?id=131318
Summary Web Replay: memoize fallback time values for document.lastModified
Brian Burg
Reported 2014-04-07 15:42:58 PDT
If we can't understand or find the Last-Modified header, then document.lastModified is derived from currentTimeMS(), which is obviously nondeterministic. It's better to handle this inside Document::lastModified rather than using MemoizedDOMResult, because only the fallback case is nondeterministic.
Attachments
the patch (49.61 KB, patch)
2014-04-07 16:56 PDT, Brian Burg
no flags
the patch (49.61 KB, patch)
2014-04-07 17:01 PDT, Brian Burg
no flags
OK, this is actually it (5.38 KB, patch)
2014-04-07 17:02 PDT, Brian Burg
no flags
patch with updated TestExpectations (7.23 KB, patch)
2014-04-15 17:24 PDT, Brian Burg
no flags
Brian Burg
Comment 1 2014-04-07 16:56:38 PDT
Created attachment 228772 [details] the patch
Brian Burg
Comment 2 2014-04-07 16:57:03 PDT
Comment on attachment 228772 [details] the patch wrong patch, i hate you webkit-patch
Brian Burg
Comment 3 2014-04-07 17:01:16 PDT
(In reply to comment #2) > (From update of attachment 228772 [details]) > wrong patch, i hate you webkit-patch Reported: https://bugs.webkit.org/show_bug.cgi?id=131327
Brian Burg
Comment 4 2014-04-07 17:01:55 PDT
Created attachment 228774 [details] the patch
Brian Burg
Comment 5 2014-04-07 17:02:54 PDT
Created attachment 228775 [details] OK, this is actually it
Brian Burg
Comment 6 2014-04-07 17:06:26 PDT
Comment on attachment 228775 [details] OK, this is actually it View in context: https://bugs.webkit.org/attachment.cgi?id=228775&action=review > Source/WebCore/ChangeLog:15 > + Test: http/tests/inspector/replay/document-last-modified-fallback-value.html This test will not actually work until 130728 and 129391 are fixed. Until then, the resource could have cached values of Last-Modified and be flaky. I didn't mark anything skip because LayoutTests/inspector/ is completely skipped due to 129642.
Brian Burg
Comment 7 2014-04-07 19:08:59 PDT
BTW: this API is being addressed now, because it is used by the google analytics urchin. So, basically every page hits it once, then makes a network request with a URL based on it.
Joseph Pecoraro
Comment 8 2014-04-07 19:14:22 PDT
Comment on attachment 228775 [details] OK, this is actually it View in context: https://bugs.webkit.org/attachment.cgi?id=228775&action=review r=me > LayoutTests/http/tests/inspector/replay/document-last-modified-fallback-value.html:4 > +<script type="text/javascript" src="./replay-test.js"></script> Is the "./" really needed here?
WebKit Commit Bot
Comment 9 2014-04-14 12:45:51 PDT
Comment on attachment 228775 [details] OK, this is actually it Clearing flags on attachment: 228775 Committed r167261: <http://trac.webkit.org/changeset/167261>
WebKit Commit Bot
Comment 10 2014-04-14 12:45:54 PDT
All reviewed patches have been landed. Closing bug.
Alexey Proskuryakov
Comment 11 2014-04-14 23:20:47 PDT
This test was landed without an expected result. But more importantly, it appears that this change broke a lot of tests: http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html http/tests/misc/isindex-with-no-form.html http/tests/navigation/javascriptlink-frames.html http/tests/navigation/document-location-click.html http/tests/navigation/javascriptlink-goback.html http/tests/navigation/javascriptlink-basic.html http/tests/navigation/document-location-click-timeout.html http/tests/navigation/document-location-mouseover.html Please see <http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK2%20(Tests)/r167261%20(17688)/results.html> for results. Will roll out. Unfortunately, bots were not being looked at today, and thus didn't work well, so I have to go by data from a single tester. Apologies in advance if this was not the culprit.
WebKit Commit Bot
Comment 12 2014-04-14 23:21:52 PDT
Re-opened since this is blocked by bug 131667
Alexey Proskuryakov
Comment 13 2014-04-14 23:22:08 PDT
Comment on attachment 228775 [details] OK, this is actually it View in context: https://bugs.webkit.org/attachment.cgi?id=228775&action=review >> Source/WebCore/ChangeLog:15 >> + Test: http/tests/inspector/replay/document-last-modified-fallback-value.html > > This test will not actually work until 130728 and 129391 are fixed. Until then, the resource could have cached values of Last-Modified and be flaky. I didn't mark anything skip because LayoutTests/inspector/ is completely skipped due to 129642. Looks like this is not the case, because bots were running this test.
Brian Burg
Comment 14 2014-04-14 23:31:03 PDT
(In reply to comment #11) > This test was landed without an expected result. But more importantly, it appears that this change broke a lot of tests: > > http/tests/loading/unfinished-main-resource-back-to-cached-page-callbacks.html > http/tests/loading/unfinished-load-back-to-cached-page-callbacks.html > http/tests/misc/isindex-with-no-form.html > http/tests/navigation/javascriptlink-frames.html > http/tests/navigation/document-location-click.html > http/tests/navigation/javascriptlink-goback.html > http/tests/navigation/javascriptlink-basic.html > http/tests/navigation/document-location-click-timeout.html > http/tests/navigation/document-location-mouseover.html > > Please see <http://build.webkit.org/results/Apple%20MountainLion%20Release%20WK2%20(Tests)/r167261%20(17688)/results.html> for results. > > Will roll out. Unfortunately, bots were not being looked at today, and thus didn't work well, so I have to go by data from a single tester. Apologies in advance if this was not the culprit. Ugh, my IRC client apparently stopped working after dinner or I would have looked into it. I'll look at this tomorrow on a ML debug build.
Brian Burg
Comment 15 2014-04-15 16:40:14 PDT
After some fiddling and test runs, my hypothesis at the moment is that the new test was running even though it shouldn't have. If it encountered an error and failed to clean up/restore non-replay settings (say, leaving page cache turned off), this may mess up later tests on the same process. (It's disturbing to me that I cannot confidently say that the test harness resets obvious settings like that.) When I explicitly skip the test in TestExpectations, I can no longer reproduce the problem on my WK2-ML-debug build. So, can this be re-landed with updated test expectations? I don't think it's a productive use of time to try and enable this test right now, since it clearly depends on other replay support that hasn't landed yet.
Alexey Proskuryakov
Comment 16 2014-04-15 16:55:55 PDT
> So, can this be re-landed with updated test expectations? Seems worth trying.
Brian Burg
Comment 17 2014-04-15 17:24:31 PDT
Created attachment 229419 [details] patch with updated TestExpectations
WebKit Commit Bot
Comment 18 2014-04-16 17:57:05 PDT
Comment on attachment 229419 [details] patch with updated TestExpectations Clearing flags on attachment: 229419 Committed r167406: <http://trac.webkit.org/changeset/167406>
WebKit Commit Bot
Comment 19 2014-04-16 17:57:10 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.