| Index: compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
|
| diff --git a/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java b/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
|
| index a65a72658b72854630c5f6fd632d70b2b01796ba..60ac3f8f0cb65f493924acf2c1e91a2b1c0b56fd 100644
|
| --- a/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
|
| +++ b/compiler/java/com/google/dart/compiler/backend/js/AbstractJsBackend.java
|
| @@ -460,7 +460,7 @@ public abstract class AbstractJsBackend extends AbstractBackend {
|
| return sb.toString();
|
| }
|
|
|
| - protected void writeEntryPointCall(String entry, Writer out) throws IOException {
|
| + protected int writeEntryPointCall(String entry, Writer out) throws IOException {
|
| // Emit entry point call.
|
| // TODO: Actually validate that this method exists.
|
| // Small hack: the V8 arguments object is not an instance of Array. [].concat(arguments)
|
| @@ -470,9 +470,11 @@ public abstract class AbstractJsBackend extends AbstractBackend {
|
| // concatenation works again.
|
| // TODO: Use a more robust check to test that the argument is
|
| // array.
|
| - out.write("RunEntry(" + entry + ", this.arguments ?" +
|
| + String entryPointCall = "RunEntry(" + entry + ", this.arguments ?" +
|
| " (this.arguments.slice ? [].concat(this.arguments.slice())" +
|
| - " : this.arguments) : []);");
|
| + " : this.arguments) : []);";
|
| + out.write(entryPointCall);
|
| + return entryPointCall.length();
|
| }
|
|
|
| protected String getMangledEntryPoint(DartCompilerContext context) {
|
|
|