New issue
Advanced search Search tips

Issue 909685 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 870173
issue 905971



Sign in to add a comment

OOR-CORS: Sync XHR does not call onerror and does not raise exception on failures

Project Member Reported by toyoshim@chromium.org, Nov 28

Issue description

Console message can say it's blocked due to CORS, but no error is reported to js.

LoaderBrowserTest.SyncXMLHttpRequest_Disallowed is the case.
 
Status: Started (was: Assigned)
Hum... blink-CORS seems to raise an exception for sync local file XHR access.
But in terms of the fetch/xhr spec, this is probably wrong, but onerror invocation would be preferable?

Actually, the test expects an exception raised, but on the other hand, we have a historical LayoutTest originally for Safari, and seems it expects this error case does not raise an exception. But I'm not sure why this does not matter with our current implementation, raising an exception.

Anyway, let me make the OOR-CORS behavior to be same with blink-CORS, and see what happens on trybots.
Cc: yhirano@chromium.org
Labels: -Pri-1 Pri-2
Checked relevant specs with yhirano.

https://xhr.spec.whatwg.org/#the-send()-method

In the step 12, we should do "handle response end-of-body".

In the step 2 of "handle response end-of-body"; https://xhr.spec.whatwg.org/#handle-response-end-of-body, we should do "Handle errors".

And in the step 3 of it; https://xhr.spec.whatwg.org/#handle-errors, we should handle it as a NetworkError DOMException.

So, let's make it raise an Exception, and fix tests.

Sign in to add a comment