« Bugzilla Issues Index

#1341 — "this function object" / "owner object"

In: ArrayBuffer(length) TypedArray ( length ) TypedArray ( typedArray ) TypedArray ( array )
the algorithm refers to "this function object", which is not defined.

Analogy with "this Date object" of 15.9.5 would suggest that it means:
the object that is the 'this' value for the invocation of the function
but this is presumably not the case, because each of the 4 algorithms,
prior to referring to "this function object", has already referred to
"the 'this' value" and found it wanting.

My guess is that "this function object" means:
the function object whose [[Call]] internal method
is the "current" algorithm

It would be good if the spec defined a term for this (generalized to any internal method). E.g., "owner object".

Section says:
In addition to its parameters, an internal method always has access to
the object upon which it is invoked as a method.
To this, you could add something like:
Specifically, when the spec refers to calling/invoking/performing
a particular internal method of an object, [the algorithm bound to]
that internal method can refer to that object as the *owner object*.

(Is this the same concept as's "target"? Note that the word "target" is used with other senses elsewhere in the spec, but the word "owner" has the advantage of not being used at all yet in the spec.)

Let F be this function object.
could become:
Let F be the owner object.
Assert: F is a function object.

I think it's also the case that occurrences of
the Foo function object on which the 'new' operator was applied
could be replaced by just
the owner object

Ditto references to "this function" in: Array ( [ item1 [ , item2 [ , [...] ] ] ] ) Array (len)
I think.

And ditto: "the Error function object" "this NativeError function object" "this NativeError function object" "this RegExp function object"

In a related bit of terminology, every occurrence of "this Function object" is in a pair of steps of the form:
a. Let F be this function object.
b. Let argumentsList be the argumentsList argument of
the [[Call]] internal method that invoked F.

But it seems to me that that phrase:
"the [[Call]] internal method that invoked F"
is incorrect: the [[Call]] internal method doesn't *invoke* F,
it merely belongs to F, and it is invoked as a consequence of F being invoked.

re comment 1:
The phrase "this function object" was mostly eliminated in rev16, then completely gone in rev19.

re comment 2:
rev24 has 3 occurrences of "Let /F/ be this function.": / step 5.a / step 5.a / step 5.a

Also, / step 15.a / step 15.a
have "Let /C/ be the function that is currently being evaluated."

re comment 3:
rev24 has: / step 1: "this Error function object" / step 1: "this /NativeError/ function object" / step 1: "this /NativeError/ function object" / step 1: "this RegExp function object"

re comment 4:
rev24 has, in / step 9:
Let /argumentsList/ be the /argumentsList/ argument of
the [[Call]] internal method that invoked /F/.

fixed in rev26 editor's draft

in 8.3 defined the term "active function" and used in in all the remaining situations "this function object", etc. situations.

in rev26 draft