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

Unified Diff: test/mjsunit/harmony/super.js

Issue 914713002: Remove Function.prototype.toMethod (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove comment Created 5 years, 10 months 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 | « test/cctest/test-api.cc ('k') | test/mjsunit/harmony/toMethod.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/harmony/super.js
diff --git a/test/mjsunit/harmony/super.js b/test/mjsunit/harmony/super.js
index bf805a4304a4ca65101bf253247d2d69f71c7f6a..ddc29d216b900fe0ef4db8f1b118e6a664447c91 100644
--- a/test/mjsunit/harmony/super.js
+++ b/test/mjsunit/harmony/super.js
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Flags: --harmony-classes
+// Flags: --harmony-classes --allow-natives-syntax
(function TestSuperNamedLoads() {
function Base() { }
@@ -40,15 +40,22 @@
(function TestSuperKeyedLoads() {
+ 'use strict';
+
var x = 'x';
var derivedDataProperty = 'derivedDataProperty';
var f = 'f';
- function Base() { }
- function fBase() { return "Base " + this.toString(); }
- Base.prototype[f] = fBase.toMethod(Base.prototype);
+ class Base {
+ f() {
+ return "Base " + this.toString();
+ }
+ toString() {
+ return "this is Base";
+ }
+ }
+
Base.prototype[x] = 15;
- Base.prototype.toString = function() { return "this is Base"; };
function Derived() {
this[derivedDataProperty] = "xxx";
@@ -79,7 +86,7 @@
function Base() { }
function fBase() { return "Base " + this.toString(); }
- Base.prototype[f] = fBase.toMethod(Base.prototype);
+ Base.prototype[f] = %ToMethod(fBase, Base.prototype);
Base.prototype[x] = 15;
Base.prototype.toString = function() { return "this is Base"; };
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/mjsunit/harmony/toMethod.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698