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

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 35921)
+++ runtime/vm/exceptions.h (working copy)
@@ -14,6 +14,7 @@
class Class;
class DartFrameIterator;
class Error;
+class ICData;
class Instance;
class Object;
class RawInstance;
@@ -30,6 +31,15 @@
static void Throw(const Instance& exception);
static void ReThrow(const Instance& exception, const Instance& stacktrace);
static void PropagateError(const Error& error);
+
+ static bool MayIssueJSWarning(const ICData& ic_data, bool check_issued);
srdjan 2014/05/08 18:11:05 Please add comment about the arguments.
regis 2014/05/09 21:03:42 Done. I also removed the check_issue argument, whi
+
+ // Argument ic_data is passed when it is known, e.g. when issuing the warning
+ // from an inline cache miss handler. Otherwise, null is passed when ic_data
+ // is not looked up yet, e.g. when the warning is issued from native code.
srdjan 2014/05/08 18:11:05 Add comment that it can produce errors if appropri
regis 2014/05/09 21:03:42 Done.
+ static void JSWarning(const ICData& ic_data, const char* format, ...)
+ PRINTF_ATTRIBUTE(2, 3);
+
static RawStacktrace* CurrentStacktrace();
// Helpers to create and throw errors.
@@ -55,6 +65,7 @@
kIsolateSpawn,
kIsolateUnhandledException,
kJavascriptIntegerOverflowError,
+ kJavascriptCompatibilityError,
kAssertion,
kCast,
kType,

Powered by Google App Engine
This is Rietveld 408576698