2016-09-12 16:12:13 +00:00
|
|
|
// Copyright 2016 the V8 project authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
|
|
|
|
2016-10-12 07:33:05 +00:00
|
|
|
// Flags: --allow-natives-syntax --turbo --always-opt
|
2016-09-12 16:12:13 +00:00
|
|
|
|
|
|
|
function f() {
|
2016-10-12 07:33:05 +00:00
|
|
|
var obj = Object.freeze({});
|
|
|
|
%_CreateDataProperty(obj, "foo", "bar");
|
2016-09-12 16:12:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Should not crash
|
2016-10-12 07:33:05 +00:00
|
|
|
assertThrows(f, TypeError);
|