archives

« Bugzilla Issues Index

#3251 — Assertion fails in CreateDataProperty


https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createdataproperty

I believe we can get here with a primitive. It can happen when `super.x = 1` is executed where we have [[This]] as a primitive (strict function) and [[HomeObject]].__proto__ has no x property.

PutValue calls [[Set]] of /base/ passing 'x', 1, and a primitive as the /Receiver/

Then in https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ordinary-object-internal-methods-and-internal-slots-set-p-v-receiver, step 5.f.i calls CreateDataProperty with a primitive value, 'x' and 1.


9.1.9 [[Set]], step 5.b handles the case when `Receiver` is a primitive value.


Thanks André.