Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(148)

Issue 11312247: Modify Object.{freeze,seal,isFrozen,isSealed} to avoid the problematic "caller" method on Functions. (Closed)

Created:
8 years, 1 month ago by adamk
Modified:
8 years ago
CC:
v8-dev, rafaelw
Visibility:
Public.

Description

Modify Object.{freeze,seal,isFrozen,isSealed} to avoid the problematic "caller" method on Functions. Given that we know the property is always non-writable and non-configurable, there's no need to ever check it or redefine it in these methods. BUG=v8:2407

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -27 lines) Patch
M src/v8natives.js View 5 chunks +15 lines, -4 lines 3 comments Download
A + test/mjsunit/regress/regress-2407.js View 1 chunk +19 lines, -23 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
adamk
This approach is pretty hacky, but other approaches I tried were worse. We can't simply ...
8 years, 1 month ago (2012-11-14 20:34:14 UTC) #1
rossberg
Hm, I'm not sure that this hack is the right way to approach the problem. ...
8 years, 1 month ago (2012-11-16 12:28:55 UTC) #2
arv (Not doing code reviews)
https://codereview.chromium.org/11312247/diff/1/src/v8natives.js File src/v8natives.js (right): https://codereview.chromium.org/11312247/diff/1/src/v8natives.js#newcode1159 src/v8natives.js:1159: if (IS_SPEC_FUNCTION(obj)) { On 2012/11/16 12:28:55, rossberg wrote: > ...
8 years, 1 month ago (2012-11-16 14:38:05 UTC) #3
rossberg
https://codereview.chromium.org/11312247/diff/1/src/v8natives.js File src/v8natives.js (right): https://codereview.chromium.org/11312247/diff/1/src/v8natives.js#newcode1159 src/v8natives.js:1159: if (IS_SPEC_FUNCTION(obj)) { On 2012/11/16 14:38:06, arv wrote: > ...
8 years, 1 month ago (2012-11-16 15:52:45 UTC) #4
arv (Not doing code reviews)
8 years, 1 month ago (2012-11-16 16:07:33 UTC) #5
On 2012/11/16 15:52:45, rossberg wrote:
> https://codereview.chromium.org/11312247/diff/1/src/v8natives.js
> File src/v8natives.js (right):
> 
> https://codereview.chromium.org/11312247/diff/1/src/v8natives.js#newcode1159
> src/v8natives.js:1159: if (IS_SPEC_FUNCTION(obj)) {
> On 2012/11/16 14:38:06, arv wrote:
> > On 2012/11/16 12:28:55, rossberg wrote:
> > > IS_FUNCTION probably is more adequate here, since it shouldn't be a proxy.
> > 
> > There are more poison pills than functionObj.caller
> > 
> > function.arguments
> > arguments.caller
> > arguments.callee
> 
> Yes, but this issue affects only "caller", because it is due to its special
> casing in 15.3.5.4.

Thanks. Very clear.

Adam, maybe add a comment to see 15.3.5.4?

Powered by Google App Engine
This is Rietveld 408576698