Closed Bug 752578 Opened 8 years ago Closed 7 years ago

Remove JSGuardObjectNotifier and all the JS_GUARD_OBJECT* macros, use MOZ_GUARD_OBJECT* macros instead


(Core :: JavaScript Engine, defect, minor)

Not set





(Reporter: Waldo, Assigned: Waldo)


(Whiteboard: [js:t][lang=c++])


(4 files)

We should only use one implementation of this stuff.

I'd be happy to mentor this at a future time, but I'm a bit too hosed to do it right now, alas.  :-\
Whiteboard: [good first bug][lang=c++] → [js:t][good first bug][lang=c++]
Whiteboard: [js:t][good first bug][lang=c++] → [js:t][lang=c++][mentor=waldo]
Whiteboard: [js:t][lang=c++][mentor=waldo] → [js:t][lang=c++]
My mind turned to mush on the drive to Chicago last week, so I picked this up and finished it off, to make forward progress on something.
Assignee: general → jwalden+bmo
Attachment #697064 - Flags: review?(Ms2ger)
Attachment #697068 - Flags: review?(Ms2ger)
Comment on attachment 697064 [details] [diff] [review]
1 - Easy cases where the macros are only in the class definition

Review of attachment 697064 [details] [diff] [review]:

No objections to this patch from my side.

::: js/src/jsapi.h
@@ +5540,2 @@
>  class JSAutoByteString {

Didn't you want to move this { too?

::: js/src/jsutil.h
@@ +159,3 @@
>  template<typename T>
>  class AutoScopedAssign
>  {

Don't we have something like this in mfbt? If not, at least somewhere in Gecko... Followup please :)
Attachment #697064 - Flags: review?(Ms2ger) → review+
Comment on attachment 697066 [details] [diff] [review]
2 - Trickier cases with only-parameter uses, constructors defined out-of-line, etc.

Review of attachment 697066 [details] [diff] [review]:

Or this.
Attachment #697066 - Flags: review?(Ms2ger) → review+
Comment on attachment 697067 [details] [diff] [review]
3 - Fix instances in js/ipc (do we even build this any more?)

Review of attachment 697067 [details] [diff] [review]:

Bah. Do whatever you want with this code.
Attachment #697067 - Flags: review?(Ms2ger) → review+
Comment on attachment 697068 [details] [diff] [review]
4 - Remove JS_GUARD* macros

Review of attachment 697068 [details] [diff] [review]:

Good riddance!
Attachment #697068 - Flags: review?(Ms2ger) → review+
You need to log in before you can comment on or make changes to this bug.