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

Unified Diff: runtime/vm/exceptions.h

Issue 260713008: Add support for javascript incompatibility warnings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 7 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: runtime/vm/exceptions.h
===================================================================
--- runtime/vm/exceptions.h (revision 36000)
+++ runtime/vm/exceptions.h (working copy)
@@ -21,6 +21,7 @@
class RawStacktrace;
class RawObject;
class Script;
+class StackFrame;
class String;
class Exceptions : AllStatic {
@@ -30,6 +31,13 @@
static void Throw(const Instance& exception);
static void ReThrow(const Instance& exception, const Instance& stacktrace);
static void PropagateError(const Error& error);
+
+ // 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 +63,7 @@
kIsolateSpawn,
kIsolateUnhandledException,
kJavascriptIntegerOverflowError,
+ kJavascriptCompatibilityError,
kAssertion,
kCast,
kType,
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/exceptions.cc » ('j') | runtime/vm/symbols.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698