Closed Bug 671091 Opened 13 years ago Closed 13 years ago

Add DefinePropertiesAndBrand to consolidate branding with defining properties/methods

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: Waldo, Assigned: Waldo)

Details

Attachments

(1 file)

Attached patch PatchSplinter Review
      No description provided.
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
Closed: 13 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.

Attachment

General

Created:
Updated:
Size: