diff --git a/components/script/dom/htmliframeelement.rs b/components/script/dom/htmliframeelement.rs
index 3c5377b8c98..f279c2cff79 100644
--- a/components/script/dom/htmliframeelement.rs
+++ b/components/script/dom/htmliframeelement.rs
@@ -50,15 +50,17 @@ use style::context::ReflowGoal;
use url::Url;
use util::prefs::mozbrowser_enabled;
-#[derive(HeapSizeOf)]
-enum SandboxAllowance {
- AllowNothing = 0x00,
- AllowSameOrigin = 0x01,
- AllowTopNavigation = 0x02,
- AllowForms = 0x04,
- AllowScripts = 0x08,
- AllowPointerLock = 0x10,
- AllowPopups = 0x20
+bitflags! {
+ #[derive(JSTraceable, HeapSizeOf)]
+ flags SandboxAllowance: u8 {
+ const ALLOW_NOTHING = 0x00,
+ const ALLOW_SAME_ORIGIN = 0x01,
+ const ALLOW_TOP_NAVIGATION = 0x02,
+ const ALLOW_FORMS = 0x04,
+ const ALLOW_SCRIPTS = 0x08,
+ const ALLOW_POINTER_LOCK = 0x10,
+ const ALLOW_POPUPS = 0x20
+ }
}
#[dom_struct]
@@ -67,7 +69,7 @@ pub struct HTMLIFrameElement {
pipeline_id: Cell