Skip to content

Commit dd507d7

Browse files
committed
Bug 1793995 - Part 3: Remove the unused includeGlobs and excludeGlobs getters, r=kmag
These getters are never called and will make making the core of MatchGlob threadsafe more annoying. Differential Revision: https://phabricator.services.mozilla.com/D158881
1 parent 9a7e380 commit dd507d7

File tree

2 files changed

+0
-41
lines changed

2 files changed

+0
-41
lines changed

dom/chrome-webidl/WebExtensionContentScript.webidl

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,6 @@ interface MozDocumentMatcher {
7474
[Constant]
7575
readonly attribute MatchPatternSet? excludeMatches;
7676

77-
/**
78-
* A set of glob matchers for URLs in which this script should run. If this
79-
* list is present, the script will only run in URLs which match the
80-
* `matches` pattern as well as one of these globs.
81-
*/
82-
[Cached, Constant, Frozen]
83-
readonly attribute sequence<MatchGlob>? includeGlobs;
84-
85-
/**
86-
* A set of glob matchers for URLs in which this script should not run, even
87-
* if they match other include patterns or globs.
88-
*/
89-
[Cached, Constant, Frozen]
90-
readonly attribute sequence<MatchGlob>? excludeGlobs;
91-
9277
/**
9378
* The originAttributesPattern for which this script should be enabled for.
9479
*/

toolkit/components/extensions/WebExtensionContentScript.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ class MozDocumentMatcher : public nsISupports, public nsWrapperCache {
137137
MatchPatternSet* GetExcludeMatches() { return mExcludeMatches; }
138138
const MatchPatternSet* GetExcludeMatches() const { return mExcludeMatches; }
139139

140-
void GetIncludeGlobs(Nullable<MatchGlobArray>& aGlobs) {
141-
ToNullable(mExcludeGlobs, aGlobs);
142-
}
143-
void GetExcludeGlobs(Nullable<MatchGlobArray>& aGlobs) {
144-
ToNullable(mExcludeGlobs, aGlobs);
145-
}
146-
147140
Nullable<uint64_t> GetFrameID() const { return mFrameID; }
148141

149142
void GetOriginAttributesPatterns(JSContext* aCx,
@@ -179,25 +172,6 @@ class MozDocumentMatcher : public nsISupports, public nsWrapperCache {
179172
Nullable<uint64_t> mFrameID;
180173
bool mMatchAboutBlank;
181174
Nullable<dom::Sequence<OriginAttributesPattern>> mOriginAttributesPatterns;
182-
183-
private:
184-
template <typename T, typename U>
185-
void ToNullable(const Nullable<T>& aInput, Nullable<U>& aOutput) {
186-
if (aInput.IsNull()) {
187-
aOutput.SetNull();
188-
} else {
189-
aOutput.SetValue(aInput.Value());
190-
}
191-
}
192-
193-
template <typename T, typename U>
194-
void ToNullable(const Nullable<T>& aInput, Nullable<nsTArray<U>>& aOutput) {
195-
if (aInput.IsNull()) {
196-
aOutput.SetNull();
197-
} else {
198-
aOutput.SetValue(aInput.Value().Clone());
199-
}
200-
}
201175
};
202176

203177
class WebExtensionContentScript final : public MozDocumentMatcher {

0 commit comments

Comments
 (0)