W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

[Bug 22808] Throw if object is constructed without new

From: <bugzilla@jessica.w3.org>
Date: Mon, 09 Feb 2015 17:49:58 +0000
To: public-script-coord@w3.org
Message-ID: <bug-22808-3890-jwHdG0vQ5N@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=22808

--- Comment #16 from Boris Zbarsky <bzbarsky@mit.edu> ---
So I just looked through the ES6 spec.  The only other use of [[FunctionKind]]
is to prevent subclassing a generator function.  This use assumes that anything
without a [[FunctionKind]] slot is not a generator, so works fine with Web IDL.

What we _could_ consider is giving a [[FunctionKind]] slot to what the spec
calls "Built-in Function objects" and checking it in
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-built-in-function-objects-call-thisargument-argumentslist
(and modifying
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-built-in-function-objects-construct-argumentslist-newtarget
to not check it, I guess).  That's assuming we don't want the existence of a
[[FunctionKind]] slot to imply the function is an "ECMASCript Language
function".

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 9 February 2015 17:50:03 UTC

This archive was generated by hypermail 2.3.1 : Monday, 9 February 2015 17:50:03 UTC