Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 740403003: Restore tmp function (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r41897. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
diff --git a/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index c456ece3ece97b5bdc5db290533fd7579806147b..80a6e7402377046c8c993bf782297cc4238b25b6 100644
--- a/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/dart/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -312,9 +312,11 @@ class OldEmitter implements Emitter {
jsAst.Expression buildInheritFrom() {
jsAst.Expression result = js(r'''
function() {
+ function tmp() {}
var hasOwnProperty = Object.prototype.hasOwnProperty;
return function (constructor, superConstructor) {
- var object = Object.create(superConstructor.prototype);
+ tmp.prototype = superConstructor.prototype;
+ var object = new tmp();
var properties = constructor.prototype;
for (var member in properties) {
if (hasOwnProperty.call(properties, member)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698