Commit ea2cb139 authored by conradw's avatar conradw Committed by Commit bot

[strong] fix strong object exception messages

A mistake in a recent CL has messed up the error messages for strong object
semantics.

BUG=
LOG=N

Review URL: https://codereview.chromium.org/1166433007

Cr-Commit-Position: refs/heads/master@{#28741}
parent 904fbc30
......@@ -230,11 +230,10 @@ class CallSite {
"On strong object %, deletion of property % is deprecated") \
T(StrongImplicitCast, "In strong mode, implicit conversions are deprecated") \
T(StrongRedefineDisallowed, \
"Cannot redefine non-configurable property '%' of strong object % to be " \
"non-writable") \
T(StrongSetProto, \
"On strong object %, redefining writable, non-configurable property '%' " \
"to be non-writable is deprecated") \
T(StrongSetProto, \
"On strong object %, redefining the internal prototype is deprecated") \
T(SymbolKeyFor, "% is not a symbol") \
T(SymbolToPrimitive, \
"Cannot convert a Symbol wrapper object to a primitive value") \
......
// Copyright 2015 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.
// Flags: --strong-mode
"use strong";
let o = {};
Object.defineProperty(o, "foo", { writable: true });
Object.defineProperty(o, "foo", { writable: false });
# Copyright 2015 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.
*%(basename)s:11: TypeError: On strong object #<Object>, redefining writable, non-configurable property 'foo' to be non-writable is deprecated
Object.defineProperty(o, "foo", { writable: false });
^
TypeError: On strong object #<Object>, redefining writable, non-configurable property 'foo' to be non-writable is deprecated
at Function.defineProperty (native)
at *%(basename)s:11:8
// Copyright 2015 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.
// Flags: --strong-mode
"use strong";
({}).__proto__ = {};
# Copyright 2015 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.
*%(basename)s:9: TypeError: On strong object #<Object>, redefining the internal prototype is deprecated
({}).__proto__ = {};
^
TypeError: On strong object #<Object>, redefining the internal prototype is deprecated
at Object.set __proto__ (native)
at *%(basename)s:9:16
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment