[Webkit-unassigned] [Bug 202599] New: InternalFunction::createSubclassStructure should use newTarget's globalObject
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 4 13:15:57 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=202599
Bug ID: 202599
Summary: InternalFunction::createSubclassStructure should use
newTarget's globalObject
Product: WebKit
Version: WebKit Nightly Build
Hardware: All
OS: All
Status: NEW
Severity: Minor
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: shvaikalesh at gmail.com
Test case:
var iframe = document.createElement("iframe")
document.body.appendChild(iframe)
var other = iframe.contentWindow
var newTarget = new other.Function()
newTarget.prototype = null
var map = Reflect.construct(Map, [], newTarget)
Object.getPrototypeOf(map) // ?
Expected:
other.Map.prototype
Actual:
Map.prototype
ECMA262:
Step 2 of https://tc39.es/ecma262/#sec-map-iterable
Step 2 of https://tc39.es/ecma262/#sec-ordinarycreatefromconstructor (constructor is NewTarget)
Step 4.b of https://tc39.es/ecma262/#sec-getprototypefromconstructor
Test262:
Tests named "proto-from-ctor-realm*.js", for example: https://test262.report/browse/built-ins/Map/proto-from-ctor-realm.js
Both V8 and SpiderMonkey create subclasses with prototypes from correct realms.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191004/72d122f5/attachment.html>
More information about the webkit-unassigned
mailing list