OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2008 Apple Inc. All rights reserved. |
3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> | 3 * Copyright (C) 2005-2007 Alexey Proskuryakov <ap@webkit.org> |
4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> | 4 * Copyright (C) 2007, 2008 Julien Chaffraix <jchaffraix@webkit.org> |
5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. | 5 * Copyright (C) 2008, 2011 Google Inc. All rights reserved. |
6 * Copyright (C) 2012 Intel Corporation | 6 * Copyright (C) 2012 Intel Corporation |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Lesser General Public | 9 * modify it under the terms of the GNU Lesser General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
566 if (!password.isNull()) | 566 if (!password.isNull()) |
567 url.setPass(password); | 567 url.setPass(password); |
568 | 568 |
569 open(method, url, async, exceptionState); | 569 open(method, url, async, exceptionState); |
570 } | 570 } |
571 | 571 |
572 void XMLHttpRequest::open(const AtomicString& method, const KURL& url, bool asyn c, ExceptionState& exceptionState) | 572 void XMLHttpRequest::open(const AtomicString& method, const KURL& url, bool asyn c, ExceptionState& exceptionState) |
573 { | 573 { |
574 WTF_LOG(Network, "XMLHttpRequest %p open('%s', '%s', %d)", this, method.utf8 ().data(), url.elidedString().utf8().data(), async); | 574 WTF_LOG(Network, "XMLHttpRequest %p open('%s', '%s', %d)", this, method.utf8 ().data(), url.elidedString().utf8().data(), async); |
575 | 575 |
576 if (method != "GET") { | |
yhirano
2015/08/20 07:46:55
Is it better to place the block on send function?
| |
577 document()->frame()->page()->chromeClient().observedNonGetXHR(); | |
578 } | |
579 | |
576 if (!internalAbort()) | 580 if (!internalAbort()) |
577 return; | 581 return; |
578 | 582 |
579 State previousState = m_state; | 583 State previousState = m_state; |
580 m_state = UNSENT; | 584 m_state = UNSENT; |
581 m_error = false; | 585 m_error = false; |
582 m_uploadComplete = false; | 586 m_uploadComplete = false; |
583 | 587 |
584 if (!isValidHTTPToken(method)) { | 588 if (!isValidHTTPToken(method)) { |
585 exceptionState.throwDOMException(SyntaxError, "'" + method + "' is not a valid HTTP method."); | 589 exceptionState.throwDOMException(SyntaxError, "'" + method + "' is not a valid HTTP method."); |
(...skipping 1107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1693 visitor->trace(m_responseDocumentParser); | 1697 visitor->trace(m_responseDocumentParser); |
1694 visitor->trace(m_progressEventThrottle); | 1698 visitor->trace(m_progressEventThrottle); |
1695 visitor->trace(m_upload); | 1699 visitor->trace(m_upload); |
1696 visitor->trace(m_blobLoader); | 1700 visitor->trace(m_blobLoader); |
1697 XMLHttpRequestEventTarget::trace(visitor); | 1701 XMLHttpRequestEventTarget::trace(visitor); |
1698 DocumentParserClient::trace(visitor); | 1702 DocumentParserClient::trace(visitor); |
1699 ActiveDOMObject::trace(visitor); | 1703 ActiveDOMObject::trace(visitor); |
1700 } | 1704 } |
1701 | 1705 |
1702 } // namespace blink | 1706 } // namespace blink |
OLD | NEW |