Chromium Code Reviews| Index: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart |
| diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart |
| index 0cd99deb25ede32deddefeeab3f04b0104a96b8e..2d48a09e939346e5fcdf782a9235a0b80db1a78f 100644 |
| --- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart |
| +++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart |
| @@ -89,6 +89,25 @@ final global_ = JS( |
| window.SourceBufferList = new MediaSource().sourceBuffers.constructor; |
| } |
| } |
| + |
| + // These settings must be configured before the application starts so that |
|
vsm
2017/05/10 16:42:05
Might be worth moving the globalState decl above t
Jacob
2017/05/10 17:05:26
Good point. Done.
|
| + // user code runs with the correct configuration. |
| + if ('ddcSettings' in window) { |
| + let settings = window.ddcSettings; |
| + if ('trapRuntimeErrors' in settings) { |
| + $trapRuntimeErrors(settings.trapRuntimeErrors); |
| + } |
| + if ('ignoreWhitelistedErrors' in settings) { |
| + $ignoreWhitelistedErrors(settings.ignoreWhitelistedErrors); |
| + } |
| + if ('failForWeakModeIsChecks' in settings) { |
| + $failForWeakModeIsChecks(settings.failForWeakModeIsChecks); |
| + } |
| + if ('trackProfile' in settings) { |
| + $trackProfile(settings.trackProfile); |
| + } |
| + } |
| + |
| var globalState = (typeof window != "undefined") ? window |
| : (typeof global != "undefined") ? global |
| : (typeof self != "undefined") ? self : {}; |