f7d7b5c6a4
Without --harmony-function-tostring, anything other than a JSFunction or JSBoundFunction throw when Function.prototype.toString is called on them. But with the toString revision, anything callable allows toString (and for non-Functions returns the good old "function () { [native code] }" string). Bug: v8:7484 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel Change-Id: I3540e213a40992151761b59666fe36e0510da908 Reviewed-on: https://chromium-review.googlesource.com/932825 Commit-Queue: Adam Klein <adamk@chromium.org> Reviewed-by: Sathya Gunasekaran <gsathya@chromium.org> Cr-Commit-Position: refs/heads/master@{#51489}
8 lines
283 B
JavaScript
8 lines
283 B
JavaScript
// Copyright 2018 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: --noharmony-function-tostring
|
|
|
|
assertThrows(() => new Proxy(function() {}, {}).toString(), TypeError);
|