Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ./tests/unit/style/viewport.rs- callback(&rule.declarations, meta);
- ./tests/unit/style/viewport.rs- } else {
- ./tests/unit/style/viewport.rs: panic!("no @viewport rule for {}", meta);
- ./tests/unit/style/viewport.rs- }
- ./tests/unit/style/viewport.rs-}
- --
- ./tests/unit/style/stylesheets.rs- }
- ./tests/unit/style/stylesheets.rs- if errors.len() < expected_errors.len() {
- ./tests/unit/style/stylesheets.rs: panic!("Missing errors: {:#?}", &expected_errors[errors.len()..]);
- ./tests/unit/style/stylesheets.rs- }
- ./tests/unit/style/stylesheets.rs- if errors.len() > expected_errors.len() {
- ./tests/unit/style/stylesheets.rs: panic!("Extra errors: {:#?}", &errors[expected_errors.len()..]);
- ./tests/unit/style/stylesheets.rs- }
- ./tests/unit/style/stylesheets.rs- }
- --
- ./tests/unit/style/specified_values.rs-
- ./tests/unit/style/specified_values.rs- if !failing_messages.is_empty() {
- ./tests/unit/style/specified_values.rs: panic!("{}", failing_messages.join("\n\n"));
- ./tests/unit/style/specified_values.rs- }
- ./tests/unit/style/specified_values.rs-}
- --
- ./tests/unit/style/rule_tree/bench.rs-impl ParseErrorReporter for ErrorringErrorReporter {
- ./tests/unit/style/rule_tree/bench.rs- fn report_error(&self, url: &ServoUrl, location: SourceLocation, error: ContextualParseError) {
- ./tests/unit/style/rule_tree/bench.rs: panic!(
- ./tests/unit/style/rule_tree/bench.rs- "CSS error: {}\t\n{}:{} {}",
- ./tests/unit/style/rule_tree/bench.rs- url.as_str(),
- --
- ./tests/unit/style/attr.rs- match AttrValue::from_double(value, 0.0) {
- ./tests/unit/style/attr.rs- AttrValue::Double(_, num) => assert_eq!(num, 43250f64),
- ./tests/unit/style/attr.rs: _ => panic!("expected a double value"),
- ./tests/unit/style/attr.rs- }
- ./tests/unit/style/attr.rs-}
- --
- ./tests/unit/style/attr.rs- match AttrValue::from_double(value, 0.0) {
- ./tests/unit/style/attr.rs- AttrValue::Double(_, num) => assert_eq!(num, -5.6f64),
- ./tests/unit/style/attr.rs: _ => panic!("expected a double value"),
- ./tests/unit/style/attr.rs- }
- ./tests/unit/style/attr.rs-}
- --
- ./tests/unit/style/attr.rs- match AttrValue::from_double(value, 0.0) {
- ./tests/unit/style/attr.rs- AttrValue::Double(_, num) => assert_eq!(num, 5.6f64),
- ./tests/unit/style/attr.rs: _ => panic!("expected a double value"),
- ./tests/unit/style/attr.rs- }
- ./tests/unit/style/attr.rs-}
- --
- ./tests/unit/style/attr.rs- match AttrValue::from_limited_i32(value, 0) {
- ./tests/unit/style/attr.rs- AttrValue::Int(_, 0) => (),
- ./tests/unit/style/attr.rs: _ => panic!("expected an IndexSize error"),
- ./tests/unit/style/attr.rs- }
- ./tests/unit/style/attr.rs-}
- --
- ./tests/unit/style/attr.rs- match AttrValue::from_limited_i32(String::from("1"), 0) {
- ./tests/unit/style/attr.rs- AttrValue::Int(_, 1) => (),
- ./tests/unit/style/attr.rs: _ => panic!("expected an successful parsing"),
- ./tests/unit/style/attr.rs- }
- ./tests/unit/style/attr.rs-}
- --
- ./tests/unit/style/attr.rs- match AttrValue::from_limited_i32(String::from("parsed-value"), 0) {
- ./tests/unit/style/attr.rs- AttrValue::Int(p, 0) => assert_eq!(p, String::from("parsed-value")),
- ./tests/unit/style/attr.rs: _ => panic!("expected an successful parsing"),
- ./tests/unit/style/attr.rs- }
- ./tests/unit/style/attr.rs-}
- --
- ./tests/unit/script/size_of.rs- let old = $known_size;
- ./tests/unit/script/size_of.rs- if new < old {
- ./tests/unit/script/size_of.rs: panic!("Your changes have decreased the stack size of commonly used DOM struct {} from {} to {}. \
- ./tests/unit/script/size_of.rs- Good work! Please update the size in tests/unit/script/size_of.rs.",
- ./tests/unit/script/size_of.rs- stringify!($t), old, new)
- ./tests/unit/script/size_of.rs- } else if new > old {
- ./tests/unit/script/size_of.rs: panic!("Your changes have increased the stack size of commonly used DOM struct {} from {} to {}. \
- ./tests/unit/script/size_of.rs- These structs are present in large quantities in the DOM, and increasing the size \
- ./tests/unit/script/size_of.rs- may dramatically affect our memory footprint. Please consider choosing a design which \
- --
- ./ports/winit/events_loop.rs- EventLoop::Winit(Some(ref event_loop)) => event_loop,
- ./ports/winit/events_loop.rs- EventLoop::Winit(None) | EventLoop::Headless(..) => {
- ./ports/winit/events_loop.rs: panic!("Can't access winit event loop while using the fake headless event loop")
- ./ports/winit/events_loop.rs- },
- ./ports/winit/events_loop.rs- }
- --
- ./ports/libsimpleservo/capi/src/lib.rs- None => Err("Servo not available in this thread"),
- ./ports/libsimpleservo/capi/src/lib.rs- }) {
- ./ports/libsimpleservo/capi/src/lib.rs: Err(e) => panic!("{}", e),
- ./ports/libsimpleservo/capi/src/lib.rs- Ok(r) => r,
- ./ports/libsimpleservo/capi/src/lib.rs- }
- --
- ./ports/gstplugin/servowebsrc.rs- (connection.0, url, webxr_mode, prefs, size)
- ./ports/gstplugin/servowebsrc.rs- },
- ./ports/gstplugin/servowebsrc.rs: e => panic!("Failed to start ({:?})", e),
- ./ports/gstplugin/servowebsrc.rs- };
- ./ports/gstplugin/servowebsrc.rs- info!(
- --
- ./ports/gstplugin/servowebsrc.rs- Some("cubemap") => Some(WebXRMode::Cubemap),
- ./ports/gstplugin/servowebsrc.rs- Some("spherical") => Some(WebXRMode::Spherical),
- ./ports/gstplugin/servowebsrc.rs: Some(mode) => panic!("Unknown WebXR mode {}", mode),
- ./ports/gstplugin/servowebsrc.rs- };
- ./ports/gstplugin/servowebsrc.rs- *guard = webxr_mode;
- --
- ./etc/ci/check_no_panic.sh-# file, You can obtain one at https://mozilla.org/MPL/2.0/.
- ./etc/ci/check_no_panic.sh-
- ./etc/ci/check_no_panic.sh:# Make sure listed paths do not use unwrap() or panic!()
- ./etc/ci/check_no_panic.sh-
- ./etc/ci/check_no_panic.sh-set -o errexit
- --
- ./etc/ci/check_no_panic.sh-ls -1 "${PATHS[@]}"
- ./etc/ci/check_no_panic.sh-
- ./etc/ci/check_no_panic.sh:# Make sure the files do not contain "unwrap" or "panic!"
- ./etc/ci/check_no_panic.sh-! grep \
- ./etc/ci/check_no_panic.sh- --dereference-recursive \
- ./etc/ci/check_no_panic.sh- --line-number \
- ./etc/ci/check_no_panic.sh- --with-filename \
- ./etc/ci/check_no_panic.sh: "unwrap(\|panic!(" \
- ./etc/ci/check_no_panic.sh- "${PATHS[@]}"
- --
- ./components/webrender_traits/lib.rs- let texture_id = match source {
- ./components/webrender_traits/lib.rs- WebrenderImageSource::TextureHandle(b) => b,
- ./components/webrender_traits/lib.rs: _ => panic!("Wrong type"),
- ./components/webrender_traits/lib.rs- };
- ./components/webrender_traits/lib.rs- webrender_api::ExternalImage {
- --
- ./components/webrender_traits/lib.rs- let texture_id = match source {
- ./components/webrender_traits/lib.rs- WebrenderImageSource::TextureHandle(b) => b,
- ./components/webrender_traits/lib.rs: _ => panic!("Wrong type"),
- ./components/webrender_traits/lib.rs- };
- ./components/webrender_traits/lib.rs- webrender_api::ExternalImage {
- --
- ./components/webrender_traits/lib.rs- let buffer = match source {
- ./components/webrender_traits/lib.rs- WebrenderImageSource::Raw(b) => b,
- ./components/webrender_traits/lib.rs: _ => panic!("Wrong type"),
- ./components/webrender_traits/lib.rs- };
- ./components/webrender_traits/lib.rs- webrender_api::ExternalImage {
- --
- ./components/webdriver_server/lib.rs- match server::start(SocketAddr::V4(address), handler, extension_routes()) {
- ./components/webdriver_server/lib.rs- Ok(listening) => info!("WebDriver server listening on {}", listening.socket),
- ./components/webdriver_server/lib.rs: Err(_) => panic!("Unable to start WebDriver HTTPD server"),
- ./components/webdriver_server/lib.rs- }
- ./components/webdriver_server/lib.rs- })
- --
- ./components/style/values/specified/length.rs- NoCalcLength::FontRelative(v) => NoCalcLength::FontRelative(v * scalar),
- ./components/style/values/specified/length.rs- NoCalcLength::ViewportPercentage(v) => NoCalcLength::ViewportPercentage(v * scalar),
- ./components/style/values/specified/length.rs: NoCalcLength::ServoCharacterWidth(_) => panic!("Can't multiply ServoCharacterWidth!"),
- ./components/style/values/specified/length.rs- }
- ./components/style/values/specified/length.rs- }
- --
- ./components/style/values/specified/length.rs- match self {
- ./components/style/values/specified/length.rs- Length::NoCalc(inner) => Length::NoCalc(inner * scalar),
- ./components/style/values/specified/length.rs: Length::Calc(..) => panic!("Can't multiply Calc!"),
- ./components/style/values/specified/length.rs- }
- ./components/style/values/specified/length.rs- }
- --
- ./components/style/thread_state.rs- if let Some(ref s) = *k.borrow() {
- ./components/style/thread_state.rs- if x != *s {
- ./components/style/thread_state.rs: panic!("Thread state already initialized as {:?}", s);
- ./components/style/thread_state.rs- }
- ./components/style/thread_state.rs- }
- --
- ./components/style/stylesheets/keyframes_rule.rs- PropertyDeclaration::CSSWideKeyword(..) => None,
- ./components/style/stylesheets/keyframes_rule.rs- PropertyDeclaration::WithVariables(..) => None,
- ./components/style/stylesheets/keyframes_rule.rs: _ => panic!(),
- ./components/style/stylesheets/keyframes_rule.rs- }
- ./components/style/stylesheets/keyframes_rule.rs- },
- ./components/style/stylesheets/keyframes_rule.rs- KeyframesStepValue::ComputedValues => {
- ./components/style/stylesheets/keyframes_rule.rs: panic!("Shouldn't happen to set animation-timing-function in missing keyframes")
- ./components/style/stylesheets/keyframes_rule.rs- },
- ./components/style/stylesheets/keyframes_rule.rs- }
- --
- ./components/style/shared_lock.rs-impl<T: ToShmem> ToShmem for Locked<T> {
- ./components/style/shared_lock.rs- fn to_shmem(&self, _builder: &mut SharedMemoryBuilder) -> to_shmem::Result<Self> {
- ./components/style/shared_lock.rs: panic!("ToShmem not supported in Servo currently")
- ./components/style/shared_lock.rs- }
- ./components/style/shared_lock.rs-}
- --
- ./components/style/properties/properties.mako.rs- StyleStructRef::Owned(ref mut v) => v,
- ./components/style/properties/properties.mako.rs- StyleStructRef::Borrowed(..) => unreachable!(),
- ./components/style/properties/properties.mako.rs: StyleStructRef::Vacated => panic!("Accessed vacated style struct")
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs- }
- --
- ./components/style/properties/properties.mako.rs- &**arc as *const T == struct_to_copy_from as *const T
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs: StyleStructRef::Vacated => panic!("Accessed vacated style struct")
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs- }
- --
- ./components/style/properties/properties.mako.rs- StyleStructRef::Owned(arc) => arc,
- ./components/style/properties/properties.mako.rs- StyleStructRef::Borrowed(arc) => UniqueArc::new((**arc).clone()),
- ./components/style/properties/properties.mako.rs: StyleStructRef::Vacated => panic!("Accessed vacated style struct"),
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs- }
- --
- ./components/style/properties/properties.mako.rs- StyleStructRef::Owned(ref mut v) => Some(v),
- ./components/style/properties/properties.mako.rs- StyleStructRef::Borrowed(..) => None,
- ./components/style/properties/properties.mako.rs: StyleStructRef::Vacated => panic!("Accessed vacated style struct")
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs- }
- --
- ./components/style/properties/properties.mako.rs- StyleStructRef::Owned(v) => v.shareable(),
- ./components/style/properties/properties.mako.rs- StyleStructRef::Borrowed(v) => clone_arc(v),
- ./components/style/properties/properties.mako.rs: StyleStructRef::Vacated => panic!("Accessed vacated style struct")
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs- }
- --
- ./components/style/properties/properties.mako.rs- StyleStructRef::Owned(ref v) => &**v,
- ./components/style/properties/properties.mako.rs- StyleStructRef::Borrowed(v) => &**v,
- ./components/style/properties/properties.mako.rs: StyleStructRef::Vacated => panic!("Accessed vacated style struct")
- ./components/style/properties/properties.mako.rs- }
- ./components/style/properties/properties.mako.rs- }
- --
- ./components/style/properties/helpers/animated_properties.mako.rs- }
- ./components/style/properties/helpers/animated_properties.mako.rs- _ => {
- ./components/style/properties/helpers/animated_properties.mako.rs: panic!("non-convertible nsCSSPropertyID")
- ./components/style/properties/helpers/animated_properties.mako.rs- }
- ./components/style/properties/helpers/animated_properties.mako.rs- }
- --
- ./components/style/properties/helpers/animated_properties.mako.rs- let other_tag = *(other as *const _ as *const u16);
- ./components/style/properties/helpers/animated_properties.mako.rs- if this_tag != other_tag {
- ./components/style/properties/helpers/animated_properties.mako.rs: panic!("Unexpected AnimationValue::animate call");
- ./components/style/properties/helpers/animated_properties.mako.rs- }
- ./components/style/properties/helpers/animated_properties.mako.rs-
- --
- ./components/style/properties/helpers/animated_properties.mako.rs- let other_tag = *(other as *const _ as *const u16);
- ./components/style/properties/helpers/animated_properties.mako.rs- if this_tag != other_tag {
- ./components/style/properties/helpers/animated_properties.mako.rs: panic!("Unexpected AnimationValue::compute_squared_distance call");
- ./components/style/properties/helpers/animated_properties.mako.rs- }
- ./components/style/properties/helpers/animated_properties.mako.rs-
- --
- ./components/style/properties/helpers.mako.rs- }
- ./components/style/properties/helpers.mako.rs- PropertyDeclaration::WithVariables(..) => {
- ./components/style/properties/helpers.mako.rs: panic!("variables should already have been substituted")
- ./components/style/properties/helpers.mako.rs- }
- ./components/style/properties/helpers.mako.rs: _ => panic!("entered the wrong cascade_property() implementation"),
- ./components/style/properties/helpers.mako.rs- };
- ./components/style/properties/helpers.mako.rs-
- --
- ./components/style/properties/helpers.mako.rs- ${to_rust_ident(value).upper()} => ${type}::${to_camel_case(value)},
- ./components/style/properties/helpers.mako.rs- % endfor
- ./components/style/properties/helpers.mako.rs: _ => panic!("Found unexpected value in style struct for ${keyword.name} property"),
- ./components/style/properties/helpers.mako.rs- }
- ./components/style/properties/helpers.mako.rs- }
- --
- ./components/style/properties/gecko.mako.rs- % endfor
- ./components/style/properties/gecko.mako.rs- % if keyword.gecko_inexhaustive:
- ./components/style/properties/gecko.mako.rs: _ => panic!("Found unexpected value in style struct for ${ident} property"),
- ./components/style/properties/gecko.mako.rs- % endif
- ./components/style/properties/gecko.mako.rs- }
- --
- ./components/style/properties/gecko.mako.rs- % endfor
- ./components/style/properties/gecko.mako.rs- % if keyword.gecko_inexhaustive:
- ./components/style/properties/gecko.mako.rs: _ => panic!("Found unexpected value in style struct for ${ident} property"),
- ./components/style/properties/gecko.mako.rs- % endif
- ./components/style/properties/gecko.mako.rs- }
- --
- ./components/style/properties/gecko.mako.rs- % endfor
- ./components/style/properties/gecko.mako.rs- % if keyword.gecko_inexhaustive:
- ./components/style/properties/gecko.mako.rs: _ => panic!("Found unexpected value for animation-${ident}"),
- ./components/style/properties/gecko.mako.rs- % endif
- ./components/style/properties/gecko.mako.rs- }
- --
- ./components/style/properties/gecko.mako.rs- % endfor
- ./components/style/properties/gecko.mako.rs- % if keyword.gecko_inexhaustive:
- ./components/style/properties/gecko.mako.rs: _ => panic!("Found unexpected value in style struct for ${ident} property"),
- ./components/style/properties/gecko.mako.rs- % endif
- ./components/style/properties/gecko.mako.rs- }
- --
- ./components/style/properties/gecko.mako.rs- StyleImageLayerRepeat::Round => BackgroundRepeatKeyword::Round,
- ./components/style/properties/gecko.mako.rs- StyleImageLayerRepeat::NoRepeat => BackgroundRepeatKeyword::NoRepeat,
- ./components/style/properties/gecko.mako.rs: _ => panic!("Found unexpected value in style struct for ${shorthand}_repeat property"),
- ./components/style/properties/gecko.mako.rs- }
- ./components/style/properties/gecko.mako.rs- }
- --
- ./components/style/gecko/wrapper.rs-
- ./components/style/gecko/wrapper.rs- fn did_process_child(&self) -> isize {
- ./components/style/gecko/wrapper.rs: panic!("Atomic child count not implemented in Gecko");
- ./components/style/gecko/wrapper.rs- }
- ./components/style/gecko/wrapper.rs-
- --
- ./components/style/build_gecko.rs- match toml::from_str::<Table>(&contents) {
- ./components/style/build_gecko.rs- Ok(result) => result,
- ./components/style/build_gecko.rs: Err(e) => panic!("Failed to parse config file: {}", e),
- ./components/style/build_gecko.rs- }
- ./components/style/build_gecko.rs-}
- --
- ./components/style/build_gecko.rs- let path = PathBuf::from(env::var_os("MOZ_DIST").unwrap());
- ./components/style/build_gecko.rs- if !path.is_absolute() || !path.is_dir() {
- ./components/style/build_gecko.rs: panic!("MOZ_DIST must be an absolute directory, was: {}", path.display());
- ./components/style/build_gecko.rs- }
- ./components/style/build_gecko.rs- path
- --
- ./components/style/build_gecko.rs- let file = match search_include(name) {
- ./components/style/build_gecko.rs- Some(file) => file,
- ./components/style/build_gecko.rs: None => panic!("Include not found: {}", name),
- ./components/style/build_gecko.rs- };
- ./components/style/build_gecko.rs- let result = String::from(file.to_str().unwrap());
- --
- ./components/style/build_gecko.rs- Ok(bindings) => bindings.to_string(),
- ./components/style/build_gecko.rs- Err(_) => {
- ./components/style/build_gecko.rs: panic!(
- ./components/style/build_gecko.rs- "Failed to generate bindings, flags: {:?}",
- ./components/style/build_gecko.rs- command_line_opts
- --
- ./components/style/build_gecko.rs- for key in self.config.keys() {
- ./components/style/build_gecko.rs- if !self.used_keys.contains(key.as_str()) {
- ./components/style/build_gecko.rs: panic!("Unknown key: {}", key);
- ./components/style/build_gecko.rs- }
- ./components/style/build_gecko.rs- }
- --
- ./components/style/build.rs- }
- ./components/style/build.rs- }
- ./components/style/build.rs: panic!(
- ./components/style/build.rs- "Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
- ./components/style/build.rs- candidates.join(", ")
- --
- ./components/style/build.rs- (false, true, true, false) => "servo-2013",
- ./components/style/build.rs- (false, true, false, true) => "servo-2020",
- ./components/style/build.rs: _ => panic!(
- ./components/style/build.rs- "\n\n\
- ./components/style/build.rs- The style crate requires enabling one of its 'servo' or 'gecko' feature flags \
- --
- ./components/style/bloom.rs- break;
- ./components/style/bloom.rs- } else {
- ./components/style/bloom.rs: panic!("should have found a common ancestor");
- ./components/style/bloom.rs- }
- ./components/style/bloom.rs- },
- --
- ./components/style/attr.rs- match *self {
- ./components/style/attr.rs- AttrValue::TokenList(_, ref tokens) => tokens,
- ./components/style/attr.rs: _ => panic!("Tokens not found"),
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/style/attr.rs- match *self {
- ./components/style/attr.rs- AttrValue::Atom(ref value) => value,
- ./components/style/attr.rs: _ => panic!("Atom not found"),
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/style/attr.rs- match *self {
- ./components/style/attr.rs- AttrValue::Color(_, ref color) => color.as_ref(),
- ./components/style/attr.rs: _ => panic!("Color not found"),
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/style/attr.rs- match *self {
- ./components/style/attr.rs- AttrValue::Dimension(_, ref l) => l,
- ./components/style/attr.rs: _ => panic!("Dimension not found"),
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/style/attr.rs- match *self {
- ./components/style/attr.rs- AttrValue::ResolvedUrl(_, ref url) => url.as_ref(),
- ./components/style/attr.rs: _ => panic!("Url not found"),
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/style/attr.rs- value
- ./components/style/attr.rs- } else {
- ./components/style/attr.rs: panic!("Uint not found");
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/style/attr.rs- LengthOrPercentageOrAuto::Length(Au::from_px(value as i32))
- ./components/style/attr.rs- } else {
- ./components/style/attr.rs: panic!("Uint not found");
- ./components/style/attr.rs- }
- ./components/style/attr.rs- }
- --
- ./components/size_of_test/lib.rs- let old = $expected_size;
- ./components/size_of_test/lib.rs- if new < old {
- ./components/size_of_test/lib.rs: panic!(
- ./components/size_of_test/lib.rs- "Your changes have decreased the stack size of {} from {} to {}. \
- ./components/size_of_test/lib.rs- Good work! Please update the expected size in {}.",
- --
- ./components/size_of_test/lib.rs- )
- ./components/size_of_test/lib.rs- } else if new > old {
- ./components/size_of_test/lib.rs: panic!(
- ./components/size_of_test/lib.rs- "Your changes have increased the stack size of {} from {} to {}. \
- ./components/size_of_test/lib.rs- Please consider choosing a design which avoids this increase. \
- --
- ./components/servo_arc/lib.rs- Layout::from_size_align_unchecked(size, align_of::<u64>())
- ./components/servo_arc/lib.rs- } else {
- ./components/servo_arc/lib.rs: panic!("Over-aligned type not handled");
- ./components/servo_arc/lib.rs- };
- ./components/servo_arc/lib.rs-
- --
- ./components/servo/lib.rs-))]
- ./components/servo/lib.rs-fn create_sandbox() {
- ./components/servo/lib.rs: panic!("Sandboxing is not supported on Windows, iOS, ARM targets and android.");
- ./components/servo/lib.rs-}
- ./components/servo/lib.rs-
- --
- ./components/servo/build.rs- }
- ./components/servo/build.rs- }
- ./components/servo/build.rs: panic!(
- ./components/servo/build.rs- "Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
- ./components/servo/build.rs- candidates.join(", ")
- --
- ./components/selectors/parser.rs- match self.0.slice[index] {
- ./components/selectors/parser.rs- Component::Combinator(c) => c,
- ./components/selectors/parser.rs: ref other => panic!(
- ./components/selectors/parser.rs- "Not a combinator: {:?}, {:?}, index: {}",
- ./components/selectors/parser.rs- other, self, index
- --
- ./components/selectors/parser.rs- match self.0.slice[self.len() - index - 1] {
- ./components/selectors/parser.rs- Component::Combinator(c) => c,
- ./components/selectors/parser.rs: ref other => panic!(
- ./components/selectors/parser.rs- "Not a combinator: {:?}, {:?}, index: {}",
- ./components/selectors/parser.rs- other, self, index
- --
- ./components/script_traits/transferable.rs- match self.state {
- ./components/script_traits/transferable.rs- MessagePortState::Detached => {
- ./components/script_traits/transferable.rs: panic!("Messageport set_has_been_shipped called in detached state")
- ./components/script_traits/transferable.rs- },
- ./components/script_traits/transferable.rs- MessagePortState::Enabled(_) => self.state = MessagePortState::Enabled(true),
- --
- ./components/script_traits/lib.rs- 8 => MediaSessionActionType::Stop,
- ./components/script_traits/lib.rs- 9 => MediaSessionActionType::SeekTo,
- ./components/script_traits/lib.rs: _ => panic!("Unknown MediaSessionActionType"),
- ./components/script_traits/lib.rs- }
- ./components/script_traits/lib.rs- }
- --
- ./components/script/script_thread.rs- match self.recv() {
- ./components/script/script_thread.rs- Ok(MainThreadScriptMsg::Common(script_msg)) => Ok(script_msg),
- ./components/script/script_thread.rs: Ok(_) => panic!("unexpected main thread event message!"),
- ./components/script/script_thread.rs- Err(_) => Err(()),
- ./components/script/script_thread.rs- }
- --
- ./components/script/script_thread.rs- match self.recv().map(|(_, msg)| msg) {
- ./components/script/script_thread.rs- Ok(MainThreadScriptMsg::Common(script_msg)) => Ok(script_msg),
- ./components/script/script_thread.rs: Ok(_) => panic!("unexpected main thread event message!"),
- ./components/script/script_thread.rs- Err(_) => Err(()),
- ./components/script/script_thread.rs- }
- --
- ./components/script/script_thread.rs- msg @ ConstellationControlMsg::ExitFullScreen(..) |
- ./components/script/script_thread.rs- msg @ ConstellationControlMsg::ExitScriptThread => {
- ./components/script/script_thread.rs: panic!("should have handled {:?} already", msg)
- ./components/script/script_thread.rs- },
- ./components/script/script_thread.rs- }
- --
- ./components/script/script_thread.rs-
- ./components/script/script_thread.rs- match current_layout_chan {
- ./components/script/script_thread.rs: None => panic!("Layout attached to empty script thread."),
- ./components/script/script_thread.rs- // Tell the layout thread factory to actually spawn the thread.
- ./components/script/script_thread.rs- Some(layout_chan) => layout_chan.send(msg).unwrap(),
- --
- ./components/script/dom/xrspace.rs- }
- ./components/script/dom/xrspace.rs- } else {
- ./components/script/dom/xrspace.rs: panic!("invalid space found")
- ./components/script/dom/xrspace.rs- }
- ./components/script/dom/xrspace.rs- }
- --
- ./components/script/dom/xrreferencespace.rs- XRReferenceSpaceType::Viewer => webxr_api::BaseSpace::Viewer,
- ./components/script/dom/xrreferencespace.rs- XRReferenceSpaceType::Local_floor => webxr_api::BaseSpace::Floor,
- ./components/script/dom/xrreferencespace.rs: _ => panic!("unsupported reference space found"),
- ./components/script/dom/xrreferencespace.rs- };
- ./components/script/dom/xrreferencespace.rs- let offset = self.offset.transform();
- --
- ./components/script/dom/workerglobalscope.rs- return service_worker.script_chan();
- ./components/script/dom/workerglobalscope.rs- } else {
- ./components/script/dom/workerglobalscope.rs: panic!("need to implement a sender for SharedWorker")
- ./components/script/dom/workerglobalscope.rs- }
- ./components/script/dom/workerglobalscope.rs- }
- --
- ./components/script/dom/workerglobalscope.rs- return dedicated.new_script_pair();
- ./components/script/dom/workerglobalscope.rs- } else {
- ./components/script/dom/workerglobalscope.rs: panic!("need to implement a sender for SharedWorker/ServiceWorker")
- ./components/script/dom/workerglobalscope.rs- }
- ./components/script/dom/workerglobalscope.rs- }
- --
- ./components/script/dom/window.rs- let proxy = match self.window_proxy.get() {
- ./components/script/dom/window.rs- Some(proxy) => proxy,
- ./components/script/dom/window.rs: None => panic!("Discarding a BC from a window that has none"),
- ./components/script/dom/window.rs- };
- ./components/script/dom/window.rs- proxy.discard_browsing_context();
- --
- ./components/script/dom/window.rs- Ok(reflow_complete) => reflow_complete,
- ./components/script/dom/window.rs- Err(TryRecvError::Disconnected) => {
- ./components/script/dom/window.rs: panic!("Layout thread failed while script was waiting for a result.");
- ./components/script/dom/window.rs- },
- ./components/script/dom/window.rs- };
- --
- ./components/script/dom/websocket.rs-
- ./components/script/dom/websocket.rs- match data_byte_len.checked_add(self.buffered_amount.get()) {
- ./components/script/dom/websocket.rs: None => panic!(),
- ./components/script/dom/websocket.rs- Some(new_amount) => self.buffered_amount.set(new_amount),
- ./components/script/dom/websocket.rs- };
- --
- ./components/script/dom/webglrenderingcontext.rs- uniform_typed::<Float32>(*cx, &uniform_get(triple, WebGLCommand::GetUniformFloat16))
- ./components/script/dom/webglrenderingcontext.rs- },
- ./components/script/dom/webglrenderingcontext.rs: _ => panic!("wrong uniform type"),
- ./components/script/dom/webglrenderingcontext.rs- }
- ./components/script/dom/webglrenderingcontext.rs- }
- --
- ./components/script/dom/testbinding.rs-
- ./components/script/dom/testbinding.rs- fn Panic(&self) {
- ./components/script/dom/testbinding.rs: panic!("explicit panic from script")
- ./components/script/dom/testbinding.rs- }
- ./components/script/dom/testbinding.rs-
- --
- ./components/script/dom/servoparser/html.rs- NodeTypeId::DocumentFragment(_) => {},
- ./components/script/dom/servoparser/html.rs-
- ./components/script/dom/servoparser/html.rs: NodeTypeId::Document(_) => panic!("Can't serialize Document node itself"),
- ./components/script/dom/servoparser/html.rs: NodeTypeId::Element(_) => panic!("Element shouldn't appear here"),
- ./components/script/dom/servoparser/html.rs: NodeTypeId::Attr => panic!("Attr shouldn't appear here"),
- ./components/script/dom/servoparser/html.rs- },
- ./components/script/dom/servoparser/html.rs- }
- --
- ./components/script/dom/servoparser/async_html.rs-
- ./components/script/dom/servoparser/async_html.rs- fn complete_script(&mut self, _: &Self::Handle) -> NextParserState {
- ./components/script/dom/servoparser/async_html.rs: panic!("complete_script should not be called here!");
- ./components/script/dom/servoparser/async_html.rs- }
- ./components/script/dom/servoparser/async_html.rs-
- --
- ./components/script/dom/serviceworkerglobalscope.rs- fn inactive_msg() -> Self {
- ./components/script/dom/serviceworkerglobalscope.rs- // Inactive is only relevant in the context of a browsing-context event-loop.
- ./components/script/dom/serviceworkerglobalscope.rs: panic!("Workers should never receive messages marked as inactive");
- ./components/script/dom/serviceworkerglobalscope.rs- }
- ./components/script/dom/serviceworkerglobalscope.rs-
- --
- ./components/script/dom/request.rs- NetTraitsRequestDestination::AudioWorklet |
- ./components/script/dom/request.rs- NetTraitsRequestDestination::PaintWorklet => {
- ./components/script/dom/request.rs: panic!("ServiceWorker request destination should not be exposed to DOM")
- ./components/script/dom/request.rs- },
- ./components/script/dom/request.rs- NetTraitsRequestDestination::SharedWorker => RequestDestination::Sharedworker,
- --
- ./components/script/dom/readablestream.rs- pub fn read_a_chunk(&self) -> Rc<Promise> {
- ./components/script/dom/readablestream.rs- if !self.has_reader.get() {
- ./components/script/dom/readablestream.rs: panic!("Attempt to read stream chunk without having acquired a reader.");
- ./components/script/dom/readablestream.rs- }
- ./components/script/dom/readablestream.rs-
- --
- ./components/script/dom/readablestream.rs- pub fn stop_reading(&self) {
- ./components/script/dom/readablestream.rs- if !self.has_reader.get() {
- ./components/script/dom/readablestream.rs: panic!("ReadableStream::stop_reading called on a readerless stream.");
- ./components/script/dom/readablestream.rs- }
- ./components/script/dom/readablestream.rs-
- --
- ./components/script/dom/promise.rs- InRealm::Already(&in_realm_proof),
- ./components/script/dom/promise.rs- ),
- ./components/script/dom/promise.rs: _ => panic!("unexpected native handler task value"),
- ./components/script/dom/promise.rs- };
- ./components/script/dom/promise.rs-
- --
- ./components/script/dom/nodelist.rs- list
- ./components/script/dom/nodelist.rs- } else {
- ./components/script/dom/nodelist.rs: panic!("called as_children_list() on a non-children node list")
- ./components/script/dom/nodelist.rs- }
- ./components/script/dom/nodelist.rs- }
- --
- ./components/script/dom/nodelist.rs- list
- ./components/script/dom/nodelist.rs- } else {
- ./components/script/dom/nodelist.rs: panic!("called as_radio_list() on a non-radio node list")
- ./components/script/dom/nodelist.rs- }
- ./components/script/dom/nodelist.rs- }
- --
- ./components/script/dom/node.rs- let object: *mut JSObject = mem::transmute(candidate);
- ./components/script/dom/node.rs- if object.is_null() {
- ./components/script/dom/node.rs: panic!("Attempted to create a `Dom<Node>` from an invalid pointer!")
- ./components/script/dom/node.rs- }
- ./components/script/dom/node.rs- let boxed_node = conversions::private_from_object(object) as *const Node;
- --
- ./components/script/dom/node.rs- }
- ./components/script/dom/node.rs-
- ./components/script/dom/node.rs: panic!("not text!")
- ./components/script/dom/node.rs- }
- ./components/script/dom/node.rs-
- --
- ./components/script/dom/messageport.rs- let port_impls = match sc_holder {
- ./components/script/dom/messageport.rs- StructuredDataHolder::Write { ports, .. } => ports,
- ./components/script/dom/messageport.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/messageport.rs- };
- ./components/script/dom/messageport.rs-
- --
- ./components/script/dom/messageport.rs- ..
- ./components/script/dom/messageport.rs- } => (message_ports, port_impls),
- ./components/script/dom/messageport.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/messageport.rs- };
- ./components/script/dom/messageport.rs-
- --
- ./components/script/dom/messageport.rs- (ports_len, port_impl)
- ./components/script/dom/messageport.rs- } else {
- ./components/script/dom/messageport.rs: panic!("A messageport was transfer-received, yet the SC holder does not have any port impls");
- ./components/script/dom/messageport.rs- };
- ./components/script/dom/messageport.rs-
- --
- ./components/script/dom/htmltextareaelement.rs- }
- ./components/script/dom/htmltextareaelement.rs- },
- ./components/script/dom/htmltextareaelement.rs: _ => panic!("Expected an AttrValue::Int"),
- ./components/script/dom/htmltextareaelement.rs- },
- ./components/script/dom/htmltextareaelement.rs- local_name!("minlength") => match *attr.value() {
- --
- ./components/script/dom/htmltextareaelement.rs- }
- ./components/script/dom/htmltextareaelement.rs- },
- ./components/script/dom/htmltextareaelement.rs: _ => panic!("Expected an AttrValue::Int"),
- ./components/script/dom/htmltextareaelement.rs- },
- ./components/script/dom/htmltextareaelement.rs- local_name!("placeholder") => {
- --
- ./components/script/dom/htmlinputelement.rs- }
- ./components/script/dom/htmlinputelement.rs- },
- ./components/script/dom/htmlinputelement.rs: _ => panic!("Expected an AttrValue::Int"),
- ./components/script/dom/htmlinputelement.rs- },
- ./components/script/dom/htmlinputelement.rs- &local_name!("minlength") => match *attr.value() {
- --
- ./components/script/dom/htmlinputelement.rs- }
- ./components/script/dom/htmlinputelement.rs- },
- ./components/script/dom/htmlinputelement.rs: _ => panic!("Expected an AttrValue::Int"),
- ./components/script/dom/htmlinputelement.rs- },
- ./components/script/dom/htmlinputelement.rs- &local_name!("placeholder") => {
- --
- ./components/script/dom/gpucanvascontext.rs- GPUTextureFormat::Rgba8unorm => webrender_api::ImageFormat::RGBA8,
- ./components/script/dom/gpucanvascontext.rs- GPUTextureFormat::Bgra8unorm => webrender_api::ImageFormat::BGRA8,
- ./components/script/dom/gpucanvascontext.rs: _ => panic!("SwapChain format({:?}) not supported", descriptor.format),
- ./components/script/dom/gpucanvascontext.rs- },
- ./components/script/dom/gpucanvascontext.rs- size: webrender_api::units::DeviceIntSize::new(
- --
- ./components/script/dom/globalscope.rs- self.state = Some(FileListenerState::Receiving(bytes, callback, target));
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs: _ => panic!(
- ./components/script/dom/globalscope.rs- "Unexpected FileListenerState when receiving ReadFileProgress::Meta msg."
- ./components/script/dom/globalscope.rs- ),
- --
- ./components/script/dom/globalscope.rs- self.state = Some(FileListenerState::Receiving(bytes, callback, target));
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs: _ => panic!(
- ./components/script/dom/globalscope.rs- "Unexpected FileListenerState when receiving ReadFileProgress::Partial msg."
- ./components/script/dom/globalscope.rs- ),
- --
- ./components/script/dom/globalscope.rs- let callback = match callback {
- ./components/script/dom/globalscope.rs- FileListenerCallback::Promise(callback) => callback,
- ./components/script/dom/globalscope.rs: _ => panic!("Expected promise callback."),
- ./components/script/dom/globalscope.rs- };
- ./components/script/dom/globalscope.rs- let task = task!(resolve_promise: move || {
- --
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- _ => {
- ./components/script/dom/globalscope.rs: panic!("Unexpected FileListenerState when receiving ReadFileProgress::EOF msg.")
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- },
- --
- ./components/script/dom/globalscope.rs- let callback = match callback {
- ./components/script/dom/globalscope.rs- FileListenerCallback::Promise(callback) => callback,
- ./components/script/dom/globalscope.rs: _ => panic!("Expected promise callback."),
- ./components/script/dom/globalscope.rs- };
- ./components/script/dom/globalscope.rs- let _ = self.task_source.queue_with_canceller(
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs: _ => panic!("Unexpected FileListenerState when receiving Err msg."),
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- match message_ports.get_mut(&port_id) {
- ./components/script/dom/globalscope.rs- None => {
- ./components/script/dom/globalscope.rs: panic!("complete_port_transfer called for an unknown port.");
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- Some(managed_port) => {
- ./components/script/dom/globalscope.rs- if managed_port.pending {
- ./components/script/dom/globalscope.rs: panic!("CompleteTransfer msg received for a pending port.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- if let Some(port_impl) = managed_port.port_impl.as_mut() {
- --
- ./components/script/dom/globalscope.rs- port_impl.enabled()
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("managed-port has no port-impl.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("complete_port_transfer called for an unknown port.");
- ./components/script/dom/globalscope.rs- };
- ./components/script/dom/globalscope.rs- if should_start {
- --
- ./components/script/dom/globalscope.rs- port_impl.entangle(entangled_id.clone());
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("managed-port has no port-impl.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("entangled_ports called on a global not managing any ports.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs-
- --
- ./components/script/dom/globalscope.rs- port_impl
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("mark_port_as_transferred called on a global not managing any ports.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- {
- ./components/script/dom/globalscope.rs- let message_buffer = match message_ports.get_mut(&port_id) {
- ./components/script/dom/globalscope.rs: None => panic!("start_message_port called on a unknown port."),
- ./components/script/dom/globalscope.rs- Some(managed_port) => {
- ./components/script/dom/globalscope.rs- if let Some(port_impl) = managed_port.port_impl.as_mut() {
- ./components/script/dom/globalscope.rs- port_impl.start()
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("managed-port has no port-impl.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- --
- ./components/script/dom/globalscope.rs- {
- ./components/script/dom/globalscope.rs- match message_ports.get_mut(&port_id) {
- ./components/script/dom/globalscope.rs: None => panic!("close_message_port called on an unknown port."),
- ./components/script/dom/globalscope.rs- Some(managed_port) => {
- ./components/script/dom/globalscope.rs- if let Some(port_impl) = managed_port.port_impl.as_mut() {
- --
- ./components/script/dom/globalscope.rs- managed_port.closed = true;
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("managed-port has no port-impl.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- --
- ./components/script/dom/globalscope.rs- {
- ./components/script/dom/globalscope.rs- let entangled_port = match message_ports.get_mut(&port_id) {
- ./components/script/dom/globalscope.rs: None => panic!("post_messageport_msg called on an unknown port."),
- ./components/script/dom/globalscope.rs- Some(managed_port) => {
- ./components/script/dom/globalscope.rs- if let Some(port_impl) = managed_port.port_impl.as_mut() {
- ./components/script/dom/globalscope.rs- port_impl.entangled_port_id()
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("managed-port has no port-impl.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- --
- ./components/script/dom/globalscope.rs- .send(ScriptMsg::ScheduleBroadcast(router_id.clone(), msg));
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("Attemps to broadcast a message via global not managing any channels.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- match message_ports.get_mut(&port_id) {
- ./components/script/dom/globalscope.rs: None => panic!("route_task_to_port called for an unknown port."),
- ./components/script/dom/globalscope.rs- Some(managed_port) => {
- ./components/script/dom/globalscope.rs- // If the port is not enabled yet, or if is awaiting the completion of it's transfer,
- --
- ./components/script/dom/globalscope.rs- })
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("managed-port has no port-impl.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- },
- --
- ./components/script/dom/globalscope.rs- .expect("Collected port-id to match an entry");
- ./components/script/dom/globalscope.rs- if !managed_port.pending {
- ./components/script/dom/globalscope.rs: panic!("Only pending ports should be found in to_be_added")
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- managed_port.pending = false;
- --
- ./components/script/dom/globalscope.rs- entry.push_back(Dom::from_ref(dom_channel));
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("track_broadcast_channel should have first switched the state to managed.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- };
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("track_message_port should have first switched the state to managed.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("get_blob_bytes called on a global not managing any blobs.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- };
- --
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- BlobData::Memory(ref s) => Ok(s.clone()),
- ./components/script/dom/globalscope.rs: BlobData::Sliced(_, _) => panic!("This blob doesn't have a parent."),
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("get_blob_bytes_non_sliced called on a global not managing any blobs.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("get_blob_bytes_or_file_id called on a global not managing any blobs.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- };
- --
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- BlobData::Memory(ref s) => BlobResult::Bytes(s.clone()),
- ./components/script/dom/globalscope.rs: BlobData::Sliced(_, _) => panic!("This blob doesn't have a parent."),
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!(
- ./components/script/dom/globalscope.rs- "get_blob_bytes_non_sliced_or_file_id called on a global not managing any blobs."
- ./components/script/dom/globalscope.rs- );
- --
- ./components/script/dom/globalscope.rs- blob_info.blob_impl.type_string()
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("get_blob_type_string called on a global not managing any blobs.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- BlobData::File(ref f) => f.get_size(),
- ./components/script/dom/globalscope.rs- BlobData::Memory(ref v) => v.len() as u64,
- ./components/script/dom/globalscope.rs: BlobData::Sliced(_, _) => panic!("Blob ancestry should be only one level."),
- ./components/script/dom/globalscope.rs- };
- ./components/script/dom/globalscope.rs- rel_pos.to_abs_range(parent_size as usize).len() as u64
- --
- ./components/script/dom/globalscope.rs- BlobData::File(ref f) => f.get_size(),
- ./components/script/dom/globalscope.rs- BlobData::Memory(ref v) => v.len() as u64,
- ./components/script/dom/globalscope.rs: BlobData::Sliced(_, _) => panic!(
- ./components/script/dom/globalscope.rs- "It was previously checked that this blob does not have a parent."
- ./components/script/dom/globalscope.rs- ),
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("get_blob_size called on a global not managing any blobs.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- } else {
- ./components/script/dom/globalscope.rs: panic!("get_blob_url_id called on a global not managing any blobs.");
- ./components/script/dom/globalscope.rs- }
- ./components/script/dom/globalscope.rs- }
- --
- ./components/script/dom/globalscope.rs- match blob_info.blob_impl.blob_data_mut() {
- ./components/script/dom/globalscope.rs- BlobData::Sliced(_, _) => {
- ./components/script/dom/globalscope.rs: panic!("Sliced blobs should use create_sliced_url_id instead of promote.");
- ./components/script/dom/globalscope.rs- },
- ./components/script/dom/globalscope.rs- BlobData::File(ref f) => {
- --
- ./components/script/dom/element.rs- // FIXME(ajeffrey): Directly convert UTF8 to DOMString
- ./components/script/dom/element.rs- Ok(()) => Ok(DOMString::from(String::from_utf8(writer).unwrap())),
- ./components/script/dom/element.rs: Err(_) => panic!("Cannot serialize element"),
- ./components/script/dom/element.rs- }
- ./components/script/dom/element.rs- }
- --
- ./components/script/dom/element.rs- ) {
- ./components/script/dom/element.rs- Ok(()) => Ok(DOMString::from(String::from_utf8(writer).unwrap())),
- ./components/script/dom/element.rs: Err(_) => panic!("Cannot serialize element"),
- ./components/script/dom/element.rs- }
- ./components/script/dom/element.rs- }
- --
- ./components/script/dom/element.rs- Some(ref attribute) => match *attribute.value() {
- ./components/script/dom/element.rs- AttrValue::Int(_, value) => value,
- ./components/script/dom/element.rs: _ => panic!(
- ./components/script/dom/element.rs- "Expected an AttrValue::Int: \
- ./components/script/dom/element.rs- implement parse_plain_attribute"
- --
- ./components/script/dom/element.rs- Some(ref attribute) => match *attribute.value() {
- ./components/script/dom/element.rs- AttrValue::UInt(_, value) => value,
- ./components/script/dom/element.rs: _ => panic!("Expected an AttrValue::UInt: implement parse_plain_attribute"),
- ./components/script/dom/element.rs- },
- ./components/script/dom/element.rs- None => default,
- --
- ./components/script/dom/dissimilaroriginwindow.rs- // Step 2.
- ./components/script/dom/dissimilaroriginwindow.rs- let incumbent = match GlobalScope::incumbent() {
- ./components/script/dom/dissimilaroriginwindow.rs: None => panic!("postMessage called with no incumbent global"),
- ./components/script/dom/dissimilaroriginwindow.rs- Some(incumbent) => incumbent,
- ./components/script/dom/dissimilaroriginwindow.rs- };
- --
- ./components/script/dom/dedicatedworkerglobalscope.rs- fn inactive_msg() -> Self {
- ./components/script/dom/dedicatedworkerglobalscope.rs- // Inactive is only relevant in the context of a browsing-context event-loop.
- ./components/script/dom/dedicatedworkerglobalscope.rs: panic!("Workers should never receive messages marked as inactive");
- ./components/script/dom/dedicatedworkerglobalscope.rs- }
- ./components/script/dom/dedicatedworkerglobalscope.rs-
- --
- ./components/script/dom/cssstyledeclaration.rs- match self.owner {
- ./components/script/dom/cssstyledeclaration.rs- CSSStyleOwner::CSSRule(..) => {
- ./components/script/dom/cssstyledeclaration.rs: panic!("get_computed_style called on CSSStyleDeclaration with a CSSRule owner")
- ./components/script/dom/cssstyledeclaration.rs- },
- ./components/script/dom/cssstyledeclaration.rs- CSSStyleOwner::Element(ref el) => {
- --
- ./components/script/dom/cssrulelist.rs- rules
- ./components/script/dom/cssrulelist.rs- } else {
- ./components/script/dom/cssrulelist.rs: panic!("Called insert_rule on non-CssRule-backed CSSRuleList");
- ./components/script/dom/cssrulelist.rs- };
- ./components/script/dom/cssrulelist.rs-
- --
- ./components/script/dom/cssrulelist.rs- pub fn append_lazy_dom_rule(&self) {
- ./components/script/dom/cssrulelist.rs- if let RulesSource::Rules(..) = self.rules {
- ./components/script/dom/cssrulelist.rs: panic!("Can only call append_lazy_rule with keyframes-backed CSSRules");
- ./components/script/dom/cssrulelist.rs- }
- ./components/script/dom/cssrulelist.rs- self.dom_rules.borrow_mut().push(MutNullableDom::new(None));
- --
- ./components/script/dom/characterdata.rs- return Ok((&s[..i], Some(c), &s[i + c.len_utf8()..]));
- ./components/script/dom/characterdata.rs- }
- ./components/script/dom/characterdata.rs: panic!(
- ./components/script/dom/characterdata.rs- "\n\n\
- ./components/script/dom/characterdata.rs- Would split a surrogate pair in CharacterData API.\n\
- --
- ./components/script/dom/blob.rs- let blob_impls = match sc_holder {
- ./components/script/dom/blob.rs- StructuredDataHolder::Write { blobs, .. } => blobs,
- ./components/script/dom/blob.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/blob.rs- };
- ./components/script/dom/blob.rs-
- --
- ./components/script/dom/blob.rs- blobs, blob_impls, ..
- ./components/script/dom/blob.rs- } => (blobs, blob_impls),
- ./components/script/dom/blob.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/blob.rs- };
- ./components/script/dom/blob.rs-
- --
- ./components/script/dom/blob.rs- Ok(FetchedData::ArrayBuffer(a)) => promise.resolve_native(&a),
- ./components/script/dom/blob.rs- Err(e) => promise.reject_error(e),
- ./components/script/dom/blob.rs: _ => panic!("Unexpected result from run_array_buffer_data_algorithm"),
- ./components/script/dom/blob.rs- }
- ./components/script/dom/blob.rs- },
- --
- ./components/script/dom/bindings/structuredclone.rs- let blobs = match sc_holder {
- ./components/script/dom/bindings/structuredclone.rs- StructuredDataHolder::Read { blobs, .. } => blobs,
- ./components/script/dom/bindings/structuredclone.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/bindings/structuredclone.rs- };
- ./components/script/dom/bindings/structuredclone.rs- if let Some(blobs) = blobs {
- --
- ./components/script/dom/bindings/structuredclone.rs- let (mut blob_impls, mut port_impls) = match sc_holder {
- ./components/script/dom/bindings/structuredclone.rs- StructuredDataHolder::Write { blobs, ports } => (blobs, ports),
- ./components/script/dom/bindings/structuredclone.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/bindings/structuredclone.rs- };
- ./components/script/dom/bindings/structuredclone.rs-
- --
- ./components/script/dom/bindings/structuredclone.rs- ..
- ./components/script/dom/bindings/structuredclone.rs- } => (message_ports, port_impls),
- ./components/script/dom/bindings/structuredclone.rs: _ => panic!("Unexpected variant of StructuredDataHolder"),
- ./components/script/dom/bindings/structuredclone.rs- };
- ./components/script/dom/bindings/structuredclone.rs-
- --
- ./components/script/dom/bindings/root.rs- roots.remove(idx);
- ./components/script/dom/bindings/root.rs- },
- ./components/script/dom/bindings/root.rs: None => panic!("Can't remove a root that was never rooted!"),
- ./components/script/dom/bindings/root.rs- }
- ./components/script/dom/bindings/root.rs- }
- --
- ./components/script/dom/bindings/error.rs- },
- ./components/script/dom/bindings/error.rs- _ => {
- ./components/script/dom/bindings/error.rs: panic!("Uncaught exception: failed to stringify primitive");
- ./components/script/dom/bindings/error.rs- },
- ./components/script/dom/bindings/error.rs- }
- --
- ./components/script/dom/bindings/conversions.rs- s.push('\u{FFFD}');
- ./components/script/dom/bindings/conversions.rs- } else {
- ./components/script/dom/bindings/conversions.rs: panic!(concat!(
- ./components/script/dom/bindings/conversions.rs- message!(),
- ./components/script/dom/bindings/conversions.rs- " Use `-Z replace-surrogates` \
- --
- ./components/script/dom/bindings/conversions.rs- );
- ./components/script/dom/bindings/conversions.rs- if jsstr.is_null() {
- ./components/script/dom/bindings/conversions.rs: panic!("JS_NewStringCopyN failed");
- ./components/script/dom/bindings/conversions.rs- }
- ./components/script/dom/bindings/conversions.rs- rval.set(StringValue(&*jsstr));
- --
- ./components/script/dom/bindings/codegen/CodegenRust.py- # XXXjdm Avoid unreachable statement warnings
- ./components/script/dom/bindings/codegen/CodegenRust.py- # overloadCGThings.append(
- ./components/script/dom/bindings/codegen/CodegenRust.py: # CGGeneric('panic!("We have an always-returning default case");\n'
- ./components/script/dom/bindings/codegen/CodegenRust.py- # 'return false;'))
- ./components/script/dom/bindings/codegen/CodegenRust.py- self.cgRoot = CGWrapper(CGList(overloadCGThings, "\n"),
- --
- ./components/script/dom/bindings/codegen/CodegenRust.py- if fallThrough:
- ./components/script/dom/bindings/codegen/CodegenRust.py- raise TypeError("fall through required but unsupported")
- ./components/script/dom/bindings/codegen/CodegenRust.py: # bodyList.append(CGGeneric('panic!("fall through unsupported"); /* Fall through */'))
- ./components/script/dom/bindings/codegen/CodegenRust.py- self.append(CGIndenter(bodyList))
- ./components/script/dom/bindings/codegen/CodegenRust.py- self.append(CGGeneric("}"))
- --
- ./components/script/dom/abstractworkerglobalscope.rs- Ok(DedicatedWorkerScriptMsg::CommonWorker(_worker, common_msg)) => common_msg,
- ./components/script/dom/abstractworkerglobalscope.rs- Err(_) => return Err(()),
- ./components/script/dom/abstractworkerglobalscope.rs: Ok(DedicatedWorkerScriptMsg::WakeUp) => panic!("unexpected worker event message!"),
- ./components/script/dom/abstractworkerglobalscope.rs- };
- ./components/script/dom/abstractworkerglobalscope.rs- match common_msg {
- ./components/script/dom/abstractworkerglobalscope.rs- WorkerScriptMsg::Common(script_msg) => Ok(script_msg),
- ./components/script/dom/abstractworkerglobalscope.rs: WorkerScriptMsg::DOMMessage { .. } => panic!("unexpected worker event message!"),
- ./components/script/dom/abstractworkerglobalscope.rs- }
- ./components/script/dom/abstractworkerglobalscope.rs- }
- --
- ./components/script/build.rs- }
- ./components/script/build.rs- }
- ./components/script/build.rs: panic!(
- ./components/script/build.rs- "Can't find python (tried {})! Try fixing PATH or setting the PYTHON3 env var",
- ./components/script/build.rs- candidates.join(", ")
- --
- ./components/script/body.rs-
- ./components/script/body.rs- if let BodySource::Null = self.source {
- ./components/script/body.rs: panic!("ReadableStream(Null) sources should not re-direct.");
- ./components/script/body.rs- }
- ./components/script/body.rs-
- --
- ./components/remutex/tests/smoke.rs- let _answer = Answer(lock2);
- ./components/remutex/tests/smoke.rs- println!("Intentionally panicking.");
- ./components/remutex/tests/smoke.rs: panic!("What the answer to my lifetimes dilemma is?");
- ./components/remutex/tests/smoke.rs- })
- ./components/remutex/tests/smoke.rs- .join();
- --
- ./components/profile/time.rs- let path = Path::new(&filename);
- ./components/profile/time.rs- let mut file = match File::create(&path) {
- ./components/profile/time.rs: Err(e) => panic!("Couldn't create {}: {}", path.display(), e),
- ./components/profile/time.rs- Ok(file) => file,
- ./components/profile/time.rs- };
- --
- ./components/profile/mem.rs- match self.reporters.insert(name, reporter) {
- ./components/profile/mem.rs- None => true,
- ./components/profile/mem.rs: Some(_) => panic!("RegisterReporter: '{}' name is already in use", name_clone),
- ./components/profile/mem.rs- }
- ./components/profile/mem.rs- },
- --
- ./components/profile/mem.rs- match self.reporters.remove(&name) {
- ./components/profile/mem.rs- Some(_) => true,
- ./components/profile/mem.rs: None => panic!("UnregisterReporter: '{}' name is unknown", &name),
- ./components/profile/mem.rs- }
- ./components/profile/mem.rs- },
- --
- ./components/profile/mem.rs- if self.size != 0 {
- ./components/profile/mem.rs- // This will occur if e.g. we have paths ["a", "b"] and ["a", "b", "c"].
- ./components/profile/mem.rs: panic!("one report's path is a sub-path of another report's path");
- ./components/profile/mem.rs- }
- ./components/profile/mem.rs- for child in &mut self.children {
- --
- ./components/net_traits/response.rs- match filter_type {
- ./components/net_traits/response.rs- ResponseType::Default |
- ./components/net_traits/response.rs: ResponseType::Error(..) => panic!(),
- ./components/net_traits/response.rs- _ => (),
- ./components/net_traits/response.rs- }
- --
- ./components/net_traits/request.rs- pub fn extract_source(&mut self) {
- ./components/net_traits/request.rs- match self.source {
- ./components/net_traits/request.rs: BodySource::Null => panic!("Null sources should never be re-directed."),
- ./components/net_traits/request.rs- BodySource::Object => {
- ./components/net_traits/request.rs- let (chan, port) = ipc::channel().unwrap();
- --
- ./components/net/tests/mime_classifier.rs- println!("Data Length {:?}", data.len());
- ./components/net/tests/mime_classifier.rs- if !matcher.matches(&data) {
- ./components/net/tests/mime_classifier.rs: panic!("Didn't read mime type")
- ./components/net/tests/mime_classifier.rs- }
- ./components/net/tests/mime_classifier.rs- },
- ./components/net/tests/mime_classifier.rs: Err(e) => panic!("Couldn't read from file with error {}", e),
- ./components/net/tests/mime_classifier.rs- }
- ./components/net/tests/mime_classifier.rs-}
- --
- ./components/net/tests/mime_classifier.rs- (parsed_mime.subtype() != expected_mime.subtype())
- ./components/net/tests/mime_classifier.rs- {
- ./components/net/tests/mime_classifier.rs: panic!(
- ./components/net/tests/mime_classifier.rs- "File {:?} parsed incorrectly should be {:?}, parsed as {:?}",
- ./components/net/tests/mime_classifier.rs- filename, expected_mime, parsed_mime
- --
- ./components/net/tests/mime_classifier.rs- }
- ./components/net/tests/mime_classifier.rs- },
- ./components/net/tests/mime_classifier.rs: Err(e) => panic!("Couldn't read from file {:?} with error {}", filename, e),
- ./components/net/tests/mime_classifier.rs- }
- ./components/net/tests/mime_classifier.rs-}
- --
- ./components/net/tests/http_loader.rs- NetworkEvent::HttpRequest(httprequest) => httprequest,
- ./components/net/tests/http_loader.rs-
- ./components/net/tests/http_loader.rs: _ => panic!("No HttpRequest Received"),
- ./components/net/tests/http_loader.rs- }
- ./components/net/tests/http_loader.rs- },
- ./components/net/tests/http_loader.rs: _ => panic!("No HttpRequest Received"),
- ./components/net/tests/http_loader.rs- }
- ./components/net/tests/http_loader.rs-}
- --
- ./components/net/tests/http_loader.rs- NetworkEvent::HttpResponse(httpresponse) => httpresponse,
- ./components/net/tests/http_loader.rs-
- ./components/net/tests/http_loader.rs: _ => panic!("No HttpResponse Received"),
- ./components/net/tests/http_loader.rs- },
- ./components/net/tests/http_loader.rs: _ => panic!("No HttpResponse Received"),
- ./components/net/tests/http_loader.rs- }
- ./components/net/tests/http_loader.rs-}
- --
- ./components/net/tests/http_loader.rs- *response.body_mut() = b"Yay!".to_vec().into();
- ./components/net/tests/http_loader.rs- } else {
- ./components/net/tests/http_loader.rs: panic!("unexpected path {:?}", path)
- ./components/net/tests/http_loader.rs- }
- ./components/net/tests/http_loader.rs- };
- --
- ./components/net/tests/http_loader.rs- *response.body_mut() = b"Yay!".to_vec().into();
- ./components/net/tests/http_loader.rs- } else {
- ./components/net/tests/http_loader.rs: panic!("unexpected path {:?}", path)
- ./components/net/tests/http_loader.rs- }
- ./components/net/tests/http_loader.rs- };
- --
- ./components/net/tests/filemanager_thread.rs- {
- ./components/net/tests/filemanager_thread.rs- ReadFileProgress::Meta(_) => {
- ./components/net/tests/filemanager_thread.rs: panic!("Invalid FileManager reply");
- ./components/net/tests/filemanager_thread.rs- },
- ./components/net/tests/filemanager_thread.rs- ReadFileProgress::Partial(mut bytes_in) => {
- --
- ./components/net/tests/filemanager_thread.rs- assert_eq!(test_file_content, bytes, "Read content differs");
- ./components/net/tests/filemanager_thread.rs- } else {
- ./components/net/tests/filemanager_thread.rs: panic!("Invalid FileManager reply");
- ./components/net/tests/filemanager_thread.rs- }
- ./components/net/tests/filemanager_thread.rs- }
- --
- ./components/net/tests/fetch.rs-
- ./components/net/tests/fetch.rs- if fetch_response.is_network_error() {
- ./components/net/tests/fetch.rs: panic!("fetch response shouldn't be a network error");
- ./components/net/tests/fetch.rs- }
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- assert_eq!(&**body, MESSAGE);
- ./components/net/tests/fetch.rs- },
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- };
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- assert_eq!(val, &file);
- ./components/net/tests/fetch.rs- },
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- }
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- match *fetch_response.body.lock().unwrap() {
- ./components/net/tests/fetch.rs- ResponseBody::Done(ref body) => assert_eq!(&**body, ACK),
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- };
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- match *fetch_response0.body.lock().unwrap() {
- ./components/net/tests/fetch.rs- ResponseBody::Done(ref body) => assert_eq!(&**body, ACK),
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- };
- ./components/net/tests/fetch.rs- match *fetch_response1.body.lock().unwrap() {
- ./components/net/tests/fetch.rs- ResponseBody::Done(ref body) => assert_eq!(&**body, ACK),
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- };
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- match *fetch_response.body.lock().unwrap() {
- ./components/net/tests/fetch.rs- ResponseBody::Empty => {},
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- }
- ./components/net/tests/fetch.rs- match fetch_response.cache_state {
- ./components/net/tests/fetch.rs- CacheState::None => {},
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- }
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- match *fetch_response.body.lock().unwrap() {
- ./components/net/tests/fetch.rs- ResponseBody::Empty => {},
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- }
- ./components/net/tests/fetch.rs- match fetch_response.cache_state {
- ./components/net/tests/fetch.rs- CacheState::None => {},
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- }
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs- assert_eq!(&**body, MESSAGE);
- ./components/net/tests/fetch.rs- },
- ./components/net/tests/fetch.rs: _ => panic!(),
- ./components/net/tests/fetch.rs- };
- ./components/net/tests/fetch.rs-}
- --
- ./components/net/tests/fetch.rs-
- ./components/net/tests/fetch.rs- match *fetch_response.body.lock().unwrap() {
- ./components/net/tests/fetch.rs: ResponseBody::Done(_) | ResponseBody::Receiving(_) => panic!(),
- ./components/net/tests/fetch.rs- _ => {},
- ./components/net/tests/fetch.rs- };
- --
- ./components/net/tests/data_loader.rs- ..
- ./components/net/tests/data_loader.rs- }) => m,
- ./components/net/tests/data_loader.rs: result => panic!("{:?}", result),
- ./components/net/tests/data_loader.rs- };
- ./components/net/tests/data_loader.rs- assert_eq!(metadata.content_type.map(Serde::into_inner), content_type);
- --
- ./components/net/tests/data_loader.rs- assert_eq!(val, &data);
- ./components/net/tests/data_loader.rs- },
- ./components/net/tests/data_loader.rs: _ => panic!(),
- ./components/net/tests/data_loader.rs- }
- ./components/net/tests/data_loader.rs- },
- --
- ./components/net/resource_thread.rs- let mut string_buffer: String = String::new();
- ./components/net/resource_thread.rs- match file.read_to_string(&mut string_buffer) {
- ./components/net/resource_thread.rs: Err(why) => panic!("couldn't read from {}: {}", display, why),
- ./components/net/resource_thread.rs- Ok(_) => println!("successfully read from {}", display),
- ./components/net/resource_thread.rs- }
- --
- ./components/net/resource_thread.rs-
- ./components/net/resource_thread.rs- let mut file = match File::create(&path) {
- ./components/net/resource_thread.rs: Err(why) => panic!("couldn't create {}: {}", display, why),
- ./components/net/resource_thread.rs- Ok(file) => file,
- ./components/net/resource_thread.rs- };
- ./components/net/resource_thread.rs-
- ./components/net/resource_thread.rs- match file.write_all(json_encoded.as_bytes()) {
- ./components/net/resource_thread.rs: Err(why) => panic!("couldn't write to {}: {}", display, why),
- ./components/net/resource_thread.rs- Ok(_) => println!("successfully wrote to {}", display),
- ./components/net/resource_thread.rs- }
- --
- ./components/net/image_cache.rs- },
- ./components/net/image_cache.rs- PixelFormat::K8 | PixelFormat::KA8 | PixelFormat::RGBA8 => {
- ./components/net/image_cache.rs: panic!("Not support by webrender yet");
- ./components/net/image_cache.rs- },
- ./components/net/image_cache.rs- };
- --
- ./components/net/image_cache.rs- match *self {
- ./components/net/image_cache.rs- ImageBytes::InProgress(ref mut bytes) => bytes.extend_from_slice(data),
- ./components/net/image_cache.rs: ImageBytes::Complete(_) => panic!("attempted modification of complete image bytes"),
- ./components/net/image_cache.rs- }
- ./components/net/image_cache.rs- }
- --
- ./components/net/image_cache.rs- let own_bytes = match *self {
- ./components/net/image_cache.rs- ImageBytes::InProgress(ref mut bytes) => bytes,
- ./components/net/image_cache.rs: ImageBytes::Complete(_) => panic!("attempted modification of complete image bytes"),
- ./components/net/image_cache.rs- };
- ./components/net/image_cache.rs- mem::replace(own_bytes, vec![])
- --
- ./components/net/http_loader.rs- let same_origin = match request.origin {
- ./components/net/http_loader.rs- Origin::Origin(ref origin) => *origin == location_url.origin(),
- ./components/net/http_loader.rs: Origin::Client => panic!(
- ./components/net/http_loader.rs- "Request origin should not be client for {}",
- ./components/net/http_loader.rs- request.current_url()
- --
- ./components/net/fetch/methods.rs- match body_port.recv().ok() {
- ./components/net/fetch/methods.rs- Some(BodyChunkResponse::Chunk(bytes)) => Some(bytes),
- ./components/net/fetch/methods.rs: _ => panic!("cert should be sent in a single chunk."),
- ./components/net/fetch/methods.rs- }
- ./components/net/fetch/methods.rs- });
- --
- ./components/net/build.rs- let minimum = 0x10101000;
- ./components/net/build.rs- if actual < minimum {
- ./components/net/build.rs: panic!(
- ./components/net/build.rs- "Your OpenSSL version is older than 1.1.1 ({:x}), you have: {:x}",
- ./components/net/build.rs- minimum, actual
- --
- ./components/metrics/lib.rs- Some(Ordering::Less) => mta,
- ./components/metrics/lib.rs- Some(_) => dcl,
- ./components/metrics/lib.rs: None => panic!("no ordering possible. something bad happened"),
- ./components/metrics/lib.rs- };
- ./components/metrics/lib.rs- set_metric(
- --
- ./components/layout_thread_2020/lib.rs- // Just ignore these messages at this point.
- ./components/layout_thread_2020/lib.rs- },
- ./components/layout_thread_2020/lib.rs: _ => panic!("layout: unexpected message received after `PrepareToExitMsg`"),
- ./components/layout_thread_2020/lib.rs- }
- ./components/layout_thread_2020/lib.rs- }
- --
- ./components/layout_thread_2020/dom_wrapper.rs- match self.element.borrow_data() {
- ./components/layout_thread_2020/dom_wrapper.rs- Some(data) => data,
- ./components/layout_thread_2020/dom_wrapper.rs: None => panic!("could not find styles for <{}>", self.element.local_name()),
- ./components/layout_thread_2020/dom_wrapper.rs- }
- ./components/layout_thread_2020/dom_wrapper.rs- }
- --
- ./components/layout_thread/lib.rs- // Just ignore these messages at this point.
- ./components/layout_thread/lib.rs- },
- ./components/layout_thread/lib.rs: _ => panic!("layout: unexpected message received after `PrepareToExitMsg`"),
- ./components/layout_thread/lib.rs- }
- ./components/layout_thread/lib.rs- }
- --
- ./components/layout_2020/traversal.rs-
- ./components/layout_2020/traversal.rs- fn process_postorder(&self, _style_context: &mut StyleContext<E>, _node: E::ConcreteNode) {
- ./components/layout_2020/traversal.rs: panic!("this should never be called")
- ./components/layout_2020/traversal.rs- }
- ./components/layout_2020/traversal.rs-
- --
- ./components/layout_2020/flow/inline.rs- },
- ./components/layout_2020/flow/inline.rs- Display::Contents => {
- ./components/layout_2020/flow/inline.rs: panic!("display:contents does not generate an abspos box")
- ./components/layout_2020/flow/inline.rs- },
- ./components/layout_2020/flow/inline.rs- Display::None => {
- ./components/layout_2020/flow/inline.rs: panic!("display:none does not generate an abspos box")
- ./components/layout_2020/flow/inline.rs- },
- ./components/layout_2020/flow/inline.rs- };
- --
- ./components/layout_2020/display_list/stacking_context.rs- ($msg: expr) => {
- ./components/layout_2020/display_list/stacking_context.rs- if cfg!(debug_assertions) {
- ./components/layout_2020/display_list/stacking_context.rs: panic!($msg)
- ./components/layout_2020/display_list/stacking_context.rs- }
- ./components/layout_2020/display_list/stacking_context.rs- };
- --
- ./components/layout_2020/display_list/stacking_context.rs- } else {
- ./components/layout_2020/display_list/stacking_context.rs- // This should only happen if the root element has `display: none`
- ./components/layout_2020/display_list/stacking_context.rs: debug_panic!("`CanvasBackground::for_root_element` should have returned `style: None`");
- ./components/layout_2020/display_list/stacking_context.rs- return;
- ./components/layout_2020/display_list/stacking_context.rs- };
- --
- ./components/layout_2020/display_list/stacking_context.rs- box_fragment
- ./components/layout_2020/display_list/stacking_context.rs- } else {
- ./components/layout_2020/display_list/stacking_context.rs: debug_panic!("Expected a box-generated fragment");
- ./components/layout_2020/display_list/stacking_context.rs- return;
- ./components/layout_2020/display_list/stacking_context.rs- };
- --
- ./components/layout/wrapper.rs- let data = match node.get_style_and_layout_data() {
- ./components/layout/wrapper.rs- Some(data) => data,
- ./components/layout/wrapper.rs: None => panic!(
- ./components/layout/wrapper.rs- "could not get style and layout data for <{}>",
- ./components/layout/wrapper.rs- node.as_element().unwrap().local_name()
- --
- ./components/layout/text.rs- selection = text_fragment_info.selection;
- ./components/layout/text.rs- },
- ./components/layout/text.rs: _ => panic!("Expected an unscanned text fragment!"),
- ./components/layout/text.rs- };
- ./components/layout/text.rs- insertion_point = match selection {
- --
- ./components/layout/table_colgroup.rs-
- ./components/layout/table_colgroup.rs- fn generated_containing_block_size(&self, _: OpaqueFlow) -> LogicalSize<Au> {
- ./components/layout/table_colgroup.rs: panic!("Table column groups can't be containing blocks!")
- ./components/layout/table_colgroup.rs- }
- ./components/layout/table_colgroup.rs-
- --
- ./components/layout/model.rs- // Can't happen because the state will have been replaced with
- ./components/layout/model.rs- // `MarginCollapseState::AccumulatingMarginIn` above.
- ./components/layout/model.rs: panic!("should not be accumulating collapsible block_start margins anymore!")
- ./components/layout/model.rs- },
- ./components/layout/model.rs- (
- --
- ./components/layout/generated_content.rs- ListStyleType::DisclosureOpen => '▾',
- ./components/layout/generated_content.rs- ListStyleType::DisclosureClosed => '‣',
- ./components/layout/generated_content.rs: _ => panic!("No static representation for this list-style-type!"),
- ./components/layout/generated_content.rs- }
- ./components/layout/generated_content.rs-}
- --
- ./components/layout/fragment.rs- // use cases like SVG.
- ./components/layout/fragment.rs- SpecificFragmentInfo::Iframe(_) => Au::from_px(DEFAULT_REPLACED_WIDTH),
- ./components/layout/fragment.rs: _ => panic!("Trying to get intrinsic width on non-replaced element!"),
- ./components/layout/fragment.rs- }
- ./components/layout/fragment.rs- }
- --
- ./components/layout/fragment.rs- SpecificFragmentInfo::Svg(ref info) => info.dom_height,
- ./components/layout/fragment.rs- SpecificFragmentInfo::Iframe(_) => Au::from_px(DEFAULT_REPLACED_HEIGHT),
- ./components/layout/fragment.rs: _ => panic!("Trying to get intrinsic height on non-replaced element!"),
- ./components/layout/fragment.rs- }
- ./components/layout/fragment.rs- }
- --
- ./components/layout/fragment.rs- match self.specific {
- ./components/layout/fragment.rs- SpecificFragmentInfo::TableColumn(col_fragment) => max(col_fragment.span, 1),
- ./components/layout/fragment.rs: _ => panic!("non-table-column fragment inside table column?!"),
- ./components/layout/fragment.rs- }
- ./components/layout/fragment.rs- }
- --
- ./components/layout/fragment.rs-
- ./components/layout/fragment.rs- SpecificFragmentInfo::UnscannedText(..) => {
- ./components/layout/fragment.rs: panic!("Unscanned text fragments should have been scanned by now!")
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs- };
- --
- ./components/layout/fragment.rs- pub fn truncate_to_inline_size(self, max_inline_size: Au) -> Fragment {
- ./components/layout/fragment.rs- if let SpecificFragmentInfo::TruncatedFragment(_) = self.specific {
- ./components/layout/fragment.rs: panic!("Cannot truncate an already truncated fragment");
- ./components/layout/fragment.rs- }
- ./components/layout/fragment.rs- let info = self.calculate_truncate_to_inline_size(max_inline_size);
- --
- ./components/layout/fragment.rs- self.margin.inline_end = next_fragment.margin.inline_end;
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs: _ => panic!("Can only merge two scanned-text fragments!"),
- ./components/layout/fragment.rs- }
- ./components/layout/fragment.rs- self.reset_text_range_and_inline_size();
- --
- ./components/layout/fragment.rs- SpecificFragmentInfo::MulticolColumn => return,
- ./components/layout/fragment.rs- SpecificFragmentInfo::TableColumn(_) => {
- ./components/layout/fragment.rs: panic!("Table column fragments do not have inline size")
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs- SpecificFragmentInfo::UnscannedText(_) => {
- ./components/layout/fragment.rs: panic!("Unscanned text fragments should have been scanned by now!")
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs- SpecificFragmentInfo::Canvas(_) |
- --
- ./components/layout/fragment.rs-
- ./components/layout/fragment.rs- ref unhandled @ _ => {
- ./components/layout/fragment.rs: panic!("this case should have been handled above: {:?}", unhandled)
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs- }
- --
- ./components/layout/fragment.rs- SpecificFragmentInfo::MulticolColumn => return,
- ./components/layout/fragment.rs- SpecificFragmentInfo::TableColumn(_) => {
- ./components/layout/fragment.rs: panic!("Table column fragments do not have block size")
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs- SpecificFragmentInfo::UnscannedText(_) => {
- ./components/layout/fragment.rs: panic!("Unscanned text fragments should have been scanned by now!")
- ./components/layout/fragment.rs- },
- ./components/layout/fragment.rs- SpecificFragmentInfo::Canvas(_) |
- --
- ./components/layout/fragment.rs- _ if self.is_replaced() => {},
- ./components/layout/fragment.rs-
- ./components/layout/fragment.rs: ref unhandled @ _ => panic!("should have been handled above: {:?}", unhandled),
- ./components/layout/fragment.rs- }
- ./components/layout/fragment.rs- }
- --
- ./components/layout/flow_list.rs- while index >= self.cache.len() {
- ./components/layout/flow_list.rs- match self.iterator.next() {
- ./components/layout/flow_list.rs: None => panic!("Flow index out of range!"),
- ./components/layout/flow_list.rs- Some(next_flow) => self.cache.push((*next_flow).clone()),
- ./components/layout/flow_list.rs- }
- --
- ./components/layout/flow.rs- /// If this is a block flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_block(&self) -> &BlockFlow {
- ./components/layout/flow.rs: panic!("called as_block() on a non-block flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- fn as_mut_block(&mut self) -> &mut BlockFlow {
- ./components/layout/flow.rs- debug!("called as_mut_block() on a flow of type {:?}", self.class());
- ./components/layout/flow.rs: panic!("called as_mut_block() on a non-block flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a flex flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_flex(&self) -> &FlexFlow {
- ./components/layout/flow.rs: panic!("called as_flex() on a non-flex flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is an inline flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_inline(&self) -> &InlineFlow {
- ./components/layout/flow.rs: panic!("called as_inline() on a non-inline flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// otherwise.
- ./components/layout/flow.rs- fn as_mut_inline(&mut self) -> &mut InlineFlow {
- ./components/layout/flow.rs: panic!("called as_mut_inline() on a non-inline flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a table wrapper flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_table_wrapper(&self) -> &TableWrapperFlow {
- ./components/layout/flow.rs: panic!("called as_table_wrapper() on a non-tablewrapper flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a table flow, returns the underlying object, borrowed mutably. Fails otherwise.
- ./components/layout/flow.rs- fn as_mut_table(&mut self) -> &mut TableFlow {
- ./components/layout/flow.rs: panic!("called as_mut_table() on a non-table flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a table flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_table(&self) -> &TableFlow {
- ./components/layout/flow.rs: panic!("called as_table() on a non-table flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// otherwise.
- ./components/layout/flow.rs- fn as_mut_table_colgroup(&mut self) -> &mut TableColGroupFlow {
- ./components/layout/flow.rs: panic!("called as_mut_table_colgroup() on a non-tablecolgroup flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// otherwise.
- ./components/layout/flow.rs- fn as_table_colgroup(&self) -> &TableColGroupFlow {
- ./components/layout/flow.rs: panic!("called as_table_colgroup() on a non-tablecolgroup flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// otherwise.
- ./components/layout/flow.rs- fn as_mut_table_rowgroup(&mut self) -> &mut TableRowGroupFlow {
- ./components/layout/flow.rs: panic!("called as_mut_table_rowgroup() on a non-tablerowgroup flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a table rowgroup flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_table_rowgroup(&self) -> &TableRowGroupFlow {
- ./components/layout/flow.rs: panic!("called as_table_rowgroup() on a non-tablerowgroup flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// otherwise.
- ./components/layout/flow.rs- fn as_mut_table_row(&mut self) -> &mut TableRowFlow {
- ./components/layout/flow.rs: panic!("called as_mut_table_row() on a non-tablerow flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a table row flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_table_row(&self) -> &TableRowFlow {
- ./components/layout/flow.rs: panic!("called as_table_row() on a non-tablerow flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// otherwise.
- ./components/layout/flow.rs- fn as_mut_table_cell(&mut self) -> &mut TableCellFlow {
- ./components/layout/flow.rs: panic!("called as_mut_table_cell() on a non-tablecell flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// If this is a table cell flow, returns the underlying object. Fails otherwise.
- ./components/layout/flow.rs- fn as_table_cell(&self) -> &TableCellFlow {
- ./components/layout/flow.rs: panic!("called as_table_cell() on a non-tablecell flow")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- /// sizes and the dimensions of any boxes it is responsible for flowing.
- ./components/layout/flow.rs- fn bubble_inline_sizes(&mut self) {
- ./components/layout/flow.rs: panic!("bubble_inline_sizes not yet implemented")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// Pass 2 of reflow: computes inline-size.
- ./components/layout/flow.rs- fn assign_inline_sizes(&mut self, _ctx: &LayoutContext) {
- ./components/layout/flow.rs: panic!("assign_inline_sizes not yet implemented")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- ./components/layout/flow.rs- /// Pass 3a of reflow: computes block-size.
- ./components/layout/flow.rs- fn assign_block_size(&mut self, _ctx: &LayoutContext) {
- ./components/layout/flow.rs: panic!("assign_block_size not yet implemented")
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- fn mark_as_root(&mut self) {
- ./components/layout/flow.rs- debug!("called mark_as_root() on a flow of type {:?}", self.class());
- ./components/layout/flow.rs: panic!("called mark_as_root() on an unhandled flow");
- ./components/layout/flow.rs- }
- ./components/layout/flow.rs-
- --
- ./components/layout/flow.rs- pub fn generated_containing_block_size(&self, for_flow: OpaqueFlow) -> LogicalSize<Au> {
- ./components/layout/flow.rs- match self.link {
- ./components/layout/flow.rs: None => panic!(
- ./components/layout/flow.rs- "Link to containing block not established; perhaps you forgot to call \
- ./components/layout/flow.rs- `set_absolute_descendants`?"
- --
- ./components/layout/flow.rs- ) -> Option<Au> {
- ./components/layout/flow.rs- match self.link {
- ./components/layout/flow.rs: None => panic!(
- ./components/layout/flow.rs- "Link to containing block not established; perhaps you forgot to call \
- ./components/layout/flow.rs- `set_absolute_descendants`?"
- --
- ./components/layout/floats.rs- },
- ./components/layout/floats.rs- (None, None, None, None) => return None,
- ./components/layout/floats.rs: _ => panic!("Reached unreachable state when computing float area"),
- ./components/layout/floats.rs- };
- ./components/layout/floats.rs-
- --
- ./components/layout/display_list/builder.rs- },
- ./components/layout/display_list/builder.rs- SpecificFragmentInfo::UnscannedText(_) => {
- ./components/layout/display_list/builder.rs: panic!("Shouldn't see unscanned fragments here.")
- ./components/layout/display_list/builder.rs- },
- ./components/layout/display_list/builder.rs- SpecificFragmentInfo::TableColumn(_) => {
- ./components/layout/display_list/builder.rs: panic!("Shouldn't see table column fragments here.")
- ./components/layout/display_list/builder.rs- },
- ./components/layout/display_list/builder.rs- }
- --
- ./components/layout/construct.rs- Display::InlineBlock => self.build_flow_for_block(node, None),
- ./components/layout/construct.rs- Display::InlineFlex => self.build_flow_for_flex(node, None),
- ./components/layout/construct.rs: _ => panic!("The flag should be inline-block or inline-flex"),
- ./components/layout/construct.rs- };
- ./components/layout/construct.rs- let (block_flow, abs_descendants) = match block_flow_result {
- --
- ./components/layout/block.rs- },
- ./components/layout/block.rs- CandidateBSizeIteratorStatus::Found => None,
- ./components/layout/block.rs: CandidateBSizeIteratorStatus::Initial => panic!(),
- ./components/layout/block.rs- }
- ./components/layout/block.rs- }
- --
- ./components/layout/block.rs- {
- ./components/layout/block.rs- CollapsibleMargins::CollapseThrough(_) => {
- ./components/layout/block.rs: panic!("Margins unexpectedly collapsed through root flow.")
- ./components/layout/block.rs- },
- ./components/layout/block.rs- CollapsibleMargins::Collapse(block_start_margin, block_end_margin) => {
- --
- ./components/layout/block.rs- let inline_size = match computed_inline_size {
- ./components/layout/block.rs- MaybeAuto::Specified(w) => w,
- ./components/layout/block.rs: _ => panic!(
- ./components/layout/block.rs- "{} {}",
- ./components/layout/block.rs- "The used value for inline_size for absolute replaced flow",
- --
- ./components/layout/block.rs- MaybeAuto::Specified(_) => {},
- ./components/layout/block.rs- MaybeAuto::Auto => {
- ./components/layout/block.rs: panic!("BlockReplaced: inline_size should have been computed by now")
- ./components/layout/block.rs- },
- ./components/layout/block.rs- };
- --
- ./components/layout/block.rs- MaybeAuto::Specified(w) => w,
- ./components/layout/block.rs- MaybeAuto::Auto => {
- ./components/layout/block.rs: panic!("FloatReplaced: inline_size should have been computed by now")
- ./components/layout/block.rs- },
- ./components/layout/block.rs- };
- --
- ./components/hashglobe/src/hash_set.rs-
- ./components/hashglobe/src/hash_set.rs- for _ in &s {
- ./components/hashglobe/src/hash_set.rs: panic!("s should be empty!");
- ./components/hashglobe/src/hash_set.rs- }
- ./components/hashglobe/src/hash_set.rs-
- --
- ./components/hashglobe/src/hash_map.rs- let mut m: HashMap<isize, bool> = HashMap::new();
- ./components/hashglobe/src/hash_map.rs- match m.entry(0) {
- ./components/hashglobe/src/hash_map.rs: Occupied(_) => panic!(),
- ./components/hashglobe/src/hash_map.rs- Vacant(_) => {},
- ./components/hashglobe/src/hash_map.rs- }
- --
- ./components/hashglobe/src/hash_map.rs- let new = 100;
- ./components/hashglobe/src/hash_map.rs- match m.get_mut(&5) {
- ./components/hashglobe/src/hash_map.rs: None => panic!(),
- ./components/hashglobe/src/hash_map.rs- Some(x) => *x = new,
- ./components/hashglobe/src/hash_map.rs- }
- --
- ./components/hashglobe/src/hash_map.rs- m.insert(1, 2);
- ./components/hashglobe/src/hash_map.rs- match m.get(&1) {
- ./components/hashglobe/src/hash_map.rs: None => panic!(),
- ./components/hashglobe/src/hash_map.rs- Some(v) => assert_eq!(*v, 2),
- ./components/hashglobe/src/hash_map.rs- }
- --
- ./components/hashglobe/src/hash_map.rs-
- ./components/hashglobe/src/hash_map.rs- match a.entry(key.clone()) {
- ./components/hashglobe/src/hash_map.rs: Vacant(_) => panic!(),
- ./components/hashglobe/src/hash_map.rs- Occupied(e) => assert_eq!(key, *e.key()),
- ./components/hashglobe/src/hash_map.rs- }
- --
- ./components/hashglobe/src/hash_map.rs- assert!(a.is_empty());
- ./components/hashglobe/src/hash_map.rs- match a.entry(key.clone()) {
- ./components/hashglobe/src/hash_map.rs: Occupied(_) => panic!(),
- ./components/hashglobe/src/hash_map.rs- Vacant(e) => {
- ./components/hashglobe/src/hash_map.rs- assert_eq!(key, *e.key());
- --
- ./components/hashglobe/src/hash_map.rs- }
- ./components/hashglobe/src/hash_map.rs- }
- ./components/hashglobe/src/hash_map.rs: panic!("Adaptive early resize failed");
- ./components/hashglobe/src/hash_map.rs- }
- ./components/hashglobe/src/hash_map.rs-}
- --
- ./components/gfx/text/shaping/harfbuzz.rs- space_glyph = g as hb_codepoint_t;
- ./components/gfx/text/shaping/harfbuzz.rs- },
- ./components/gfx/text/shaping/harfbuzz.rs: None => panic!("No space info"),
- ./components/gfx/text/shaping/harfbuzz.rs- }
- ./components/gfx/text/shaping/harfbuzz.rs- let space_advance = unsafe { (*font).glyph_h_advance(space_glyph as GlyphId) };
- --
- ./components/gfx/text/glyph.rs- pub fn iter_glyphs_for_byte_range(&'a self, range: &Range<ByteIndex>) -> GlyphIterator<'a> {
- ./components/gfx/text/glyph.rs- if range.begin() >= self.len() {
- ./components/gfx/text/glyph.rs: panic!("iter_glyphs_for_range: range.begin beyond length!");
- ./components/gfx/text/glyph.rs- }
- ./components/gfx/text/glyph.rs- if range.end() > self.len() {
- ./components/gfx/text/glyph.rs: panic!("iter_glyphs_for_range: range.end beyond length!");
- ./components/gfx/text/glyph.rs- }
- ./components/gfx/text/glyph.rs-
- --
- ./components/gfx/platform/freetype/font_list.rs- c_str_to_string(file as *const c_char)
- ./components/gfx/platform/freetype/font_list.rs- } else {
- ./components/gfx/platform/freetype/font_list.rs: panic!();
- ./components/gfx/platform/freetype/font_list.rs- };
- ./components/gfx/platform/freetype/font_list.rs- let mut index: libc::c_int = 0;
- --
- ./components/gfx/platform/freetype/font_list.rs- index
- ./components/gfx/platform/freetype/font_list.rs- } else {
- ./components/gfx/platform/freetype/font_list.rs: panic!();
- ./components/gfx/platform/freetype/font_list.rs- };
- ./components/gfx/platform/freetype/font_list.rs-
- --
- ./components/gfx/platform/freetype/font_context.rs- let result = FT_New_Library(mem, &mut ctx);
- ./components/gfx/platform/freetype/font_context.rs- if !succeeded(result) {
- ./components/gfx/platform/freetype/font_context.rs: panic!("Unable to initialize FreeType library");
- ./components/gfx/platform/freetype/font_context.rs- }
- ./components/gfx/platform/freetype/font_context.rs-
- --
- ./components/gfx/platform/freetype/font.rs- unsafe {
- ./components/gfx/platform/freetype/font.rs- if !succeeded(FT_Done_Face(self.face)) {
- ./components/gfx/platform/freetype/font.rs: panic!("FT_Done_Face failed");
- ./components/gfx/platform/freetype/font.rs- }
- ./components/gfx/platform/freetype/font.rs- }
- --
- ./components/gfx/font_cache_thread.rs- "Failed to receive a response from live font cache"
- ./components/gfx/font_cache_thread.rs- );
- ./components/gfx/font_cache_thread.rs: panic!("Font cache thread has already exited.");
- ./components/gfx/font_cache_thread.rs- }
- ./components/gfx/font_cache_thread.rs- instance_key.unwrap()
- --
- ./components/gfx/font_cache_thread.rs- "Failed to receive a response from live font cache"
- ./components/gfx/font_cache_thread.rs- );
- ./components/gfx/font_cache_thread.rs: panic!("Font cache thread has already exited.");
- ./components/gfx/font_cache_thread.rs- }
- ./components/gfx/font_cache_thread.rs-
- --
- ./components/gfx/font.rs-
- ./components/gfx/font.rs- SingleFontFamily::Generic(generic) => FontFamilyName::Generic(match generic {
- ./components/gfx/font.rs: GenericFontFamily::None => panic!("Shouldn't appear in style"),
- ./components/gfx/font.rs- GenericFontFamily::Serif => atom!("serif"),
- ./components/gfx/font.rs- GenericFontFamily::SansSerif => atom!("sans-serif"),
- --
- ./components/domobject_derive/lib.rs- fields.iter().collect::<Vec<&syn::Field>>()
- ./components/domobject_derive/lib.rs- } else {
- ./components/domobject_derive/lib.rs: panic!("#[derive(DomObject)] should only be applied on proper structs")
- ./components/domobject_derive/lib.rs- };
- ./components/domobject_derive/lib.rs-
- --
- ./components/dom_struct/lib.rs-pub fn dom_struct(args: TokenStream, input: TokenStream) -> TokenStream {
- ./components/dom_struct/lib.rs- if !args.is_empty() {
- ./components/dom_struct/lib.rs: panic!("#[dom_struct] takes no arguments");
- ./components/dom_struct/lib.rs- }
- ./components/dom_struct/lib.rs- let attributes = quote! {
- --
- ./components/dom_struct/lib.rs- .into()
- ./components/dom_struct/lib.rs- } else {
- ./components/dom_struct/lib.rs: panic!("#[dom_struct] only applies to structs with named fields");
- ./components/dom_struct/lib.rs- }
- ./components/dom_struct/lib.rs- } else {
- ./components/dom_struct/lib.rs: panic!("#[dom_struct] only applies to structs");
- ./components/dom_struct/lib.rs- }
- ./components/dom_struct/lib.rs-}
- --
- ./components/devtools/actor.rs- }
- ./components/devtools/actor.rs- }
- ./components/devtools/actor.rs: panic!("couldn't find actor named {}", actor)
- ./components/devtools/actor.rs- }
- ./components/devtools/actor.rs-
- --
- ./components/derive_common/cg.rs- let ty = match *pred {
- ./components/derive_common/cg.rs- syn::WherePredicate::Type(ref ty) => ty,
- ./components/derive_common/cg.rs: ref predicate => panic!("Unhanded complex where predicate: {:?}", predicate),
- ./components/derive_common/cg.rs- };
- ./components/derive_common/cg.rs-
- ./components/derive_common/cg.rs- let path = match ty.bounded_ty {
- ./components/derive_common/cg.rs- syn::Type::Path(ref p) => &p.path,
- ./components/derive_common/cg.rs: ref ty => panic!("Unhanded complex where type: {:?}", ty),
- ./components/derive_common/cg.rs- };
- ./components/derive_common/cg.rs-
- --
- ./components/derive_common/cg.rs- let ident = match path_to_ident(path) {
- ./components/derive_common/cg.rs- Some(i) => i,
- ./components/derive_common/cg.rs: None => panic!("Unhanded complex where type path: {:?}", path),
- ./components/derive_common/cg.rs- };
- ./components/derive_common/cg.rs-
- --
- ./components/derive_common/cg.rs- GenericArgument::Type(parse_quote!(<#ident as #trait_path>::#trait_output))
- ./components/derive_common/cg.rs- },
- ./components/derive_common/cg.rs: ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
- ./components/derive_common/cg.rs- })
- ./components/derive_common/cg.rs- .collect(),
- --
- ./components/derive_common/cg.rs- ..inner.clone()
- ./components/derive_common/cg.rs- }),
- ./components/derive_common/cg.rs: ref ty => panic!("type {:?} cannot be mapped yet", ty),
- ./components/derive_common/cg.rs- }
- ./components/derive_common/cg.rs-}
- --
- ./components/derive_common/cg.rs- })
- ./components/derive_common/cg.rs- },
- ./components/derive_common/cg.rs: ref arg => panic!("arguments {:?} cannot be mapped yet", arg),
- ./components/derive_common/cg.rs- })
- ./components/derive_common/cg.rs- .collect(),
- --
- ./components/derive_common/cg.rs- },
- ./components/derive_common/cg.rs- ref arg @ PathArguments::None => arg.clone(),
- ./components/derive_common/cg.rs: ref parameters => panic!("parameters {:?} cannot be mapped yet", parameters),
- ./components/derive_common/cg.rs- },
- ./components/derive_common/cg.rs- })
- --
- ./components/derive_common/cg.rs- match A::from_field(field) {
- ./components/derive_common/cg.rs- Ok(attrs) => attrs,
- ./components/derive_common/cg.rs: Err(e) => panic!("failed to parse field attributes: {}", e),
- ./components/derive_common/cg.rs- }
- ./components/derive_common/cg.rs-}
- --
- ./components/derive_common/cg.rs- match A::from_derive_input(input) {
- ./components/derive_common/cg.rs- Ok(attrs) => attrs,
- ./components/derive_common/cg.rs: Err(e) => panic!("failed to parse input attributes: {}", e),
- ./components/derive_common/cg.rs- }
- ./components/derive_common/cg.rs-}
- --
- ./components/derive_common/cg.rs- match A::from_variant(variant) {
- ./components/derive_common/cg.rs- Ok(attrs) => attrs,
- ./components/derive_common/cg.rs: Err(e) => panic!("failed to parse variant attributes: {}", e),
- ./components/derive_common/cg.rs- }
- ./components/derive_common/cg.rs-}
- --
- ./components/deny_public_fields/lib.rs- s.each(|binding| {
- ./components/deny_public_fields/lib.rs- if binding.ast().vis != syn::Visibility::Inherited {
- ./components/deny_public_fields/lib.rs: panic!(
- ./components/deny_public_fields/lib.rs- "Field `{}` should not be public",
- ./components/deny_public_fields/lib.rs- binding.ast().ident.as_ref().unwrap_or(&binding.binding)
- --
- ./components/constellation/constellation.rs-//!
- ./components/constellation/constellation.rs-//! The constellation acts as a logger, tracking any `warn!` messages from threads,
- ./components/constellation/constellation.rs://! and converting any `error!` or `panic!` into a crash report.
- ./components/constellation/constellation.rs-//!
- ./components/constellation/constellation.rs-//! Since there is only one constellation, and its responsibilities include crash reporting,
- --
- ./components/constellation/constellation.rs-
- ./components/constellation/constellation.rs-/// The constellation uses logging to perform crash reporting.
- ./components/constellation/constellation.rs:/// The constellation receives all `warn!`, `error!` and `panic!` messages,
- ./components/constellation/constellation.rs-/// and generates a crash report when it receives a panic.
- ./components/constellation/constellation.rs-
- --
- ./components/config/prefs.rs-pub fn add_user_prefs(prefs: HashMap<String, PrefValue>) {
- ./components/config/prefs.rs- if let Err(error) = PREFS.set_all(prefs.into_iter()) {
- ./components/config/prefs.rs: panic!("Error setting preference: {:?}", error);
- ./components/config/prefs.rs- }
- ./components/config/prefs.rs-}
- --
- ./components/config/pref_util.rs- value.into()
- ./components/config/pref_util.rs- } else {
- ./components/config/pref_util.rs: panic!("Cannot convert {:?} to {:?}", other, std::any::type_name::<$t>())
- ./components/config/pref_util.rs- }
- ./components/config/pref_util.rs- }
- --
- ./components/config/opts.rs- Ok(interval) => Some(OutputOptions::Stdout(interval)),
- ./components/config/opts.rs- Err(_) => match ServoUrl::parse(&argument) {
- ./components/config/opts.rs: Ok(_) => panic!("influxDB isn't supported anymore"),
- ./components/config/opts.rs- Err(_) => Some(OutputOptions::FileName(argument)),
- ./components/config/opts.rs- },
- --
- ./components/compositing/build.rs- write!(&mut revision_module_file, "{}", format!("\"{}\"", revision)).unwrap();
- ./components/compositing/build.rs- },
- ./components/compositing/build.rs: _ => panic!("Cannot find package definitions in lockfile"),
- ./components/compositing/build.rs- }
- ./components/compositing/build.rs- },
- ./components/compositing/build.rs: Err(e) => panic!("{}", e),
- ./components/compositing/build.rs- }
- ./components/compositing/build.rs-}
- --
- ./components/canvas/webgl_thread.rs- }
- ./components/canvas/webgl_thread.rs- }
- ./components/canvas/webgl_thread.rs: panic!(
- ./components/canvas/webgl_thread.rs- "Unexpected WebGL error: 0x{:x} ({}) [{:?}]",
- ./components/canvas/webgl_thread.rs- error, error, command
- --
- ./components/canvas/canvas_data.rs- PathState::UserSpacePath(ref p, _) => p,
- ./components/canvas/canvas_data.rs- PathState::UserSpacePathBuilder(..) | PathState::DeviceSpacePathBuilder(..) => {
- ./components/canvas/canvas_data.rs: panic!("should have called ensure_path")
- ./components/canvas/canvas_data.rs- },
- ./components/canvas/canvas_data.rs- }
Advertisement
Add Comment
Please, Sign In to add comment