Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Implement Window.trap() to trigger a breakpoint trap
  • Loading branch information
tetsuharuohzeki committed Jul 20, 2015
1 parent 3a5e433 commit eb47185
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions components/script/dom/webidls/Window.webidl
Expand Up @@ -126,6 +126,7 @@ partial interface Window {
readonly attribute Console console;
void debug(DOMString arg);
void gc();
void trap();
};
Window implements OnErrorEventHandlerForWindow;

Expand Down
6 changes: 5 additions & 1 deletion components/script/dom/window.rs
Expand Up @@ -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};
Expand Down Expand Up @@ -482,6 +482,10 @@ impl<'a> WindowMethods for &'a Window {
}
}

fn Trap(self) {
breakpoint();
}

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

0 comments on commit eb47185

Please sign in to comment.