GitHub PushEvent at 2014-06-04 02:22:10
Repository: blink
Actor: dstockwell
Payload: {"shas":[["4b90656dd3bb6a2a0a8f77cf2b0a679f798e5f77","76c92ef94d28285880e6d7f62852909c1d7b12b8@chromium.org","Always preload all tokens before parsing\n\nThis change is in preparation for re-writing the path\nthrough which tokens are handled on the main thread\nto allow them to be batched and deferred until more\nimportant work is done:\nhttps://codereview.chromium.org/258013009/\n\nCurrently the threaded parser uses the main thread's\nMessageQueue as its work-queue and we'll commonly\nqueue 10 chunks of work in the main thread MessageQueue\neven if the first chunk takes a long time we'll still have to\nprocess the next 9 before we can do more important things\nlike put up a frame because we don't have a separate\nqueue for parser work.  258013009 will fix that.\n\nhttp/tests/security/script-crossorigin-loads-correctly-credentials-2.html\noriginally started failing with this change and it\nturns out that always-preloading found a real bug\nin CORS handling with preloads. The ResourceFetcher\nwas incorrectly always reusing an in-flight preload\nrequest, even if the CORS state didn't match. Nate\nhelped me re-order the calls in requestResource to fix it.\n\nThis change also discovered 2 other bugs in the preloader.\n1. a preload request != LinkPrefect request\nand one will cancel the other. crbug.com/379893\n2. The preloader has no concept of script type and will\nblindly issue preloads for all <script href> regardless\nof <script type>.  I decided this didn't matter in practice.\nMaking the <script type> handling threadsafe isn't\nworth the trouble.\n\nI would anticipate that this change might make some\nspeed-index scores better (we'll now be preloading\nall tokens slightly sooner, especially those\nwhich are in the same chunk as a long inline\nscript block for instance), but may make non-network\nPLT scores lower (due to extra mallocs required\nto process every chunk since more loads will\nbe preloaded just before their actually loaded).\n\nBUG=356292\n\nReview URL: https://codereview.chromium.org/302063002\n\ngit-svn-id: svn://svn.chromium.org/blink/trunk@175427 bbb929c8-8fbe-4397-9dbb-9b2b20218538","eseidel@chromium.org",true]],"size":1,"ref":"refs/heads/master","head":"4b90656dd3bb6a2a0a8f77cf2b0a679f798e5f77"}