Commit 238b87d3 authored by Marco Trevisan's avatar Marco Trevisan 🎺

grabHelper: Throw an error if the owner is not an actor

Starting from commit 7bb84dae, GrabHelper requires the owner to be an Actor as
we pass this to pushModal that assumes it to be as well.

So check that GrabHelper owner is an actor and throws an error if it is not the
case. This helps in tracking down issues such as gnome-shell-extensions!68

!565
parent 8c01d341
Pipeline #85059 passed with stages
in 4 minutes and 1 second
......@@ -43,6 +43,9 @@ function _popGrabHelper(grabHelper) {
// call grab().
var GrabHelper = class GrabHelper {
constructor(owner, params) {
if (!(owner instanceof Clutter.Actor))
throw new Error('GrabHelper owner must be a Clutter.Actor');
this._owner = owner;
this._modalParams = params;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment