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

Side by Side Diff: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp

Issue 2272613003: binding: Retires ExceptionState::throwIfNeeded(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 bool XMLHttpRequest::initSend(ExceptionState& exceptionState) 624 bool XMLHttpRequest::initSend(ExceptionState& exceptionState)
625 { 625 {
626 if (!getExecutionContext()) 626 if (!getExecutionContext())
627 return false; 627 return false;
628 628
629 if (m_state != kOpened || m_loader) { 629 if (m_state != kOpened || m_loader) {
630 exceptionState.throwDOMException(InvalidStateError, "The object's state must be OPENED."); 630 exceptionState.throwDOMException(InvalidStateError, "The object's state must be OPENED.");
631 return false; 631 return false;
632 } 632 }
633 633
634 if (!m_async && exceptionState.isolate() && v8::MicrotasksScope::IsRunningMi crotasks(exceptionState.isolate())) { 634 if (!m_async) {
635 UseCounter::count(getExecutionContext(), UseCounter::During_Microtask_Sy ncXHR); 635 v8::Isolate* isolate = v8::Isolate::GetCurrent();
636 if (isolate && v8::MicrotasksScope::IsRunningMicrotasks(isolate)) {
637 UseCounter::count(getExecutionContext(), UseCounter::During_Microtas k_SyncXHR);
638 }
636 } 639 }
637 640
638
639 m_error = false; 641 m_error = false;
640 return true; 642 return true;
641 } 643 }
642 644
643 void XMLHttpRequest::send(const ArrayBufferOrArrayBufferViewOrBlobOrDocumentOrSt ringOrFormData& body, ExceptionState& exceptionState) 645 void XMLHttpRequest::send(const ArrayBufferOrArrayBufferViewOrBlobOrDocumentOrSt ringOrFormData& body, ExceptionState& exceptionState)
644 { 646 {
645 InspectorInstrumentation::willSendXMLHttpOrFetchNetworkRequest(getExecutionC ontext(), url()); 647 InspectorInstrumentation::willSendXMLHttpOrFetchNetworkRequest(getExecutionC ontext(), url());
646 648
647 if (body.isNull()) { 649 if (body.isNull()) {
648 send(String(), exceptionState); 650 send(String(), exceptionState);
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1723 visitor->traceWrappers(m_responseDocument); 1725 visitor->traceWrappers(m_responseDocument);
1724 visitor->traceWrappers(m_responseArrayBuffer); 1726 visitor->traceWrappers(m_responseArrayBuffer);
1725 } 1727 }
1726 1728
1727 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr) 1729 std::ostream& operator<<(std::ostream& ostream, const XMLHttpRequest* xhr)
1728 { 1730 {
1729 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr); 1731 return ostream << "XMLHttpRequest " << static_cast<const void*>(xhr);
1730 } 1732 }
1731 1733
1732 } // namespace blink 1734 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698