Closed Bug 771907 Opened 12 years ago Closed 8 years ago

Remove AbstractWrapper

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: ejpbruel, Unassigned)

References

Details

(Whiteboard: [js:t])

Attachments

(1 file)

The class AbstractWrapper is currently not used anywhere. More precisely, it looks like the only code that uses it does not use the policy enforcement traps, and could therefore inherit from IndirectProxyHandler instead. If that's true, it's probably better to get rid of this class. Proxies are currently in flux, and changes in other parts of the code could easily lead to AbstractWrapper breaking without us noticing it.
Attached patch Patch to be reviewed (deleted) — Splinter Review
Attachment #640200 - Flags: review?(bobbyholley+bmo)
Comment on attachment 640200 [details] [diff] [review]
Patch to be reviewed

This looks good! It also means, I think, that we no longer need the multiple inheritance for DirectWrapper, so we could just fold everything into DirectWrapper, and get rid of those toWrapper and toProxyHandler virtual methods. What do you think?
Attachment #640200 - Flags: review?(bobbyholley+bmo) → review+
Adding bug 771429 as a dependency, since it looks as bz might have a use for IndirectWrapper at all.
Depends on: 771429
(In reply to Bobby Holley (:bholley) from comment #2)
> Comment on attachment 640200 [details] [diff] [review]
> Patch to be reviewed
> 
> This looks good! It also means, I think, that we no longer need the multiple
> inheritance for DirectWrapper, so we could just fold everything into
> DirectWrapper, and get rid of those toWrapper and toProxyHandler virtual
> methods. What do you think?

Provided bz doesn't need IndirectWrapper, I totally agree :-)
Blocks: 772138
Whiteboard: [js:t]
(In reply to Bobby Holley (:bholley) from comment #2)
> Comment on attachment 640200 [details] [diff] [review]
> Patch to be reviewed
> 
> This looks good! It also means, I think, that we no longer need the multiple
> inheritance for DirectWrapper, so we could just fold everything into
> DirectWrapper, and get rid of those toWrapper and toProxyHandler virtual
> methods. What do you think?

My understanding of our last irc convo was that it is ok for us to move forward with this. Can you confirm?
Well, I think this patch wouldn't be correct until IndirectProxyHandler is unwrappable, right? Otherwise, we change the behavior of SandboxProxy.
(In reply to Bobby Holley (:bholley) from comment #6)
> Well, I think this patch wouldn't be correct until IndirectProxyHandler is
> unwrappable, right? Otherwise, we change the behavior of SandboxProxy.

You're right. Good thing that I double checked :-)
Assignee: ejpbruel → general
Assignee: general → nobody
Abstract/IndirectMapper was removed in https://hg.mozilla.org/mozilla-central/rev/da2e3ebd1c26
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: