Commit Graph

64 Commits

Author SHA1 Message Date
Kris Maglione
527c833970 Bug 1314861: Minor optimization: Define globals for shared sandbox modules on the sandbox rather than each module. r=ochameau
MozReview-Commit-ID: Lre6L2u4Y2r
2017-04-14 16:13:41 -07:00
Florian Queze
451928e614 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
Sebastian Hengst
f75839c723 Backed out changeset 55f3df15eaa6 (bug 1356569) 2017-04-14 23:39:17 +02:00
Florian Queze
61aabdf237 Bug 1356569 - Remove notifyObservers' last parameter when it is falsy, r=jaws. 2017-04-14 21:51:39 +02:00
J. Ryan Stinnett
4999247ce4 Bug 1275942 - Add option to wait for debugger on startup. r=jdescottes
Adds a `--wait-for-jsdebugger` CLI option which will spin the event loop until
the debugger connects to allow debugging _some_ startup code paths, such as the
beginning of the `browser.js` file.

Startup code paths that run before the DevTools CLI handler will be missed for
now.  This can be improved in the future if we move this to an earlier phase of
app startup.

MozReview-Commit-ID: J1A8lWLETGY
2017-03-02 14:50:30 -06:00
Yury Delendik
189dc8847c Bug 1333840 - Protect from frame.this access for wasm debugger frame. r=ochameau
MozReview-Commit-ID: eEhoHiXQTr
2017-01-25 12:21:37 -06:00
Alexandre Poirot
f0b62a2852 Bug 1323466 - Lazy load dependencies from actors/script.js. r=jryans
MozReview-Commit-ID: 6DdFOIL6nD
2016-12-20 13:35:13 -08:00
Alexandre Poirot
b1fb773627 Bug 1154645 - Move findCssSelector from server to shared. r=pbro
MozReview-Commit-ID: DjEO1hjFSc5
2016-11-09 09:22:42 -08:00
J. Ryan Stinnett
ca28966f00 Bug 1315391 - Rename all disconnect methods to destroy in actors. r=ochameau
Ever since protocol.js was added as a way to create DevTools actors, we've had
lots of confusion about the correct way to implement actor destruction.  If your
actor's _parent_ was the legacy kind, you had to use `disconnect`.  If it was
protocol.js, you had to use `destroy`.

There is no reason for this madness, which makes reasoning about destruction
quite hard.  Here we rename `disconnect` to `destroy` so there is only one name
for every destruction path.

MozReview-Commit-ID: C1Yw9NfUUR2
2016-11-11 18:24:58 -06:00
Stone Shih
862ea623ce Bug 1292063 - Part 2: Add composed argument to getEventTargetChainFor and refine test cases. r=smaug 2016-09-13 17:29:08 +08:00
Alexandre Poirot
055cbd96c1 Bug 1300036 - Update the state correctly on the client side when the server reports a conflict on resume. r=ejpbruel
MozReview-Commit-ID: IK6LXEGXan
2016-09-05 10:42:05 -07:00
fbdb0dae94 Bug 1295171 - Reintroduce the old Actor/FrontClass constructors. r=jryans
Heintroduce the old Actor/FrontClass constructors.
2016-08-22 16:25:57 +02:00
b0fa44c98a Bug 1288423 - Rename Actor/FrontClassWithSpec to Actor/FrontClass. r=fitzgen 2016-08-10 17:36:04 +02:00
James Long
24266d6355 Bug 1267365 - move various flags out of DevToolsUtils and don't depend on that module so much r=tromey 2016-08-05 17:41:01 -04:00
Eddy Bruel
6e63cd22ba Bug 1184661 - If a listener is not callable, assume it is an event listener object. r=past 2016-08-01 09:09:00 +02:00
Carsten "Tomcat" Book
6c57a4aadc Backed out changeset 2b687444223c (bug 1184461) for landing with wrong bug number 2016-08-04 14:43:25 +02:00
f867443bf1 Bug 1184461 - If a listener is not callable, assume it is an event listener object. r=past
In ThreadActor._getAllEventListeners, we construct a list of handler functions
for each target in the event target chain of a given event target. If a handler
is an event handler object, we obtain the handler function from its handleEvent
property. Otherwise, the handler function is assumed to be the handler itself.

To detect whether a handler is an event handler object, we would check its class
name property. This approach is fragile for several reasons: if the handler is
a proxy, accessing its class name may cause the debuggee to run. Moreover,
since accessing a proxy's class name requires us to enter the compartment of the
proxy's handler, if the latter is a security wrapper, accessing its class name
will cause security warnings in debug mode.

Since a handler is either an event handler object or a function, it should be
safe to assume that a handler is an event handler object if and only if it is
not callable. Checking whether a proxy is callable cannot cause the debuggee to
run. Moreover, it does not require us to enter the compartment of the proxy's
handler, thus avoiding the security warnings we mentioned earlier.
2016-08-03 14:26:06 +02:00
Carsten "Tomcat" Book
9265f02f72 merge mozilla-inbound to mozilla-central a=merge 2016-07-21 16:24:36 +02:00
James Long
14cb1813db Bug 1238173 - remove ScriptStore in use findScripts in debugger r=fitzgen 2016-07-20 14:57:13 -04:00
Till Schneidereit
e393dab409 Bug 911216 - Part 30: Enable SpiderMonkey Promise implementation. r=bz,efaust,bholley,Paolo,tromey,shu
Also contains folded version of the following patches that have to land at the same time with enabling the new implementation (or be backed out at the same time, if it comes to that):

Add Promise checks to test_xrayToJS.xul. r=bholley
Change Promise debugger hook tests to use Promise ctor instead of makeFakePromise. r=shu
Change DOM interface tests to assume Promise is an ES builtin, not a DOM one. r=bz
Remove some PromiseDebugging references. r=bz
Adapt promise rejections test to new xray-unwrapping error. r=bz
Fix expectations in browser_timelineMarkers tests. r=tromey
2016-07-21 12:06:30 +02:00
Carsten "Tomcat" Book
e7b6762188 Backed out changeset a80fdfc128b0 (bug 911216) for high crash-rate on developers - RyanVM request 2016-07-18 16:14:59 +02:00
Till Schneidereit
b5a834f62f Bug 911216 - Part 30: Enable SpiderMonkey Promise implementation. r=bz,efaust,bholley,Paolo,tromey,shu
Also contains folded version of the following patches that have to land at the same time with enabling the new implementation (or be backed out at the same time, if it comes to that):

Add Promise checks to test_xrayToJS.xul. r=bholley
Change Promise debugger hook tests to use Promise ctor instead of makeFakePromise. r=shu
Change DOM interface tests to assume Promise is an ES builtin, not a DOM one. r=bz
Remove some PromiseDebugging references. r=bz
Adapt promise rejections test to new xray-unwrapping error. r=bz
Fix expectations in browser_timelineMarkers tests. r=tromey
2016-07-16 15:05:12 +02:00
Nick Fitzgerald
29461839ae Bug 1261869 - Fix leaks in devtools; r=ejpbruel
There are two leaks addressed in this commit:

1. The thread actor's `_debuggerSourcesSeen` set was never cleared. This set
exists only as a performance optimization to speed up `_addSource` in cases
where we've already added the source. Unfortunately, this set wasn't getting
cleared when we cleared debuggees out and it ended up keeping the
`Debugger.Source`, its referent, and transitively its referent's global alive. I
figured it was simpler to make it a `WeakSet` than to add it as a special case
in `ThreadActor.prototype._clearDebuggees` and manage the lifetimes by hand. I
think this fits well with its intended use as an ephemeral performance
optimization.

2. Due to a logic error, we were not clearing debuggees in the memory actor's
`Debugger` instance on navigations. This isn't really a "proper" leak, in that
if you forced a GC, the old debuggees would go away as `Debugger` holds them
weakly, however if there was no GC between navigations, then you could still see
the old windows (and everything they "retained") as roots in the snapshot. This
issue is straightforward to fix once identified: ensure that `_clearDebuggees`
is actually called on navigation.

Finally, this commit adds a test that we don't leak Window objects when devtools
are open and we keep refreshing a tab. When it fails, it prints out the leaking
window's retaining paths.
2016-07-06 08:37:57 -07:00
Eddy Bruel
80b6bbdcff Bug 1280257 - Reset non-pending breakpoints when tab is reloaded with source maps disabled;r=jryans 2016-07-01 15:19:25 +02:00
Tom Tromey
a1c55e31b0 Bug 1225254 - split css-logic.js into server and shared files; r=pbro
MozReview-Commit-ID: BTFVQJcVI5d
2016-06-24 08:26:21 -06:00
Nick Fitzgerald
3fc1b07222 Bug 1277947 - Use ActorClassWithSpec for the ThreadActor; r=ejpbruel 2016-06-06 10:24:34 -07:00
J. Ryan Stinnett
458af0e0f3 Bug 1269457 - Only set breakpoints for pending bp actors. r=ejpbruel
The special code path carved out in bug 1225160 dropped the `actor.isPending`
check which causes many, many attempts to set a breakpoint on every new source
notification, leading to a very slow debugging experience.

MozReview-Commit-ID: A3pnHzh5eeh
2016-06-01 10:59:24 -05:00
J. Ryan Stinnett
530b903fcf Bug 1271084 - Apply ESLint autofixes to ignored /devtools files. r=tromey
For simple rules like function spacing, we can auto-fix these across the code
base so they are followed in a consistent way.

To generate this patch, I ran:

./mach eslint devtools --no-ignore --fix

After this, I reverted any changes to third party files that we really do want
to ignore.

MozReview-Commit-ID: 6Q8BApkAW20
2016-05-18 12:49:23 -05:00
Jennifer Fong
bb0e5b8001 Bug 1270173 - Move protocol.js from devtools/server to devtools/shared. r=ejpbruel 2016-05-06 09:19:00 +02:00
Tom Tromey
3a49936872 Bug 1265876 - don't directly use Timer.jsm or timers.js in devtools; r=ochameau
MozReview-Commit-ID: HzbnNvTc5db
2016-05-04 08:02:03 -06:00
Carsten "Tomcat" Book
74de773d2c Backed out changeset 797e8190073f (bug 1265876) for memory leaks in browser_markup_mutation_02.js 2016-04-28 08:13:42 +02:00
Tom Tromey
323443bd29 Bug 1265876 - don't directly use Timer.jsm or timers.js in devtools; r=ochameau
MozReview-Commit-ID: HzbnNvTc5db
2016-04-21 11:20:14 -06:00
Alexandre Poirot
9564188e35 Bug 1263935 - Use AddonPathService.mapURIToAddonId instead of AddonManager.mapURIToAddonID. r=ejpbruel 2016-04-26 07:11:15 -07:00
Eddy Bruel
8f89e310fe Bug 1225160 - Carefully avoid unsafeSynchronize when source maps are disabled;r=jlong 2016-04-14 21:57:58 +02:00
Jason Laster
6cee8a06ab Bug 1261956 - Replace update with Object.assign in actors/script.js r=ejpbruel
MozReview-Commit-ID: 7rXaG6ltOXw
2016-04-06 23:30:41 -07:00
Eddy Bruel
5b4d963baa Bug 1256397 - Convert ThreadActor into an instance of ActorClass;r=jryans 2016-04-01 10:59:59 +02:00
James Long
902e253362 Bug 1177329 - make sure sourcemapped frames appear in order r=fitzgen 2016-03-22 14:05:15 -04:00
James Long
bda9f04a7a Bug 1177329 - handle unsourcemapped frames in the debugger and fix top-level breakpoint edge case r=ejpbruel 2016-03-18 18:35:03 -04:00
Jordan Santell
91eae2ce6e Bug 1177279 - Create a SourceLocationController to manage the state of updating sources for source mapping. r=jlong,jryans 2016-03-14 18:49:07 -07:00
Eddy Bruel
056076244e Bug 1250896 - Move SourceActor into its own file;r=jryans 2016-03-03 17:51:37 +01:00
Eddy Bruel
c600405f32 Bug 1235371 - Move EnvironmentActor into its own file;r=jryans 2016-02-26 09:10:14 +01:00
Kris Maglione
9aa0e7d296 Bug 1222087: Part 2 - Ignore NS_ERROR_NO_INTERFACE exceptions when pausing on exceptions. r=fitzgen
MozReview-Commit-ID: Ao5Xpth3Txh
2016-02-22 14:52:27 -08:00
Kris Maglione
2836bba575 Bug 1222087: Part 1 - Fix ignoring of exceptions in blackboxed code. r=fitzgen
MozReview-Commit-ID: vtu1ou4ueT
2016-02-22 14:54:36 -08:00
Lin Clark
a39e2fcc0a Bug 1235374 - Change BreakpointActor to protocol.js. r=jryans 2016-01-22 15:52:00 -05:00
Carsten "Tomcat" Book
4be0db1c6b Backed out changeset b4b8a8dd9ce8 (bug 1239008) for dt1 test failures 2016-01-14 16:43:20 +01:00
Lin Clark
cdc8c1fdf0 Bug 1239008 - Change ChromeDebuggerActor to protocol.js. r=jryans 2016-01-12 11:46:00 +01:00
Gabriel Luong
c63ff3b56b Bug 1237441 - Move styleinspector directory into the shared inspector directory r=pbro 2016-01-12 09:52:12 -08:00
Wes Kocher
9329572311 Backed out changeset 29f184e43309 (bug 1237441) for eventual build bustage 2016-01-12 09:20:43 -08:00
Gabriel Luong
b5d2cb9306 Bug 1237441 - Move styleinspector directory into the shared inspector directory r=pbro 2016-01-12 08:55:46 -08:00
Lin Clark
18b605bb4f Bug 1235375 - Change FrameActor to protocol.js. r=ejpbruel 2016-01-04 08:34:00 -05:00