Closed
Bug 1316619
Opened 9 years ago
Closed 9 years ago
Add a [NeedsCallerType] IDL annotation
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla52
| Tracking | Status | |
|---|---|---|
| firefox52 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
|
19.66 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
See discussion in bug 1316480.
I'm going to build it on top of IsCallerChrome/ThreadsafeIsCallerChrome for now, I guess. Once bug 1316616 is sorted out we can change to that.
| Assignee | ||
Comment 1•9 years ago
|
||
Per IRC discussion, will do a mozilla::dom::CallerType enum.
Summary: Add a [NeedsCallerIsSystem] IDL annotation → Add a [NeedsCallerType] IDL annotation
| Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8809484 -
Flags: review?(bobbyholley)
Comment 3•9 years ago
|
||
Comment on attachment 8809484 [details] [diff] [review]
Add a [NeedsCallerType] WebIDL annotation
Review of attachment 8809484 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/bindings/Codegen.py
@@ +14085,5 @@
> # And the nsIPrincipal
> if self.member.getExtendedAttribute('NeedsSubjectPrincipal'):
> + # Cheat and assume self.descriptorProvider is a descriptor
> + if self.descriptorProvider.interface.isExposedInAnyWorker():
> + args.append(Argument("Maybe<nsIPrincipal*>", "aSubjectPrincipal"))
I don't see the code changes that cause us to set this Maybe<> up when being called from JS (instead of the nsIPrincipal& we had before). And isn't that whole thing kind of orthogonal to your patch here?
::: dom/bindings/test/TestExampleGen.webidl
@@ +806,5 @@
> +interface TestExampleWorkerInterface {
> + [NeedsSubjectPrincipal] void needsSubjectPrincipalMethod();
> + [NeedsSubjectPrincipal] attribute boolean needsSubjectPrincipalAttr;
> + [NeedsCallerType] void needsCallerTypeMethod();
> + [NeedsCallerType] attribute boolean needsCallerTypeAttr;
Nit: whitespace.
Attachment #8809484 -
Flags: review?(bobbyholley) → review+
| Assignee | ||
Comment 4•9 years ago
|
||
> And isn't that whole thing kind of orthogonal to your patch here?
It's orthogonal in the sense that the code to pass Maybe<nsIPrincipal*> already exists. I just encountered this bug in the example codegen when I added a worker-exposed interface that exercised some of this stuff, including my new thing... I suppose I could have spun this part off to a separate patch, sorry.
Pushed by bzbarsky@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a0d9aedec307
Add a [NeedsCallerType] WebIDL annotation. r=bholley
| Assignee | ||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•