Cleanup unused DartStickyError
Change-Id: I9143da972773c86d50016f261508059664d912f2
diff --git a/BUILD.gn b/BUILD.gn
index ebf350c..9fd04e6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -26,8 +26,6 @@
"dart_persistent_value.h",
"dart_state.cc",
"dart_state.h",
- "dart_sticky_error.cc",
- "dart_sticky_error.h",
"dart_wrappable.cc",
"dart_wrappable.h",
"dart_wrapper_info.h",
diff --git a/dart_message_handler.cc b/dart_message_handler.cc
index 2263315..dec186a 100644
--- a/dart_message_handler.cc
+++ b/dart_message_handler.cc
@@ -9,7 +9,6 @@
#include "third_party/dart/runtime/include/dart_tools_api.h"
#include "tonic/common/macros.h"
#include "tonic/dart_state.h"
-#include "tonic/dart_sticky_error.h"
#include "tonic/logging/dart_error.h"
namespace tonic {
diff --git a/dart_microtask_queue.cc b/dart_microtask_queue.cc
index 5cd8ee6..57f7d93 100644
--- a/dart_microtask_queue.cc
+++ b/dart_microtask_queue.cc
@@ -6,7 +6,6 @@
#include "tonic/common/build_config.h"
#include "tonic/dart_state.h"
-#include "tonic/dart_sticky_error.h"
#include "tonic/logging/dart_invoke.h"
#ifdef OS_IOS
diff --git a/dart_sticky_error.cc b/dart_sticky_error.cc
deleted file mode 100644
index 39a6c2a..0000000
--- a/dart_sticky_error.cc
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2016 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "tonic/dart_sticky_error.h"
-
-namespace tonic {
-
-bool DartStickyError::MaybeSet(Dart_Handle result) {
- if (!Dart_IsError(result)) {
- // Not an error.
- return false;
- }
- if (Dart_HasStickyError()) {
- // We only remember the first error.
- return false;
- }
- if (!Dart_IsUnhandledExceptionError(result)) {
- result = Dart_NewUnhandledExceptionError(result);
- }
- Dart_SetStickyError(result);
- return true;
-}
-
-bool DartStickyError::IsSet() {
- return Dart_HasStickyError();
-}
-
-} // namespace tonic
diff --git a/dart_sticky_error.h b/dart_sticky_error.h
deleted file mode 100644
index 174432d..0000000
--- a/dart_sticky_error.h
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright 2016 The Fuchsia Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef LIB_TONIC_DART_STICKY_ERROR_H_
-#define LIB_TONIC_DART_STICKY_ERROR_H_
-
-#include "third_party/dart/runtime/include/dart_api.h"
-
-namespace tonic {
-
-class DartStickyError {
- public:
- // Returns true if the sticky error was set.
- static bool MaybeSet(Dart_Handle result);
-
- // Returns true if the isolate has a sticky error set.
- static bool IsSet();
-};
-
-} // namespace tonic
-
-#endif // LIB_TONIC_DART_MICROTASK_QUEUE_H_