Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Issue 902453002: Revert of Prevent calling didReceiveData()/didFinishLoading() after didFailAccessControlCheck() (Closed)

Created:
5 years, 10 months ago by Nate Chapin
Modified:
5 years, 10 months ago
CC:
gavinp+loader_chromium.org, Nate Chapin, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Revert of Prevent calling didReceiveData()/didFinishLoading() after didFailAccessControlCheck() (patchset #6 id:100001 of https://codereview.chromium.org/891263002/) Reason for revert: Broke some nacl browser_tests: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=browser_tests&tests=NaClBrowserTestStatic.CORSNoCookie%2CNaClBrowserTestStatic.CrossOriginFail%2CPnaclHeaderTest.TestHasPnaclHeader Original issue's description: > Prevent calling didReceiveData()/didFinishLoading() after didFailAccessControlCheck() > > In some cases DocumentThreadableLoader calls m_client->didReceiveData() or > didFinishLoading() after m_client->didFailAccessControlCheck(). > WorkerLoaderClientBridgeSyncHelper assumes no calls are made to > ThreadableLoaderClient after didFailAccessControlCheck(), and this mismatch > results in a race condition. > > This CL fixes this by omitting calls to didReceiveData()/didFinishLoading() > after didFailAccessControlCheck() using |m_accessControlCheckFailed| flag. > handlePreflightFailure() is called instead of didFailAccessControlCheck() to > ensure |m_accessControlCheckFailed| and |m_actualRequest| are properly managed. > > This CL also makes WorkerLoaderClientBridgeSyncHelper to ASSERT/ignore did*() > calls after any of didFail*() or didFinishLoading() is called. > This explicitly states the assumptions of WorkerLoaderClientBridgeSyncHelper, > and prevents possible race conditions as defensive programming. > > BUG=421627 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189418 TBR=tyoshino@chromium.org,kinuko@chromium.org,mkwst@chromium.org,hiroshige@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=421627 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189439

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+12 lines, -42 lines) Patch
M Source/core/loader/DocumentThreadableLoader.h View 2 chunks +1 line, -5 lines 0 comments Download
M Source/core/loader/DocumentThreadableLoader.cpp View 9 chunks +10 lines, -18 lines 0 comments Download
M Source/core/loader/WorkerLoaderClientBridgeSyncHelper.cpp View 9 chunks +0 lines, -18 lines 0 comments Download
M Source/web/tests/AssociatedURLLoaderTest.cpp View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 4 (0 generated)
Nate Chapin
Created Revert of Prevent calling didReceiveData()/didFinishLoading() after didFailAccessControlCheck()
5 years, 10 months ago (2015-02-03 22:05:00 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/902453002/1
5 years, 10 months ago (2015-02-03 22:06:14 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1) as https://src.chromium.org/viewvc/blink?view=rev&revision=189439
5 years, 10 months ago (2015-02-03 22:06:55 UTC) #3
Mike West
5 years, 10 months ago (2015-02-04 05:24:43 UTC) #4
Message was sent while issue was closed.
LGTM, thanks for reverting.

Powered by Google App Engine
This is Rietveld 408576698