mirror of
https://github.com/dart-lang/sdk
synced 2024-10-05 03:15:01 +00:00
Address Erik's comments on https://codereview.chromium.org/11778064 and fix minifier failures.
Review URL: https://codereview.chromium.org//11970007 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17131 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
1ad6e92ef6
commit
45520c44e4
|
@ -385,10 +385,10 @@ class _WorkerStub implements _ManagerStub {
|
|||
const String _SPAWNED_SIGNAL = "spawned";
|
||||
|
||||
var globalThis = IsolateNatives.computeGlobalThis();
|
||||
var globalWindow = JS('', "#['window']", globalThis);
|
||||
var globalWorker = JS('', "#['Worker']", globalThis);
|
||||
var globalWindow = JS('', "#.window", globalThis);
|
||||
var globalWorker = JS('', "#.Worker", globalThis);
|
||||
bool globalPostMessageDefined =
|
||||
JS('', "#['postMessage'] !== (void 0)", globalThis);
|
||||
JS('', "#.postMessage !== (void 0)", globalThis);
|
||||
|
||||
class IsolateNatives {
|
||||
|
||||
|
@ -406,9 +406,11 @@ class IsolateNatives {
|
|||
// executed. The last one is the currently running script.
|
||||
for (var script in scripts) {
|
||||
var src = JS('String|Null', '# && #.src', script, script);
|
||||
// Filter out the test controller script, and the Dart
|
||||
// bootstrap script.
|
||||
if (src != null
|
||||
&& !src.endsWith('test_controller.js')
|
||||
&& !new RegExp('client.dart\.js').hasMatch(src)) {
|
||||
&& !src.endsWith('dart.js')) {
|
||||
return src;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1119,8 +1119,10 @@ convertDartClosureToJS(closure, int arity) {
|
|||
// executes.
|
||||
var currentIsolate = JS_CURRENT_ISOLATE();
|
||||
|
||||
// We use $0 and $1 to not clash with variable names used by the
|
||||
// compiler and/or minifier.
|
||||
function = JS("var",
|
||||
r"""function(a, b) { return #(#, #, #, a, b); }""",
|
||||
r"""function($0, $1) { return #(#, #, #, $0, $1); }""",
|
||||
DART_CLOSURE_TO_JS(invokeClosure),
|
||||
closure,
|
||||
JS_CURRENT_ISOLATE(),
|
||||
|
|
Loading…
Reference in a new issue