| Index: pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| diff --git a/pkg/dev_compiler/lib/js/common/dart_sdk.js b/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| index 7d85febacc2c5802c7235745daf1dba419a8e865..b0d69545f4e7d33dacca2bc467838017f7671b49 100644
|
| --- a/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| +++ b/pkg/dev_compiler/lib/js/common/dart_sdk.js
|
| @@ -1536,6 +1536,10 @@
|
| debugger;
|
| dart.throw(new core.AssertionError());
|
| };
|
| + dart.throwAssertionErrorWithMessage = function(message) {
|
| + debugger;
|
| + dart.throw(new _js_helper.AssertionErrorWithMessage(message));
|
| + };
|
| dart.throwNullValueError = function() {
|
| debugger;
|
| dart.throw(new core.NoSuchMethodError(null, new core.Symbol('<Unexpected Null Value>'), null, null, null));
|
| @@ -1898,6 +1902,9 @@
|
| dart.assert = function(condition) {
|
| if (!condition) dart.throwAssertionError();
|
| };
|
| + dart.assertMessage = function(condition, message) {
|
| + if (!condition) dart.throwAssertionErrorWithMessage(message());
|
| + };
|
| dart.throw = function(obj) {
|
| dart._stack = new Error();
|
| throw obj;
|
| @@ -11879,6 +11886,30 @@
|
| constructors: () => ({new: dart.definiteFunctionType(_js_helper.RuntimeError, [dart.dynamic])}),
|
| fields: () => ({message: dart.dynamic})
|
| });
|
| + core.AssertionError = class AssertionError extends core.Error {
|
| + new() {
|
| + super.new();
|
| + }
|
| + toString() {
|
| + return "Assertion failed";
|
| + }
|
| + };
|
| + dart.setSignature(core.AssertionError, {
|
| + constructors: () => ({new: dart.definiteFunctionType(core.AssertionError, [])})
|
| + });
|
| + _js_helper.AssertionErrorWithMessage = class AssertionErrorWithMessage extends core.AssertionError {
|
| + new(message) {
|
| + this[_message] = message;
|
| + super.new();
|
| + }
|
| + toString() {
|
| + return dart.str`Assertion failed: ${this[_message]}`;
|
| + }
|
| + };
|
| + dart.setSignature(_js_helper.AssertionErrorWithMessage, {
|
| + constructors: () => ({new: dart.definiteFunctionType(_js_helper.AssertionErrorWithMessage, [core.Object])}),
|
| + fields: () => ({[_message]: core.Object})
|
| + });
|
| _js_helper.random64 = function() {
|
| let int32a = Math.random() * 0x100000000 >>> 0;
|
| let int32b = Math.random() * 0x100000000 >>> 0;
|
| @@ -12009,17 +12040,6 @@
|
| return SyncIterable;
|
| });
|
| _js_helper.SyncIterable = SyncIterable();
|
| - core.AssertionError = class AssertionError extends core.Error {
|
| - new() {
|
| - super.new();
|
| - }
|
| - toString() {
|
| - return "Assertion failed";
|
| - }
|
| - };
|
| - dart.setSignature(core.AssertionError, {
|
| - constructors: () => ({new: dart.definiteFunctionType(core.AssertionError, [])})
|
| - });
|
| _js_helper.BooleanConversionAssertionError = class BooleanConversionAssertionError extends core.AssertionError {
|
| new() {
|
| super.new();
|
|
|