The default bug view has changed. See this FAQ.

Add DefinePropertiesAndBrand to consolidate branding with defining properties/methods

RESOLVED FIXED in mozilla8

Status

()

Core
JavaScript Engine
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Waldo, Assigned: Waldo)

Tracking

unspecified
mozilla8
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 545490 [details] [diff] [review]
Patch
Attachment #545490 - Flags: review?(bhackett1024)
Comment on attachment 545490 [details] [diff] [review]
Patch

Review of attachment 545490 [details] [diff] [review]:
-----------------------------------------------------------------
Attachment #545490 - Flags: review?(bhackett1024) → review+
Comment on attachment 545490 [details] [diff] [review]
Patch

Review of attachment 545490 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jsobj.cpp
@@ +3834,5 @@
>              ctor->setProto(proto);
>      }
>  
> +    if (!DefinePropertiesAndBrand(cx, proto, ps, fs) ||
> +        (ctor != proto && !DefinePropertiesAndBrand(cx, ctor, static_ps, static_fs)))

Might want to assert that (ctor == proto) implies no static_ps or static_fs.
http://hg.mozilla.org/integration/mozilla-inbound/rev/800657b3354b

The JS_InitClass code path is eventually going to be moved into jsapi.cpp, so making changes here is a pain to bubble through my mq.  Perhaps I'll add this after that move happens.
Whiteboard: [inbound]
Target Milestone: --- → mozilla8
(In reply to comment #3)
> http://hg.mozilla.org/integration/mozilla-inbound/rev/800657b3354b

That commit massage is kind of broken...
http://hg.mozilla.org/mozilla-central/rev/800657b3354b
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Gaaaah...

I had a pre-push hook that would prevent me from pushing things like that, in the distant past.  I disabled it when I couldn't figure out a way to make it allow pushes to try, but disallow pushes elsewhere.  :-(  I should probably complain to hg people about that and figure out some sort of way to make it do what I want for try and for non-try.
(In reply to comment #6)
> Gaaaah...
> 
> I had a pre-push hook that would prevent me from pushing things like that, in
> the distant past.  I disabled it when I couldn't figure out a way to make it
> allow pushes to try, but disallow pushes elsewhere.  :-(  I should probably
> complain to hg people about that and figure out some sort of way to make it do
> what I want for try and for non-try.

Been there, done that!  ;-)

http://mercurial.selenic.com/bts/issue2859

It practically means that you can't write such a hook... :(
You need to log in before you can comment on or make changes to this bug.