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

Unified Diff: third_party/WebKit/Source/modules/nfc/NFC.cpp

Issue 2463453002: "Fix" remaining connection error handlers in Blink (Closed)
Patch Set: Created 4 years, 2 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
Index: third_party/WebKit/Source/modules/nfc/NFC.cpp
diff --git a/third_party/WebKit/Source/modules/nfc/NFC.cpp b/third_party/WebKit/Source/modules/nfc/NFC.cpp
index 9f9649bae2dae0b3946495aa905e3ad8402d08e4..a8e470f1096f4ea3cd4a30c2d5821a160c7de889 100644
--- a/third_party/WebKit/Source/modules/nfc/NFC.cpp
+++ b/third_party/WebKit/Source/modules/nfc/NFC.cpp
@@ -17,6 +17,7 @@
#include "modules/nfc/NFCPushOptions.h"
#include "platform/mojo/MojoHelper.h"
#include "public/platform/InterfaceProvider.h"
+#include "public/platform/Platform.h"
namespace mojom = device::nfc::mojom::blink;
@@ -561,6 +562,11 @@ void NFC::OnRequestCompleted(ScriptPromiseResolver* resolver,
}
void NFC::OnConnectionError() {
+ if (!Platform::current()) {
+ // TODO(rockot): Clean this up once renderer shutdown sequence is fixed.
+ return;
+ }
+
m_nfc.reset();
// If NFCService is not available or disappears when NFC hardware is

Powered by Google App Engine
This is Rietveld 408576698