Home | History | Annotate | Download | only in regress
      1 // Copyright 2015 the V8 project authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 function* g() {}
      6 assertTrue(Object.getOwnPropertyDescriptor(g.__proto__, "constructor").configurable);
      7 assertTrue(Object.getOwnPropertyDescriptor(g.prototype.__proto__, "constructor").configurable);
      8 
      9 function FakeGeneratorFunctionConstructor() {}
     10 Object.defineProperty(g.__proto__, "constructor", {value: FakeGeneratorFunctionConstructor});
     11 assertSame(g.__proto__.constructor, FakeGeneratorFunctionConstructor);
     12 
     13 function FakeGeneratorObjectConstructor() {}
     14 Object.defineProperty(g.prototype.__proto__, "constructor", {value: FakeGeneratorObjectConstructor});
     15 assertSame(g.prototype.__proto__.constructor, FakeGeneratorObjectConstructor);
     16