mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1207696 Part 16 - Server side devtools changes, r=jimb.
--HG-- extra : rebase_source : caf99feea9e9a4685a66ed30a9448aacbdae54b2
This commit is contained in:
parent
85db906378
commit
e41439a68d
@ -151,12 +151,13 @@ const proto = {
|
||||
let raw = this.obj.unsafeDereference();
|
||||
|
||||
// If Cu is not defined, we are running on a worker thread, where xrays
|
||||
// don't exist.
|
||||
if (Cu) {
|
||||
// don't exist. The raw object will be null/unavailable when interacting
|
||||
// with a replaying execution.
|
||||
if (raw && Cu) {
|
||||
raw = Cu.unwaiveXrays(raw);
|
||||
}
|
||||
|
||||
if (!DevToolsUtils.isSafeJSObject(raw)) {
|
||||
if (raw && !DevToolsUtils.isSafeJSObject(raw)) {
|
||||
raw = null;
|
||||
}
|
||||
|
||||
|
@ -448,15 +448,20 @@ previewers.Object = [
|
||||
}
|
||||
|
||||
const raw = obj.unsafeDereference();
|
||||
const global = Cu.getGlobalForObject(DebuggerServer);
|
||||
const classProto = global[obj.class].prototype;
|
||||
// The Xray machinery for TypedArrays denies indexed access on the grounds
|
||||
// that it's slow, and advises callers to do a structured clone instead.
|
||||
const safeView = Cu.cloneInto(classProto.subarray.call(raw, 0,
|
||||
OBJECT_PREVIEW_MAX_ITEMS), global);
|
||||
const items = grip.preview.items = [];
|
||||
for (let i = 0; i < safeView.length; i++) {
|
||||
items.push(safeView[i]);
|
||||
|
||||
// The raw object will be null/unavailable when interacting with a
|
||||
// replaying execution.
|
||||
if (raw) {
|
||||
const global = Cu.getGlobalForObject(DebuggerServer);
|
||||
const classProto = global[obj.class].prototype;
|
||||
// The Xray machinery for TypedArrays denies indexed access on the grounds
|
||||
// that it's slow, and advises callers to do a structured clone instead.
|
||||
const safeView = Cu.cloneInto(classProto.subarray.call(raw, 0,
|
||||
OBJECT_PREVIEW_MAX_ITEMS), global);
|
||||
const items = grip.preview.items = [];
|
||||
for (let i = 0; i < safeView.length; i++) {
|
||||
items.push(safeView[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -115,7 +115,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||
},
|
||||
|
||||
get globalDebugObject() {
|
||||
if (!this._parent.window) {
|
||||
if (!this._parent.window || this.dbg.replaying) {
|
||||
return null;
|
||||
}
|
||||
return this.dbg.makeGlobalObjectReference(this._parent.window);
|
||||
@ -411,7 +411,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||
return this._parentClosed ? null : undefined;
|
||||
},
|
||||
|
||||
_makeOnEnterFrame: function({ pauseAndRespond }) {
|
||||
_makeOnEnterFrame: function({ pauseAndRespond, rewinding }) {
|
||||
return frame => {
|
||||
const generatedLocation = this.sources.getFrameLocation(frame);
|
||||
const { originalSourceActor } = this.unsafeSynchronize(
|
||||
@ -420,6 +420,11 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||
|
||||
const url = originalSourceActor.url;
|
||||
|
||||
// When rewinding into a frame, we end up at the point when it is being popped.
|
||||
if (rewinding) {
|
||||
frame.reportedPop = true;
|
||||
}
|
||||
|
||||
if (this.sources.isBlackBoxed(url)) {
|
||||
return undefined;
|
||||
}
|
||||
@ -1224,6 +1229,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||
|
||||
// Clear stepping hooks.
|
||||
this.dbg.onEnterFrame = undefined;
|
||||
this.dbg.onPopFrame = undefined;
|
||||
this.dbg.onExceptionUnwind = undefined;
|
||||
if (frame) {
|
||||
frame.onStep = undefined;
|
||||
@ -1233,7 +1239,7 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||
// Clear DOM event breakpoints.
|
||||
// XPCShell tests don't use actual DOM windows for globals and cause
|
||||
// removeListenerForAllEvents to throw.
|
||||
if (!isWorker && this.global && !this.global.toString().includes("Sandbox")) {
|
||||
if (!isWorker && this.global && !this.dbg.replaying && !this.global.toString().includes("Sandbox")) {
|
||||
Services.els.removeListenerForAllEvents(this.global, this._allEventsListener, true);
|
||||
for (const [, bp] of this._hiddenBreakpoints) {
|
||||
bp.delete();
|
||||
|
Loading…
Reference in New Issue
Block a user