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

Unified 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, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/inspector/MainThreadDebugger.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
diff --git a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
index 4e1085e5ea2f5555338f704e0ce50a5733ee2c32..0d317bdbad102559cf8eb1f140562f7d9fb094c0 100644
--- a/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
+++ b/third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp
@@ -631,11 +631,13 @@ bool XMLHttpRequest::initSend(ExceptionState& exceptionState)
return false;
}
- if (!m_async && exceptionState.isolate() && v8::MicrotasksScope::IsRunningMicrotasks(exceptionState.isolate())) {
- UseCounter::count(getExecutionContext(), UseCounter::During_Microtask_SyncXHR);
+ if (!m_async) {
+ v8::Isolate* isolate = v8::Isolate::GetCurrent();
+ if (isolate && v8::MicrotasksScope::IsRunningMicrotasks(isolate)) {
+ UseCounter::count(getExecutionContext(), UseCounter::During_Microtask_SyncXHR);
+ }
}
-
m_error = false;
return true;
}
« 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