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

Side by Side Diff: pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/runtime.dart

Issue 2875063003: Fix bugs supporting configuring DDC runtime settings before the application starts. (Closed)
Patch Set: fix Created 3 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 unified diff | Download patch
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/profile.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart._runtime; 5 library dart._runtime;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 9
10 import 'dart:_debugger' show stackTraceMapper; 10 import 'dart:_debugger' show stackTraceMapper;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 window.SourceBufferList = new MediaSource().sourceBuffers.constructor; 89 window.SourceBufferList = new MediaSource().sourceBuffers.constructor;
90 } 90 }
91 } 91 }
92 92
93 var globalState = (typeof window != "undefined") ? window 93 var globalState = (typeof window != "undefined") ? window
94 : (typeof global != "undefined") ? global 94 : (typeof global != "undefined") ? global
95 : (typeof self != "undefined") ? self : {}; 95 : (typeof self != "undefined") ? self : {};
96 96
97 // These settings must be configured before the application starts so that 97 // These settings must be configured before the application starts so that
98 // user code runs with the correct configuration. 98 // user code runs with the correct configuration.
99 if ('ddcSettings' in globalState) { 99 let settings = 'ddcSettings' in globalState ? globalState.ddcSettings : {};
100 let settings = globalState.ddcSettings; 100 $trapRuntimeErrors(
101 if ('trapRuntimeErrors' in settings) { 101 'trapRuntimeErrors' in settings ? settings.trapRuntimeErrors : true);
102 $trapRuntimeErrors(settings.trapRuntimeErrors); 102 $ignoreWhitelistedErrors(
103 } 103 'ignoreWhitelistedErrors' in settings ?
104 if ('ignoreWhitelistedErrors' in settings) { 104 settings.ignoreWhitelistedErrors : true);
105 $ignoreWhitelistedErrors(settings.ignoreWhitelistedErrors); 105 $failForWeakModeIsChecks(
106 } 106 'failForWeakModeIsChecks' in settings ?
107 if ('failForWeakModeIsChecks' in settings) { 107 settings.failForWeakModeIsChecks : true);
108 $failForWeakModeIsChecks(settings.failForWeakModeIsChecks); 108 $trackProfile(
109 } 109 'trackProfile' in settings ? settings.trackProfile : false);
110 if ('trackProfile' in settings) {
111 $trackProfile(settings.trackProfile);
112 }
113 }
114 110
115 return globalState; 111 return globalState;
116 }() 112 }()
117 '''); 113 ''');
118 114
119 final JsSymbol = JS('', 'Symbol'); 115 final JsSymbol = JS('', 'Symbol');
OLDNEW
« no previous file with comments | « pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/profile.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698