Version 1.3.5

svn merge -c 35417 https://dart.googlecode.com/svn/branches/bleeding_edge 1.3
Apply
https://codereview.chromium.org/250553003/

R=herhut@google.com

Review URL: https://codereview.chromium.org//256033005

git-svn-id: http://dart.googlecode.com/svn/branches/1.3@35478 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
index 73a81dc..e2aa2fa 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/node_tracer.dart
@@ -282,6 +282,15 @@
 
   bool isClosure(Element element) {
     if (!element.isFunction()) return false;
+    /// Creating an instance of a class that implements [Function] also
+    /// closurizes the corresponding [call] member. We do not currently
+    /// track these, thus the check for [isClosurized] on such a method will
+    /// return false. Instead we catch that case here for now.
+    // TODO(herhut): Handle creation of closures from instances of Function.
+    if (element.isInstanceMember() &&
+        element.name == Compiler.CALL_OPERATOR_NAME) {
+      return true;
+    }
     Element outermost = element.getOutermostEnclosingMemberOrTopLevel();
     return outermost.declaration != element.declaration;
   }
diff --git a/tests/compiler/dart2js_extra/18383_test.dart b/tests/compiler/dart2js_extra/18383_test.dart
new file mode 100644
index 0000000..1659129
--- /dev/null
+++ b/tests/compiler/dart2js_extra/18383_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for http://dartbug.com/18383
+
+import "package:expect/expect.dart";
+
+class F {
+  call() => (x) => new G(x.toInt());
+}
+
+class G {
+  var z;
+  G(this.z);
+  foo() => '$this.foo';
+  toString() => 'G($z)';
+}
+
+main() {
+  var f = new F();
+  var m = f();
+  Expect.equals(m(66).foo(), "G(66).foo");
+}
+
diff --git a/tests/standalone/io/http_server_test.dart b/tests/standalone/io/http_server_test.dart
index f664501..d412328 100644
--- a/tests/standalone/io/http_server_test.dart
+++ b/tests/standalone/io/http_server_test.dart
@@ -115,7 +115,6 @@
   HttpServer.bind("127.0.0.1", 0).then((server) {
     runZoned(() {
       server.listen((request) {
-        request.response.bufferOutput = false;
         request.response.add(new Uint8List(64 * 1024));
         new Timer(const Duration(milliseconds: 100), () {
           request.response.close().then((_) {
diff --git a/tools/VERSION b/tools/VERSION
index 3316975..33e4d99 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -26,6 +26,6 @@
 CHANNEL stable
 MAJOR 1
 MINOR 3
-PATCH 4
+PATCH 5
 PRERELEASE 0
 PRERELEASE_PATCH 0