CN103034495A - Browser capable of isolating plug-in in webpage and webpage plug-in isolating method - Google Patents

Browser capable of isolating plug-in in webpage and webpage plug-in isolating method Download PDF

Info

Publication number
CN103034495A
CN103034495A CN2012105376036A CN201210537603A CN103034495A CN 103034495 A CN103034495 A CN 103034495A CN 2012105376036 A CN2012105376036 A CN 2012105376036A CN 201210537603 A CN201210537603 A CN 201210537603A CN 103034495 A CN103034495 A CN 103034495A
Authority
CN
China
Prior art keywords
plug
unit
page
type
browser
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2012105376036A
Other languages
Chinese (zh)
Inventor
杨晓兵
任寰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Qizhi Software Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, Qizhi Software Beijing Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN2012105376036A priority Critical patent/CN103034495A/en
Publication of CN103034495A publication Critical patent/CN103034495A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to the technical field of the Internet and discloses a browser capable of isolating plug-ins in a webpage. The browser comprises a plug-in type obtainer, a plug-in process creator and a plug-in thread creator, wherein the plug-in type obtainer is used for obtaining the type of the plug-ins to be loaded in the webpage during webpage loading; the plug-in process creator is used for creating a plug-in process independent of a browser process for the plug-ins of the same type in the webpage; and the plug-in thread creator is used for creating a thread for the plug-ins of the same type in the webpage in the independent plug-in process to run the plug-ins in the webpage. The invention additionally discloses a webpage plug-in isolating method. By enabling the webpage plug-ins of different types to respectively run in different processes independent of the browser process, the problem that tabs (or label pages) are collapsed or even the entire browser is collapsed because the plug-ins are collapsed is solved, and the beneficial effect of enabling the browser to operate more stably is obtained.

Description

The browser that plug-in unit in the webpage is isolated and the partition method of webpage connector
Technical field
The present invention relates to Internet technical field, be specifically related to a kind of browser that plug-in unit in the webpage is isolated and the partition method of webpage connector.
Background technology
Browser refers to can the display web page server or the html file content of file system, and allows a kind of software of user and these file interactions.Web browser is mainly mutual by http protocol and web page server and obtain webpage, and these webpages are specified by URL, and file layout is generally html format, and is indicated in http protocol by multimedia file format MIME.Can comprise a plurality of documents in the webpage, each document obtains from server respectively.Most browser itself is all supported other form widely except HTML, such as: the picture formats such as JPEG, PNG, GIF, and can expand and support numerous plug-in units (plug-ins).In addition, many browsers are also supported other URL type and corresponding agreement thereof, as: the encryption version of FTP, Gopher, HTTPS(HTTP agreement).HTTP content type and URL protocol specification allow Web page maker embedded images, animation, video, sound, Streaming Media etc. in webpage.Common web browser comprises the Firefox of Internet Explorer, the Mozilla of Microsoft, the Safari of Apple on the PC, Opera, Google Chrome, GreenBrowser browser, 360 secure browsers, search dog high speed browser, everyday browser, the TT of Tengxun, proud trip browser, Baidu's browser, Tencent QQ browser etc., browser is the client-side program that the most often uses.
ActiveX refers to the whole COM framework of Microsoft in a broad sense, realizes that object connects and the ActiveX control (usually being loaded as plug-in unit) that embeds but be commonly used to now call based on standard C OM interface in browser.The latter refers to develop from VBX, towards the Internet Explorer technology of Microsoft and the OLE control take OCX as extension name that designs.By the interface specification between definition container and the assembly, if write a control of following standard, can in multiple container, use easily so and need not revise the code of control.Equally, by realizing that standard interface calls, a container of following standard can embed any control of following standard at an easy rate.Because popularizing of the application of OLE in ActiveX control only has minority to be independent of ActiveX technology, for example compound document in the OLE technology now.
Some browsers, for example Internet Explorer, Netscape browser etc. are all supported ActiveX control in varying degrees.This allows webpage to produce more abundant effect by script and widget interaction, but also is with the problem of serving security simultaneously, as: the collapse of control can cause the browser program collapse usually.
The phenomenon of collapsing often appears in order to tackle browser, now a lot of browser manufacturers have all adopted the concept of multi-process based tab navigation, comprising browsers such as IE8, Chrome, Firefox, and numerous browser based on WebKit has adopted later on this function of multi-process based tab navigation at apple issue WebKit2 kernel.Because in browser, add after the multi-process function of browse, even the collapse phenomenon has appearred in one of them process of browser, also can not involve other browser windows, thereby effectively avoid the seemingly-dead of whole browser.
In latest generation browser IE8, Microsoft added and be called as " Loosely-Coupled IE(LCIE) " framework ( Http:// www.iefans.net/liulanqi-duoincheng-duibi-iance).By Loosely-Coupled IE(LCIE) framework, IE8 with the main process of browsing with to play up process isolated.Main process is processed browser, user interface and framework (window), is used for the Save option card (being Shipping Options Page).Some tab among the IE8 is to operate in the identical process, but the tab of different level of securitys is separated, namely operates in the different processes.ActiveX control is processed by the tab process.
In the multi-process framework of above-mentioned IE browser, although thereby tab is to be sorted in the framework that formed multi-process in the different processes, and ActiveX control is processed by the tab process in each process.But the dissimilar ActiveX plug-in unit in the tab in same process all is to operate in the process, because it is different separately that the probability of collapse appears in various ActiveX plug-in unit, and the situation of each plug-in unit is different, still can cause the collapse of its place process, namely corresponding tab can be collapsed.
Summary of the invention
In view of the above problems, the present invention has been proposed in order to a kind of overcome the problems referred to above or the browser that plug-in unit in the webpage is isolated that addresses the above problem at least in part and the partition method of webpage connector are provided.
According to one aspect of the present invention, a kind of browser that plug-in unit in the webpage is isolated is provided, comprising:
The package types getter is suitable for obtaining the type of plug-in unit in the page to be loaded in the page loading procedure;
Plug-in unit process creation device is suitable for plug-in unit in the page of same type and creates a plug-in unit process that is independent of browser process;
Plug-in unit thread creation device is suitable for independently creating a thread to move plug-in unit in the described page for plug-in unit in the page of each same type in the plug-in unit process at this.
Alternatively, described package types getter comprises:
Type I D resolver is suitable for resolving in the page to be loaded corresponding web page element, therefrom parses unique ID of plug-in unit in the described page to be loaded of sign, thereby obtains the type of plug-in unit in the page to be loaded.
Alternatively, described package types getter further comprises:
Type I D blocker is suitable for tackling the CoGetClassObject function, obtains unique ID of plug-in unit in the invoked described page to be loaded.
Alternatively, described plug-in unit process creation device further comprises:
The process requestor, whether the plug-in unit process that is suitable for inquiring about the type of plug-in unit in the described page creates;
The process creation device, be suitable for not creating the plug-in unit process, or the plug-in unit process center line number of passes that has created to reach when thread threshold value or current EMS memory occupation reach predetermined quota be that plug-in unit creates new plug-in unit process in the described page of the type, and upgrade the progress information tabulation of the type of plug-in unit in the described page.
Alternatively, described process creation device is further adapted for the process priority that dissimilar plug-in units in this page are set according to the type of the page to be loaded, creates successively the plug-in unit process of plug-in unit in the respective page by described process priority.
Alternatively, described process creation device further comprises:
New process maker is suitable for generating a new plug-in unit process with unique process ID, and distributes the memory headroom of described predetermined quota for it;
New process configuration device is suitable for arranging type, thread threshold value, the thread information list of plug-in unit in the page under the described new plug-in unit process.
Alternatively, described browser also comprises:
The process determining device, be suitable for judging with described browser process independently in the page process number of the type of plug-in unit whether arrive the process threshold value, if do not reach, then create new plug-in unit process for plug-in unit in the described page of the type.
Alternatively, described browser also comprises:
The process communication device is suitable for the mutual exclusion of communicating by letter by the mutual exclusion lock implementation process between plug-in unit process and the browser process of type of plug-in unit in the described page.
Alternatively, described browser also comprises:
The thread release is suitable for then cutting out the thread of plug-in unit in the described page, and discharging the memory headroom that described thread takies when the browser Shipping Options Page at plug-in unit place in the described page is closed.
According to a further aspect in the invention, provide a kind of partition method of webpage connector, comprised step:
Obtain the type of plug-in unit in the page to be loaded in the page loading procedure;
For plug-in unit establishment one in the page of same type is independent of the plug-in unit process of browser process;
Independently create a thread to move plug-in unit in the described page for plug-in unit in the page of each same type in the plug-in unit process at this.
Alternatively, the described step of obtaining the type of plug-in unit in the page to be loaded in the page loading procedure comprises:
Resolve in the page to be loaded corresponding web page element, therefrom parse unique ID of plug-in unit in the described page to be loaded of sign, thereby obtain the type of plug-in unit in the page to be loaded.
Alternatively, further comprise:
Interception CoGetClassObject function obtains unique ID of plug-in unit in the invoked described page to be loaded.
Alternatively, described is that the plug-in unit establishment one plug-in unit process that is independent of browser process comprises in the page of same type:
Whether the plug-in unit process of inquiring about the type of plug-in unit in the described page creates;
If create, or the plug-in unit process center line number of passes that has created reaches the thread threshold value or current EMS memory occupation reaches predetermined quota, then be that plug-in unit creates new plug-in unit process in the described page of the type, and upgrade the progress information tabulation of the type of plug-in unit in the described page.
Alternatively, the described step that creates new plug-in unit process for plug-in unit in the described page of the type comprises:
The process priority of dissimilar plug-in units in this page is set according to the type of the page to be loaded;
Create successively the plug-in unit process of plug-in unit in the respective page by described process priority.
Alternatively, the described step that creates new plug-in unit process for plug-in unit in the described page of the type further comprises:
Generate a new plug-in unit process with unique process ID, and distribute the memory headroom of described predetermined quota for it;
Type, thread threshold value, the thread information list of plug-in unit in the affiliated page of described new plug-in unit process are set.
Alternatively, also comprise before the described step that creates new plug-in unit process for plug-in unit in the described page of the type:
Judge with described browser process mutually independently in the page number of the process of the type of plug-in unit whether arrive the process threshold value, if do not reach, then be that plug-in unit creates new plug-in unit process in the described page of the type.
The mutual exclusion of communicating by letter by the mutual exclusion lock implementation process between the plug-in unit process of the type of plug-in unit and the browser process in the described page alternatively.
Alternatively, further comprise:
When the browser Shipping Options Page at plug-in unit place in the described page is closed, then close the thread of plug-in unit in the described page, and discharge the memory headroom that described thread takies.
Can make dissimilar webpage connectors operate in respectively from browser process independently in the different process according to the partition method of the browser that plug-in unit in the webpage is isolated of the present invention and webpage connector; solved thus because tab (or Shipping Options Page) collapse that the plug-in unit collapse causes or even the problem of whole browser collapse, obtained the beneficial effect that makes browser execution more stable.
Above-mentioned explanation only is the general introduction of technical solution of the present invention, for can clearer understanding technological means of the present invention, and can be implemented according to the content of instructions, and for above and other objects of the present invention, feature and advantage can be become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of drawings
By reading hereinafter detailed description of the preferred embodiment, various other advantage and benefits will become cheer and bright for those of ordinary skills.Accompanying drawing only is used for the purpose of preferred implementation is shown, and does not think limitation of the present invention.And in whole accompanying drawing, represent identical parts with identical reference symbol.In the accompanying drawings:
Fig. 1 shows the browser structure synoptic diagram of according to an embodiment of the invention plug-in unit in the webpage being isolated;
Fig. 2 shows the concrete structure synoptic diagram of process creation device among Fig. 1;
Fig. 3 shows the data structure synoptic diagram that is used for the class of managing process and thread in the application example;
Fig. 4 shows the instance graph of opening three Shipping Options Pages and load Flash, BD Player and Qvod plug-in unit in browser;
Fig. 5 shows the according to an embodiment of the invention partition method process flow diagram of webpage connector.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings in more detail.Although shown exemplary embodiment of the present disclosure in the accompanying drawing, yet should be appreciated that and to realize the disclosure and the embodiment that should do not set forth limits here with various forms.On the contrary, it is in order to understand the disclosure more thoroughly that these embodiment are provided, and can with the scope of the present disclosure complete convey to those skilled in the art.
For fear of because tab (or Shipping Options Page) collapse that plug-in unit collapse causes or even the problem of whole browser collapse; the browser structure that plug-in unit in the webpage is isolated that present embodiment provides comprises: package types getter 110, plug-in unit process creation device 120 and plug-in unit thread creation device 130 as shown in Figure 1.
Package types getter 110 is suitable for obtaining the type of plug-in unit in the page to be loaded in the page loading procedure.If there is plug-in unit (being plug-in unit in the webpage) in the webpage to be loaded, can be with different type I D in the web page element that then the webpage source code is corresponding, be that CLSID distinguishes plug-in unit in the dissimilar webpages, therefore, this package types getter 110 comprises a type I D resolver 111, by unique ID of plug-in unit in the analyzing web page element, thereby obtain the type of plug-in unit in the page to be loaded.For example need to load flash object object, following webpage example source code:
<object?classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"width="360"height="210">。
Type I D resolver 111 is easy to parse the type of plug-in object by identidication key clsid, adopts the plug-in unit of which kind of classification to load this plug-in object thereby make browser be easy to judge.
After getting access to clsid, the plug-in unit process (such as above-mentioned flash process) of plug-in unit in the browser meeting Web page loading, further, package types getter 110 also comprises type I D blocker 112, be suitable for tackling the CoGetClassObject function, thereby hook lives plug-in unit in the invoked webpage to be loaded, obtains the clsid of plug-in unit in the invoked page to be loaded.By hook behind clsid, but the just plug-in unit process of plug-in unit in the Web page loading.
Plug-in unit process creation device 120 is suitable for plug-in unit in the page of same type and creates a plug-in unit process that is independent of browser process.Namely in order to avoid because the tab (or Shipping Options Page) that plug-in unit collapse causes collapse or even the problem of whole browser collapse; this plug-in unit process creation device 120 is that dissimilar plug-in units creates different processes; and all be independent of browser process, as: the CLSID according to Flash, baidu player, Qvod plug-in unit creates different processes.
This plug-in unit process creation device 120 specifically comprises: process requestor 121 and process creation device 122.
Because a browser can have a plurality of Shipping Options Pages, the plug-in object of loading may be arranged in each Shipping Options Page, and type may be identical, therefore, after in the Shipping Options Page opened plug-in unit process corresponding to plug-in object to be loaded may be created.Process requestor 121 judges by the process list of query procedure manager whether the process of plug-in unit corresponding types in the current page to be loaded creates.If do not create this plug-in unit process, or the plug-in unit process center line number of passes that has created reaches the thread threshold value or current EMS memory occupation reaches when being scheduled to quota, process creation device 122 creates new plug-in unit process for plug-in unit in the page of the type, and upgrades the progress information tabulation of the type of plug-in unit in the page.The progress information tabulation comprises: the information such as the type of plug-in unit, thread threshold value (being the maximum thread amount that comprises in the process), thread information list in the page under the new plug-in unit process.Wherein, the thread information list comprises the information such as current existing Thread Count and the corresponding Shipping Options Page of thread in the process.
Further, process creation device 122 arranges the process priority of dissimilar plug-in units in this page according to the type of the page to be loaded, and creates successively the plug-in unit process of plug-in unit in the respective page by described process priority when creating the plug-in unit process.For example for the demonstration of the video in the video webpage, just need be somebody's turn to do the height established for the priority of the process of flash plug-in unit foundation a bit.This process priority also can be adjusted according to type and the URL of current page, thereby supports efficiently the plug-in unit in the page to show, preferential process and the thread that generates correspondence.Here process priority also represents to create the establishment priority sequentially of certain type plug-in simultaneously, wherein, the page for certain type, the relation that dissimilar plug-in units is wherein created the priority of processes can be stored in by the form of configuration file in the corresponding document of browser, process creation device 122 reads this configuration file, is that dissimilar plug-in units creates the plug-in unit process by the order of the formulation in this configuration file.
Wherein, process creation device 122 concrete structures comprise as shown in Figure 2: new process maker 210 and new process configuration device 220.
New process maker 210 is suitable for generating a new plug-in unit process with unique process ID, and distributes the memory headroom of predetermined quota for it.
New process configuration device 220 is suitable for arranging type, thread threshold value, the thread information list of plug-in unit in the affiliated page of new plug-in unit process.
This memory headroom is the virtual memory space, and size is generally 1GB, and the thread threshold value is 10, and namely plug-in unit process comprises the thread of 10 the type plug-in units, and memory headroom size and thread threshold value can be set according to actual conditions.
Plug-in unit thread creation device 130 be suitable for this independently create for plug-in unit in the page of each same type in the plug-in unit process thread with the operation page in plug-in unit.The list item of the corresponding Shipping Options Page of thread when creating thread in above-mentioned thread information list arranges the Shipping Options Page ID under plug-in object corresponding to this thread, in order to be convenient to search thread corresponding to plug-in object all in this Shipping Options Page when closing Shipping Options Page, and these these threads are closed, discharge the system resource of the shared process of thread.
In the present embodiment, establishment for process, acquiescence can create 256 processes the largelyst, opens simultaneously concomitantly 256 processes and seldom occur in browser, also satisfies actual conditions on the present system hardware so 256 these upper limits satisfy the use of browser.Therefore, browser also comprises: process determining device 140, before the establishment process, this process determining device 140 judge with browser process independently in the page process number of the type of plug-in unit whether arrive process threshold value (namely 256), if reach, then create new plug-in unit process for plug-in unit in the page of the type.
Because it is separate that the plug-in unit of dissimilar plug-in units carries out, and all independent with browser process, in the browser execution process, may there be between process the competition that takies to system resource.Therefore, in the present embodiment, also comprise: process communication device 150, the mutual exclusion of communicating by letter by mutual exclusion lock (being not limited to this process communication mode) implementation process between the plug-in unit process of the type of plug-in unit and the browser process in the page.
For effective shared system resource of managing process, the browser of present embodiment also comprises: thread release 160, be suitable for when the browser Shipping Options Page at plug-in unit place in the page is closed, then close the thread of plug-in unit in the described page, and discharge the memory headroom that described thread takies, to redistribute system resource.
In actual applications, make up a Session MGR class and manage above-mentioned process, the inquiry of thread, the process that creates and discharge, such data structure as shown in Figure 3, the large virtual memory of a slice (the share memory database) progress information that maintains each plug-in unit classification wherein can be produced and manage to Session MGR class, in Fig. 3, object data structural representation of each plug-in unit classification for such wherein has CLSID(plug-in unit category IDs), the proc_count(number of processes), currentprocID(current process ID), Proc[] (progress information array).
This Proc[] array includes following information: the procID(process ID), the Prio(process priority, when not creating for creating the priority of this process), the quota quantities of Quota(process), plug-in unit category IDs corresponding to this process of clsid(), the number of threads in the threadcount(process), Tids[] (thread in the above-mentioned process (also can be id number of Shipping Options Page, because the array of the information corresponding Shipping Options Page of thread), the information of wherein preserving thread).Wherein, process threshold value, thread threshold value can be set by global variable, as: the thread Threshold is 10.
Fig. 4 is the instance graph of opening three Shipping Options Pages in the browser and loading Flash, BD Player and Qvod plug-in unit.When opening each Shipping Options Page, by interception CoGetClassObject function, thereby hook lives plug-in unit in the Shipping Options Page, obtains the clsid of plug-in unit in this page.Just create different plug-in unit processes and thread wherein by above-mentioned Session MGR according to different clsid after obtaining the clsid of plug-in unit.In Fig. 4, browser has loaded the plug-in unit of 3 types altogether, is respectively Fla sh, BD Player and Qvod plug-in unit.When opening the T1 Shipping Options Page, load Flash, BD Player plug-in unit, Session MGR creates respectively Flash process 1 and BD Player process 1 according to its different clsid, and create therein respectively corresponding thread, by the data structure among Fig. 3 corresponding information is set afterwards, as the number of threads that arranges in the process is 1.Be convenient to search thread corresponding to plug-in object all in this Shipping Options Page when closing Shipping Options Page, when creating thread at Tids[] in Shipping Options Page ID under the corresponding plug-in unit of the corresponding Shipping Options Page ID(of this thread is set) information Shipping Options Page ID under this thread is set, Fla sh thread T1 and BD Player thread T1 belong to Shipping Options Page T1 as can be seen from Figure.
When opening Shipping Options Page T2, load Flash, Qvod plug-in unit, Session MGR inquires about the current Flash process 1 that created, and Thread Count wherein is 1, do not surpass thread threshold value 10, the direct thread of the corresponding Flash plug-in object of establishing label page or leaf T2 in the Flash process 1 that has created then, and the corresponding Shipping Options Page of this thread is set is T2.Distinguish corresponding label page or leaf T1 and T2 such as two Flash threads in the Flash process 1 among Fig. 4.When loading the Qvod plug-in unit, Session MGR inquire about the current process that does not create such plug-in unit, so creates Qvod process 1, and creates therein the Qvod thread, and the corresponding Shipping Options Page of this Qvod thread is set is T2.
Process and the said process of opening Shipping Options Page T3 are similar, repeat no more herein.Wherein, when the quota that surpasses 10 and this process when the number of threads in the process for example surpasses 1G, can automatically generate the thread that a new process is moved the type plug-in unit, such as Flash process 1 thread above 10, when reloading the Flash plug-in unit, then create Flash process 2, and create therein corresponding Flash thread.
The browser of present embodiment is by obtaining the clsid of plug-in unit to be loaded; and be that dissimilar plug-in units creates the plug-in unit process that is independent of browser process; dissimilar webpage connectors is operated in respectively in the different processes; solved thus because tab (or Shipping Options Page) collapse that the plug-in unit collapse causes or even the problem of whole browser collapse, obtained the beneficial effect that makes browser execution more stable.
The present invention also provides a kind of partition method of webpage connector, and its flow process comprises as shown in Figure 3:
Step S510 obtains the type of plug-in unit in the page to be loaded in the page loading procedure.If there is plug-in unit (being plug-in unit in the webpage) in the webpage to be loaded, can be with different type I D in the web page element that then the webpage source code is corresponding, be that CLSID distinguishes plug-in unit in the dissimilar webpages, therefore, by unique ID of plug-in unit in the analyzing web page element, thereby obtain the type of plug-in unit in the page to be loaded.
For example need to load flash object object, following webpage example source code:
<object?classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"width="360"height="210">。
Be easy to parse the type of plug-in object by identidication key cl s id during parsing, adopt the plug-in unit of which kind of classification to load this plug-in object thereby make browser be easy to judge.
After getting access to clsid, the plug-in unit process (such as above-mentioned flash process) of plug-in unit in the browser meeting Web page loading, further, by interception CoGetClassObject function, thereby hook lives plug-in unit in the invoked webpage to be loaded, obtains the clsid of plug-in unit in the invoked page to be loaded.By hook behind clsid, but the just plug-in unit process of plug-in unit in the Web page loading.
Step S520 is for plug-in unit establishment one in the page of same type is independent of the plug-in unit process of browser process.Namely in order to avoid because the tab (or Shipping Options Page) that plug-in unit collapse causes collapse or even the problem of whole browser collapse; for dissimilar plug-in units creates different processes; and all be independent of browser process, as: the CLSID according to Flash, baidu player, Qvod plug-in unit creates different processes.
This step S520 specifically comprises:
The process list of query procedure manager judges whether the process of plug-in unit corresponding types in the current page to be loaded creates.Because a browser can have a plurality of Shipping Options Pages, the plug-in object of loading may be arranged in each Shipping Options Page, and type may be identical, therefore, after in the Shipping Options Page opened plug-in unit process corresponding to plug-in object to be loaded may be created.
If create, or the plug-in unit process center line number of passes that has created reaches the thread threshold value or current EMS memory occupation reaches predetermined quota, then for plug-in unit in the page of the type creates new plug-in unit process, and the progress information of the type of plug-in unit is tabulated in the renewal page.Wherein, the progress information tabulation comprises: the information such as the type of plug-in unit, thread threshold value (being the maximum thread amount that comprises in the process), thread information list in the page under the new plug-in unit process.Wherein, the thread information list comprises the information such as current existing Thread Count and the corresponding Shipping Options Page of thread in the process.
Further, when creating the plug-in unit process, according to the type of the page to be loaded the process priority of dissimilar plug-in units in this page is set, and creates successively the plug-in unit process of plug-in unit in the respective page by described process priority.For example for the demonstration of the video in the video webpage, just need be somebody's turn to do the height established for the priority of the process of flash plug-in unit foundation a bit.This process priority also can be adjusted according to type and the URL of current page, thereby supports efficiently the plug-in unit in the page to show, preferential process and the thread that generates correspondence.Here process priority also represents to create the establishment priority sequentially of certain type plug-in simultaneously, wherein, the page for certain type, the relation that dissimilar plug-in units is wherein created the priority of processes can be stored in by the form of configuration file in the corresponding document of browser, reading first this configuration file during the establishment process, is that dissimilar plug-in units creates the plug-in unit process by the order of the formulation in this configuration file.
The concrete steps that create the plug-in unit process are as follows:
Generate a new plug-in unit process with unique process ID, and distribute the memory headroom of predetermined quota for it.
Type, thread threshold value, the thread information list of plug-in unit in the affiliated page of new plug-in unit process are set.
This memory headroom is the virtual memory space, and size is generally 1GB, and the thread threshold value is 10, and namely plug-in unit process comprises the thread of 10 the type plug-in units, and memory headroom size and thread threshold value can be set according to actual conditions.
Step S530, this independently create for plug-in unit in the page of each same type in the plug-in unit process thread with the operation page in plug-in unit.The list item of the corresponding Shipping Options Page of thread when creating thread in above-mentioned thread information list arranges the Shipping Options Page ID under plug-in object corresponding to this thread, in order to be convenient to search thread corresponding to plug-in object all in this Shipping Options Page when closing Shipping Options Page, and these these threads are closed, discharge the system resource of the shared process of thread.
In the present embodiment, establishment for process, acquiescence can create 256 processes the largelyst, opens simultaneously concomitantly 256 processes and seldom occur in browser, also satisfies actual conditions on the present system hardware so 256 these upper limits satisfy the use of browser.Therefore, before the establishment process, judge with browser process independently in the page process number of the type of plug-in unit whether arrive process threshold value (namely 256), if reach, then be that plug-in unit creates new plug-in unit process in the page of the type.
Because it is separate that the plug-in unit of dissimilar plug-in units carries out, and all independent with browser process, in the browser execution process, may there be between process the competition that takies to system resource.Therefore, in the present embodiment, the mutual exclusion of communicating by letter by the mutual exclusion lock implementation process between the plug-in unit process of the type of plug-in unit and the browser process in the page.
For effective shared system resource of managing process, when the browser Shipping Options Page at plug-in unit place in the page is closed, then close the thread of plug-in unit in the page, and discharge the memory headroom that described thread takies, to redistribute system resource.
Intrinsic not relevant with any certain computer, virtual system or miscellaneous equipment with demonstration at this algorithm that provides.Various general-purpose systems also can be with using based on the teaching at this.According to top description, it is apparent constructing the desired structure of this type systematic.In addition, the present invention is not also for any certain programmed language.Should be understood that and to utilize various programming languages to realize content of the present invention described here, and the top description that language-specific is done is in order to disclose preferred forms of the present invention.
In the instructions that provides herein, a large amount of details have been described.Yet, can understand, embodiments of the invention can be put into practice in the situation of these details not having.In some instances, be not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, be to be understood that, in order to simplify the disclosure and to help to understand one or more in each inventive aspect, in the description to exemplary embodiment of the present invention, each feature of the present invention is grouped together in single embodiment, figure or the description to it sometimes in the above.Yet the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires the more feature of feature clearly put down in writing than institute in each claim.Or rather, as following claims reflected, inventive aspect was to be less than all features of the disclosed single embodiment in front.Therefore, follow claims of embodiment and incorporate clearly thus this embodiment into, wherein each claim itself is as independent embodiment of the present invention.
Those skilled in the art are appreciated that and can adaptively change and they are arranged in one or more equipment different from this embodiment the module in the equipment among the embodiment.Can be combined into a module or unit or assembly to the module among the embodiment or unit or assembly, and can be divided into a plurality of submodules or subelement or sub-component to them in addition.In such feature and/or process or unit at least some are mutually repelling, and can adopt any combination to disclosed all features in this instructions (comprising claim, summary and the accompanying drawing followed) and so all processes or the unit of disclosed any method or equipment make up.Unless in addition clearly statement, disclosed each feature can be by providing identical, being equal to or the alternative features of similar purpose replaces in this instructions (comprising claim, summary and the accompanying drawing followed).
In addition, those skilled in the art can understand, although embodiment more described herein comprise some feature rather than further feature included among other embodiment, the combination of the feature of different embodiment means and is within the scope of the present invention and forms different embodiment.For example, in the following claims, the one of any of embodiment required for protection can be used with array mode arbitrarily.
All parts embodiment of the present invention can realize with hardware, perhaps realizes with the software module of moving at one or more processor, and perhaps the combination with them realizes.It will be understood by those of skill in the art that and to use in practice microprocessor or digital signal processor (DSP) to realize according to some or all some or repertoire of parts in the browser of the embodiment of the invention.The present invention can also be embodied as be used to part or all equipment or the device program (for example, computer program and computer program) of carrying out method as described herein.Such realization program of the present invention can be stored on the computer-readable medium, perhaps can have the form of one or more signal.Such signal can be downloaded from internet website and obtain, and perhaps provides at carrier signal, perhaps provides with any other form.
It should be noted above-described embodiment the present invention will be described rather than limit the invention, and those skilled in the art can design alternative embodiment in the situation of the scope that does not break away from claims.In the claims, any reference symbol between bracket should be configured to limitations on claims.Word " comprises " not to be got rid of existence and is not listed in element or step in the claim.Being positioned at word " " before the element or " one " does not get rid of and has a plurality of such elements.The present invention can realize by means of the hardware that includes some different elements and by means of the computing machine of suitably programming.In having enumerated the unit claim of some devices, several in these devices can be to come imbody by same hardware branch.The use of word first, second and C grade does not represent any order.Can be title with these word explanations.

Claims (18)

1. browser that plug-in unit in the webpage is isolated comprises:
The package types getter is suitable for obtaining the type of plug-in unit in the page to be loaded in the page loading procedure;
Plug-in unit process creation device is suitable for plug-in unit in the page of same type and creates a plug-in unit process that is independent of browser process;
Plug-in unit thread creation device is suitable for independently creating a thread to move plug-in unit in the described page for plug-in unit in the page of each same type in the plug-in unit process at this.
2. the browser that plug-in unit in the webpage is isolated as claimed in claim 1 is characterized in that, described package types getter comprises:
Type I D resolver is suitable for resolving in the page to be loaded corresponding web page element, therefrom parses unique ID of plug-in unit in the described page to be loaded of sign, thereby obtains the type of plug-in unit in the page to be loaded.
3. the browser that plug-in unit in the webpage is isolated as claimed in claim 2 is characterized in that, described package types getter further comprises:
Type I D blocker is suitable for tackling the CoGetClassObject function, obtains unique ID of plug-in unit in the invoked described page to be loaded.
4. the browser that plug-in unit in the webpage is isolated as claimed in claim 1 is characterized in that, described plug-in unit process creation device further comprises:
The process requestor, whether the plug-in unit process that is suitable for inquiring about the type of plug-in unit in the described page creates;
The process creation device, be suitable for not creating the plug-in unit process, or the plug-in unit process center line number of passes that has created to reach when thread threshold value or current EMS memory occupation reach predetermined quota be that plug-in unit creates new plug-in unit process in the described page of the type, and upgrade the progress information tabulation of the type of plug-in unit in the described page.
5. the browser that plug-in unit in the webpage is isolated as claimed in claim 4, it is characterized in that, described process creation device is further adapted for the process priority that dissimilar plug-in units in this page are set according to the type of the page to be loaded, creates successively the plug-in unit process of plug-in unit in the respective page by described process priority.
6. the browser that plug-in unit in the webpage is isolated as claimed in claim 4 is characterized in that, described process creation device further comprises:
New process maker is suitable for generating a new plug-in unit process with unique process ID, and distributes the memory headroom of described predetermined quota for it;
New process configuration device is suitable for arranging type, thread threshold value, the thread information list of plug-in unit in the page under the described new plug-in unit process.
7. the browser that plug-in unit in the webpage is isolated as claimed in claim 4 is characterized in that, described browser also comprises:
The process determining device, be suitable for judging with described browser process independently in the page process number of the type of plug-in unit whether arrive the process threshold value, if do not reach, then create new plug-in unit process for plug-in unit in the described page of the type.
8. such as each described browser that plug-in unit in the webpage is isolated in the claim 1 ~ 7, it is characterized in that described browser also comprises:
The process communication device is suitable for the mutual exclusion of communicating by letter by the mutual exclusion lock implementation process between plug-in unit process and the browser process of type of plug-in unit in the described page.
9. such as each described browser that plug-in unit in the webpage is isolated in the claim 1 ~ 7, it is characterized in that described browser also comprises:
The thread release is suitable for then cutting out the thread of plug-in unit in the described page, and discharging the memory headroom that described thread takies when the browser Shipping Options Page at plug-in unit place in the described page is closed.
10. the partition method of a webpage connector comprises step:
Obtain the type of plug-in unit in the page to be loaded in the page loading procedure;
For plug-in unit establishment one in the page of same type is independent of the plug-in unit process of browser process;
Independently create a thread to move plug-in unit in the described page for plug-in unit in the page of each same type in the plug-in unit process at this.
11. the partition method of webpage connector as claimed in claim 10 is characterized in that, the described step of obtaining the type of plug-in unit in the page to be loaded in the page loading procedure comprises:
Resolve in the page to be loaded corresponding web page element, therefrom parse unique I D of plug-in unit in the described page to be loaded of sign, thereby obtain the type of plug-in unit in the page to be loaded.
12. the partition method of webpage connector as claimed in claim 11 is characterized in that, further comprises:
Interception CoGetClassObject function obtains unique ID of plug-in unit in the invoked described page to be loaded.
13. the partition method of webpage connector as claimed in claim 10 is characterized in that, described is that the plug-in unit establishment one plug-in unit process that is independent of browser process comprises in the page of same type:
Whether the plug-in unit process of inquiring about the type of plug-in unit in the described page creates;
If create, or the plug-in unit process center line number of passes that has created reaches the thread threshold value or current EMS memory occupation reaches predetermined quota, then be that plug-in unit creates new plug-in unit process in the described page of the type, and upgrade the progress information tabulation of the type of plug-in unit in the described page.
14. the partition method of webpage connector as claimed in claim 13 is characterized in that, the described step that creates new plug-in unit process for plug-in unit in the described page of the type comprises:
The process priority of dissimilar plug-in units in this page is set according to the type of the page to be loaded;
Create successively the plug-in unit process of plug-in unit in the respective page by described process priority.
15. the partition method of webpage connector as claimed in claim 13 is characterized in that, the described step that creates new plug-in unit process for plug-in unit in the described page of the type further comprises:
Generate a new plug-in unit process with unique process ID, and distribute the memory headroom of described predetermined quota for it;
Type, thread threshold value, the thread information list of plug-in unit in the affiliated page of described new plug-in unit process are set.
16. the partition method of webpage connector as claimed in claim 13 is characterized in that, also comprises before the described step that creates new plug-in unit process for plug-in unit in the described page of the type:
Judge with described browser process mutually independently in the page number of the process of the type of plug-in unit whether arrive the process threshold value, if do not reach, then be that plug-in unit creates new plug-in unit process in the described page of the type.
17. the partition method such as each described webpage connector in the claim 10 ~ 16 is characterized in that, the mutual exclusion of communicating by letter by the mutual exclusion lock implementation process between the plug-in unit process of the type of plug-in unit and the browser process in the described page.
18. the partition method such as each described webpage connector in the claim 10 ~ 16 is characterized in that, further comprises:
When the browser Shipping Options Page at plug-in unit place in the described page is closed, then close the thread of plug-in unit in the described page, and discharge the memory headroom that described thread takies.
CN2012105376036A 2012-12-12 2012-12-12 Browser capable of isolating plug-in in webpage and webpage plug-in isolating method Pending CN103034495A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012105376036A CN103034495A (en) 2012-12-12 2012-12-12 Browser capable of isolating plug-in in webpage and webpage plug-in isolating method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012105376036A CN103034495A (en) 2012-12-12 2012-12-12 Browser capable of isolating plug-in in webpage and webpage plug-in isolating method

Publications (1)

Publication Number Publication Date
CN103034495A true CN103034495A (en) 2013-04-10

Family

ID=48021421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012105376036A Pending CN103034495A (en) 2012-12-12 2012-12-12 Browser capable of isolating plug-in in webpage and webpage plug-in isolating method

Country Status (1)

Country Link
CN (1) CN103034495A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102982169A (en) * 2012-12-12 2013-03-20 北京奇虎科技有限公司 Browser and method for isolating webpage plugins
CN105718322A (en) * 2014-11-30 2016-06-29 中国科学院沈阳自动化研究所 Exception handling method for multi-application module client in same process
CN105791998A (en) * 2016-02-25 2016-07-20 四川长虹电器股份有限公司 Method and system for coexistence of DVB application and browser application
CN106453509A (en) * 2013-10-22 2017-02-22 北京奇虎科技有限公司 Method and system for processing abnormal closure of browser, browser and server
CN108009429A (en) * 2017-12-11 2018-05-08 北京奇虎科技有限公司 A kind of patch function generation method and device
CN111427548A (en) * 2020-03-18 2020-07-17 成都中科合迅科技有限公司 Plug-in development method and system based on process
CN113204385A (en) * 2021-05-17 2021-08-03 南京统信软件技术有限公司 Plug-in loading method and device, computing equipment and readable storage medium
CN114047978A (en) * 2021-11-23 2022-02-15 国投信开水环境投资有限公司 Control method and device for automatic control system plug-in and computer equipment
WO2022100141A1 (en) * 2020-11-11 2022-05-19 华为技术有限公司 Plug-in management method, system and apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090288098A1 (en) * 2008-05-13 2009-11-19 Google Inc. Separate Plug-In Processes In Browsers and Applications Thereof
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control
CN102436507A (en) * 2011-12-28 2012-05-02 奇智软件(北京)有限公司 Method and device for browsing web pages
CN102622439A (en) * 2012-03-06 2012-08-01 奇智软件(北京)有限公司 Method and device for displaying document in browser
CN102681891A (en) * 2012-05-04 2012-09-19 奇智软件(北京)有限公司 Process control method and device for browser input control
US20120284630A1 (en) * 2011-05-02 2012-11-08 Frank May Window Proxy
CN102982169A (en) * 2012-12-12 2013-03-20 北京奇虎科技有限公司 Browser and method for isolating webpage plugins

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090288098A1 (en) * 2008-05-13 2009-11-19 Google Inc. Separate Plug-In Processes In Browsers and Applications Thereof
US20120284630A1 (en) * 2011-05-02 2012-11-08 Frank May Window Proxy
CN102314510A (en) * 2011-09-15 2012-01-11 奇智软件(北京)有限公司 Method and system for executing browser control
CN102436507A (en) * 2011-12-28 2012-05-02 奇智软件(北京)有限公司 Method and device for browsing web pages
CN102622439A (en) * 2012-03-06 2012-08-01 奇智软件(北京)有限公司 Method and device for displaying document in browser
CN102681891A (en) * 2012-05-04 2012-09-19 奇智软件(北京)有限公司 Process control method and device for browser input control
CN102982169A (en) * 2012-12-12 2013-03-20 北京奇虎科技有限公司 Browser and method for isolating webpage plugins

Non-Patent Citations (9)

* Cited by examiner, † Cited by third party
Title
BING: "bing快照", 《BING》 *
CHROMIUM: "Multi-process Architecture", 《BLOG.CHROMIUM.ORG/2008/09/MULTI-PROCESS-ARCHITECTURE.HTML》 *
ITHZHANG: "为什么浏览器会使用多进程架构", 《HTTP://BLOG.CSDN.NET/ITHZHANG/ARTICLE/DETAILS/7917754》, 28 August 2012 (2012-08-28) *
KLARCLM: "理解WebKit和Chromium:插件机制(NPAPI Plugin)", 《HTTP://WWW.ITKEYWORD.COM/DOC/9634699835714291915》 *
MILADO_NJU: "理解WebKit和Chromium:插件机制(NPAPI Plugin)", 《HTTP://WWW.LAI18.COM/CONTENT/491017.HTML》 *
YONGSHENG: "理解WebKit和Chromium:插件机制(NPAPI Plugin)", 《HTTP://BLOG.CSDN.NET/MILADO_NJU/ARTICLE/DETAILS/7216145》 *
任熏儿: "为什么浏览器会使用多进程架构", 《HTTP://WWW.DOCIN.COM/P-549454631.HTML》 *
推酷: "为什么浏览器会使用多进程架构", 《HTTP://WWW.TUICOOL.COM/ARTICLES/AVM6Z3》 *
爱程序网: "理解WebKit和Chromium:插件机制(NPAPI Plugin)", 《HTTP://WWW.AICHENGXU.COM/WEB/491017.HTM》 *

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102982169B (en) * 2012-12-12 2017-05-24 北京奇虎科技有限公司 Browser and method for isolating webpage plugins
CN102982169A (en) * 2012-12-12 2013-03-20 北京奇虎科技有限公司 Browser and method for isolating webpage plugins
CN106453509B (en) * 2013-10-22 2019-06-04 北京奇虎科技有限公司 Processing method that browser is closed extremely, system, browser and server
CN106453509A (en) * 2013-10-22 2017-02-22 北京奇虎科技有限公司 Method and system for processing abnormal closure of browser, browser and server
CN105718322B (en) * 2014-11-30 2018-10-23 中国科学院沈阳自动化研究所 The abnormality eliminating method of more application module clients under same process
CN105718322A (en) * 2014-11-30 2016-06-29 中国科学院沈阳自动化研究所 Exception handling method for multi-application module client in same process
CN105791998A (en) * 2016-02-25 2016-07-20 四川长虹电器股份有限公司 Method and system for coexistence of DVB application and browser application
CN108009429A (en) * 2017-12-11 2018-05-08 北京奇虎科技有限公司 A kind of patch function generation method and device
CN108009429B (en) * 2017-12-11 2021-09-03 北京奇虎科技有限公司 Patch function generation method and device
CN111427548A (en) * 2020-03-18 2020-07-17 成都中科合迅科技有限公司 Plug-in development method and system based on process
WO2022100141A1 (en) * 2020-11-11 2022-05-19 华为技术有限公司 Plug-in management method, system and apparatus
CN113204385A (en) * 2021-05-17 2021-08-03 南京统信软件技术有限公司 Plug-in loading method and device, computing equipment and readable storage medium
CN114047978A (en) * 2021-11-23 2022-02-15 国投信开水环境投资有限公司 Control method and device for automatic control system plug-in and computer equipment

Similar Documents

Publication Publication Date Title
CN102982169A (en) Browser and method for isolating webpage plugins
CN103034495A (en) Browser capable of isolating plug-in in webpage and webpage plug-in isolating method
WO2016155388A1 (en) Method and device for installing and running application
US7849437B2 (en) Object oriented web application framework
EP2916243B1 (en) Method, apparatus, server and system for implementing web application
US7937670B2 (en) Data sharing system, method and software tool
US9201665B2 (en) Outputting presentation code updated for a particular user in response to receiving a page identifier
CN102890724B (en) webpage loading method and device
US20130066947A1 (en) System and Method for Managing Applications for Multiple Computing Endpoints and Multiple Endpoint Types
CN103034517A (en) Method and device for loading browser control tool
CN104036011A (en) Webpage element display method and browser device.
US8893097B2 (en) Tool configured to build cross-browser toolbar
CN103631664A (en) Inter-process communication method and device
CN103577227A (en) Method for loading plug-ins, browser and server
CN106933629B (en) Method for loading browser plug-in icon and browser
CN103034518A (en) Method and browser for loading browser control tool
CN103677823A (en) Method and device for managing browser plug-ins
CN104036019A (en) Method and device for opening webpage links
CN104111847A (en) Method and device for improving running speed of games
CN103177115A (en) Method and device of extracting page link of webpage
KR101340588B1 (en) Method and apparatus for comprising webpage
CN105683957A (en) Style sheet speculative preloading
US11930096B2 (en) Systems and methods for rendering interactive web pages
CN103440453A (en) Method for detecting operation environment of browser, client, server and system
CN102902784A (en) Web page classification storage system and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130410