Implement Window.trap() to trigger a breakpoint trap

This commit is contained in:
Tetsuharu OHZEKI 2015-07-21 00:46:18 +09:00
parent 3a5e4335d7
commit eb47185d58
2 changed files with 6 additions and 1 deletions

View file

@ -126,6 +126,7 @@ partial interface Window {
readonly attribute Console console;
void debug(DOMString arg);
void gc();
void trap();
};
Window implements OnErrorEventHandlerForWindow;

View file

@ -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)
}