missing function nsiDocShell.setIsApp

Talk about code development, features, specific bugs, enhancements, patches, and similar 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 bugs, git, the repositories, 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. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

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.
User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

missing function nsiDocShell.setIsApp

Unread 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."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Andrew Herbert

Re: missing function nsiDocShell.setIsApp

Unread 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
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: missing function nsiDocShell.setIsApp

Unread 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."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Fedor2

Re: missing function nsiDocShell.setIsApp

Unread post by Fedor2 » 2020-06-02, 17:42

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

Andrew Herbert

Re: missing function nsiDocShell.setIsApp

Unread 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
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: missing function nsiDocShell.setIsApp

Unread 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."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

New Tobin Paradigm

Re: missing function nsiDocShell.setIsApp

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

Because the Unified XUL Platform isn't mozilla-central and never will be again?

Andrew Herbert

Re: missing function nsiDocShell.setIsApp

Unread 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
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: missing function nsiDocShell.setIsApp

Unread 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."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Andrew Herbert

Re: missing function nsiDocShell.setIsApp

Unread 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
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: missing function nsiDocShell.setIsApp

Unread 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."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked