6957e23b54
The WebAssembly JavaScript Interface specifies[1] that exported functions are not constructors, hence do not have the "prototype" property. This is not true for asm.js exported functions which are expected to look like normal functions (or constructors). [1] https://webassembly.github.io/spec/js-api/index.html#exported-function-exotic-objects R=clemensh@chromium.org TEST=mjsunit/regress/regress-crbug-935800 BUG=chromium:935800 Change-Id: Idecacfb7f5d4668540589af95fd59872334c21a3 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1578499 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Michael Achenbach <machenbach@chromium.org> Reviewed-by: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#60943}
22 lines
741 B
JavaScript
22 lines
741 B
JavaScript
// Copyright 2019 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.
|
|
|
|
// This file is executed separately before the correctness test case. Add here
|
|
// checking of global properties that should never differ in any configuration.
|
|
// A difference found in the prints below will prevent any further correctness
|
|
// comparison for the selected configurations to avoid flooding bugs.
|
|
|
|
print("https://crbug.com/932656");
|
|
print(Object.getOwnPropertyNames(this));
|
|
|
|
print("https://crbug.com/935800");
|
|
(function () {
|
|
function foo() {
|
|
"use asm";
|
|
function baz() {}
|
|
return {bar: baz};
|
|
}
|
|
print(Object.getOwnPropertyNames(foo().bar));
|
|
})();
|