Index: runtime/vm/exceptions.h |
=================================================================== |
--- runtime/vm/exceptions.h (revision 35994) |
+++ runtime/vm/exceptions.h (working copy) |
@@ -14,6 +14,7 @@ |
class Class; |
class DartFrameIterator; |
class Error; |
+class ICData; |
class Instance; |
class Object; |
class RawInstance; |
@@ -21,6 +22,7 @@ |
class RawStacktrace; |
class RawObject; |
class Script; |
+class StackFrame; |
class String; |
class Exceptions : AllStatic { |
@@ -30,6 +32,17 @@ |
static void Throw(const Instance& exception); |
static void ReThrow(const Instance& exception, const Instance& stacktrace); |
static void PropagateError(const Error& error); |
+ |
+ // Return true if the target function of the given ic_data may check for (and |
+ // possibly issue) a Javascript compatibility warning. |
+ static bool MayCheckForJSWarning(const ICData& ic_data); |
+ |
+ // Report a Javascript compatibility warning at the call site given by |
+ // caller_frame. Note that a JavascriptCompatibilityError is thrown |
+ // if --warning_as_error is specified. |
+ static void JSWarning(StackFrame* caller_frame, const char* format, ...) |
+ PRINTF_ATTRIBUTE(2, 3); |
+ |
static RawStacktrace* CurrentStacktrace(); |
// Helpers to create and throw errors. |
@@ -55,6 +68,7 @@ |
kIsolateSpawn, |
kIsolateUnhandledException, |
kJavascriptIntegerOverflowError, |
+ kJavascriptCompatibilityError, |
kAssertion, |
kCast, |
kType, |