aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/guard.rs
diff options
context:
space:
mode:
authorbors-servo <servo-ops@mozilla.com>2020-03-31 02:33:53 -0400
committerGitHub <noreply@github.com>2020-03-31 02:33:53 -0400
commitf9e7c6b9dc65fc178ef5e7e516bd777ef3bb5052 (patch)
tree481cf6eda0528a4475cb53d3edb6902ef52611e0 /components/script/dom/bindings/guard.rs
parent687156ac90d0cead80e89b63b9394d1a6f7a808e (diff)
parent74995a5287dc0af8afe62e9b537db5141b854765 (diff)
downloadservo-f9e7c6b9dc65fc178ef5e7e516bd777ef3bb5052.tar.gz
servo-f9e7c6b9dc65fc178ef5e7e516bd777ef3bb5052.zip
Auto merge of #26054 - shnmorimoto:fix_tojson_unconditionally_serializes, r=jdm
Fix tojson unconditionally serializes <!-- Please describe your changes on the following line: --> --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #25281 <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
Diffstat (limited to 'components/script/dom/bindings/guard.rs')
-rw-r--r--components/script/dom/bindings/guard.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/components/script/dom/bindings/guard.rs b/components/script/dom/bindings/guard.rs
index bba30e1581c..188d36fee17 100644
--- a/components/script/dom/bindings/guard.rs
+++ b/components/script/dom/bindings/guard.rs
@@ -50,7 +50,7 @@ pub enum Condition {
}
impl Condition {
- fn is_satisfied(&self, cx: JSContext, obj: HandleObject, global: HandleObject) -> bool {
+ pub fn is_satisfied(&self, cx: JSContext, obj: HandleObject, global: HandleObject) -> bool {
match *self {
Condition::Pref(name) => prefs::pref_map().get(name).as_bool().unwrap_or(false),
Condition::Func(f) => f(cx, obj),