missing function nsiDocShell.setIsApp

Talk about code development, features, specific bugzilla bugs, enhancements, patches, and other highly technical things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific referenced Bugzilla bugs, mercurial, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Most "bug reports" do not belong in this board and should initially be posted in Community Support or other relevant support boards.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.
Post Reply
User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2015-12-09, 15:45

missing function nsiDocShell.setIsApp

Post by moonbat » 2020-05-26, 12:06

Was trying to get the Priv8 extension from CAA to work, it's a bootstrapped sandbox/container extension that predates Mozilla's own Multi-container. After following the code, I find it makes a call to nsiDocShell.setIsApp, which errors out as a non existent function.
Checking Pale Moon's version of this file, I find there is a member called isApp but marked as readonly.

Code: Select all

 829   /**
830    * Returns true iff the docshell corresponds to an <iframe mozapp>.
831    */
832   [infallible] readonly attribute boolean isApp;
A bit of searching turned up bug #754141, which adds this method.
Is there a way to workaround the lack of this API here? For reference, I've included the function in the extension that calls this. If I comment out the call, it doesn't seem to do anything in terms of loading a webpage into a sandbox.

Code: Select all

  configureWindow: function(aTab, aWindow, aId) {
    this._sessionStore.setTabValue(aTab, this.TAB_DATA_IDENTIFIER,
                                   JSON.stringify({ appId: aId }));

    let docShell = aWindow.QueryInterface(Ci.nsIInterfaceRequestor)
                          .getInterface(Ci.nsIDocShell);
    if (docShell.appId == aId) {
      return false;
    }
    debug("ID is "+aId);
//    docShell.setIsApp(aId);
    return true;
  }
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

User avatar
Andrew Herbert
Fanatic
Fanatic
Posts: 156
Joined: 2019-11-25, 21:46

Re: missing function nsiDocShell.setIsApp

Post by Andrew Herbert » 2020-06-01, 01:17

Making Multifox work with a non-Australis UI could be a better choice.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2015-12-09, 15:45

Re: missing function nsiDocShell.setIsApp

Post by moonbat » 2020-06-01, 01:20

Does it otherwise work on Basilisk?
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

User avatar
Fedor2
Astronaut
Astronaut
Posts: 703
Joined: 2016-04-11, 01:26

Re: missing function nsiDocShell.setIsApp

Post by Fedor2 » 2020-06-02, 17:42

The function was for the mobile firefox os (b2g), you may remove all its references.

User avatar
Andrew Herbert
Fanatic
Fanatic
Posts: 156
Joined: 2019-11-25, 21:46

Re: missing function nsiDocShell.setIsApp

Post by Andrew Herbert » 2020-06-02, 21:43

moonbat wrote:
2020-06-01, 01:20
Does it otherwise work on Basilisk?
Yes.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2015-12-09, 15:45

Re: missing function nsiDocShell.setIsApp

Post by moonbat » 2020-06-03, 01:43

Andrew Herbert wrote:
2020-06-01, 01:17
Making Multifox work with a non-Australis UI could be a better choice.
That one is even older and marked compatible with Firefox 29-32..let me see how well it works here.
Fedor2 wrote:
2020-06-02, 17:42
The function was for the mobile firefox os (b2g), you may remove all its references.
Thanks :)
There was just the one reference, I was wondering if the extension wasn't working properly because of that.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 7885
Joined: 2012-10-09, 19:37
Location: Space, maybe..

Re: missing function nsiDocShell.setIsApp

Post by New Tobin Paradigm » 2020-06-03, 06:31

Because the Unified XUL Platform isn't mozilla-central and never will be again?
Image
- Mars will never be free until the sands run red with Earther blood! -

Image

User avatar
Andrew Herbert
Fanatic
Fanatic
Posts: 156
Joined: 2019-11-25, 21:46

Re: missing function nsiDocShell.setIsApp

Post by Andrew Herbert » 2020-06-19, 14:25

moonbat wrote:
2020-06-03, 01:43
Andrew Herbert wrote:
2020-06-01, 01:17
Making Multifox work with a non-Australis UI could be a better choice.
That one is even older and marked compatible with Firefox 29-32..let me see how well it works here.
Actually there's a more recent version on GitHub: https://github.com/hultmann/multifox/releases/tag/3.2.3

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2015-12-09, 15:45

Re: missing function nsiDocShell.setIsApp

Post by moonbat » 2020-06-19, 14:54

That was released in 2017, even less likely to work since by then they had introduced 'embedded WebExtensions'.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

User avatar
Andrew Herbert
Fanatic
Fanatic
Posts: 156
Joined: 2019-11-25, 21:46

Re: missing function nsiDocShell.setIsApp

Post by Andrew Herbert » 2020-06-19, 23:53

It doesn't have a "webextension" folder, and probably can't be converted to WebExtensions anyway.

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2015-12-09, 15:45

Re: missing function nsiDocShell.setIsApp

Post by moonbat » 2020-06-20, 04:53

In my view, something designed for a version of Firefox more recent than 52 will be far less compatible than an earlier one. Remember this is also when they were migrating to e10s.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Linux Mint 20 Xfce x64 on HP i5 laptop with 12 GB RAM, always latest versions of PM & Basilisk unless specified.

Post Reply