Skip to content
Permalink
Browse files

Implement Window.trap() to trigger a breakpoint trap

  • Loading branch information
tetsuharuohzeki committed Jul 20, 2015
1 parent 3a5e433 commit eb47185d58cab0e0257a45f5bebe8ce37feb16cc
Showing with 6 additions and 1 deletion.
  1. +1 −0 components/script/dom/webidls/Window.webidl
  2. +5 −1 components/script/dom/window.rs
@@ -126,6 +126,7 @@ partial interface Window {
readonly attribute Console console;
void debug(DOMString arg);
void gc();
void trap();
};
Window implements OnErrorEventHandlerForWindow;

@@ -47,7 +47,7 @@ use net_traits::image_cache_task::{ImageCacheChan, ImageCacheTask};
use net_traits::storage_task::{StorageTask, StorageType};
use profile_traits::mem;
use util::geometry::{self, Au, MAX_RECT};
use util::opts;
use util::{breakpoint, opts};
use util::str::{DOMString,HTML_SPACE_CHARACTERS};

use euclid::{Point2D, Rect, Size2D};
@@ -482,6 +482,10 @@ impl<'a> WindowMethods for &'a Window {
}
}

fn Trap(self) {
breakpoint();
}

fn Btoa(self, btoa: DOMString) -> Fallible<DOMString> {
base64_btoa(btoa)
}

0 comments on commit eb47185

Please sign in to comment.
You can’t perform that action at this time.