Chromium Code Reviews| Index: dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| diff --git a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| index 4b1228f483387419e17bc1bfdf8df9f6d98cf2e6..0f7d23a82b35d549b9ff304d300b9c172057b406 100644 |
| --- a/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| +++ b/dart/sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart |
| @@ -3755,7 +3755,11 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| ..write(',$_') |
| ..write('{$n') |
| ..addBuffer(buffer) |
| - ..write('}],$n'); |
| + ..write('}'); |
| + if (library == compiler.mainApp) { |
| + mainBuffer.write(',${n}1'); |
| + } |
| + mainBuffer.write('],$n'); |
| } |
| buffer = buffers[1]; |
| if (buffer != null) { |
| @@ -3976,6 +3980,7 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| var uri = data[1]; |
| var metadata = data[2]; |
| var descriptor = data[3]; |
| + var isRoot = !!data[4]; |
|
kustermann
2013/07/25 14:56:45
I guess this double negation is because the last p
ahe
2013/07/25 18:01:01
Yes. We use it so frequently in dart2js that we do
|
| var fields = descriptor && descriptor[""]; |
| var classes = []; |
| var functions = []; |
| @@ -4017,7 +4022,7 @@ if (typeof document !== "undefined" && document.readyState !== "complete") { |
| } |
| } |
| processStatics(descriptor); |
| - libraries.push([name, uri, classes, functions, metadata, fields]); |
| + libraries.push([name, uri, classes, functions, metadata, fields, isRoot]); |
| } |
| })'''; |
| } |