Skip to content

Commit

Permalink
Make Location's toString() actually work
Browse files Browse the repository at this point in the history
I mistakenly copied all boilerplate from IDL’s unforgeable interfaces concept (which was only ever used for Location) and thereby turned the fallback behavior into the actual behavior (or an exception arguably, as [[Configurable]] is false).

Fixes #2284.
  • Loading branch information
annevk committed Jan 25, 2017
1 parent 296da73 commit 772d35f
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2864,8 +2864,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<dfn>@@toStringTag</dfn></li>
<li><dfn data-x-href="https://tc39.github.io/ecma262/#sec-well-known-intrinsic-objects">Well-Known Intrinsic Objects</dfn>, including
<dfn data-x-href="https://tc39.github.io/ecma262/#sec-arraybuffer-constructor">%ArrayBuffer%</dfn>,
<dfn data-x-href="https://tc39.github.io/ecma262/#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</dfn>,
<dfn data-x-href="https://tc39.github.io/ecma262/#sec-object.prototype.tostring">%ObjProto_toString%</dfn>, and
<dfn data-x-href="https://tc39.github.io/ecma262/#sec-properties-of-the-array-prototype-object">%ArrayPrototype%</dfn>, and
<dfn data-x-href="https://tc39.github.io/ecma262/#sec-object.prototype.valueof">%ObjProto_valueOf%</dfn></li>

<li>The <dfn data-x="js-prod-FunctionBody" data-x-href="https://tc39.github.io/ecma262/#prod-FunctionBody"><i>FunctionBody</i></dfn> production</li>
Expand Down Expand Up @@ -80462,12 +80461,6 @@ State: &lt;OUTPUT NAME=I>1&lt;/OUTPUT> &lt;INPUT VALUE="Increment" TYPE=BUTTON O
<li><p>Let <var>location</var> be a new <code>Location</code> <span>platform
object</span>.</p></li>

<li><p>Perform ! <var>location</var>.[[DefineOwnProperty]]("<code data-x="">toString</code>", {
[[Value]]: <span>%ObjProto_toString%</span>,
[[Writable]]: false,
[[Enumerable]]: false,
[[Configurable]]: false }).</p></li>

<li><p>Perform ! <var>location</var>.[[DefineOwnProperty]]("<code data-x="">toJSON</code>", {
[[Value]]: undefined,
[[Writable]]: false,
Expand Down Expand Up @@ -119188,6 +119181,7 @@ INSERT INTERFACES HERE
Ami Fischman,
Amos Jeffries,
Anders Carlsson,
André Bargull,
Andr&eacute; E. Veltstra,
Andrea Rendine,
Andreas<!-- mqmq87 -->,
Expand Down

0 comments on commit 772d35f

Please sign in to comment.