diff --git a/.travis.yml b/.travis.yml
index 9b024e6a526..12c9198d3ee 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -447,12 +447,8 @@ jobs:
# need to make them fatal for the purposes of the test run.
# TODO(varconst): disallow sanitizers to fail once we fix all existing issues.
- - env:
- - PROJECT=Firestore PLATFORM=macOS METHOD=cmake SANITIZERS=asan
- env:
- PROJECT=Firestore PLATFORM=macOS METHOD=cmake SANITIZERS=tsan
- - env:
- - PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild SANITIZERS=asan
- env:
- PROJECT=Firestore PLATFORM=iOS METHOD=xcodebuild SANITIZERS=tsan
- env:
diff --git a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme
index 03e9133eefe..f4896bc192e 100644
--- a/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme
+++ b/Firestore/Example/Firestore.xcodeproj/xcshareddata/xcschemes/Firestore_IntegrationTests_iOS.xcscheme
@@ -26,7 +26,17 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
- shouldUseLaunchSchemeArgsEnv = "YES">
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ enableASanStackUseAfterReturn = "YES">
+
+
+
+
@@ -39,17 +49,6 @@
-
-
-
-
-
-
-
-
static_cast(limit)) {
for (size_t i = new_document_set.size() - limit; i > 0; --i) {
- const Document& old_doc = *new_document_set.GetLastDocument();
+ absl::optional found = new_document_set.GetLastDocument();
+ const Document& old_doc = *found;
new_document_set = new_document_set.erase(old_doc.key());
new_mutated_keys = new_mutated_keys.erase(old_doc.key());
change_set.AddChange(