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

Side by Side Diff: test/mjsunit/es6/throw-type-error-function-restrictions.js

Issue 1061393002: Fix issues with name and length on poison pill function (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: git rebase and refactor Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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 var throwTypeErrorFunction =
6 Object.getOwnPropertyDescriptor(Function.prototype, 'arguments').get;
7
8 assertFalse(
9 Object.prototype.hasOwnProperty.call(throwTypeErrorFunction, 'name'));
10 assertThrows(function() {
11 'use strict';
12 throwTypeErrorFunction.name = 'foo';
13 }, TypeError);
14
15 var lengthDesc =
16 Object.getOwnPropertyDescriptor(throwTypeErrorFunction, 'length');
17 assertFalse(lengthDesc.configurable, 'configurable');
18 assertFalse(lengthDesc.enumerable, 'enumerable');
19 assertFalse(lengthDesc.writable, 'writable');
20 assertThrows(function() {
21 'use strict';
22 throwTypeErrorFunction.length = 42;
23 }, TypeError);
24
25 assertTrue(Object.isFrozen(throwTypeErrorFunction));
OLDNEW
« no previous file with comments | « src/bootstrapper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698