Chromium Code Reviews| Index: sdk/lib/_internal/compiler/js_lib/isolate_helper.dart |
| diff --git a/sdk/lib/_internal/compiler/js_lib/isolate_helper.dart b/sdk/lib/_internal/compiler/js_lib/isolate_helper.dart |
| index 2619c3507647e2935be43dd2490a19a7451ed0b0..ad6883c95f9c02494dc8b68050bf7d09cd08935f 100644 |
| --- a/sdk/lib/_internal/compiler/js_lib/isolate_helper.dart |
| +++ b/sdk/lib/_internal/compiler/js_lib/isolate_helper.dart |
| @@ -753,29 +753,20 @@ class IsolateNatives { |
| static final Expando<int> workerIds = new Expando<int>(); |
| /** |
| - * The src url for the script tag that loaded this Used to create |
| - * JavaScript workers. |
| + * The src url for the script tag that loaded this function. |
| + * |
| + * Used to create JavaScript workers and load deferred libraries. |
| */ |
| static String computeThisScript() { |
| var currentScript = JS_EMBEDDED_GLOBAL('', CURRENT_SCRIPT); |
|
floitsch
2015/05/07 21:09:51
The embedded global is set, if `document.currentSc
|
| if (currentScript != null) { |
| return JS('String', 'String(#.src)', currentScript); |
| } |
| - if (Primitives.isD8) return computeThisScriptD8(); |
|
herhut
2015/05/08 08:06:27
Do we still need the Primitives.isXX helpers? It w
floitsch
2015/05/09 01:07:54
Removed in https://codereview.chromium.org/1132923
|
| - if (Primitives.isJsshell) return computeThisScriptJsshell(); |
| // A worker has no script tag - so get an url from a stack-trace. |
| if (_globalState.isWorker) return computeThisScriptFromTrace(); |
| return null; |
| } |
| - static String computeThisScriptJsshell() { |
| - return JS('String|Null', 'thisFilename()'); |
| - } |
| - |
| - // TODO(ahe): The following is for supporting D8. We should move this code |
| - // to a helper library that is only loaded when testing on D8. |
| - static String computeThisScriptD8() => computeThisScriptFromTrace(); |
| - |
| static String computeThisScriptFromTrace() { |
| var stack = JS('String|Null', 'new Error().stack'); |
| if (stack == null) { |