We however leave moving the packages building to a script for another
day.
Differential Revision: https://phabricator.services.mozilla.com/D19624
--HG--
rename : taskcluster/docker/debian-base/cloud-mirror-workaround.sh => taskcluster/docker/debian-raw/cloud-mirror-workaround.sh
rename : taskcluster/docker/debian-base/setup_packages.sh => taskcluster/docker/debian-raw/setup_packages.sh
Modify the Debugger API implementation to ensure that debugger code's promise
activity (resolving promises; running reaction jobs) cannot interfere with the
debuggee's.
Specifically, ensure that there is an `AutoDebuggerJobQueueInterruption` in
scope at every site in the Debugger implementation that might invoke a debugger
hook function. This saves the debuggee's job queue, emplaces a fresh empty
queue, lets the hooks run, drains the queue, and then restores the debuggee's
original queue.
Since we must already mark sites that could invoke hooks with
`EnterDebuggeeNoExecute`, we ensure our job queue protection coverage is
complete statically by having `EnterDebuggeeNoExecute`'s constructor require a
reference to an `AutoDebuggerJobQueueInterruption`.
Differential Revision: https://phabricator.services.mozilla.com/D17547
--HG--
extra : moz-landing-system : lando
Define a new RAII class, AutoDebuggerJobQueueInterruption, to save and restore
the current ECMAScript job queue, to protect the debuggee's job queue from
activity that occurs in debugger callbacks. Add a new method to the JS::JobQueue
abstract base class, saveJobQueue, to support AutoDebuggerJobQueueInterruption.
Comments on AutoDebuggerJobQueueInterruption provide details.
Implement saveJobQueue for SpiderMonkey's internal job queue and for Gecko's job
queue in CycleCollectedJSContext.
Differential Revision: https://phabricator.services.mozilla.com/D17546
--HG--
extra : moz-landing-system : lando
While the behavior of ECMAScript Promises and their associated job queue is
covered by the ECMAScript standard, the HTML specification amends that with
additional behavior the web platform requires. To support this, SpiderMonkey
provides hooks the embedding can set to replace SpiderMonkey's queue with its
own implementation.
At present, these hooks are C-style function-pointer-and-void-pointer pairs,
which are awkward to handle and mistake-prone, as passing a function the wrong
void* is not a type error. Later patches in this series must add new hooks,
making a bad situation worse.
A C++ abstract base class is a well-typed alternative. This introduces a new
`JS::JobQueue` abstract class, and adapts SpiderMonkey's internal job queue and
Gecko's customization to use it. `GetIncumbentGlobalCallback` and
`EnqueuePromiseJobCallback` become virtual methods.
Within SpiderMonkey, the patch gathers the various fields of JSContext that
implement the internal queue into their own type, js::InternalJobQueue. Various
jsfriendapi functions become veneers for calls to methods specific to the
derived class. The InternalJobQueue type itself remains private to SpiderMonkey,
as it uses types like TraceableFifo, derived from Fifo, that are not part of
SpiderMonkey's public API.
Within Gecko, CycleCollectedJSContext acquires JS::JobQueue as a private base
class, and a few static methods are cleaned up nicely.
There are a few other hooks defined in js/public/Promise.h that might make sense
to turn into virtual methods on JobQueue. For example,
DispatchToEventLoopCallback, used for resolving promises of results from
off-main-thread tasks, is probably necessarily connected to the JobQueue
implementation in use, so it might not be sensible to set one without the other.
But it was left unchanged to reduce this patch's size.
Differential Revision: https://phabricator.services.mozilla.com/D17544
--HG--
extra : moz-landing-system : lando
This patch moves the channel pointer from the WebSocketEvents into the
classes that wrap them (EventTargetDispatcher and
WrappedWebSocketEvent) to fix leaks.
EventTargetDispatcher uses a weak pointer. This is needed to prevent a
leak if the ChannelEvent dispatch fails, because it would create a
cycle of strong references between the WebSocketEvent, the channel,
the channel event queue, and EventTargetDispatcher. It is safe because
the ChannelEventQueue ensures that the channel remains alive.
WrappedWebSocketEvent uses a strong pointer. This won't create a leak
because the runnable is not owned by the channel. It is needed for
safety because it can't rely on the ChannelEventQueue mechanism for
keeping the channel alive.
The WPT whitelisting moves them into two subdirectories that still
seem to leak sometimes, but the top level websockets/ directory seems
okay now.
Depends on D19586
Differential Revision: https://phabricator.services.mozilla.com/D19587
--HG--
extra : moz-landing-system : lando
In the next patch, I want to change the signature of Run(), so I need
to create a new base class for these inner WebSocket events.
For now, this class is the same as ChannelEvent, except that it does
not have the GetEventTarget method, which is never called.
Depends on D19585
Differential Revision: https://phabricator.services.mozilla.com/D19586
--HG--
extra : moz-landing-system : lando
Later patches change the WrappedChannelEvent ctor, so I'm removing
this unused method to avoid having to fix it up.
Differential Revision: https://phabricator.services.mozilla.com/D19585
--HG--
extra : moz-landing-system : lando
As we add more specific methods to RemotePageManager some of them will have to
call the main process to get the results. This adds a standard mechanism for
doing so. Calling sendRequest will return a promise that is resolved or rejected
when the main process responds.
Differential Revision: https://phabricator.services.mozilla.com/D19412
--HG--
extra : moz-landing-system : lando
Evaluation of debuggee code should always begin with an empty microtask queue.
In xpcshell tests, this is not guaranteed, as it is in the web platform. This
patch changes those devtools server xpcshell tests that break this rule in a
detectable way to run the debuggee code as a separate HTML task.
In an actual browser environment, debuggee JavaScript runs as an HTML task.
Since HTML requires a microtask checkpoint at the end of each task, this means
that a debuggee task begins execution with an empty microtask queue, free of
microtasks from other tabs or the browser machinery itself. Hence, while the
debugger is pausing debuggee code, it is safe for it to save the debuggee's
microtask queue, so that those jobs do not make progress. (Which is fortunate,
because it *must* do so, lest the debuggee's microtasks run during the pause!)
In an xpcshell test, however, there is no guarantee that debuggee code begins
execution with a fresh microtask queue: the test may call `eval` or
`evalInSandbox` at any time. If such an evaluation hits a breakpoint, `debugger`
statement, etc. that invokes a Debugger hook, supervisory microtasks from the
test harness code may be set aside along with the debuggee's microtasks. If the
hook code then blocks waiting for those microtasks to run, the test will hang.
Differential Revision: https://phabricator.services.mozilla.com/D18904
--HG--
extra : moz-landing-system : lando
This was added in bug 476393 in order to work around a problem with the Java plug-in.
We no longer support that plug-in.
The comment also mentions NSTexturedBackgroundWindowMask which we stopped using in bug 1335191.
Differential Revision: https://phabricator.services.mozilla.com/D19558
--HG--
extra : moz-landing-system : lando
This method could only return something non-null in embedding situations,
in which our ChildView was a subview of somebody else's NSView that conforms
to the mozView protocol. Such a situation hasn't existed for about 10 years.
Differential Revision: https://phabricator.services.mozilla.com/D19555
--HG--
extra : moz-landing-system : lando
As we add more specific methods to RemotePageManager some of them will have to
call the main process to get the results. This adds a standard mechanism for
doing so. Calling sendRequest will return a promise that is resolved or rejected
when the main process responds.
Differential Revision: https://phabricator.services.mozilla.com/D19412
--HG--
extra : moz-landing-system : lando