Closed
Bug 1444416
Opened 7 years ago
Closed 7 years ago
MOZ_CAN_RUN_SCRIPT doesn't work at all with references.
Categories
(Developer Infrastructure :: Source Code Analysis, defect)
Tracking
(firefox61 fixed)
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
(Blocks 1 open bug)
Details
Attachments
(3 files)
The following test fails:
MOZ_CAN_RUN_SCRIPT void test2_parent8() {
RefCountedBase* t = new RefCountedBase;
(*t).method_test(); // expected-error {{arguments must all be strong refs or parent parameters when calling a function marked as MOZ_CAN_RUN_SCRIPT (including the implicit object argument)}}
}
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → emilio
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
Comment hidden (mozreview-request) |
![]() |
||
Comment 6•7 years ago
|
||
mozreview-review |
Comment on attachment 8957667 [details]
Bug 1444416: Make bindings generate appropriate MOZ_KnownLive wrappers.
https://reviewboard.mozilla.org/r/226590/#review232460
::: dom/bindings/Codegen.py:7424
(Diff revision 1)
> a.type.isDOMString()):
> arg = CGWrapper(arg, pre="NonNullHelper(", post=")")
> +
> + # If it's an object, let the static analysis know it's alive for
> + # the duration of the call.
> + if a.type.isObject() or a.type.isGeckoInterface():
Why do you need the isObject() check? I don't think it makes sense, because MOZ_KnownLive only applies to refcounted stuff. So just the isGeckoInterface() check, please.
r=me with that.
Attachment #8957667 -
Flags: review?(bzbarsky) → review+
Comment hidden (mozreview-request) |
Comment 8•7 years ago
|
||
mozreview-review |
Comment on attachment 8957623 [details]
Bug 1444416: Handle references in the "can run script" checker.
https://reviewboard.mozilla.org/r/226506/#review232896
LGTM, thanks :-)
Attachment #8957623 -
Flags: review?(nika) → review+
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8957628 [details]
Bug 1444416: Make the diagnostic point to the bogus argument.
https://reviewboard.mozilla.org/r/226516/#review232898
Attachment #8957628 -
Flags: review?(nika) → review+
Comment 10•7 years ago
|
||
Pushed by ecoal95@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/6416568ad06b
Handle references in the "can run script" checker. r=mystor
https://hg.mozilla.org/integration/autoland/rev/4d8dcb700d09
Make the diagnostic point to the bogus argument. r=mystor
https://hg.mozilla.org/integration/autoland/rev/e1e268860e38
Make bindings generate appropriate MOZ_KnownLive wrappers. r=bz
Comment 11•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6416568ad06b
https://hg.mozilla.org/mozilla-central/rev/4d8dcb700d09
https://hg.mozilla.org/mozilla-central/rev/e1e268860e38
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox61:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Updated•7 years ago
|
Version: Version 3 → 3 Branch
Updated•3 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•