Closed Bug 1012748 Opened 10 years ago Closed 10 years ago

remove nsIXPCSecurityManager

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

Attachments

(3 files)

Bobby indicated in bug 996061 that this interface should just be removed.
Removing it also makes parts of that bug easier, so let's go ahead and do that.
Getting rid of unused fields is a good starting point.
Attachment #8424934 - Flags: review?(bobbyholley)
Another minor cleanup before we get to the real patch.
Attachment #8424935 - Flags: review?(bobbyholley)
Finally, the removal.  Nothing complicated here.
Attachment #8424943 - Flags: review?(bobbyholley)
Blocks: 996061
Comment on attachment 8424934 [details] [diff] [review]
part 1 - remove unused mDefaultSecurityManager field

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

Good catch. I thought I removed this.
Attachment #8424934 - Flags: review?(bobbyholley) → review+
Attachment #8424935 - Flags: review?(bobbyholley) → review+
Comment on attachment 8424943 [details] [diff] [review]
part 3 - remove nsIXPCSecurityManager

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

\o/
Attachment #8424943 - Flags: review?(bobbyholley) → review+
Comment on attachment 8424943 [details] [diff] [review]
part 3 - remove nsIXPCSecurityManager

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

::: caps/idl/nsIScriptSecurityManager.idl
@@ +15,5 @@
> +#include "jspubtd.h"
> +%}
> +
> +[ptr] native JSContextPtr(JSContext);
> +[ptr] native JSObjectPtr(JSObject);

I don't think you need this.
(In reply to Tom Schuster [:evilpie] from comment #6)
> Comment on attachment 8424943 [details] [diff] [review]
> part 3 - remove nsIXPCSecurityManager
> 
> Review of attachment 8424943 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: caps/idl/nsIScriptSecurityManager.idl
> @@ +15,5 @@
> > +#include "jspubtd.h"
> > +%}
> > +
> > +[ptr] native JSContextPtr(JSContext);
> > +[ptr] native JSObjectPtr(JSObject);
> 
> I don't think you need this.

You do, since the newly-added can* methods for that interface take native pointer types.  Without those, you get:

Traceback (most recent call last):
  File "/home/froydnj/src/gecko-dev.git/config/pythonpath.py", line 56, in <module>
    main(sys.argv[1:])
  File "/home/froydnj/src/gecko-dev.git/config/pythonpath.py", line 48, in main
    execfile(script, frozenglobals)
  File "/home/froydnj/src/gecko-dev.git/python/mozbuild/mozbuild/action/xpidl-process.py", line 92, in <module>
    main(sys.argv[1:])
  File "/home/froydnj/src/gecko-dev.git/python/mozbuild/mozbuild/action/xpidl-process.py", line 89, in main
    args.xptdir, args.depsdir, args.module, args.idls)
  File "/home/froydnj/src/gecko-dev.git/python/mozbuild/mozbuild/action/xpidl-process.py", line 43, in process
    idl.resolve([input_dir] + inc_paths, p)
  File "/home/froydnj/src/gecko-dev.git/xpcom/idl-parser/xpidl.py", line 287, in resolve
    p.resolve(self)
  File "/home/froydnj/src/gecko-dev.git/xpcom/idl-parser/xpidl.py", line 516, in resolve
    member.resolve(self)
  File "/home/froydnj/src/gecko-dev.git/xpcom/idl-parser/xpidl.py", line 834, in resolve
    p.resolve(self)
  File "/home/froydnj/src/gecko-dev.git/xpcom/idl-parser/xpidl.py", line 944, in resolve
    self.realtype = method.iface.idl.getName(self.type, self.location)
  File "/home/froydnj/src/gecko-dev.git/xpcom/idl-parser/xpidl.py", line 271, in getName
    raise IDLError("type '%s' not found" % id, location)
xpidl.IDLError: error: type 'JSContextPtr' not found, ../../../dist/idl/nsIScriptSecurityManager.idl line 28:40
    [noscript] void canCreateWrapper(in JSContextPtr aJSContext,
>error: type 'JSContextPtr' not found

Seems like you removed JSContextPtr and not JSObjectPtr.
(In reply to Tom Schuster [:evilpie] from comment #8)
> >error: type 'JSContextPtr' not found
> 
> Seems like you removed JSContextPtr and not JSObjectPtr.

Ah, my mistake, I misread and thought you were saying that all of those could be removed.  I think you're correct, and will remove those before landing.
Assignee: nobody → nfroyd
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: