Example #1
0
void EventSource::didFailAccessControlCheck(const ResourceError& error)
{
    String message = makeString("EventSource cannot load ", error.failingURL(), ". ", error.localizedDescription());
    scriptExecutionContext()->addConsoleMessage(JSMessageSource, ErrorMessageLevel, message);

    abortConnectionAttempt();
}
Example #2
0
void EventSource::didFailAccessControlCheck(const ResourceError& error) {
  DCHECK(m_loader);

  String message = "EventSource cannot load " + error.failingURL() + ". " +
                   error.localizedDescription();
  getExecutionContext()->addConsoleMessage(
      ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));

  abortConnectionAttempt();
}
Example #3
0
void EventSource::didFail(const ResourceError& error)
{
    ASSERT(m_state != CLOSED);

    if (error.isAccessControl()) {
        String message = makeString("EventSource cannot load ", error.failingURL().string(), ". ", error.localizedDescription());
        scriptExecutionContext()->addConsoleMessage(MessageSource::JS, MessageLevel::Error, message);

        abortConnectionAttempt();
        return;
    }

    ASSERT(m_requestInFlight);

    if (error.isCancellation())
        m_state = CLOSED;

    // FIXME: Why don't we need to clear data members here as in didFinishLoading?

    networkRequestEnded();
}
Example #4
0
void EventSource::didFailRedirectCheck()
{
    abortConnectionAttempt();
}
Example #5
0
void EventSource::didFailRedirectCheck() {
  DCHECK(m_loader);

  abortConnectionAttempt();
}