The default bug view has changed. See this FAQ.
Last Comment Bug 713681 - Provide lite embedding API with IPC
: Provide lite embedding API with IPC
Status: RESOLVED INCOMPLETE
:
Product: Core
Classification: Components
Component: Embedding: APIs (show other bugs)
: Trunk
: All Linux
-- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
: Myk Melez [:myk] [@mykmelez]
Mentors:
https://wiki.mozilla.org/Embedding/IP...
Depends on: 714929
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-27 10:27 PST by Oleg Romashin (:romaxa)
Modified: 2016-06-23 10:45 PDT (History)
18 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Add new XRE process type for IPC Embedding (75.29 KB, patch)
2011-12-30 14:46 PST, Oleg Romashin (:romaxa)
benjamin: feedback-
Details | Diff | Splinter Review
Replace equals into XRE_IsProcessType function wrapper (79.70 KB, patch)
2012-04-10 09:03 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Splinter Review
Previde IPC Embedding process types (27.76 KB, patch)
2012-04-10 09:05 PDT, Oleg Romashin (:romaxa)
no flags Details | Diff | Splinter Review

Description User image Oleg Romashin (:romaxa) 2011-12-27 10:27:58 PST
Here is the meta bug for new IPC Embedding API.
Idea of this new embedding is to provide API similar to WebKit2, and build applications with embedded mozilla engine (including browser application)
1) No xul/xpcom in UI process (fast embed app startup and less memory usage)
2) Content process separation enabled (embed app responsiveness on expected level, UI protected from engine crashes)
3) Basic C++ embedding API, extendable by JSON messaging system. and content process script loading.
Comment 1 User image Oleg Romashin (:romaxa) 2011-12-30 14:46:07 PST
Created attachment 585053 [details] [diff] [review]
Add new XRE process type for IPC Embedding

Purpose of this patch is to create new UI/Content process relationship where UI process contains:
1) Chromium message loop
2) Shadow Layer tree
3) EmbedContentParent/TabParent

Child process:
1) XPCOM/Embedding, profile
2) Necko, permissions et.c.

Implementation similar to Fennec, but without XPCOM/XUL on UI process, and Mozilla engine lives mostly in child process
Comment 2 User image Benjamin Smedberg [:bsmedberg] 2012-01-04 12:25:33 PST
I don't understand (yet) how these process types would be used or (for example) why you need a process type for the "embeddefault" case at all... you said XPCOM code never runs in that process, right?

This definitely needs better documentation of the process types in nsXULAppAPI.h, but I also am feeling more than a little unhappy about having to sprinkle these XRE_ calls all over the codebase. Can we come up with a more generic function that people can use in general?
Comment 3 User image Benjamin Smedberg [:bsmedberg] 2012-01-04 12:26:36 PST
Also I'd like to understand how profiles/profile data is managed in this configuration.
Comment 4 User image Oleg Romashin (:romaxa) 2012-01-04 12:37:10 PST
> Also I'd like to understand how profiles/profile data is managed in this
> configuration.

In comment 1, I've explained a bit structure of this embedding type 
Profile data created for child process, and basically managed by child process. and because we can't share profile data between processes it will be one profile directory per process.

> example) why you need a process type for the "embeddefault" case at all...
> you said XPCOM code never runs in that process, right?

embeddefault currently only used for protecting GFX code from XPCOM usage. (UI process GFX, Layers), for example I don't create fonts in embeddefault UI process.
Comment 5 User image Oleg Romashin (:romaxa) 2012-04-10 09:03:07 PDT
Created attachment 613627 [details] [diff] [review]
Replace equals into XRE_IsProcessType function wrapper
Comment 6 User image Oleg Romashin (:romaxa) 2012-04-10 09:05:15 PDT
Created attachment 613631 [details] [diff] [review]
Previde IPC Embedding process types

Here is more simple version of IPC embedding process types with new XRE process check function.
Comment 7 User image Oleg Romashin (:romaxa) 2012-04-10 09:36:34 PDT
Comment on attachment 613627 [details] [diff] [review]
Replace equals into XRE_IsProcessType function wrapper

Wrap "XRE_GetProcessType ==" > XRE_IsProcessType
Comment 8 User image Benjamin Smedberg [:bsmedberg] 2012-04-18 13:34:12 PDT
cjones, can you look these over and give some opinions? I'm getting bad vibes about the "process type" abstraction here in any case, although the XRE_IsProcessType abstraction helps a bit. But I can't think of a straightforward way of doing this differently.
Comment 9 User image Chris Jones [:cjones] inactive; ni?/f?/r? if you need me 2015-01-29 10:54:44 PST
Comment on attachment 613631 [details] [diff] [review]
Previde IPC Embedding process types

Sorry, I'm declaring review bankruptcy.  I don't have an opinion on these patches on their own merit.  If someone else wants to review them and land them, that's fine with me.  Given gecko's small share of the embedding market, my opinion would be that copying the webkit2 API, or derivatives thereof like WebView, would be the way to go.  But I have no idea what the consumers are for gecko embeddings these days.
Comment 10 User image Shmerl 2015-01-29 10:57:56 PST
(In reply to Chris Jones [:cjones] inactive; ni?/f?/r? if you need me from comment #9)
> Comment on attachment 613631 [details] [diff] [review]
>...I have no idea what the
> consumers are for gecko embeddings these days.

Sailfish browser is using it:

https://github.com/sailfishos/sailfish-browser
https://github.com/tmeshkova/gecko-dev/tree/embedlite/embedding/embedlite
Comment 11 User image Benjamin Smedberg [:bsmedberg] 2016-06-23 10:45:41 PDT
Marking a bunch of bugs in the "Embedding: APIs" component INCOMPLETE in preparation to archive that component. If I have done this incorrectly, please reopen the bugs and move them to a more correct component as we don't have "embedding" APIs any more.

Note You need to log in before you can comment on or make changes to this bug.