Bug 1581447 - Fix event breakpoints ignoring blackboxed files. r=davidwalsh

Differential Revision: https://phabricator.services.mozilla.com/D47120

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Miriam 2019-09-27 20:40:41 +00:00
Родитель 69ddf4a3e7
Коммит b52f6bd330
2 изменённых файлов: 21 добавлений и 2 удалений

Просмотреть файл

@ -51,4 +51,21 @@ add_task(async function() {
await waitForPaused(dbg);
assertPauseLocation(dbg, 28);
await resume(dbg);
// Test that we don't pause on event breakpoints when source is blackboxed.
await clickElement(dbg, "blackbox");
await waitForDispatch(dbg, "BLACKBOX");
invokeInTab("clickHandler");
is(isPaused(dbg), false);
invokeInTab("xhrHandler");
is(isPaused(dbg), false);
invokeInTab("timerHandler");
is(isPaused(dbg), false);
// Cleanup - unblackbox the source
await clickElement(dbg, "blackbox");
await waitForDispatch(dbg, "BLACKBOX");
});

Просмотреть файл

@ -723,9 +723,11 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
_makeEventBreakpointEnterFrame(eventBreakpoint) {
return frame => {
const { sourceActor } = this.sources.getFrameLocation(frame);
const location = this.sources.getFrameLocation(frame);
const { sourceActor, line, column } = location;
const url = sourceActor.url;
if (this.sources.isBlackBoxed(url)) {
if (this.sources.isBlackBoxed(url, line, column)) {
return undefined;
}