Guest User

Untitled

a guest
Jun 23rd, 2021
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 113.26 KB | None | 0 0
  1. ./tests/unit/style/viewport.rs-        callback(&rule.declarations, meta);
  2. ./tests/unit/style/viewport.rs-    } else {
  3. ./tests/unit/style/viewport.rs:        panic!("no @viewport rule for {}", meta);
  4. ./tests/unit/style/viewport.rs-    }
  5. ./tests/unit/style/viewport.rs-}
  6. --
  7. ./tests/unit/style/stylesheets.rs-        }
  8. ./tests/unit/style/stylesheets.rs-        if errors.len() < expected_errors.len() {
  9. ./tests/unit/style/stylesheets.rs:            panic!("Missing errors: {:#?}", &expected_errors[errors.len()..]);
  10. ./tests/unit/style/stylesheets.rs-        }
  11. ./tests/unit/style/stylesheets.rs-        if errors.len() > expected_errors.len() {
  12. ./tests/unit/style/stylesheets.rs:            panic!("Extra errors: {:#?}", &errors[expected_errors.len()..]);
  13. ./tests/unit/style/stylesheets.rs-        }
  14. ./tests/unit/style/stylesheets.rs-    }
  15. --
  16. ./tests/unit/style/specified_values.rs-
  17. ./tests/unit/style/specified_values.rs-    if !failing_messages.is_empty() {
  18. ./tests/unit/style/specified_values.rs:        panic!("{}", failing_messages.join("\n\n"));
  19. ./tests/unit/style/specified_values.rs-    }
  20. ./tests/unit/style/specified_values.rs-}
  21. --
  22. ./tests/unit/style/rule_tree/bench.rs-impl ParseErrorReporter for ErrorringErrorReporter {
  23. ./tests/unit/style/rule_tree/bench.rs-    fn report_error(&self, url: &ServoUrl, location: SourceLocation, error: ContextualParseError) {
  24. ./tests/unit/style/rule_tree/bench.rs:        panic!(
  25. ./tests/unit/style/rule_tree/bench.rs-            "CSS error: {}\t\n{}:{} {}",
  26. ./tests/unit/style/rule_tree/bench.rs-            url.as_str(),
  27. --
  28. ./tests/unit/style/attr.rs-    match AttrValue::from_double(value, 0.0) {
  29. ./tests/unit/style/attr.rs-        AttrValue::Double(_, num) => assert_eq!(num, 43250f64),
  30. ./tests/unit/style/attr.rs:        _ => panic!("expected a double value"),
  31. ./tests/unit/style/attr.rs-    }
  32. ./tests/unit/style/attr.rs-}
  33. --
  34. ./tests/unit/style/attr.rs-    match AttrValue::from_double(value, 0.0) {
  35. ./tests/unit/style/attr.rs-        AttrValue::Double(_, num) => assert_eq!(num, -5.6f64),
  36. ./tests/unit/style/attr.rs:        _ => panic!("expected a double value"),
  37. ./tests/unit/style/attr.rs-    }
  38. ./tests/unit/style/attr.rs-}
  39. --
  40. ./tests/unit/style/attr.rs-    match AttrValue::from_double(value, 0.0) {
  41. ./tests/unit/style/attr.rs-        AttrValue::Double(_, num) => assert_eq!(num, 5.6f64),
  42. ./tests/unit/style/attr.rs:        _ => panic!("expected a double value"),
  43. ./tests/unit/style/attr.rs-    }
  44. ./tests/unit/style/attr.rs-}
  45. --
  46. ./tests/unit/style/attr.rs-    match AttrValue::from_limited_i32(value, 0) {
  47. ./tests/unit/style/attr.rs-        AttrValue::Int(_, 0) => (),
  48. ./tests/unit/style/attr.rs:        _ => panic!("expected an IndexSize error"),
  49. ./tests/unit/style/attr.rs-    }
  50. ./tests/unit/style/attr.rs-}
  51. --
  52. ./tests/unit/style/attr.rs-    match AttrValue::from_limited_i32(String::from("1"), 0) {
  53. ./tests/unit/style/attr.rs-        AttrValue::Int(_, 1) => (),
  54. ./tests/unit/style/attr.rs:        _ => panic!("expected an successful parsing"),
  55. ./tests/unit/style/attr.rs-    }
  56. ./tests/unit/style/attr.rs-}
  57. --
  58. ./tests/unit/style/attr.rs-    match AttrValue::from_limited_i32(String::from("parsed-value"), 0) {
  59. ./tests/unit/style/attr.rs-        AttrValue::Int(p, 0) => assert_eq!(p, String::from("parsed-value")),
  60. ./tests/unit/style/attr.rs:        _ => panic!("expected an successful parsing"),
  61. ./tests/unit/style/attr.rs-    }
  62. ./tests/unit/style/attr.rs-}
  63. --
  64. ./tests/unit/script/size_of.rs-            let old = $known_size;
  65. ./tests/unit/script/size_of.rs-            if new < old {
  66. ./tests/unit/script/size_of.rs:                panic!("Your changes have decreased the stack size of commonly used DOM struct {} from {} to {}. \
  67. ./tests/unit/script/size_of.rs-                        Good work! Please update the size in tests/unit/script/size_of.rs.",
  68. ./tests/unit/script/size_of.rs-                        stringify!($t), old, new)
  69. ./tests/unit/script/size_of.rs-            } else if new > old {
  70. ./tests/unit/script/size_of.rs:                panic!("Your changes have increased the stack size of commonly used DOM struct {} from {} to {}. \
  71. ./tests/unit/script/size_of.rs-                        These structs are present in large quantities in the DOM, and increasing the size \
  72. ./tests/unit/script/size_of.rs-                        may dramatically affect our memory footprint. Please consider choosing a design which \
  73. --
  74. ./ports/winit/events_loop.rs-            EventLoop::Winit(Some(ref event_loop)) => event_loop,
  75. ./ports/winit/events_loop.rs-            EventLoop::Winit(None) | EventLoop::Headless(..) => {
  76. ./ports/winit/events_loop.rs:                panic!("Can't access winit event loop while using the fake headless event loop")
  77. ./ports/winit/events_loop.rs-            },
  78. ./ports/winit/events_loop.rs-        }
  79. --
  80. ./ports/libsimpleservo/capi/src/lib.rs-        None => Err("Servo not available in this thread"),
  81. ./ports/libsimpleservo/capi/src/lib.rs-    }) {
  82. ./ports/libsimpleservo/capi/src/lib.rs:        Err(e) => panic!("{}", e),
  83. ./ports/libsimpleservo/capi/src/lib.rs-        Ok(r) => r,
  84. ./ports/libsimpleservo/capi/src/lib.rs-    }
  85. --
  86. ./ports/gstplugin/servowebsrc.rs-                (connection.0, url, webxr_mode, prefs, size)
  87. ./ports/gstplugin/servowebsrc.rs-            },
  88. ./ports/gstplugin/servowebsrc.rs:            e => panic!("Failed to start ({:?})", e),
  89. ./ports/gstplugin/servowebsrc.rs-        };
  90. ./ports/gstplugin/servowebsrc.rs-        info!(
  91. --
  92. ./ports/gstplugin/servowebsrc.rs-                    Some("cubemap") => Some(WebXRMode::Cubemap),
  93. ./ports/gstplugin/servowebsrc.rs-                    Some("spherical") => Some(WebXRMode::Spherical),
  94. ./ports/gstplugin/servowebsrc.rs:                    Some(mode) => panic!("Unknown WebXR mode {}", mode),
  95. ./ports/gstplugin/servowebsrc.rs-                };
  96. ./ports/gstplugin/servowebsrc.rs-                *guard = webxr_mode;
  97. --
  98. ./etc/ci/check_no_panic.sh-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
  99. ./etc/ci/check_no_panic.sh-
  100. ./etc/ci/check_no_panic.sh:# Make sure listed paths do not use unwrap() or panic!()
  101. ./etc/ci/check_no_panic.sh-
  102. ./etc/ci/check_no_panic.sh-set -o errexit
  103. --
  104. ./etc/ci/check_no_panic.sh-ls -1 "${PATHS[@]}"
  105. ./etc/ci/check_no_panic.sh-
  106. ./etc/ci/check_no_panic.sh:# Make sure the files do not contain "unwrap" or "panic!"
  107. ./etc/ci/check_no_panic.sh-! grep \
  108. ./etc/ci/check_no_panic.sh-    --dereference-recursive \
  109. ./etc/ci/check_no_panic.sh-    --line-number \
  110. ./etc/ci/check_no_panic.sh-    --with-filename \
  111. ./etc/ci/check_no_panic.sh:    "unwrap(\|panic!(" \
  112. ./etc/ci/check_no_panic.sh-    "${PATHS[@]}"
  113. --
  114. ./components/webrender_traits/lib.rs-                let texture_id = match source {
  115. ./components/webrender_traits/lib.rs-                    WebrenderImageSource::TextureHandle(b) => b,
  116. ./components/webrender_traits/lib.rs:                    _ => panic!("Wrong type"),
  117. ./components/webrender_traits/lib.rs-                };
  118. ./components/webrender_traits/lib.rs-                webrender_api::ExternalImage {
  119. --
  120. ./components/webrender_traits/lib.rs-                let texture_id = match source {
  121. ./components/webrender_traits/lib.rs-                    WebrenderImageSource::TextureHandle(b) => b,
  122. ./components/webrender_traits/lib.rs:                    _ => panic!("Wrong type"),
  123. ./components/webrender_traits/lib.rs-                };
  124. ./components/webrender_traits/lib.rs-                webrender_api::ExternalImage {
  125. --
  126. ./components/webrender_traits/lib.rs-                let buffer = match source {
  127. ./components/webrender_traits/lib.rs-                    WebrenderImageSource::Raw(b) => b,
  128. ./components/webrender_traits/lib.rs:                    _ => panic!("Wrong type"),
  129. ./components/webrender_traits/lib.rs-                };
  130. ./components/webrender_traits/lib.rs-                webrender_api::ExternalImage {
  131. --
  132. ./components/webdriver_server/lib.rs-            match server::start(SocketAddr::V4(address), handler, extension_routes()) {
  133. ./components/webdriver_server/lib.rs-                Ok(listening) => info!("WebDriver server listening on {}", listening.socket),
  134. ./components/webdriver_server/lib.rs:                Err(_) => panic!("Unable to start WebDriver HTTPD server"),
  135. ./components/webdriver_server/lib.rs-            }
  136. ./components/webdriver_server/lib.rs-        })
  137. --
  138. ./components/style/values/specified/length.rs-            NoCalcLength::FontRelative(v) => NoCalcLength::FontRelative(v * scalar),
  139. ./components/style/values/specified/length.rs-            NoCalcLength::ViewportPercentage(v) => NoCalcLength::ViewportPercentage(v * scalar),
  140. ./components/style/values/specified/length.rs:            NoCalcLength::ServoCharacterWidth(_) => panic!("Can't multiply ServoCharacterWidth!"),
  141. ./components/style/values/specified/length.rs-        }
  142. ./components/style/values/specified/length.rs-    }
  143. --
  144. ./components/style/values/specified/length.rs-        match self {
  145. ./components/style/values/specified/length.rs-            Length::NoCalc(inner) => Length::NoCalc(inner * scalar),
  146. ./components/style/values/specified/length.rs:            Length::Calc(..) => panic!("Can't multiply Calc!"),
  147. ./components/style/values/specified/length.rs-        }
  148. ./components/style/values/specified/length.rs-    }
  149. --
  150. ./components/style/thread_state.rs-        if let Some(ref s) = *k.borrow() {
  151. ./components/style/thread_state.rs-            if x != *s {
  152. ./components/style/thread_state.rs:                panic!("Thread state already initialized as {:?}", s);
  153. ./components/style/thread_state.rs-            }
  154. ./components/style/thread_state.rs-        }
  155. --
  156. ./components/style/stylesheets/keyframes_rule.rs-                    PropertyDeclaration::CSSWideKeyword(..) => None,
  157. ./components/style/stylesheets/keyframes_rule.rs-                    PropertyDeclaration::WithVariables(..) => None,
  158. ./components/style/stylesheets/keyframes_rule.rs:                    _ => panic!(),
  159. ./components/style/stylesheets/keyframes_rule.rs-                }
  160. ./components/style/stylesheets/keyframes_rule.rs-            },
  161. ./components/style/stylesheets/keyframes_rule.rs-            KeyframesStepValue::ComputedValues => {
  162. ./components/style/stylesheets/keyframes_rule.rs:                panic!("Shouldn't happen to set animation-timing-function in missing keyframes")
  163. ./components/style/stylesheets/keyframes_rule.rs-            },
  164. ./components/style/stylesheets/keyframes_rule.rs-        }
  165. --
  166. ./components/style/shared_lock.rs-impl<T: ToShmem> ToShmem for Locked<T> {
  167. ./components/style/shared_lock.rs-    fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> to_shmem::Result<Self> {
  168. ./components/style/shared_lock.rs:        panic!("ToShmem not supported in Servo currently")
  169. ./components/style/shared_lock.rs-    }
  170. ./components/style/shared_lock.rs-}
  171. --
  172. ./components/style/properties/properties.mako.rs-            StyleStructRef::Owned(ref mut v) => v,
  173. ./components/style/properties/properties.mako.rs-            StyleStructRef::Borrowed(..) => unreachable!(),
  174. ./components/style/properties/properties.mako.rs:            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
  175. ./components/style/properties/properties.mako.rs-        }
  176. ./components/style/properties/properties.mako.rs-    }
  177. --
  178. ./components/style/properties/properties.mako.rs-                &**arc as *const T == struct_to_copy_from as *const T
  179. ./components/style/properties/properties.mako.rs-            }
  180. ./components/style/properties/properties.mako.rs:            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
  181. ./components/style/properties/properties.mako.rs-        }
  182. ./components/style/properties/properties.mako.rs-    }
  183. --
  184. ./components/style/properties/properties.mako.rs-            StyleStructRef::Owned(arc) => arc,
  185. ./components/style/properties/properties.mako.rs-            StyleStructRef::Borrowed(arc) => UniqueArc::new((**arc).clone()),
  186. ./components/style/properties/properties.mako.rs:            StyleStructRef::Vacated => panic!("Accessed vacated style struct"),
  187. ./components/style/properties/properties.mako.rs-        }
  188. ./components/style/properties/properties.mako.rs-    }
  189. --
  190. ./components/style/properties/properties.mako.rs-            StyleStructRef::Owned(ref mut v) => Some(v),
  191. ./components/style/properties/properties.mako.rs-            StyleStructRef::Borrowed(..) => None,
  192. ./components/style/properties/properties.mako.rs:            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
  193. ./components/style/properties/properties.mako.rs-        }
  194. ./components/style/properties/properties.mako.rs-    }
  195. --
  196. ./components/style/properties/properties.mako.rs-            StyleStructRef::Owned(v) => v.shareable(),
  197. ./components/style/properties/properties.mako.rs-            StyleStructRef::Borrowed(v) => clone_arc(v),
  198. ./components/style/properties/properties.mako.rs:            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
  199. ./components/style/properties/properties.mako.rs-        }
  200. ./components/style/properties/properties.mako.rs-    }
  201. --
  202. ./components/style/properties/properties.mako.rs-            StyleStructRef::Owned(ref v) => &**v,
  203. ./components/style/properties/properties.mako.rs-            StyleStructRef::Borrowed(v) => &**v,
  204. ./components/style/properties/properties.mako.rs:            StyleStructRef::Vacated => panic!("Accessed vacated style struct")
  205. ./components/style/properties/properties.mako.rs-        }
  206. ./components/style/properties/properties.mako.rs-    }
  207. --
  208. ./components/style/properties/helpers/animated_properties.mako.rs-            }
  209. ./components/style/properties/helpers/animated_properties.mako.rs-            _ => {
  210. ./components/style/properties/helpers/animated_properties.mako.rs:                panic!("non-convertible nsCSSPropertyID")
  211. ./components/style/properties/helpers/animated_properties.mako.rs-            }
  212. ./components/style/properties/helpers/animated_properties.mako.rs-        }
  213. --
  214. ./components/style/properties/helpers/animated_properties.mako.rs-            let other_tag = *(other as *const _ as *const u16);
  215. ./components/style/properties/helpers/animated_properties.mako.rs-            if this_tag != other_tag {
  216. ./components/style/properties/helpers/animated_properties.mako.rs:                panic!("Unexpected AnimationValue::animate call");
  217. ./components/style/properties/helpers/animated_properties.mako.rs-            }
  218. ./components/style/properties/helpers/animated_properties.mako.rs-
  219. --
  220. ./components/style/properties/helpers/animated_properties.mako.rs-            let other_tag = *(other as *const _ as *const u16);
  221. ./components/style/properties/helpers/animated_properties.mako.rs-            if this_tag != other_tag {
  222. ./components/style/properties/helpers/animated_properties.mako.rs:                panic!("Unexpected AnimationValue::compute_squared_distance call");
  223. ./components/style/properties/helpers/animated_properties.mako.rs-            }
  224. ./components/style/properties/helpers/animated_properties.mako.rs-
  225. --
  226. ./components/style/properties/helpers.mako.rs-                }
  227. ./components/style/properties/helpers.mako.rs-                PropertyDeclaration::WithVariables(..) => {
  228. ./components/style/properties/helpers.mako.rs:                    panic!("variables should already have been substituted")
  229. ./components/style/properties/helpers.mako.rs-                }
  230. ./components/style/properties/helpers.mako.rs:                _ => panic!("entered the wrong cascade_property() implementation"),
  231. ./components/style/properties/helpers.mako.rs-            };
  232. ./components/style/properties/helpers.mako.rs-
  233. --
  234. ./components/style/properties/helpers.mako.rs-                    ${to_rust_ident(value).upper()} => ${type}::${to_camel_case(value)},
  235. ./components/style/properties/helpers.mako.rs-                % endfor
  236. ./components/style/properties/helpers.mako.rs:                _ => panic!("Found unexpected value in style struct for ${keyword.name} property"),
  237. ./components/style/properties/helpers.mako.rs-            }
  238. ./components/style/properties/helpers.mako.rs-        }
  239. --
  240. ./components/style/properties/gecko.mako.rs-            % endfor
  241. ./components/style/properties/gecko.mako.rs-            % if keyword.gecko_inexhaustive:
  242. ./components/style/properties/gecko.mako.rs:            _ => panic!("Found unexpected value in style struct for ${ident} property"),
  243. ./components/style/properties/gecko.mako.rs-            % endif
  244. ./components/style/properties/gecko.mako.rs-        }
  245. --
  246. ./components/style/properties/gecko.mako.rs-            % endfor
  247. ./components/style/properties/gecko.mako.rs-            % if keyword.gecko_inexhaustive:
  248. ./components/style/properties/gecko.mako.rs:            _ => panic!("Found unexpected value in style struct for ${ident} property"),
  249. ./components/style/properties/gecko.mako.rs-            % endif
  250. ./components/style/properties/gecko.mako.rs-        }
  251. --
  252. ./components/style/properties/gecko.mako.rs-            % endfor
  253. ./components/style/properties/gecko.mako.rs-            % if keyword.gecko_inexhaustive:
  254. ./components/style/properties/gecko.mako.rs:            _ => panic!("Found unexpected value for animation-${ident}"),
  255. ./components/style/properties/gecko.mako.rs-            % endif
  256. ./components/style/properties/gecko.mako.rs-        }
  257. --
  258. ./components/style/properties/gecko.mako.rs-                        % endfor
  259. ./components/style/properties/gecko.mako.rs-                        % if keyword.gecko_inexhaustive:
  260. ./components/style/properties/gecko.mako.rs:                        _ => panic!("Found unexpected value in style struct for ${ident} property"),
  261. ./components/style/properties/gecko.mako.rs-                        % endif
  262. ./components/style/properties/gecko.mako.rs-                    }
  263. --
  264. ./components/style/properties/gecko.mako.rs-                StyleImageLayerRepeat::Round => BackgroundRepeatKeyword::Round,
  265. ./components/style/properties/gecko.mako.rs-                StyleImageLayerRepeat::NoRepeat => BackgroundRepeatKeyword::NoRepeat,
  266. ./components/style/properties/gecko.mako.rs:                _ => panic!("Found unexpected value in style struct for ${shorthand}_repeat property"),
  267. ./components/style/properties/gecko.mako.rs-            }
  268. ./components/style/properties/gecko.mako.rs-        }
  269. --
  270. ./components/style/gecko/wrapper.rs-
  271. ./components/style/gecko/wrapper.rs-    fn did_process_child(&self) -> isize {
  272. ./components/style/gecko/wrapper.rs:        panic!("Atomic child count not implemented in Gecko");
  273. ./components/style/gecko/wrapper.rs-    }
  274. ./components/style/gecko/wrapper.rs-
  275. --
  276. ./components/style/build_gecko.rs-    match toml::from_str::<Table>(&contents) {
  277. ./components/style/build_gecko.rs-        Ok(result) => result,
  278. ./components/style/build_gecko.rs:        Err(e) => panic!("Failed to parse config file: {}", e),
  279. ./components/style/build_gecko.rs-    }
  280. ./components/style/build_gecko.rs-}
  281. --
  282. ./components/style/build_gecko.rs-        let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
  283. ./components/style/build_gecko.rs-        if !path.is_absolute() || !path.is_dir() {
  284. ./components/style/build_gecko.rs:            panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
  285. ./components/style/build_gecko.rs-        }
  286. ./components/style/build_gecko.rs-        path
  287. --
  288. ./components/style/build_gecko.rs-    let file = match search_include(name) {
  289. ./components/style/build_gecko.rs-        Some(file) => file,
  290. ./components/style/build_gecko.rs:        None => panic!("Include not found: {}", name),
  291. ./components/style/build_gecko.rs-    };
  292. ./components/style/build_gecko.rs-    let result = String::from(file.to_str().unwrap());
  293. --
  294. ./components/style/build_gecko.rs-        Ok(bindings) => bindings.to_string(),
  295. ./components/style/build_gecko.rs-        Err(_) => {
  296. ./components/style/build_gecko.rs:            panic!(
  297. ./components/style/build_gecko.rs-                "Failed to generate bindings, flags: {:?}",
  298. ./components/style/build_gecko.rs-                command_line_opts
  299. --
  300. ./components/style/build_gecko.rs-        for key in self.config.keys() {
  301. ./components/style/build_gecko.rs-            if !self.used_keys.contains(key.as_str()) {
  302. ./components/style/build_gecko.rs:                panic!("Unknown key: {}", key);
  303. ./components/style/build_gecko.rs-            }
  304. ./components/style/build_gecko.rs-        }
  305. --
  306. ./components/style/build.rs-            }
  307. ./components/style/build.rs-        }
  308. ./components/style/build.rs:        panic!(
  309. ./components/style/build.rs-            "Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
  310. ./components/style/build.rs-            candidates.join(", ")
  311. --
  312. ./components/style/build.rs-        (false, true, true, false) => "servo-2013",
  313. ./components/style/build.rs-        (false, true, false, true) => "servo-2020",
  314. ./components/style/build.rs:        _ => panic!(
  315. ./components/style/build.rs-            "\n\n\
  316. ./components/style/build.rs-             The style crate requires enabling one of its 'servo' or 'gecko' feature flags \
  317. --
  318. ./components/style/bloom.rs-                        break;
  319. ./components/style/bloom.rs-                    } else {
  320. ./components/style/bloom.rs:                        panic!("should have found a common ancestor");
  321. ./components/style/bloom.rs-                    }
  322. ./components/style/bloom.rs-                },
  323. --
  324. ./components/style/attr.rs-        match *self {
  325. ./components/style/attr.rs-            AttrValue::TokenList(_, ref tokens) => tokens,
  326. ./components/style/attr.rs:            _ => panic!("Tokens not found"),
  327. ./components/style/attr.rs-        }
  328. ./components/style/attr.rs-    }
  329. --
  330. ./components/style/attr.rs-        match *self {
  331. ./components/style/attr.rs-            AttrValue::Atom(ref value) => value,
  332. ./components/style/attr.rs:            _ => panic!("Atom not found"),
  333. ./components/style/attr.rs-        }
  334. ./components/style/attr.rs-    }
  335. --
  336. ./components/style/attr.rs-        match *self {
  337. ./components/style/attr.rs-            AttrValue::Color(_, ref color) => color.as_ref(),
  338. ./components/style/attr.rs:            _ => panic!("Color not found"),
  339. ./components/style/attr.rs-        }
  340. ./components/style/attr.rs-    }
  341. --
  342. ./components/style/attr.rs-        match *self {
  343. ./components/style/attr.rs-            AttrValue::Dimension(_, ref l) => l,
  344. ./components/style/attr.rs:            _ => panic!("Dimension not found"),
  345. ./components/style/attr.rs-        }
  346. ./components/style/attr.rs-    }
  347. --
  348. ./components/style/attr.rs-        match *self {
  349. ./components/style/attr.rs-            AttrValue::ResolvedUrl(_, ref url) => url.as_ref(),
  350. ./components/style/attr.rs:            _ => panic!("Url not found"),
  351. ./components/style/attr.rs-        }
  352. ./components/style/attr.rs-    }
  353. --
  354. ./components/style/attr.rs-            value
  355. ./components/style/attr.rs-        } else {
  356. ./components/style/attr.rs:            panic!("Uint not found");
  357. ./components/style/attr.rs-        }
  358. ./components/style/attr.rs-    }
  359. --
  360. ./components/style/attr.rs-            LengthOrPercentageOrAuto::Length(Au::from_px(value as i32))
  361. ./components/style/attr.rs-        } else {
  362. ./components/style/attr.rs:            panic!("Uint not found");
  363. ./components/style/attr.rs-        }
  364. ./components/style/attr.rs-    }
  365. --
  366. ./components/size_of_test/lib.rs-            let old = $expected_size;
  367. ./components/size_of_test/lib.rs-            if new < old {
  368. ./components/size_of_test/lib.rs:                panic!(
  369. ./components/size_of_test/lib.rs-                    "Your changes have decreased the stack size of {} from {} to {}. \
  370. ./components/size_of_test/lib.rs-                     Good work! Please update the expected size in {}.",
  371. --
  372. ./components/size_of_test/lib.rs-                )
  373. ./components/size_of_test/lib.rs-            } else if new > old {
  374. ./components/size_of_test/lib.rs:                panic!(
  375. ./components/size_of_test/lib.rs-                    "Your changes have increased the stack size of {} from {} to {}. \
  376. ./components/size_of_test/lib.rs-                     Please consider choosing a design which avoids this increase. \
  377. --
  378. ./components/servo_arc/lib.rs-                Layout::from_size_align_unchecked(size, align_of::<u64>())
  379. ./components/servo_arc/lib.rs-            } else {
  380. ./components/servo_arc/lib.rs:                panic!("Over-aligned type not handled");
  381. ./components/servo_arc/lib.rs-            };
  382. ./components/servo_arc/lib.rs-
  383. --
  384. ./components/servo/lib.rs-))]
  385. ./components/servo/lib.rs-fn create_sandbox() {
  386. ./components/servo/lib.rs:    panic!("Sandboxing is not supported on Windows, iOS, ARM targets and android.");
  387. ./components/servo/lib.rs-}
  388. ./components/servo/lib.rs-
  389. --
  390. ./components/servo/build.rs-            }
  391. ./components/servo/build.rs-        }
  392. ./components/servo/build.rs:        panic!(
  393. ./components/servo/build.rs-            "Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
  394. ./components/servo/build.rs-            candidates.join(", ")
  395. --
  396. ./components/selectors/parser.rs-        match self.0.slice[index] {
  397. ./components/selectors/parser.rs-            Component::Combinator(c) => c,
  398. ./components/selectors/parser.rs:            ref other => panic!(
  399. ./components/selectors/parser.rs-                "Not a combinator: {:?}, {:?}, index: {}",
  400. ./components/selectors/parser.rs-                other, self, index
  401. --
  402. ./components/selectors/parser.rs-        match self.0.slice[self.len() - index - 1] {
  403. ./components/selectors/parser.rs-            Component::Combinator(c) => c,
  404. ./components/selectors/parser.rs:            ref other => panic!(
  405. ./components/selectors/parser.rs-                "Not a combinator: {:?}, {:?}, index: {}",
  406. ./components/selectors/parser.rs-                other, self, index
  407. --
  408. ./components/script_traits/transferable.rs-        match self.state {
  409. ./components/script_traits/transferable.rs-            MessagePortState::Detached => {
  410. ./components/script_traits/transferable.rs:                panic!("Messageport set_has_been_shipped called in detached state")
  411. ./components/script_traits/transferable.rs-            },
  412. ./components/script_traits/transferable.rs-            MessagePortState::Enabled(_) => self.state = MessagePortState::Enabled(true),
  413. --
  414. ./components/script_traits/lib.rs-            8 => MediaSessionActionType::Stop,
  415. ./components/script_traits/lib.rs-            9 => MediaSessionActionType::SeekTo,
  416. ./components/script_traits/lib.rs:            _ => panic!("Unknown MediaSessionActionType"),
  417. ./components/script_traits/lib.rs-        }
  418. ./components/script_traits/lib.rs-    }
  419. --
  420. ./components/script/script_thread.rs-        match self.recv() {
  421. ./components/script/script_thread.rs-            Ok(MainThreadScriptMsg::Common(script_msg)) => Ok(script_msg),
  422. ./components/script/script_thread.rs:            Ok(_) => panic!("unexpected main thread event message!"),
  423. ./components/script/script_thread.rs-            Err(_) => Err(()),
  424. ./components/script/script_thread.rs-        }
  425. --
  426. ./components/script/script_thread.rs-        match self.recv().map(|(_, msg)| msg) {
  427. ./components/script/script_thread.rs-            Ok(MainThreadScriptMsg::Common(script_msg)) => Ok(script_msg),
  428. ./components/script/script_thread.rs:            Ok(_) => panic!("unexpected main thread event message!"),
  429. ./components/script/script_thread.rs-            Err(_) => Err(()),
  430. ./components/script/script_thread.rs-        }
  431. --
  432. ./components/script/script_thread.rs-            msg @ ConstellationControlMsg::ExitFullScreen(..) |
  433. ./components/script/script_thread.rs-            msg @ ConstellationControlMsg::ExitScriptThread => {
  434. ./components/script/script_thread.rs:                panic!("should have handled {:?} already", msg)
  435. ./components/script/script_thread.rs-            },
  436. ./components/script/script_thread.rs-        }
  437. --
  438. ./components/script/script_thread.rs-
  439. ./components/script/script_thread.rs-        match current_layout_chan {
  440. ./components/script/script_thread.rs:            None => panic!("Layout attached to empty script thread."),
  441. ./components/script/script_thread.rs-            // Tell the layout thread factory to actually spawn the thread.
  442. ./components/script/script_thread.rs-            Some(layout_chan) => layout_chan.send(msg).unwrap(),
  443. --
  444. ./components/script/dom/xrspace.rs-            }
  445. ./components/script/dom/xrspace.rs-        } else {
  446. ./components/script/dom/xrspace.rs:            panic!("invalid space found")
  447. ./components/script/dom/xrspace.rs-        }
  448. ./components/script/dom/xrspace.rs-    }
  449. --
  450. ./components/script/dom/xrreferencespace.rs-            XRReferenceSpaceType::Viewer => webxr_api::BaseSpace::Viewer,
  451. ./components/script/dom/xrreferencespace.rs-            XRReferenceSpaceType::Local_floor => webxr_api::BaseSpace::Floor,
  452. ./components/script/dom/xrreferencespace.rs:            _ => panic!("unsupported reference space found"),
  453. ./components/script/dom/xrreferencespace.rs-        };
  454. ./components/script/dom/xrreferencespace.rs-        let offset = self.offset.transform();
  455. --
  456. ./components/script/dom/workerglobalscope.rs-            return service_worker.script_chan();
  457. ./components/script/dom/workerglobalscope.rs-        } else {
  458. ./components/script/dom/workerglobalscope.rs:            panic!("need to implement a sender for SharedWorker")
  459. ./components/script/dom/workerglobalscope.rs-        }
  460. ./components/script/dom/workerglobalscope.rs-    }
  461. --
  462. ./components/script/dom/workerglobalscope.rs-            return dedicated.new_script_pair();
  463. ./components/script/dom/workerglobalscope.rs-        } else {
  464. ./components/script/dom/workerglobalscope.rs:            panic!("need to implement a sender for SharedWorker/ServiceWorker")
  465. ./components/script/dom/workerglobalscope.rs-        }
  466. ./components/script/dom/workerglobalscope.rs-    }
  467. --
  468. ./components/script/dom/window.rs-        let proxy = match self.window_proxy.get() {
  469. ./components/script/dom/window.rs-            Some(proxy) => proxy,
  470. ./components/script/dom/window.rs:            None => panic!("Discarding a BC from a window that has none"),
  471. ./components/script/dom/window.rs-        };
  472. ./components/script/dom/window.rs-        proxy.discard_browsing_context();
  473. --
  474. ./components/script/dom/window.rs-            Ok(reflow_complete) => reflow_complete,
  475. ./components/script/dom/window.rs-            Err(TryRecvError::Disconnected) => {
  476. ./components/script/dom/window.rs:                panic!("Layout thread failed while script was waiting for a result.");
  477. ./components/script/dom/window.rs-            },
  478. ./components/script/dom/window.rs-        };
  479. --
  480. ./components/script/dom/websocket.rs-
  481. ./components/script/dom/websocket.rs-        match data_byte_len.checked_add(self.buffered_amount.get()) {
  482. ./components/script/dom/websocket.rs:            None => panic!(),
  483. ./components/script/dom/websocket.rs-            Some(new_amount) => self.buffered_amount.set(new_amount),
  484. ./components/script/dom/websocket.rs-        };
  485. --
  486. ./components/script/dom/webglrenderingcontext.rs-                uniform_typed::<Float32>(*cx, &uniform_get(triple, WebGLCommand::GetUniformFloat16))
  487. ./components/script/dom/webglrenderingcontext.rs-            },
  488. ./components/script/dom/webglrenderingcontext.rs:            _ => panic!("wrong uniform type"),
  489. ./components/script/dom/webglrenderingcontext.rs-        }
  490. ./components/script/dom/webglrenderingcontext.rs-    }
  491. --
  492. ./components/script/dom/testbinding.rs-
  493. ./components/script/dom/testbinding.rs-    fn Panic(&self) {
  494. ./components/script/dom/testbinding.rs:        panic!("explicit panic from script")
  495. ./components/script/dom/testbinding.rs-    }
  496. ./components/script/dom/testbinding.rs-
  497. --
  498. ./components/script/dom/servoparser/html.rs-                    NodeTypeId::DocumentFragment(_) => {},
  499. ./components/script/dom/servoparser/html.rs-
  500. ./components/script/dom/servoparser/html.rs:                    NodeTypeId::Document(_) => panic!("Can't serialize Document node itself"),
  501. ./components/script/dom/servoparser/html.rs:                    NodeTypeId::Element(_) => panic!("Element shouldn't appear here"),
  502. ./components/script/dom/servoparser/html.rs:                    NodeTypeId::Attr => panic!("Attr shouldn't appear here"),
  503. ./components/script/dom/servoparser/html.rs-                },
  504. ./components/script/dom/servoparser/html.rs-            }
  505. --
  506. ./components/script/dom/servoparser/async_html.rs-
  507. ./components/script/dom/servoparser/async_html.rs-    fn complete_script(&mut self, _: &Self::Handle) -> NextParserState {
  508. ./components/script/dom/servoparser/async_html.rs:        panic!("complete_script should not be called here!");
  509. ./components/script/dom/servoparser/async_html.rs-    }
  510. ./components/script/dom/servoparser/async_html.rs-
  511. --
  512. ./components/script/dom/serviceworkerglobalscope.rs-    fn inactive_msg() -> Self {
  513. ./components/script/dom/serviceworkerglobalscope.rs-        // Inactive is only relevant in the context of a browsing-context event-loop.
  514. ./components/script/dom/serviceworkerglobalscope.rs:        panic!("Workers should never receive messages marked as inactive");
  515. ./components/script/dom/serviceworkerglobalscope.rs-    }
  516. ./components/script/dom/serviceworkerglobalscope.rs-
  517. --
  518. ./components/script/dom/request.rs-            NetTraitsRequestDestination::AudioWorklet |
  519. ./components/script/dom/request.rs-            NetTraitsRequestDestination::PaintWorklet => {
  520. ./components/script/dom/request.rs:                panic!("ServiceWorker request destination should not be exposed to DOM")
  521. ./components/script/dom/request.rs-            },
  522. ./components/script/dom/request.rs-            NetTraitsRequestDestination::SharedWorker => RequestDestination::Sharedworker,
  523. --
  524. ./components/script/dom/readablestream.rs-    pub fn read_a_chunk(&self) -> Rc<Promise> {
  525. ./components/script/dom/readablestream.rs-        if !self.has_reader.get() {
  526. ./components/script/dom/readablestream.rs:            panic!("Attempt to read stream chunk without having acquired a reader.");
  527. ./components/script/dom/readablestream.rs-        }
  528. ./components/script/dom/readablestream.rs-
  529. --
  530. ./components/script/dom/readablestream.rs-    pub fn stop_reading(&self) {
  531. ./components/script/dom/readablestream.rs-        if !self.has_reader.get() {
  532. ./components/script/dom/readablestream.rs:            panic!("ReadableStream::stop_reading called on a readerless stream.");
  533. ./components/script/dom/readablestream.rs-        }
  534. ./components/script/dom/readablestream.rs-
  535. --
  536. ./components/script/dom/promise.rs-            InRealm::Already(&in_realm_proof),
  537. ./components/script/dom/promise.rs-        ),
  538. ./components/script/dom/promise.rs:        _ => panic!("unexpected native handler task value"),
  539. ./components/script/dom/promise.rs-    };
  540. ./components/script/dom/promise.rs-
  541. --
  542. ./components/script/dom/nodelist.rs-            list
  543. ./components/script/dom/nodelist.rs-        } else {
  544. ./components/script/dom/nodelist.rs:            panic!("called as_children_list() on a non-children node list")
  545. ./components/script/dom/nodelist.rs-        }
  546. ./components/script/dom/nodelist.rs-    }
  547. --
  548. ./components/script/dom/nodelist.rs-            list
  549. ./components/script/dom/nodelist.rs-        } else {
  550. ./components/script/dom/nodelist.rs:            panic!("called as_radio_list() on a non-radio node list")
  551. ./components/script/dom/nodelist.rs-        }
  552. ./components/script/dom/nodelist.rs-    }
  553. --
  554. ./components/script/dom/node.rs-    let object: *mut JSObject = mem::transmute(candidate);
  555. ./components/script/dom/node.rs-    if object.is_null() {
  556. ./components/script/dom/node.rs:        panic!("Attempted to create a `Dom<Node>` from an invalid pointer!")
  557. ./components/script/dom/node.rs-    }
  558. ./components/script/dom/node.rs-    let boxed_node = conversions::private_from_object(object) as *const Node;
  559. --
  560. ./components/script/dom/node.rs-        }
  561. ./components/script/dom/node.rs-
  562. ./components/script/dom/node.rs:        panic!("not text!")
  563. ./components/script/dom/node.rs-    }
  564. ./components/script/dom/node.rs-
  565. --
  566. ./components/script/dom/messageport.rs-        let port_impls = match sc_holder {
  567. ./components/script/dom/messageport.rs-            StructuredDataHolder::Write { ports, .. } => ports,
  568. ./components/script/dom/messageport.rs:            _ => panic!("Unexpected variant of StructuredDataHolder"),
  569. ./components/script/dom/messageport.rs-        };
  570. ./components/script/dom/messageport.rs-
  571. --
  572. ./components/script/dom/messageport.rs-                ..
  573. ./components/script/dom/messageport.rs-            } => (message_ports, port_impls),
  574. ./components/script/dom/messageport.rs:            _ => panic!("Unexpected variant of StructuredDataHolder"),
  575. ./components/script/dom/messageport.rs-        };
  576. ./components/script/dom/messageport.rs-
  577. --
  578. ./components/script/dom/messageport.rs-            (ports_len, port_impl)
  579. ./components/script/dom/messageport.rs-        } else {
  580. ./components/script/dom/messageport.rs:            panic!("A messageport was transfer-received, yet the SC holder does not have any port impls");
  581. ./components/script/dom/messageport.rs-        };
  582. ./components/script/dom/messageport.rs-
  583. --
  584. ./components/script/dom/htmltextareaelement.rs-                    }
  585. ./components/script/dom/htmltextareaelement.rs-                },
  586. ./components/script/dom/htmltextareaelement.rs:                _ => panic!("Expected an AttrValue::Int"),
  587. ./components/script/dom/htmltextareaelement.rs-            },
  588. ./components/script/dom/htmltextareaelement.rs-            local_name!("minlength") => match *attr.value() {
  589. --
  590. ./components/script/dom/htmltextareaelement.rs-                    }
  591. ./components/script/dom/htmltextareaelement.rs-                },
  592. ./components/script/dom/htmltextareaelement.rs:                _ => panic!("Expected an AttrValue::Int"),
  593. ./components/script/dom/htmltextareaelement.rs-            },
  594. ./components/script/dom/htmltextareaelement.rs-            local_name!("placeholder") => {
  595. --
  596. ./components/script/dom/htmlinputelement.rs-                    }
  597. ./components/script/dom/htmlinputelement.rs-                },
  598. ./components/script/dom/htmlinputelement.rs:                _ => panic!("Expected an AttrValue::Int"),
  599. ./components/script/dom/htmlinputelement.rs-            },
  600. ./components/script/dom/htmlinputelement.rs-            &local_name!("minlength") => match *attr.value() {
  601. --
  602. ./components/script/dom/htmlinputelement.rs-                    }
  603. ./components/script/dom/htmlinputelement.rs-                },
  604. ./components/script/dom/htmlinputelement.rs:                _ => panic!("Expected an AttrValue::Int"),
  605. ./components/script/dom/htmlinputelement.rs-            },
  606. ./components/script/dom/htmlinputelement.rs-            &local_name!("placeholder") => {
  607. --
  608. ./components/script/dom/gpucanvascontext.rs-                GPUTextureFormat::Rgba8unorm => webrender_api::ImageFormat::RGBA8,
  609. ./components/script/dom/gpucanvascontext.rs-                GPUTextureFormat::Bgra8unorm => webrender_api::ImageFormat::BGRA8,
  610. ./components/script/dom/gpucanvascontext.rs:                _ => panic!("SwapChain format({:?}) not supported", descriptor.format),
  611. ./components/script/dom/gpucanvascontext.rs-            },
  612. ./components/script/dom/gpucanvascontext.rs-            size: webrender_api::units::DeviceIntSize::new(
  613. --
  614. ./components/script/dom/globalscope.rs-                    self.state = Some(FileListenerState::Receiving(bytes, callback, target));
  615. ./components/script/dom/globalscope.rs-                },
  616. ./components/script/dom/globalscope.rs:                _ => panic!(
  617. ./components/script/dom/globalscope.rs-                    "Unexpected FileListenerState when receiving ReadFileProgress::Meta msg."
  618. ./components/script/dom/globalscope.rs-                ),
  619. --
  620. ./components/script/dom/globalscope.rs-                    self.state = Some(FileListenerState::Receiving(bytes, callback, target));
  621. ./components/script/dom/globalscope.rs-                },
  622. ./components/script/dom/globalscope.rs:                _ => panic!(
  623. ./components/script/dom/globalscope.rs-                    "Unexpected FileListenerState when receiving ReadFileProgress::Partial msg."
  624. ./components/script/dom/globalscope.rs-                ),
  625. --
  626. ./components/script/dom/globalscope.rs-                        let callback = match callback {
  627. ./components/script/dom/globalscope.rs-                            FileListenerCallback::Promise(callback) => callback,
  628. ./components/script/dom/globalscope.rs:                            _ => panic!("Expected promise callback."),
  629. ./components/script/dom/globalscope.rs-                        };
  630. ./components/script/dom/globalscope.rs-                        let task = task!(resolve_promise: move || {
  631. --
  632. ./components/script/dom/globalscope.rs-                },
  633. ./components/script/dom/globalscope.rs-                _ => {
  634. ./components/script/dom/globalscope.rs:                    panic!("Unexpected FileListenerState when receiving ReadFileProgress::EOF msg.")
  635. ./components/script/dom/globalscope.rs-                },
  636. ./components/script/dom/globalscope.rs-            },
  637. --
  638. ./components/script/dom/globalscope.rs-                            let callback = match callback {
  639. ./components/script/dom/globalscope.rs-                                FileListenerCallback::Promise(callback) => callback,
  640. ./components/script/dom/globalscope.rs:                                _ => panic!("Expected promise callback."),
  641. ./components/script/dom/globalscope.rs-                            };
  642. ./components/script/dom/globalscope.rs-                            let _ = self.task_source.queue_with_canceller(
  643. --
  644. ./components/script/dom/globalscope.rs-                    }
  645. ./components/script/dom/globalscope.rs-                },
  646. ./components/script/dom/globalscope.rs:                _ => panic!("Unexpected FileListenerState when receiving Err msg."),
  647. ./components/script/dom/globalscope.rs-            },
  648. ./components/script/dom/globalscope.rs-        }
  649. --
  650. ./components/script/dom/globalscope.rs-            match message_ports.get_mut(&port_id) {
  651. ./components/script/dom/globalscope.rs-                None => {
  652. ./components/script/dom/globalscope.rs:                    panic!("complete_port_transfer called for an unknown port.");
  653. ./components/script/dom/globalscope.rs-                },
  654. ./components/script/dom/globalscope.rs-                Some(managed_port) => {
  655. ./components/script/dom/globalscope.rs-                    if managed_port.pending {
  656. ./components/script/dom/globalscope.rs:                        panic!("CompleteTransfer msg received for a pending port.");
  657. ./components/script/dom/globalscope.rs-                    }
  658. ./components/script/dom/globalscope.rs-                    if let Some(port_impl) = managed_port.port_impl.as_mut() {
  659. --
  660. ./components/script/dom/globalscope.rs-                        port_impl.enabled()
  661. ./components/script/dom/globalscope.rs-                    } else {
  662. ./components/script/dom/globalscope.rs:                        panic!("managed-port has no port-impl.");
  663. ./components/script/dom/globalscope.rs-                    }
  664. ./components/script/dom/globalscope.rs-                },
  665. ./components/script/dom/globalscope.rs-            }
  666. ./components/script/dom/globalscope.rs-        } else {
  667. ./components/script/dom/globalscope.rs:            panic!("complete_port_transfer called for an unknown port.");
  668. ./components/script/dom/globalscope.rs-        };
  669. ./components/script/dom/globalscope.rs-        if should_start {
  670. --
  671. ./components/script/dom/globalscope.rs-                            port_impl.entangle(entangled_id.clone());
  672. ./components/script/dom/globalscope.rs-                        } else {
  673. ./components/script/dom/globalscope.rs:                            panic!("managed-port has no port-impl.");
  674. ./components/script/dom/globalscope.rs-                        }
  675. ./components/script/dom/globalscope.rs-                    },
  676. --
  677. ./components/script/dom/globalscope.rs-            }
  678. ./components/script/dom/globalscope.rs-        } else {
  679. ./components/script/dom/globalscope.rs:            panic!("entangled_ports called on a global not managing any ports.");
  680. ./components/script/dom/globalscope.rs-        }
  681. ./components/script/dom/globalscope.rs-
  682. --
  683. ./components/script/dom/globalscope.rs-            port_impl
  684. ./components/script/dom/globalscope.rs-        } else {
  685. ./components/script/dom/globalscope.rs:            panic!("mark_port_as_transferred called on a global not managing any ports.");
  686. ./components/script/dom/globalscope.rs-        }
  687. ./components/script/dom/globalscope.rs-    }
  688. --
  689. ./components/script/dom/globalscope.rs-        {
  690. ./components/script/dom/globalscope.rs-            let message_buffer = match message_ports.get_mut(&port_id) {
  691. ./components/script/dom/globalscope.rs:                None => panic!("start_message_port called on a unknown port."),
  692. ./components/script/dom/globalscope.rs-                Some(managed_port) => {
  693. ./components/script/dom/globalscope.rs-                    if let Some(port_impl) = managed_port.port_impl.as_mut() {
  694. ./components/script/dom/globalscope.rs-                        port_impl.start()
  695. ./components/script/dom/globalscope.rs-                    } else {
  696. ./components/script/dom/globalscope.rs:                        panic!("managed-port has no port-impl.");
  697. ./components/script/dom/globalscope.rs-                    }
  698. ./components/script/dom/globalscope.rs-                },
  699. --
  700. ./components/script/dom/globalscope.rs-        {
  701. ./components/script/dom/globalscope.rs-            match message_ports.get_mut(&port_id) {
  702. ./components/script/dom/globalscope.rs:                None => panic!("close_message_port called on an unknown port."),
  703. ./components/script/dom/globalscope.rs-                Some(managed_port) => {
  704. ./components/script/dom/globalscope.rs-                    if let Some(port_impl) = managed_port.port_impl.as_mut() {
  705. --
  706. ./components/script/dom/globalscope.rs-                        managed_port.closed = true;
  707. ./components/script/dom/globalscope.rs-                    } else {
  708. ./components/script/dom/globalscope.rs:                        panic!("managed-port has no port-impl.");
  709. ./components/script/dom/globalscope.rs-                    }
  710. ./components/script/dom/globalscope.rs-                },
  711. --
  712. ./components/script/dom/globalscope.rs-        {
  713. ./components/script/dom/globalscope.rs-            let entangled_port = match message_ports.get_mut(&port_id) {
  714. ./components/script/dom/globalscope.rs:                None => panic!("post_messageport_msg called on an unknown port."),
  715. ./components/script/dom/globalscope.rs-                Some(managed_port) => {
  716. ./components/script/dom/globalscope.rs-                    if let Some(port_impl) = managed_port.port_impl.as_mut() {
  717. ./components/script/dom/globalscope.rs-                        port_impl.entangled_port_id()
  718. ./components/script/dom/globalscope.rs-                    } else {
  719. ./components/script/dom/globalscope.rs:                        panic!("managed-port has no port-impl.");
  720. ./components/script/dom/globalscope.rs-                    }
  721. ./components/script/dom/globalscope.rs-                },
  722. --
  723. ./components/script/dom/globalscope.rs-                .send(ScriptMsg::ScheduleBroadcast(router_id.clone(), msg));
  724. ./components/script/dom/globalscope.rs-        } else {
  725. ./components/script/dom/globalscope.rs:            panic!("Attemps to broadcast a message via global not managing any channels.");
  726. ./components/script/dom/globalscope.rs-        }
  727. ./components/script/dom/globalscope.rs-    }
  728. --
  729. ./components/script/dom/globalscope.rs-            }
  730. ./components/script/dom/globalscope.rs-            match message_ports.get_mut(&port_id) {
  731. ./components/script/dom/globalscope.rs:                None => panic!("route_task_to_port called for an unknown port."),
  732. ./components/script/dom/globalscope.rs-                Some(managed_port) => {
  733. ./components/script/dom/globalscope.rs-                    // If the port is not enabled yet, or if is awaiting the completion of it's transfer,
  734. --
  735. ./components/script/dom/globalscope.rs-                        })
  736. ./components/script/dom/globalscope.rs-                    } else {
  737. ./components/script/dom/globalscope.rs:                        panic!("managed-port has no port-impl.");
  738. ./components/script/dom/globalscope.rs-                    }
  739. ./components/script/dom/globalscope.rs-                },
  740. --
  741. ./components/script/dom/globalscope.rs-                    .expect("Collected port-id to match an entry");
  742. ./components/script/dom/globalscope.rs-                if !managed_port.pending {
  743. ./components/script/dom/globalscope.rs:                    panic!("Only pending ports should be found in to_be_added")
  744. ./components/script/dom/globalscope.rs-                }
  745. ./components/script/dom/globalscope.rs-                managed_port.pending = false;
  746. --
  747. ./components/script/dom/globalscope.rs-            entry.push_back(Dom::from_ref(dom_channel));
  748. ./components/script/dom/globalscope.rs-        } else {
  749. ./components/script/dom/globalscope.rs:            panic!("track_broadcast_channel should have first switched the state to managed.");
  750. ./components/script/dom/globalscope.rs-        }
  751. ./components/script/dom/globalscope.rs-    }
  752. --
  753. ./components/script/dom/globalscope.rs-            };
  754. ./components/script/dom/globalscope.rs-        } else {
  755. ./components/script/dom/globalscope.rs:            panic!("track_message_port should have first switched the state to managed.");
  756. ./components/script/dom/globalscope.rs-        }
  757. ./components/script/dom/globalscope.rs-    }
  758. --
  759. ./components/script/dom/globalscope.rs-                }
  760. ./components/script/dom/globalscope.rs-            } else {
  761. ./components/script/dom/globalscope.rs:                panic!("get_blob_bytes called on a global not managing any blobs.");
  762. ./components/script/dom/globalscope.rs-            }
  763. ./components/script/dom/globalscope.rs-        };
  764. --
  765. ./components/script/dom/globalscope.rs-                },
  766. ./components/script/dom/globalscope.rs-                BlobData::Memory(ref s) => Ok(s.clone()),
  767. ./components/script/dom/globalscope.rs:                BlobData::Sliced(_, _) => panic!("This blob doesn't have a parent."),
  768. ./components/script/dom/globalscope.rs-            }
  769. ./components/script/dom/globalscope.rs-        } else {
  770. ./components/script/dom/globalscope.rs:            panic!("get_blob_bytes_non_sliced called on a global not managing any blobs.");
  771. ./components/script/dom/globalscope.rs-        }
  772. ./components/script/dom/globalscope.rs-    }
  773. --
  774. ./components/script/dom/globalscope.rs-                }
  775. ./components/script/dom/globalscope.rs-            } else {
  776. ./components/script/dom/globalscope.rs:                panic!("get_blob_bytes_or_file_id called on a global not managing any blobs.");
  777. ./components/script/dom/globalscope.rs-            }
  778. ./components/script/dom/globalscope.rs-        };
  779. --
  780. ./components/script/dom/globalscope.rs-                },
  781. ./components/script/dom/globalscope.rs-                BlobData::Memory(ref s) => BlobResult::Bytes(s.clone()),
  782. ./components/script/dom/globalscope.rs:                BlobData::Sliced(_, _) => panic!("This blob doesn't have a parent."),
  783. ./components/script/dom/globalscope.rs-            }
  784. ./components/script/dom/globalscope.rs-        } else {
  785. ./components/script/dom/globalscope.rs:            panic!(
  786. ./components/script/dom/globalscope.rs-                "get_blob_bytes_non_sliced_or_file_id called on a global not managing any blobs."
  787. ./components/script/dom/globalscope.rs-            );
  788. --
  789. ./components/script/dom/globalscope.rs-            blob_info.blob_impl.type_string()
  790. ./components/script/dom/globalscope.rs-        } else {
  791. ./components/script/dom/globalscope.rs:            panic!("get_blob_type_string called on a global not managing any blobs.");
  792. ./components/script/dom/globalscope.rs-        }
  793. ./components/script/dom/globalscope.rs-    }
  794. --
  795. ./components/script/dom/globalscope.rs-                        BlobData::File(ref f) => f.get_size(),
  796. ./components/script/dom/globalscope.rs-                        BlobData::Memory(ref v) => v.len() as u64,
  797. ./components/script/dom/globalscope.rs:                        BlobData::Sliced(_, _) => panic!("Blob ancestry should be only one level."),
  798. ./components/script/dom/globalscope.rs-                    };
  799. ./components/script/dom/globalscope.rs-                    rel_pos.to_abs_range(parent_size as usize).len() as u64
  800. --
  801. ./components/script/dom/globalscope.rs-                        BlobData::File(ref f) => f.get_size(),
  802. ./components/script/dom/globalscope.rs-                        BlobData::Memory(ref v) => v.len() as u64,
  803. ./components/script/dom/globalscope.rs:                        BlobData::Sliced(_, _) => panic!(
  804. ./components/script/dom/globalscope.rs-                            "It was previously checked that this blob does not have a parent."
  805. ./components/script/dom/globalscope.rs-                        ),
  806. --
  807. ./components/script/dom/globalscope.rs-            }
  808. ./components/script/dom/globalscope.rs-        } else {
  809. ./components/script/dom/globalscope.rs:            panic!("get_blob_size called on a global not managing any blobs.");
  810. ./components/script/dom/globalscope.rs-        }
  811. ./components/script/dom/globalscope.rs-    }
  812. --
  813. ./components/script/dom/globalscope.rs-            }
  814. ./components/script/dom/globalscope.rs-        } else {
  815. ./components/script/dom/globalscope.rs:            panic!("get_blob_url_id called on a global not managing any blobs.");
  816. ./components/script/dom/globalscope.rs-        }
  817. ./components/script/dom/globalscope.rs-    }
  818. --
  819. ./components/script/dom/globalscope.rs-        match blob_info.blob_impl.blob_data_mut() {
  820. ./components/script/dom/globalscope.rs-            BlobData::Sliced(_, _) => {
  821. ./components/script/dom/globalscope.rs:                panic!("Sliced blobs should use create_sliced_url_id instead of promote.");
  822. ./components/script/dom/globalscope.rs-            },
  823. ./components/script/dom/globalscope.rs-            BlobData::File(ref f) => {
  824. --
  825. ./components/script/dom/element.rs-            // FIXME(ajeffrey): Directly convert UTF8 to DOMString
  826. ./components/script/dom/element.rs-            Ok(()) => Ok(DOMString::from(String::from_utf8(writer).unwrap())),
  827. ./components/script/dom/element.rs:            Err(_) => panic!("Cannot serialize element"),
  828. ./components/script/dom/element.rs-        }
  829. ./components/script/dom/element.rs-    }
  830. --
  831. ./components/script/dom/element.rs-        ) {
  832. ./components/script/dom/element.rs-            Ok(()) => Ok(DOMString::from(String::from_utf8(writer).unwrap())),
  833. ./components/script/dom/element.rs:            Err(_) => panic!("Cannot serialize element"),
  834. ./components/script/dom/element.rs-        }
  835. ./components/script/dom/element.rs-    }
  836. --
  837. ./components/script/dom/element.rs-            Some(ref attribute) => match *attribute.value() {
  838. ./components/script/dom/element.rs-                AttrValue::Int(_, value) => value,
  839. ./components/script/dom/element.rs:                _ => panic!(
  840. ./components/script/dom/element.rs-                    "Expected an AttrValue::Int: \
  841. ./components/script/dom/element.rs-                     implement parse_plain_attribute"
  842. --
  843. ./components/script/dom/element.rs-            Some(ref attribute) => match *attribute.value() {
  844. ./components/script/dom/element.rs-                AttrValue::UInt(_, value) => value,
  845. ./components/script/dom/element.rs:                _ => panic!("Expected an AttrValue::UInt: implement parse_plain_attribute"),
  846. ./components/script/dom/element.rs-            },
  847. ./components/script/dom/element.rs-            None => default,
  848. --
  849. ./components/script/dom/dissimilaroriginwindow.rs-        // Step 2.
  850. ./components/script/dom/dissimilaroriginwindow.rs-        let incumbent = match GlobalScope::incumbent() {
  851. ./components/script/dom/dissimilaroriginwindow.rs:            None => panic!("postMessage called with no incumbent global"),
  852. ./components/script/dom/dissimilaroriginwindow.rs-            Some(incumbent) => incumbent,
  853. ./components/script/dom/dissimilaroriginwindow.rs-        };
  854. --
  855. ./components/script/dom/dedicatedworkerglobalscope.rs-    fn inactive_msg() -> Self {
  856. ./components/script/dom/dedicatedworkerglobalscope.rs-        // Inactive is only relevant in the context of a browsing-context event-loop.
  857. ./components/script/dom/dedicatedworkerglobalscope.rs:        panic!("Workers should never receive messages marked as inactive");
  858. ./components/script/dom/dedicatedworkerglobalscope.rs-    }
  859. ./components/script/dom/dedicatedworkerglobalscope.rs-
  860. --
  861. ./components/script/dom/cssstyledeclaration.rs-        match self.owner {
  862. ./components/script/dom/cssstyledeclaration.rs-            CSSStyleOwner::CSSRule(..) => {
  863. ./components/script/dom/cssstyledeclaration.rs:                panic!("get_computed_style called on CSSStyleDeclaration with a CSSRule owner")
  864. ./components/script/dom/cssstyledeclaration.rs-            },
  865. ./components/script/dom/cssstyledeclaration.rs-            CSSStyleOwner::Element(ref el) => {
  866. --
  867. ./components/script/dom/cssrulelist.rs-            rules
  868. ./components/script/dom/cssrulelist.rs-        } else {
  869. ./components/script/dom/cssrulelist.rs:            panic!("Called insert_rule on non-CssRule-backed CSSRuleList");
  870. ./components/script/dom/cssrulelist.rs-        };
  871. ./components/script/dom/cssrulelist.rs-
  872. --
  873. ./components/script/dom/cssrulelist.rs-    pub fn append_lazy_dom_rule(&self) {
  874. ./components/script/dom/cssrulelist.rs-        if let RulesSource::Rules(..) = self.rules {
  875. ./components/script/dom/cssrulelist.rs:            panic!("Can only call append_lazy_rule with keyframes-backed CSSRules");
  876. ./components/script/dom/cssrulelist.rs-        }
  877. ./components/script/dom/cssrulelist.rs-        self.dom_rules.borrow_mut().push(MutNullableDom::new(None));
  878. --
  879. ./components/script/dom/characterdata.rs-                    return Ok((&s[..i], Some(c), &s[i + c.len_utf8()..]));
  880. ./components/script/dom/characterdata.rs-                }
  881. ./components/script/dom/characterdata.rs:                panic!(
  882. ./components/script/dom/characterdata.rs-                    "\n\n\
  883. ./components/script/dom/characterdata.rs-                     Would split a surrogate pair in CharacterData API.\n\
  884. --
  885. ./components/script/dom/blob.rs-        let blob_impls = match sc_holder {
  886. ./components/script/dom/blob.rs-            StructuredDataHolder::Write { blobs, .. } => blobs,
  887. ./components/script/dom/blob.rs:            _ => panic!("Unexpected variant of StructuredDataHolder"),
  888. ./components/script/dom/blob.rs-        };
  889. ./components/script/dom/blob.rs-
  890. --
  891. ./components/script/dom/blob.rs-                blobs, blob_impls, ..
  892. ./components/script/dom/blob.rs-            } => (blobs, blob_impls),
  893. ./components/script/dom/blob.rs:            _ => panic!("Unexpected variant of StructuredDataHolder"),
  894. ./components/script/dom/blob.rs-        };
  895. ./components/script/dom/blob.rs-
  896. --
  897. ./components/script/dom/blob.rs-                            Ok(FetchedData::ArrayBuffer(a)) => promise.resolve_native(&a),
  898. ./components/script/dom/blob.rs-                            Err(e) => promise.reject_error(e),
  899. ./components/script/dom/blob.rs:                            _ => panic!("Unexpected result from run_array_buffer_data_algorithm"),
  900. ./components/script/dom/blob.rs-                        }
  901. ./components/script/dom/blob.rs-                    },
  902. --
  903. ./components/script/dom/bindings/structuredclone.rs-        let blobs = match sc_holder {
  904. ./components/script/dom/bindings/structuredclone.rs-            StructuredDataHolder::Read { blobs, .. } => blobs,
  905. ./components/script/dom/bindings/structuredclone.rs:            _ => panic!("Unexpected variant of StructuredDataHolder"),
  906. ./components/script/dom/bindings/structuredclone.rs-        };
  907. ./components/script/dom/bindings/structuredclone.rs-        if let Some(blobs) = blobs {
  908. --
  909. ./components/script/dom/bindings/structuredclone.rs-        let (mut blob_impls, mut port_impls) = match sc_holder {
  910. ./components/script/dom/bindings/structuredclone.rs-            StructuredDataHolder::Write { blobs, ports } => (blobs, ports),
  911. ./components/script/dom/bindings/structuredclone.rs:            _ => panic!("Unexpected variant of StructuredDataHolder"),
  912. ./components/script/dom/bindings/structuredclone.rs-        };
  913. ./components/script/dom/bindings/structuredclone.rs-
  914. --
  915. ./components/script/dom/bindings/structuredclone.rs-                    ..
  916. ./components/script/dom/bindings/structuredclone.rs-                } => (message_ports, port_impls),
  917. ./components/script/dom/bindings/structuredclone.rs:                _ => panic!("Unexpected variant of StructuredDataHolder"),
  918. ./components/script/dom/bindings/structuredclone.rs-            };
  919. ./components/script/dom/bindings/structuredclone.rs-
  920. --
  921. ./components/script/dom/bindings/root.rs-                roots.remove(idx);
  922. ./components/script/dom/bindings/root.rs-            },
  923. ./components/script/dom/bindings/root.rs:            None => panic!("Can't remove a root that was never rooted!"),
  924. ./components/script/dom/bindings/root.rs-        }
  925. ./components/script/dom/bindings/root.rs-    }
  926. --
  927. ./components/script/dom/bindings/error.rs-            },
  928. ./components/script/dom/bindings/error.rs-            _ => {
  929. ./components/script/dom/bindings/error.rs:                panic!("Uncaught exception: failed to stringify primitive");
  930. ./components/script/dom/bindings/error.rs-            },
  931. ./components/script/dom/bindings/error.rs-        }
  932. --
  933. ./components/script/dom/bindings/conversions.rs-                        s.push('\u{FFFD}');
  934. ./components/script/dom/bindings/conversions.rs-                    } else {
  935. ./components/script/dom/bindings/conversions.rs:                        panic!(concat!(
  936. ./components/script/dom/bindings/conversions.rs-                            message!(),
  937. ./components/script/dom/bindings/conversions.rs-                            " Use `-Z replace-surrogates` \
  938. --
  939. ./components/script/dom/bindings/conversions.rs-        );
  940. ./components/script/dom/bindings/conversions.rs-        if jsstr.is_null() {
  941. ./components/script/dom/bindings/conversions.rs:            panic!("JS_NewStringCopyN failed");
  942. ./components/script/dom/bindings/conversions.rs-        }
  943. ./components/script/dom/bindings/conversions.rs-        rval.set(StringValue(&*jsstr));
  944. --
  945. ./components/script/dom/bindings/codegen/CodegenRust.py-        # XXXjdm Avoid unreachable statement warnings
  946. ./components/script/dom/bindings/codegen/CodegenRust.py-        # overloadCGThings.append(
  947. ./components/script/dom/bindings/codegen/CodegenRust.py:        #     CGGeneric('panic!("We have an always-returning default case");\n'
  948. ./components/script/dom/bindings/codegen/CodegenRust.py-        #               'return false;'))
  949. ./components/script/dom/bindings/codegen/CodegenRust.py-        self.cgRoot = CGWrapper(CGList(overloadCGThings, "\n"),
  950. --
  951. ./components/script/dom/bindings/codegen/CodegenRust.py-        if fallThrough:
  952. ./components/script/dom/bindings/codegen/CodegenRust.py-            raise TypeError("fall through required but unsupported")
  953. ./components/script/dom/bindings/codegen/CodegenRust.py:            # bodyList.append(CGGeneric('panic!("fall through unsupported"); /* Fall through */'))
  954. ./components/script/dom/bindings/codegen/CodegenRust.py-        self.append(CGIndenter(bodyList))
  955. ./components/script/dom/bindings/codegen/CodegenRust.py-        self.append(CGGeneric("}"))
  956. --
  957. ./components/script/dom/abstractworkerglobalscope.rs-            Ok(DedicatedWorkerScriptMsg::CommonWorker(_worker, common_msg)) => common_msg,
  958. ./components/script/dom/abstractworkerglobalscope.rs-            Err(_) => return Err(()),
  959. ./components/script/dom/abstractworkerglobalscope.rs:            Ok(DedicatedWorkerScriptMsg::WakeUp) => panic!("unexpected worker event message!"),
  960. ./components/script/dom/abstractworkerglobalscope.rs-        };
  961. ./components/script/dom/abstractworkerglobalscope.rs-        match common_msg {
  962. ./components/script/dom/abstractworkerglobalscope.rs-            WorkerScriptMsg::Common(script_msg) => Ok(script_msg),
  963. ./components/script/dom/abstractworkerglobalscope.rs:            WorkerScriptMsg::DOMMessage { .. } => panic!("unexpected worker event message!"),
  964. ./components/script/dom/abstractworkerglobalscope.rs-        }
  965. ./components/script/dom/abstractworkerglobalscope.rs-    }
  966. --
  967. ./components/script/build.rs-            }
  968. ./components/script/build.rs-        }
  969. ./components/script/build.rs:        panic!(
  970. ./components/script/build.rs-            "Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
  971. ./components/script/build.rs-            candidates.join(", ")
  972. --
  973. ./components/script/body.rs-
  974. ./components/script/body.rs-        if let BodySource::Null = self.source {
  975. ./components/script/body.rs:            panic!("ReadableStream(Null) sources should not re-direct.");
  976. ./components/script/body.rs-        }
  977. ./components/script/body.rs-
  978. --
  979. ./components/remutex/tests/smoke.rs-        let _answer = Answer(lock2);
  980. ./components/remutex/tests/smoke.rs-        println!("Intentionally panicking.");
  981. ./components/remutex/tests/smoke.rs:        panic!("What the answer to my lifetimes dilemma is?");
  982. ./components/remutex/tests/smoke.rs-    })
  983. ./components/remutex/tests/smoke.rs-    .join();
  984. --
  985. ./components/profile/time.rs-                let path = Path::new(&filename);
  986. ./components/profile/time.rs-                let mut file = match File::create(&path) {
  987. ./components/profile/time.rs:                    Err(e) => panic!("Couldn't create {}: {}", path.display(), e),
  988. ./components/profile/time.rs-                    Ok(file) => file,
  989. ./components/profile/time.rs-                };
  990. --
  991. ./components/profile/mem.rs-                match self.reporters.insert(name, reporter) {
  992. ./components/profile/mem.rs-                    None => true,
  993. ./components/profile/mem.rs:                    Some(_) => panic!("RegisterReporter: '{}' name is already in use", name_clone),
  994. ./components/profile/mem.rs-                }
  995. ./components/profile/mem.rs-            },
  996. --
  997. ./components/profile/mem.rs-                match self.reporters.remove(&name) {
  998. ./components/profile/mem.rs-                    Some(_) => true,
  999. ./components/profile/mem.rs:                    None => panic!("UnregisterReporter: '{}' name is unknown", &name),
  1000. ./components/profile/mem.rs-                }
  1001. ./components/profile/mem.rs-            },
  1002. --
  1003. ./components/profile/mem.rs-            if self.size != 0 {
  1004. ./components/profile/mem.rs-                // This will occur if e.g. we have paths ["a", "b"] and ["a", "b", "c"].
  1005. ./components/profile/mem.rs:                panic!("one report's path is a sub-path of another report's path");
  1006. ./components/profile/mem.rs-            }
  1007. ./components/profile/mem.rs-            for child in &mut self.children {
  1008. --
  1009. ./components/net_traits/response.rs-        match filter_type {
  1010. ./components/net_traits/response.rs-            ResponseType::Default |
  1011. ./components/net_traits/response.rs:            ResponseType::Error(..) => panic!(),
  1012. ./components/net_traits/response.rs-            _ => (),
  1013. ./components/net_traits/response.rs-        }
  1014. --
  1015. ./components/net_traits/request.rs-    pub fn extract_source(&mut self) {
  1016. ./components/net_traits/request.rs-        match self.source {
  1017. ./components/net_traits/request.rs:            BodySource::Null => panic!("Null sources should never be re-directed."),
  1018. ./components/net_traits/request.rs-            BodySource::Object => {
  1019. ./components/net_traits/request.rs-                let (chan, port) = ipc::channel().unwrap();
  1020. --
  1021. ./components/net/tests/mime_classifier.rs-            println!("Data Length {:?}", data.len());
  1022. ./components/net/tests/mime_classifier.rs-            if !matcher.matches(&data) {
  1023. ./components/net/tests/mime_classifier.rs:                panic!("Didn't read mime type")
  1024. ./components/net/tests/mime_classifier.rs-            }
  1025. ./components/net/tests/mime_classifier.rs-        },
  1026. ./components/net/tests/mime_classifier.rs:        Err(e) => panic!("Couldn't read from file with error {}", e),
  1027. ./components/net/tests/mime_classifier.rs-    }
  1028. ./components/net/tests/mime_classifier.rs-}
  1029. --
  1030. ./components/net/tests/mime_classifier.rs-                (parsed_mime.subtype() != expected_mime.subtype())
  1031. ./components/net/tests/mime_classifier.rs-            {
  1032. ./components/net/tests/mime_classifier.rs:                panic!(
  1033. ./components/net/tests/mime_classifier.rs-                    "File {:?} parsed incorrectly should be {:?}, parsed as {:?}",
  1034. ./components/net/tests/mime_classifier.rs-                    filename, expected_mime, parsed_mime
  1035. --
  1036. ./components/net/tests/mime_classifier.rs-            }
  1037. ./components/net/tests/mime_classifier.rs-        },
  1038. ./components/net/tests/mime_classifier.rs:        Err(e) => panic!("Couldn't read from file {:?} with error {}", filename, e),
  1039. ./components/net/tests/mime_classifier.rs-    }
  1040. ./components/net/tests/mime_classifier.rs-}
  1041. --
  1042. ./components/net/tests/http_loader.rs-                NetworkEvent::HttpRequest(httprequest) => httprequest,
  1043. ./components/net/tests/http_loader.rs-
  1044. ./components/net/tests/http_loader.rs:                _ => panic!("No HttpRequest Received"),
  1045. ./components/net/tests/http_loader.rs-            }
  1046. ./components/net/tests/http_loader.rs-        },
  1047. ./components/net/tests/http_loader.rs:        _ => panic!("No HttpRequest Received"),
  1048. ./components/net/tests/http_loader.rs-    }
  1049. ./components/net/tests/http_loader.rs-}
  1050. --
  1051. ./components/net/tests/http_loader.rs-            NetworkEvent::HttpResponse(httpresponse) => httpresponse,
  1052. ./components/net/tests/http_loader.rs-
  1053. ./components/net/tests/http_loader.rs:            _ => panic!("No HttpResponse Received"),
  1054. ./components/net/tests/http_loader.rs-        },
  1055. ./components/net/tests/http_loader.rs:        _ => panic!("No HttpResponse Received"),
  1056. ./components/net/tests/http_loader.rs-    }
  1057. ./components/net/tests/http_loader.rs-}
  1058. --
  1059. ./components/net/tests/http_loader.rs-            *response.body_mut() = b"Yay!".to_vec().into();
  1060. ./components/net/tests/http_loader.rs-        } else {
  1061. ./components/net/tests/http_loader.rs:            panic!("unexpected path {:?}", path)
  1062. ./components/net/tests/http_loader.rs-        }
  1063. ./components/net/tests/http_loader.rs-    };
  1064. --
  1065. ./components/net/tests/http_loader.rs-            *response.body_mut() = b"Yay!".to_vec().into();
  1066. ./components/net/tests/http_loader.rs-        } else {
  1067. ./components/net/tests/http_loader.rs:            panic!("unexpected path {:?}", path)
  1068. ./components/net/tests/http_loader.rs-        }
  1069. ./components/net/tests/http_loader.rs-    };
  1070. --
  1071. ./components/net/tests/filemanager_thread.rs-                    {
  1072. ./components/net/tests/filemanager_thread.rs-                        ReadFileProgress::Meta(_) => {
  1073. ./components/net/tests/filemanager_thread.rs:                            panic!("Invalid FileManager reply");
  1074. ./components/net/tests/filemanager_thread.rs-                        },
  1075. ./components/net/tests/filemanager_thread.rs-                        ReadFileProgress::Partial(mut bytes_in) => {
  1076. --
  1077. ./components/net/tests/filemanager_thread.rs-                assert_eq!(test_file_content, bytes, "Read content differs");
  1078. ./components/net/tests/filemanager_thread.rs-            } else {
  1079. ./components/net/tests/filemanager_thread.rs:                panic!("Invalid FileManager reply");
  1080. ./components/net/tests/filemanager_thread.rs-            }
  1081. ./components/net/tests/filemanager_thread.rs-        }
  1082. --
  1083. ./components/net/tests/fetch.rs-
  1084. ./components/net/tests/fetch.rs-    if fetch_response.is_network_error() {
  1085. ./components/net/tests/fetch.rs:        panic!("fetch response shouldn't be a network error");
  1086. ./components/net/tests/fetch.rs-    }
  1087. ./components/net/tests/fetch.rs-}
  1088. --
  1089. ./components/net/tests/fetch.rs-            assert_eq!(&**body, MESSAGE);
  1090. ./components/net/tests/fetch.rs-        },
  1091. ./components/net/tests/fetch.rs:        _ => panic!(),
  1092. ./components/net/tests/fetch.rs-    };
  1093. ./components/net/tests/fetch.rs-}
  1094. --
  1095. ./components/net/tests/fetch.rs-            assert_eq!(val, &file);
  1096. ./components/net/tests/fetch.rs-        },
  1097. ./components/net/tests/fetch.rs:        _ => panic!(),
  1098. ./components/net/tests/fetch.rs-    }
  1099. ./components/net/tests/fetch.rs-}
  1100. --
  1101. ./components/net/tests/fetch.rs-    match *fetch_response.body.lock().unwrap() {
  1102. ./components/net/tests/fetch.rs-        ResponseBody::Done(ref body) => assert_eq!(&**body, ACK),
  1103. ./components/net/tests/fetch.rs:        _ => panic!(),
  1104. ./components/net/tests/fetch.rs-    };
  1105. ./components/net/tests/fetch.rs-}
  1106. --
  1107. ./components/net/tests/fetch.rs-    match *fetch_response0.body.lock().unwrap() {
  1108. ./components/net/tests/fetch.rs-        ResponseBody::Done(ref body) => assert_eq!(&**body, ACK),
  1109. ./components/net/tests/fetch.rs:        _ => panic!(),
  1110. ./components/net/tests/fetch.rs-    };
  1111. ./components/net/tests/fetch.rs-    match *fetch_response1.body.lock().unwrap() {
  1112. ./components/net/tests/fetch.rs-        ResponseBody::Done(ref body) => assert_eq!(&**body, ACK),
  1113. ./components/net/tests/fetch.rs:        _ => panic!(),
  1114. ./components/net/tests/fetch.rs-    };
  1115. ./components/net/tests/fetch.rs-}
  1116. --
  1117. ./components/net/tests/fetch.rs-    match *fetch_response.body.lock().unwrap() {
  1118. ./components/net/tests/fetch.rs-        ResponseBody::Empty => {},
  1119. ./components/net/tests/fetch.rs:        _ => panic!(),
  1120. ./components/net/tests/fetch.rs-    }
  1121. ./components/net/tests/fetch.rs-    match fetch_response.cache_state {
  1122. ./components/net/tests/fetch.rs-        CacheState::None => {},
  1123. ./components/net/tests/fetch.rs:        _ => panic!(),
  1124. ./components/net/tests/fetch.rs-    }
  1125. ./components/net/tests/fetch.rs-}
  1126. --
  1127. ./components/net/tests/fetch.rs-    match *fetch_response.body.lock().unwrap() {
  1128. ./components/net/tests/fetch.rs-        ResponseBody::Empty => {},
  1129. ./components/net/tests/fetch.rs:        _ => panic!(),
  1130. ./components/net/tests/fetch.rs-    }
  1131. ./components/net/tests/fetch.rs-    match fetch_response.cache_state {
  1132. ./components/net/tests/fetch.rs-        CacheState::None => {},
  1133. ./components/net/tests/fetch.rs:        _ => panic!(),
  1134. ./components/net/tests/fetch.rs-    }
  1135. ./components/net/tests/fetch.rs-}
  1136. --
  1137. ./components/net/tests/fetch.rs-            assert_eq!(&**body, MESSAGE);
  1138. ./components/net/tests/fetch.rs-        },
  1139. ./components/net/tests/fetch.rs:        _ => panic!(),
  1140. ./components/net/tests/fetch.rs-    };
  1141. ./components/net/tests/fetch.rs-}
  1142. --
  1143. ./components/net/tests/fetch.rs-
  1144. ./components/net/tests/fetch.rs-    match *fetch_response.body.lock().unwrap() {
  1145. ./components/net/tests/fetch.rs:        ResponseBody::Done(_) | ResponseBody::Receiving(_) => panic!(),
  1146. ./components/net/tests/fetch.rs-        _ => {},
  1147. ./components/net/tests/fetch.rs-    };
  1148. --
  1149. ./components/net/tests/data_loader.rs-                    ..
  1150. ./components/net/tests/data_loader.rs-                }) => m,
  1151. ./components/net/tests/data_loader.rs:                result => panic!("{:?}", result),
  1152. ./components/net/tests/data_loader.rs-            };
  1153. ./components/net/tests/data_loader.rs-            assert_eq!(metadata.content_type.map(Serde::into_inner), content_type);
  1154. --
  1155. ./components/net/tests/data_loader.rs-                    assert_eq!(val, &data);
  1156. ./components/net/tests/data_loader.rs-                },
  1157. ./components/net/tests/data_loader.rs:                _ => panic!(),
  1158. ./components/net/tests/data_loader.rs-            }
  1159. ./components/net/tests/data_loader.rs-        },
  1160. --
  1161. ./components/net/resource_thread.rs-    let mut string_buffer: String = String::new();
  1162. ./components/net/resource_thread.rs-    match file.read_to_string(&mut string_buffer) {
  1163. ./components/net/resource_thread.rs:        Err(why) => panic!("couldn't read from {}: {}", display, why),
  1164. ./components/net/resource_thread.rs-        Ok(_) => println!("successfully read from {}", display),
  1165. ./components/net/resource_thread.rs-    }
  1166. --
  1167. ./components/net/resource_thread.rs-
  1168. ./components/net/resource_thread.rs-    let mut file = match File::create(&path) {
  1169. ./components/net/resource_thread.rs:        Err(why) => panic!("couldn't create {}: {}", display, why),
  1170. ./components/net/resource_thread.rs-        Ok(file) => file,
  1171. ./components/net/resource_thread.rs-    };
  1172. ./components/net/resource_thread.rs-
  1173. ./components/net/resource_thread.rs-    match file.write_all(json_encoded.as_bytes()) {
  1174. ./components/net/resource_thread.rs:        Err(why) => panic!("couldn't write to {}: {}", display, why),
  1175. ./components/net/resource_thread.rs-        Ok(_) => println!("successfully wrote to {}", display),
  1176. ./components/net/resource_thread.rs-    }
  1177. --
  1178. ./components/net/image_cache.rs-        },
  1179. ./components/net/image_cache.rs-        PixelFormat::K8 | PixelFormat::KA8 | PixelFormat::RGBA8 => {
  1180. ./components/net/image_cache.rs:            panic!("Not support by webrender yet");
  1181. ./components/net/image_cache.rs-        },
  1182. ./components/net/image_cache.rs-    };
  1183. --
  1184. ./components/net/image_cache.rs-        match *self {
  1185. ./components/net/image_cache.rs-            ImageBytes::InProgress(ref mut bytes) => bytes.extend_from_slice(data),
  1186. ./components/net/image_cache.rs:            ImageBytes::Complete(_) => panic!("attempted modification of complete image bytes"),
  1187. ./components/net/image_cache.rs-        }
  1188. ./components/net/image_cache.rs-    }
  1189. --
  1190. ./components/net/image_cache.rs-            let own_bytes = match *self {
  1191. ./components/net/image_cache.rs-                ImageBytes::InProgress(ref mut bytes) => bytes,
  1192. ./components/net/image_cache.rs:                ImageBytes::Complete(_) => panic!("attempted modification of complete image bytes"),
  1193. ./components/net/image_cache.rs-            };
  1194. ./components/net/image_cache.rs-            mem::replace(own_bytes, vec![])
  1195. --
  1196. ./components/net/http_loader.rs-    let same_origin = match request.origin {
  1197. ./components/net/http_loader.rs-        Origin::Origin(ref origin) => *origin == location_url.origin(),
  1198. ./components/net/http_loader.rs:        Origin::Client => panic!(
  1199. ./components/net/http_loader.rs-            "Request origin should not be client for {}",
  1200. ./components/net/http_loader.rs-            request.current_url()
  1201. --
  1202. ./components/net/fetch/methods.rs-                match body_port.recv().ok() {
  1203. ./components/net/fetch/methods.rs-                    Some(BodyChunkResponse::Chunk(bytes)) => Some(bytes),
  1204. ./components/net/fetch/methods.rs:                    _ => panic!("cert should be sent in a single chunk."),
  1205. ./components/net/fetch/methods.rs-                }
  1206. ./components/net/fetch/methods.rs-            });
  1207. --
  1208. ./components/net/build.rs-    let minimum = 0x10101000;
  1209. ./components/net/build.rs-    if actual < minimum {
  1210. ./components/net/build.rs:        panic!(
  1211. ./components/net/build.rs-            "Your OpenSSL version is older than 1.1.1 ({:x}), you have: {:x}",
  1212. ./components/net/build.rs-            minimum, actual
  1213. --
  1214. ./components/metrics/lib.rs-            Some(Ordering::Less) => mta,
  1215. ./components/metrics/lib.rs-            Some(_) => dcl,
  1216. ./components/metrics/lib.rs:            None => panic!("no ordering possible. something bad happened"),
  1217. ./components/metrics/lib.rs-        };
  1218. ./components/metrics/lib.rs-        set_metric(
  1219. --
  1220. ./components/layout_thread_2020/lib.rs-                    // Just ignore these messages at this point.
  1221. ./components/layout_thread_2020/lib.rs-                },
  1222. ./components/layout_thread_2020/lib.rs:                _ => panic!("layout: unexpected message received after `PrepareToExitMsg`"),
  1223. ./components/layout_thread_2020/lib.rs-            }
  1224. ./components/layout_thread_2020/lib.rs-        }
  1225. --
  1226. ./components/layout_thread_2020/dom_wrapper.rs-        match self.element.borrow_data() {
  1227. ./components/layout_thread_2020/dom_wrapper.rs-            Some(data) => data,
  1228. ./components/layout_thread_2020/dom_wrapper.rs:            None => panic!("could not find styles for <{}>", self.element.local_name()),
  1229. ./components/layout_thread_2020/dom_wrapper.rs-        }
  1230. ./components/layout_thread_2020/dom_wrapper.rs-    }
  1231. --
  1232. ./components/layout_thread/lib.rs-                    // Just ignore these messages at this point.
  1233. ./components/layout_thread/lib.rs-                },
  1234. ./components/layout_thread/lib.rs:                _ => panic!("layout: unexpected message received after `PrepareToExitMsg`"),
  1235. ./components/layout_thread/lib.rs-            }
  1236. ./components/layout_thread/lib.rs-        }
  1237. --
  1238. ./components/layout_2020/traversal.rs-
  1239. ./components/layout_2020/traversal.rs-    fn process_postorder(&self, _style_context: &mut StyleContext<E>, _node: E::ConcreteNode) {
  1240. ./components/layout_2020/traversal.rs:        panic!("this should never be called")
  1241. ./components/layout_2020/traversal.rs-    }
  1242. ./components/layout_2020/traversal.rs-
  1243. --
  1244. ./components/layout_2020/flow/inline.rs-                                },
  1245. ./components/layout_2020/flow/inline.rs-                                Display::Contents => {
  1246. ./components/layout_2020/flow/inline.rs:                                    panic!("display:contents does not generate an abspos box")
  1247. ./components/layout_2020/flow/inline.rs-                                },
  1248. ./components/layout_2020/flow/inline.rs-                                Display::None => {
  1249. ./components/layout_2020/flow/inline.rs:                                    panic!("display:none does not generate an abspos box")
  1250. ./components/layout_2020/flow/inline.rs-                                },
  1251. ./components/layout_2020/flow/inline.rs-                            };
  1252. --
  1253. ./components/layout_2020/display_list/stacking_context.rs-            ($msg: expr) => {
  1254. ./components/layout_2020/display_list/stacking_context.rs-                if cfg!(debug_assertions) {
  1255. ./components/layout_2020/display_list/stacking_context.rs:                    panic!($msg)
  1256. ./components/layout_2020/display_list/stacking_context.rs-                }
  1257. ./components/layout_2020/display_list/stacking_context.rs-            };
  1258. --
  1259. ./components/layout_2020/display_list/stacking_context.rs-        } else {
  1260. ./components/layout_2020/display_list/stacking_context.rs-            // This should only happen if the root element has `display: none`
  1261. ./components/layout_2020/display_list/stacking_context.rs:            debug_panic!("`CanvasBackground::for_root_element` should have returned `style: None`");
  1262. ./components/layout_2020/display_list/stacking_context.rs-            return;
  1263. ./components/layout_2020/display_list/stacking_context.rs-        };
  1264. --
  1265. ./components/layout_2020/display_list/stacking_context.rs-            box_fragment
  1266. ./components/layout_2020/display_list/stacking_context.rs-        } else {
  1267. ./components/layout_2020/display_list/stacking_context.rs:            debug_panic!("Expected a box-generated fragment");
  1268. ./components/layout_2020/display_list/stacking_context.rs-            return;
  1269. ./components/layout_2020/display_list/stacking_context.rs-        };
  1270. --
  1271. ./components/layout/wrapper.rs-            let data = match node.get_style_and_layout_data() {
  1272. ./components/layout/wrapper.rs-                Some(data) => data,
  1273. ./components/layout/wrapper.rs:                None => panic!(
  1274. ./components/layout/wrapper.rs-                    "could not get style and layout data for <{}>",
  1275. ./components/layout/wrapper.rs-                    node.as_element().unwrap().local_name()
  1276. --
  1277. ./components/layout/text.rs-                        selection = text_fragment_info.selection;
  1278. ./components/layout/text.rs-                    },
  1279. ./components/layout/text.rs:                    _ => panic!("Expected an unscanned text fragment!"),
  1280. ./components/layout/text.rs-                };
  1281. ./components/layout/text.rs-                insertion_point = match selection {
  1282. --
  1283. ./components/layout/table_colgroup.rs-
  1284. ./components/layout/table_colgroup.rs-    fn generated_containing_block_size(&self, _: OpaqueFlow) -> LogicalSize<Au> {
  1285. ./components/layout/table_colgroup.rs:        panic!("Table column groups can't be containing blocks!")
  1286. ./components/layout/table_colgroup.rs-    }
  1287. ./components/layout/table_colgroup.rs-
  1288. --
  1289. ./components/layout/model.rs-                // Can't happen because the state will have been replaced with
  1290. ./components/layout/model.rs-                // `MarginCollapseState::AccumulatingMarginIn` above.
  1291. ./components/layout/model.rs:                panic!("should not be accumulating collapsible block_start margins anymore!")
  1292. ./components/layout/model.rs-            },
  1293. ./components/layout/model.rs-            (
  1294. --
  1295. ./components/layout/generated_content.rs-        ListStyleType::DisclosureOpen => '▾',
  1296. ./components/layout/generated_content.rs-        ListStyleType::DisclosureClosed => '‣',
  1297. ./components/layout/generated_content.rs:        _ => panic!("No static representation for this list-style-type!"),
  1298. ./components/layout/generated_content.rs-    }
  1299. ./components/layout/generated_content.rs-}
  1300. --
  1301. ./components/layout/fragment.rs-            // use cases like SVG.
  1302. ./components/layout/fragment.rs-            SpecificFragmentInfo::Iframe(_) => Au::from_px(DEFAULT_REPLACED_WIDTH),
  1303. ./components/layout/fragment.rs:            _ => panic!("Trying to get intrinsic width on non-replaced element!"),
  1304. ./components/layout/fragment.rs-        }
  1305. ./components/layout/fragment.rs-    }
  1306. --
  1307. ./components/layout/fragment.rs-            SpecificFragmentInfo::Svg(ref info) => info.dom_height,
  1308. ./components/layout/fragment.rs-            SpecificFragmentInfo::Iframe(_) => Au::from_px(DEFAULT_REPLACED_HEIGHT),
  1309. ./components/layout/fragment.rs:            _ => panic!("Trying to get intrinsic height on non-replaced element!"),
  1310. ./components/layout/fragment.rs-        }
  1311. ./components/layout/fragment.rs-    }
  1312. --
  1313. ./components/layout/fragment.rs-        match self.specific {
  1314. ./components/layout/fragment.rs-            SpecificFragmentInfo::TableColumn(col_fragment) => max(col_fragment.span, 1),
  1315. ./components/layout/fragment.rs:            _ => panic!("non-table-column fragment inside table column?!"),
  1316. ./components/layout/fragment.rs-        }
  1317. ./components/layout/fragment.rs-    }
  1318. --
  1319. ./components/layout/fragment.rs-
  1320. ./components/layout/fragment.rs-            SpecificFragmentInfo::UnscannedText(..) => {
  1321. ./components/layout/fragment.rs:                panic!("Unscanned text fragments should have been scanned by now!")
  1322. ./components/layout/fragment.rs-            },
  1323. ./components/layout/fragment.rs-        };
  1324. --
  1325. ./components/layout/fragment.rs-    pub fn truncate_to_inline_size(self, max_inline_size: Au) -> Fragment {
  1326. ./components/layout/fragment.rs-        if let SpecificFragmentInfo::TruncatedFragment(_) = self.specific {
  1327. ./components/layout/fragment.rs:            panic!("Cannot truncate an already truncated fragment");
  1328. ./components/layout/fragment.rs-        }
  1329. ./components/layout/fragment.rs-        let info = self.calculate_truncate_to_inline_size(max_inline_size);
  1330. --
  1331. ./components/layout/fragment.rs-                self.margin.inline_end = next_fragment.margin.inline_end;
  1332. ./components/layout/fragment.rs-            },
  1333. ./components/layout/fragment.rs:            _ => panic!("Can only merge two scanned-text fragments!"),
  1334. ./components/layout/fragment.rs-        }
  1335. ./components/layout/fragment.rs-        self.reset_text_range_and_inline_size();
  1336. --
  1337. ./components/layout/fragment.rs-            SpecificFragmentInfo::MulticolColumn => return,
  1338. ./components/layout/fragment.rs-            SpecificFragmentInfo::TableColumn(_) => {
  1339. ./components/layout/fragment.rs:                panic!("Table column fragments do not have inline size")
  1340. ./components/layout/fragment.rs-            },
  1341. ./components/layout/fragment.rs-            SpecificFragmentInfo::UnscannedText(_) => {
  1342. ./components/layout/fragment.rs:                panic!("Unscanned text fragments should have been scanned by now!")
  1343. ./components/layout/fragment.rs-            },
  1344. ./components/layout/fragment.rs-            SpecificFragmentInfo::Canvas(_) |
  1345. --
  1346. ./components/layout/fragment.rs-
  1347. ./components/layout/fragment.rs-            ref unhandled @ _ => {
  1348. ./components/layout/fragment.rs:                panic!("this case should have been handled above: {:?}", unhandled)
  1349. ./components/layout/fragment.rs-            },
  1350. ./components/layout/fragment.rs-        }
  1351. --
  1352. ./components/layout/fragment.rs-            SpecificFragmentInfo::MulticolColumn => return,
  1353. ./components/layout/fragment.rs-            SpecificFragmentInfo::TableColumn(_) => {
  1354. ./components/layout/fragment.rs:                panic!("Table column fragments do not have block size")
  1355. ./components/layout/fragment.rs-            },
  1356. ./components/layout/fragment.rs-            SpecificFragmentInfo::UnscannedText(_) => {
  1357. ./components/layout/fragment.rs:                panic!("Unscanned text fragments should have been scanned by now!")
  1358. ./components/layout/fragment.rs-            },
  1359. ./components/layout/fragment.rs-            SpecificFragmentInfo::Canvas(_) |
  1360. --
  1361. ./components/layout/fragment.rs-            _ if self.is_replaced() => {},
  1362. ./components/layout/fragment.rs-
  1363. ./components/layout/fragment.rs:            ref unhandled @ _ => panic!("should have been handled above: {:?}", unhandled),
  1364. ./components/layout/fragment.rs-        }
  1365. ./components/layout/fragment.rs-    }
  1366. --
  1367. ./components/layout/flow_list.rs-        while index >= self.cache.len() {
  1368. ./components/layout/flow_list.rs-            match self.iterator.next() {
  1369. ./components/layout/flow_list.rs:                None => panic!("Flow index out of range!"),
  1370. ./components/layout/flow_list.rs-                Some(next_flow) => self.cache.push((*next_flow).clone()),
  1371. ./components/layout/flow_list.rs-            }
  1372. --
  1373. ./components/layout/flow.rs-    /// If this is a block flow, returns the underlying object. Fails otherwise.
  1374. ./components/layout/flow.rs-    fn as_block(&self) -> &BlockFlow {
  1375. ./components/layout/flow.rs:        panic!("called as_block() on a non-block flow")
  1376. ./components/layout/flow.rs-    }
  1377. ./components/layout/flow.rs-
  1378. --
  1379. ./components/layout/flow.rs-    fn as_mut_block(&mut self) -> &mut BlockFlow {
  1380. ./components/layout/flow.rs-        debug!("called as_mut_block() on a flow of type {:?}", self.class());
  1381. ./components/layout/flow.rs:        panic!("called as_mut_block() on a non-block flow")
  1382. ./components/layout/flow.rs-    }
  1383. ./components/layout/flow.rs-
  1384. ./components/layout/flow.rs-    /// If this is a flex flow, returns the underlying object. Fails otherwise.
  1385. ./components/layout/flow.rs-    fn as_flex(&self) -> &FlexFlow {
  1386. ./components/layout/flow.rs:        panic!("called as_flex() on a non-flex flow")
  1387. ./components/layout/flow.rs-    }
  1388. ./components/layout/flow.rs-
  1389. ./components/layout/flow.rs-    /// If this is an inline flow, returns the underlying object. Fails otherwise.
  1390. ./components/layout/flow.rs-    fn as_inline(&self) -> &InlineFlow {
  1391. ./components/layout/flow.rs:        panic!("called as_inline() on a non-inline flow")
  1392. ./components/layout/flow.rs-    }
  1393. ./components/layout/flow.rs-
  1394. --
  1395. ./components/layout/flow.rs-    /// otherwise.
  1396. ./components/layout/flow.rs-    fn as_mut_inline(&mut self) -> &mut InlineFlow {
  1397. ./components/layout/flow.rs:        panic!("called as_mut_inline() on a non-inline flow")
  1398. ./components/layout/flow.rs-    }
  1399. ./components/layout/flow.rs-
  1400. ./components/layout/flow.rs-    /// If this is a table wrapper flow, returns the underlying object. Fails otherwise.
  1401. ./components/layout/flow.rs-    fn as_table_wrapper(&self) -> &TableWrapperFlow {
  1402. ./components/layout/flow.rs:        panic!("called as_table_wrapper() on a non-tablewrapper flow")
  1403. ./components/layout/flow.rs-    }
  1404. ./components/layout/flow.rs-
  1405. ./components/layout/flow.rs-    /// If this is a table flow, returns the underlying object, borrowed mutably. Fails otherwise.
  1406. ./components/layout/flow.rs-    fn as_mut_table(&mut self) -> &mut TableFlow {
  1407. ./components/layout/flow.rs:        panic!("called as_mut_table() on a non-table flow")
  1408. ./components/layout/flow.rs-    }
  1409. ./components/layout/flow.rs-
  1410. ./components/layout/flow.rs-    /// If this is a table flow, returns the underlying object. Fails otherwise.
  1411. ./components/layout/flow.rs-    fn as_table(&self) -> &TableFlow {
  1412. ./components/layout/flow.rs:        panic!("called as_table() on a non-table flow")
  1413. ./components/layout/flow.rs-    }
  1414. ./components/layout/flow.rs-
  1415. --
  1416. ./components/layout/flow.rs-    /// otherwise.
  1417. ./components/layout/flow.rs-    fn as_mut_table_colgroup(&mut self) -> &mut TableColGroupFlow {
  1418. ./components/layout/flow.rs:        panic!("called as_mut_table_colgroup() on a non-tablecolgroup flow")
  1419. ./components/layout/flow.rs-    }
  1420. ./components/layout/flow.rs-
  1421. --
  1422. ./components/layout/flow.rs-    /// otherwise.
  1423. ./components/layout/flow.rs-    fn as_table_colgroup(&self) -> &TableColGroupFlow {
  1424. ./components/layout/flow.rs:        panic!("called as_table_colgroup() on a non-tablecolgroup flow")
  1425. ./components/layout/flow.rs-    }
  1426. ./components/layout/flow.rs-
  1427. --
  1428. ./components/layout/flow.rs-    /// otherwise.
  1429. ./components/layout/flow.rs-    fn as_mut_table_rowgroup(&mut self) -> &mut TableRowGroupFlow {
  1430. ./components/layout/flow.rs:        panic!("called as_mut_table_rowgroup() on a non-tablerowgroup flow")
  1431. ./components/layout/flow.rs-    }
  1432. ./components/layout/flow.rs-
  1433. ./components/layout/flow.rs-    /// If this is a table rowgroup flow, returns the underlying object. Fails otherwise.
  1434. ./components/layout/flow.rs-    fn as_table_rowgroup(&self) -> &TableRowGroupFlow {
  1435. ./components/layout/flow.rs:        panic!("called as_table_rowgroup() on a non-tablerowgroup flow")
  1436. ./components/layout/flow.rs-    }
  1437. ./components/layout/flow.rs-
  1438. --
  1439. ./components/layout/flow.rs-    /// otherwise.
  1440. ./components/layout/flow.rs-    fn as_mut_table_row(&mut self) -> &mut TableRowFlow {
  1441. ./components/layout/flow.rs:        panic!("called as_mut_table_row() on a non-tablerow flow")
  1442. ./components/layout/flow.rs-    }
  1443. ./components/layout/flow.rs-
  1444. ./components/layout/flow.rs-    /// If this is a table row flow, returns the underlying object. Fails otherwise.
  1445. ./components/layout/flow.rs-    fn as_table_row(&self) -> &TableRowFlow {
  1446. ./components/layout/flow.rs:        panic!("called as_table_row() on a non-tablerow flow")
  1447. ./components/layout/flow.rs-    }
  1448. ./components/layout/flow.rs-
  1449. --
  1450. ./components/layout/flow.rs-    /// otherwise.
  1451. ./components/layout/flow.rs-    fn as_mut_table_cell(&mut self) -> &mut TableCellFlow {
  1452. ./components/layout/flow.rs:        panic!("called as_mut_table_cell() on a non-tablecell flow")
  1453. ./components/layout/flow.rs-    }
  1454. ./components/layout/flow.rs-
  1455. ./components/layout/flow.rs-    /// If this is a table cell flow, returns the underlying object. Fails otherwise.
  1456. ./components/layout/flow.rs-    fn as_table_cell(&self) -> &TableCellFlow {
  1457. ./components/layout/flow.rs:        panic!("called as_table_cell() on a non-tablecell flow")
  1458. ./components/layout/flow.rs-    }
  1459. ./components/layout/flow.rs-
  1460. --
  1461. ./components/layout/flow.rs-    /// sizes and the dimensions of any boxes it is responsible for flowing.
  1462. ./components/layout/flow.rs-    fn bubble_inline_sizes(&mut self) {
  1463. ./components/layout/flow.rs:        panic!("bubble_inline_sizes not yet implemented")
  1464. ./components/layout/flow.rs-    }
  1465. ./components/layout/flow.rs-
  1466. ./components/layout/flow.rs-    /// Pass 2 of reflow: computes inline-size.
  1467. ./components/layout/flow.rs-    fn assign_inline_sizes(&mut self, _ctx: &LayoutContext) {
  1468. ./components/layout/flow.rs:        panic!("assign_inline_sizes not yet implemented")
  1469. ./components/layout/flow.rs-    }
  1470. ./components/layout/flow.rs-
  1471. ./components/layout/flow.rs-    /// Pass 3a of reflow: computes block-size.
  1472. ./components/layout/flow.rs-    fn assign_block_size(&mut self, _ctx: &LayoutContext) {
  1473. ./components/layout/flow.rs:        panic!("assign_block_size not yet implemented")
  1474. ./components/layout/flow.rs-    }
  1475. ./components/layout/flow.rs-
  1476. --
  1477. ./components/layout/flow.rs-    fn mark_as_root(&mut self) {
  1478. ./components/layout/flow.rs-        debug!("called mark_as_root() on a flow of type {:?}", self.class());
  1479. ./components/layout/flow.rs:        panic!("called mark_as_root() on an unhandled flow");
  1480. ./components/layout/flow.rs-    }
  1481. ./components/layout/flow.rs-
  1482. --
  1483. ./components/layout/flow.rs-    pub fn generated_containing_block_size(&self, for_flow: OpaqueFlow) -> LogicalSize<Au> {
  1484. ./components/layout/flow.rs-        match self.link {
  1485. ./components/layout/flow.rs:            None => panic!(
  1486. ./components/layout/flow.rs-                "Link to containing block not established; perhaps you forgot to call \
  1487. ./components/layout/flow.rs-                 `set_absolute_descendants`?"
  1488. --
  1489. ./components/layout/flow.rs-    ) -> Option<Au> {
  1490. ./components/layout/flow.rs-        match self.link {
  1491. ./components/layout/flow.rs:            None => panic!(
  1492. ./components/layout/flow.rs-                "Link to containing block not established; perhaps you forgot to call \
  1493. ./components/layout/flow.rs-                 `set_absolute_descendants`?"
  1494. --
  1495. ./components/layout/floats.rs-                },
  1496. ./components/layout/floats.rs-                (None, None, None, None) => return None,
  1497. ./components/layout/floats.rs:                _ => panic!("Reached unreachable state when computing float area"),
  1498. ./components/layout/floats.rs-            };
  1499. ./components/layout/floats.rs-
  1500. --
  1501. ./components/layout/display_list/builder.rs-            },
  1502. ./components/layout/display_list/builder.rs-            SpecificFragmentInfo::UnscannedText(_) => {
  1503. ./components/layout/display_list/builder.rs:                panic!("Shouldn't see unscanned fragments here.")
  1504. ./components/layout/display_list/builder.rs-            },
  1505. ./components/layout/display_list/builder.rs-            SpecificFragmentInfo::TableColumn(_) => {
  1506. ./components/layout/display_list/builder.rs:                panic!("Shouldn't see table column fragments here.")
  1507. ./components/layout/display_list/builder.rs-            },
  1508. ./components/layout/display_list/builder.rs-        }
  1509. --
  1510. ./components/layout/construct.rs-            Display::InlineBlock => self.build_flow_for_block(node, None),
  1511. ./components/layout/construct.rs-            Display::InlineFlex => self.build_flow_for_flex(node, None),
  1512. ./components/layout/construct.rs:            _ => panic!("The flag should be inline-block or inline-flex"),
  1513. ./components/layout/construct.rs-        };
  1514. ./components/layout/construct.rs-        let (block_flow, abs_descendants) = match block_flow_result {
  1515. --
  1516. ./components/layout/block.rs-            },
  1517. ./components/layout/block.rs-            CandidateBSizeIteratorStatus::Found => None,
  1518. ./components/layout/block.rs:            CandidateBSizeIteratorStatus::Initial => panic!(),
  1519. ./components/layout/block.rs-        }
  1520. ./components/layout/block.rs-    }
  1521. --
  1522. ./components/layout/block.rs-        {
  1523. ./components/layout/block.rs-            CollapsibleMargins::CollapseThrough(_) => {
  1524. ./components/layout/block.rs:                panic!("Margins unexpectedly collapsed through root flow.")
  1525. ./components/layout/block.rs-            },
  1526. ./components/layout/block.rs-            CollapsibleMargins::Collapse(block_start_margin, block_end_margin) => {
  1527. --
  1528. ./components/layout/block.rs-        let inline_size = match computed_inline_size {
  1529. ./components/layout/block.rs-            MaybeAuto::Specified(w) => w,
  1530. ./components/layout/block.rs:            _ => panic!(
  1531. ./components/layout/block.rs-                "{} {}",
  1532. ./components/layout/block.rs-                "The used value for inline_size for absolute replaced flow",
  1533. --
  1534. ./components/layout/block.rs-            MaybeAuto::Specified(_) => {},
  1535. ./components/layout/block.rs-            MaybeAuto::Auto => {
  1536. ./components/layout/block.rs:                panic!("BlockReplaced: inline_size should have been computed by now")
  1537. ./components/layout/block.rs-            },
  1538. ./components/layout/block.rs-        };
  1539. --
  1540. ./components/layout/block.rs-            MaybeAuto::Specified(w) => w,
  1541. ./components/layout/block.rs-            MaybeAuto::Auto => {
  1542. ./components/layout/block.rs:                panic!("FloatReplaced: inline_size should have been computed by now")
  1543. ./components/layout/block.rs-            },
  1544. ./components/layout/block.rs-        };
  1545. --
  1546. ./components/hashglobe/src/hash_set.rs-
  1547. ./components/hashglobe/src/hash_set.rs-            for _ in &s {
  1548. ./components/hashglobe/src/hash_set.rs:                panic!("s should be empty!");
  1549. ./components/hashglobe/src/hash_set.rs-            }
  1550. ./components/hashglobe/src/hash_set.rs-
  1551. --
  1552. ./components/hashglobe/src/hash_map.rs-        let mut m: HashMap<isize, bool> = HashMap::new();
  1553. ./components/hashglobe/src/hash_map.rs-        match m.entry(0) {
  1554. ./components/hashglobe/src/hash_map.rs:            Occupied(_) => panic!(),
  1555. ./components/hashglobe/src/hash_map.rs-            Vacant(_) => {},
  1556. ./components/hashglobe/src/hash_map.rs-        }
  1557. --
  1558. ./components/hashglobe/src/hash_map.rs-        let new = 100;
  1559. ./components/hashglobe/src/hash_map.rs-        match m.get_mut(&5) {
  1560. ./components/hashglobe/src/hash_map.rs:            None => panic!(),
  1561. ./components/hashglobe/src/hash_map.rs-            Some(x) => *x = new,
  1562. ./components/hashglobe/src/hash_map.rs-        }
  1563. --
  1564. ./components/hashglobe/src/hash_map.rs-        m.insert(1, 2);
  1565. ./components/hashglobe/src/hash_map.rs-        match m.get(&1) {
  1566. ./components/hashglobe/src/hash_map.rs:            None => panic!(),
  1567. ./components/hashglobe/src/hash_map.rs-            Some(v) => assert_eq!(*v, 2),
  1568. ./components/hashglobe/src/hash_map.rs-        }
  1569. --
  1570. ./components/hashglobe/src/hash_map.rs-
  1571. ./components/hashglobe/src/hash_map.rs-        match a.entry(key.clone()) {
  1572. ./components/hashglobe/src/hash_map.rs:            Vacant(_) => panic!(),
  1573. ./components/hashglobe/src/hash_map.rs-            Occupied(e) => assert_eq!(key, *e.key()),
  1574. ./components/hashglobe/src/hash_map.rs-        }
  1575. --
  1576. ./components/hashglobe/src/hash_map.rs-        assert!(a.is_empty());
  1577. ./components/hashglobe/src/hash_map.rs-        match a.entry(key.clone()) {
  1578. ./components/hashglobe/src/hash_map.rs:            Occupied(_) => panic!(),
  1579. ./components/hashglobe/src/hash_map.rs-            Vacant(e) => {
  1580. ./components/hashglobe/src/hash_map.rs-                assert_eq!(key, *e.key());
  1581. --
  1582. ./components/hashglobe/src/hash_map.rs-            }
  1583. ./components/hashglobe/src/hash_map.rs-        }
  1584. ./components/hashglobe/src/hash_map.rs:        panic!("Adaptive early resize failed");
  1585. ./components/hashglobe/src/hash_map.rs-    }
  1586. ./components/hashglobe/src/hash_map.rs-}
  1587. --
  1588. ./components/gfx/text/shaping/harfbuzz.rs-            space_glyph = g as hb_codepoint_t;
  1589. ./components/gfx/text/shaping/harfbuzz.rs-        },
  1590. ./components/gfx/text/shaping/harfbuzz.rs:        None => panic!("No space info"),
  1591. ./components/gfx/text/shaping/harfbuzz.rs-    }
  1592. ./components/gfx/text/shaping/harfbuzz.rs-    let space_advance = unsafe { (*font).glyph_h_advance(space_glyph as GlyphId) };
  1593. --
  1594. ./components/gfx/text/glyph.rs-    pub fn iter_glyphs_for_byte_range(&'a self, range: &Range<ByteIndex>) -> GlyphIterator<'a> {
  1595. ./components/gfx/text/glyph.rs-        if range.begin() >= self.len() {
  1596. ./components/gfx/text/glyph.rs:            panic!("iter_glyphs_for_range: range.begin beyond length!");
  1597. ./components/gfx/text/glyph.rs-        }
  1598. ./components/gfx/text/glyph.rs-        if range.end() > self.len() {
  1599. ./components/gfx/text/glyph.rs:            panic!("iter_glyphs_for_range: range.end beyond length!");
  1600. ./components/gfx/text/glyph.rs-        }
  1601. ./components/gfx/text/glyph.rs-
  1602. --
  1603. ./components/gfx/platform/freetype/font_list.rs-                c_str_to_string(file as *const c_char)
  1604. ./components/gfx/platform/freetype/font_list.rs-            } else {
  1605. ./components/gfx/platform/freetype/font_list.rs:                panic!();
  1606. ./components/gfx/platform/freetype/font_list.rs-            };
  1607. ./components/gfx/platform/freetype/font_list.rs-            let mut index: libc::c_int = 0;
  1608. --
  1609. ./components/gfx/platform/freetype/font_list.rs-                index
  1610. ./components/gfx/platform/freetype/font_list.rs-            } else {
  1611. ./components/gfx/platform/freetype/font_list.rs:                panic!();
  1612. ./components/gfx/platform/freetype/font_list.rs-            };
  1613. ./components/gfx/platform/freetype/font_list.rs-
  1614. --
  1615. ./components/gfx/platform/freetype/font_context.rs-            let result = FT_New_Library(mem, &mut ctx);
  1616. ./components/gfx/platform/freetype/font_context.rs-            if !succeeded(result) {
  1617. ./components/gfx/platform/freetype/font_context.rs:                panic!("Unable to initialize FreeType library");
  1618. ./components/gfx/platform/freetype/font_context.rs-            }
  1619. ./components/gfx/platform/freetype/font_context.rs-
  1620. --
  1621. ./components/gfx/platform/freetype/font.rs-        unsafe {
  1622. ./components/gfx/platform/freetype/font.rs-            if !succeeded(FT_Done_Face(self.face)) {
  1623. ./components/gfx/platform/freetype/font.rs:                panic!("FT_Done_Face failed");
  1624. ./components/gfx/platform/freetype/font.rs-            }
  1625. ./components/gfx/platform/freetype/font.rs-        }
  1626. --
  1627. ./components/gfx/font_cache_thread.rs-                "Failed to receive a response from live font cache"
  1628. ./components/gfx/font_cache_thread.rs-            );
  1629. ./components/gfx/font_cache_thread.rs:            panic!("Font cache thread has already exited.");
  1630. ./components/gfx/font_cache_thread.rs-        }
  1631. ./components/gfx/font_cache_thread.rs-        instance_key.unwrap()
  1632. --
  1633. ./components/gfx/font_cache_thread.rs-                "Failed to receive a response from live font cache"
  1634. ./components/gfx/font_cache_thread.rs-            );
  1635. ./components/gfx/font_cache_thread.rs:            panic!("Font cache thread has already exited.");
  1636. ./components/gfx/font_cache_thread.rs-        }
  1637. ./components/gfx/font_cache_thread.rs-
  1638. --
  1639. ./components/gfx/font.rs-
  1640. ./components/gfx/font.rs-            SingleFontFamily::Generic(generic) => FontFamilyName::Generic(match generic {
  1641. ./components/gfx/font.rs:                GenericFontFamily::None => panic!("Shouldn't appear in style"),
  1642. ./components/gfx/font.rs-                GenericFontFamily::Serif => atom!("serif"),
  1643. ./components/gfx/font.rs-                GenericFontFamily::SansSerif => atom!("sans-serif"),
  1644. --
  1645. ./components/domobject_derive/lib.rs-        fields.iter().collect::<Vec<&syn::Field>>()
  1646. ./components/domobject_derive/lib.rs-    } else {
  1647. ./components/domobject_derive/lib.rs:        panic!("#[derive(DomObject)] should only be applied on proper structs")
  1648. ./components/domobject_derive/lib.rs-    };
  1649. ./components/domobject_derive/lib.rs-
  1650. --
  1651. ./components/dom_struct/lib.rs-pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
  1652. ./components/dom_struct/lib.rs-    if !args.is_empty() {
  1653. ./components/dom_struct/lib.rs:        panic!("#[dom_struct] takes no arguments");
  1654. ./components/dom_struct/lib.rs-    }
  1655. ./components/dom_struct/lib.rs-    let attributes = quote! {
  1656. --
  1657. ./components/dom_struct/lib.rs-            .into()
  1658. ./components/dom_struct/lib.rs-        } else {
  1659. ./components/dom_struct/lib.rs:            panic!("#[dom_struct] only applies to structs with named fields");
  1660. ./components/dom_struct/lib.rs-        }
  1661. ./components/dom_struct/lib.rs-    } else {
  1662. ./components/dom_struct/lib.rs:        panic!("#[dom_struct] only applies to structs");
  1663. ./components/dom_struct/lib.rs-    }
  1664. ./components/dom_struct/lib.rs-}
  1665. --
  1666. ./components/devtools/actor.rs-            }
  1667. ./components/devtools/actor.rs-        }
  1668. ./components/devtools/actor.rs:        panic!("couldn't find actor named {}", actor)
  1669. ./components/devtools/actor.rs-    }
  1670. ./components/devtools/actor.rs-
  1671. --
  1672. ./components/derive_common/cg.rs-        let ty = match *pred {
  1673. ./components/derive_common/cg.rs-            syn::WherePredicate::Type(ref ty) => ty,
  1674. ./components/derive_common/cg.rs:            ref predicate => panic!("Unhanded complex where predicate: {:?}", predicate),
  1675. ./components/derive_common/cg.rs-        };
  1676. ./components/derive_common/cg.rs-
  1677. ./components/derive_common/cg.rs-        let path = match ty.bounded_ty {
  1678. ./components/derive_common/cg.rs-            syn::Type::Path(ref p) => &p.path,
  1679. ./components/derive_common/cg.rs:            ref ty => panic!("Unhanded complex where type: {:?}", ty),
  1680. ./components/derive_common/cg.rs-        };
  1681. ./components/derive_common/cg.rs-
  1682. --
  1683. ./components/derive_common/cg.rs-        let ident = match path_to_ident(path) {
  1684. ./components/derive_common/cg.rs-            Some(i) => i,
  1685. ./components/derive_common/cg.rs:            None => panic!("Unhanded complex where type path: {:?}", path),
  1686. ./components/derive_common/cg.rs-        };
  1687. ./components/derive_common/cg.rs-
  1688. --
  1689. ./components/derive_common/cg.rs-                        GenericArgument::Type(parse_quote!(<#ident as #trait_path>::#trait_output))
  1690. ./components/derive_common/cg.rs-                    },
  1691. ./components/derive_common/cg.rs:                    ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
  1692. ./components/derive_common/cg.rs-                })
  1693. ./components/derive_common/cg.rs-                .collect(),
  1694. --
  1695. ./components/derive_common/cg.rs-            ..inner.clone()
  1696. ./components/derive_common/cg.rs-        }),
  1697. ./components/derive_common/cg.rs:        ref ty => panic!("type {:?} cannot be mapped yet", ty),
  1698. ./components/derive_common/cg.rs-    }
  1699. ./components/derive_common/cg.rs-}
  1700. --
  1701. ./components/derive_common/cg.rs-                                        })
  1702. ./components/derive_common/cg.rs-                                    },
  1703. ./components/derive_common/cg.rs:                                    ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
  1704. ./components/derive_common/cg.rs-                                })
  1705. ./components/derive_common/cg.rs-                                .collect(),
  1706. --
  1707. ./components/derive_common/cg.rs-                    },
  1708. ./components/derive_common/cg.rs-                    ref arg @ PathArguments::None => arg.clone(),
  1709. ./components/derive_common/cg.rs:                    ref parameters => panic!("parameters {:?} cannot be mapped yet", parameters),
  1710. ./components/derive_common/cg.rs-                },
  1711. ./components/derive_common/cg.rs-            })
  1712. --
  1713. ./components/derive_common/cg.rs-    match A::from_field(field) {
  1714. ./components/derive_common/cg.rs-        Ok(attrs) => attrs,
  1715. ./components/derive_common/cg.rs:        Err(e) => panic!("failed to parse field attributes: {}", e),
  1716. ./components/derive_common/cg.rs-    }
  1717. ./components/derive_common/cg.rs-}
  1718. --
  1719. ./components/derive_common/cg.rs-    match A::from_derive_input(input) {
  1720. ./components/derive_common/cg.rs-        Ok(attrs) => attrs,
  1721. ./components/derive_common/cg.rs:        Err(e) => panic!("failed to parse input attributes: {}", e),
  1722. ./components/derive_common/cg.rs-    }
  1723. ./components/derive_common/cg.rs-}
  1724. --
  1725. ./components/derive_common/cg.rs-    match A::from_variant(variant) {
  1726. ./components/derive_common/cg.rs-        Ok(attrs) => attrs,
  1727. ./components/derive_common/cg.rs:        Err(e) => panic!("failed to parse variant attributes: {}", e),
  1728. ./components/derive_common/cg.rs-    }
  1729. ./components/derive_common/cg.rs-}
  1730. --
  1731. ./components/deny_public_fields/lib.rs-    s.each(|binding| {
  1732. ./components/deny_public_fields/lib.rs-        if binding.ast().vis != syn::Visibility::Inherited {
  1733. ./components/deny_public_fields/lib.rs:            panic!(
  1734. ./components/deny_public_fields/lib.rs-                "Field `{}` should not be public",
  1735. ./components/deny_public_fields/lib.rs-                binding.ast().ident.as_ref().unwrap_or(&binding.binding)
  1736. --
  1737. ./components/constellation/constellation.rs-//!
  1738. ./components/constellation/constellation.rs-//! The constellation acts as a logger, tracking any `warn!` messages from threads,
  1739. ./components/constellation/constellation.rs://! and converting any `error!` or `panic!` into a crash report.
  1740. ./components/constellation/constellation.rs-//!
  1741. ./components/constellation/constellation.rs-//! Since there is only one constellation, and its responsibilities include crash reporting,
  1742. --
  1743. ./components/constellation/constellation.rs-
  1744. ./components/constellation/constellation.rs-/// The constellation uses logging to perform crash reporting.
  1745. ./components/constellation/constellation.rs:/// The constellation receives all `warn!`, `error!` and `panic!` messages,
  1746. ./components/constellation/constellation.rs-/// and generates a crash report when it receives a panic.
  1747. ./components/constellation/constellation.rs-
  1748. --
  1749. ./components/config/prefs.rs-pub fn add_user_prefs(prefs: HashMap<String, PrefValue>) {
  1750. ./components/config/prefs.rs-    if let Err(error) = PREFS.set_all(prefs.into_iter()) {
  1751. ./components/config/prefs.rs:        panic!("Error setting preference: {:?}", error);
  1752. ./components/config/prefs.rs-    }
  1753. ./components/config/prefs.rs-}
  1754. --
  1755. ./components/config/pref_util.rs-                        value.into()
  1756. ./components/config/pref_util.rs-                    } else {
  1757. ./components/config/pref_util.rs:                        panic!("Cannot convert {:?} to {:?}", other, std::any::type_name::<$t>())
  1758. ./components/config/pref_util.rs-                    }
  1759. ./components/config/pref_util.rs-                }
  1760. --
  1761. ./components/config/opts.rs-                Ok(interval) => Some(OutputOptions::Stdout(interval)),
  1762. ./components/config/opts.rs-                Err(_) => match ServoUrl::parse(&argument) {
  1763. ./components/config/opts.rs:                    Ok(_) => panic!("influxDB isn't supported anymore"),
  1764. ./components/config/opts.rs-                    Err(_) => Some(OutputOptions::FileName(argument)),
  1765. ./components/config/opts.rs-                },
  1766. --
  1767. ./components/compositing/build.rs-                    write!(&mut revision_module_file, "{}", format!("\"{}\"", revision)).unwrap();
  1768. ./components/compositing/build.rs-                },
  1769. ./components/compositing/build.rs:                _ => panic!("Cannot find package definitions in lockfile"),
  1770. ./components/compositing/build.rs-            }
  1771. ./components/compositing/build.rs-        },
  1772. ./components/compositing/build.rs:        Err(e) => panic!("{}", e),
  1773. ./components/compositing/build.rs-    }
  1774. ./components/compositing/build.rs-}
  1775. --
  1776. ./components/canvas/webgl_thread.rs-                    }
  1777. ./components/canvas/webgl_thread.rs-                }
  1778. ./components/canvas/webgl_thread.rs:                panic!(
  1779. ./components/canvas/webgl_thread.rs-                    "Unexpected WebGL error: 0x{:x} ({}) [{:?}]",
  1780. ./components/canvas/webgl_thread.rs-                    error, error, command
  1781. --
  1782. ./components/canvas/canvas_data.rs-            PathState::UserSpacePath(ref p, _) => p,
  1783. ./components/canvas/canvas_data.rs-            PathState::UserSpacePathBuilder(..) | PathState::DeviceSpacePathBuilder(..) => {
  1784. ./components/canvas/canvas_data.rs:                panic!("should have called ensure_path")
  1785. ./components/canvas/canvas_data.rs-            },
  1786. ./components/canvas/canvas_data.rs-        }
  1787.  
Advertisement
Add Comment
Please, Sign In to add comment