CN103019867B - Script execution between process, system and browser - Google Patents
Script execution between process, system and browser Download PDFInfo
- Publication number
- CN103019867B CN103019867B CN201210572598.2A CN201210572598A CN103019867B CN 103019867 B CN103019867 B CN 103019867B CN 201210572598 A CN201210572598 A CN 201210572598A CN 103019867 B CN103019867 B CN 103019867B
- Authority
- CN
- China
- Prior art keywords
- behalf
- moving object
- script
- acting
- page
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 312
- 230000008569 process Effects 0.000 title claims abstract description 227
- 238000004891 communication Methods 0.000 claims abstract description 58
- 230000000903 blocking effect Effects 0.000 claims description 8
- 230000005540 biological transmission Effects 0.000 claims description 7
- 230000006870 function Effects 0.000 description 21
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 6
- 241000700605 Viruses Species 0.000 description 4
- 230000004913 activation Effects 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000002955 isolation Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 230000009897 systematic effect Effects 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
The present invention discloses the script execution between a kind of process, system and browser. Wherein method comprises: script is sent to by communication window and described acts on behalf of object by described moving object; Described object of acting on behalf of is inquired about in described page process and is performed relevant interface with script, obtains script execution according to this interface; Described object of acting on behalf of performs described script according to described script execution. Present invention achieves the execution of script between different process.
Description
Technical field
The present invention relates to technical field of the computer network, script execution, system and the browser being specifically related between a kind of process.
Background technology
IPC (Inter-ProcessCommunication communicates between process) refers to some technology or method of transmitting data or signal between at least two processes or thread. Process is the least unit of computer system distribution resource. The system resource that each process has the part of oneself independent is isolation each other. In order to the mutual access resources of different processes can be made and carries out co-ordination, communicate between process just had. Different processes be may operate on same computer or on the different computers that connected by network.
In general, need in a case where to communicate between implementation process:
(1) transfer a: process needs its data are sent to another process, and the data volume of transmission is between a byte to a few megabyte.
(2) data are shared: multiple process is wanted to operate shared data, and a process is to the amendment of shared data, and other process should be seen at once.
(3) notification event a: process needs to send message to another or one group of process, notifies that its (they) there occurs certain event (as notified father's process during procedure termination).
(4) resource sharing: share same resource between multiple process. In order to accomplish this point, it is necessary to kernel provides lock and synchronous mechanism.
(5) Process flowchart: some process wishes to control completely the execution (such as Debug process) of another process, this control process wishes that can tackle all of another process is absorbed in and exception, and the state that can know it in time changes.
But, prior art does not also provide about the scheme that script between process performs, and utilizes the existing method can't the mutual execution of script between implementation process.
Summary of the invention
In view of the above problems, it is proposed that the present invention is to provide a kind of script execution between script execution system, browser and corresponding process overcome between the problems referred to above or the process that solves the problem at least in part.
According to an aspect of the present invention, provide the script execution between a kind of process, the method is applicable to by the script acting on behalf of the moving object that object execution runs in detached process running in page process, described object of acting on behalf of is communicated by the communication window set up in advance with moving object, and described method comprises: script is sent to by communication window and described acts on behalf of object by described moving object; Described object of acting on behalf of is inquired about in described page process and is performed relevant interface with script, obtains script execution according to this interface; Described object of acting on behalf of performs described script according to described script execution.
According to an aspect of the present invention, providing the script execution system between a kind of process, described system comprises: runs the moving object acted on behalf of object, run in detached process in page process and acts on behalf of in object and moving object create one to communication window described respectively; This system is applicable to by the script acting on behalf of object executed activity object, and communication window is communicated by described one by described object of acting on behalf of with moving object; Described moving object comprises: sending module, is suitable for being sent to by script by communication window described acting on behalf of object; Described object of acting on behalf of comprises: inquiry module, is suitable for inquiring about in described page process performing relevant interface with script, obtains script execution according to this interface; Execution module, is suitable for performing described script according to described script execution.
According to an aspect of the present invention, it provides a kind of browser, comprises the script execution system between above-mentioned process.
According to a further aspect in the invention, provide the script execution between another kind of process, the method is applicable to perform to run the script acting on behalf of object in page process by the moving object running in detached process, described object of acting on behalf of is communicated by the communication window set up in advance with moving object, and described method comprises: script is sent to described moving object by communication window by described object of acting on behalf of; Described object of acting on behalf of, by calling the dispatch interface of described moving object, obtains the scheduling identification of pending method in described script; Described object of acting on behalf of tackles the instruction performing pending method in described script in page process, and described instruction is sent to described moving object; Described moving object, by performing described instruction, performs pending method in described script, then execution result is returned to and act on behalf of object.
According to a further aspect in the invention, providing the script execution system between another kind of process, described system comprises: runs the moving object acted on behalf of object, run in detached process in page process and acts on behalf of in object and moving object create one to communication window described respectively; This system is applicable to perform the script in page process by moving object, and communication window is communicated described moving object by object by described one with acting on behalf of; Described object of acting on behalf of comprises: sending module, is suitable for, by communication window, script is sent to described moving object; Scheduling identification acquisition module, is suitable for the dispatch interface by calling described moving object, obtains the scheduling identification of pending method in described script; Blocking module, is suitable for tackling the instruction performing pending method in described script in page process, described instruction is sent to described moving object; Described moving object comprises: receiver module, is suitable for receiving the described script of the sending module transmission acting on behalf of in object and the instruction of blocking module transmission; Execution module, is suitable for performing pending method in described script by performing described instruction, then execution result is returned to and act on behalf of object.
According to another aspect of the present invention, it provides another kind of browser, the script execution system between above-mentioned another kind of process is comprised.
The scheme provided according to an aspect of the present invention, after script is sent to and to act on behalf of object by moving object, act on behalf of in object query page process and perform relevant interface with script, the method of script execution is obtained according to this interface, and then according to the script that sends over of method executed activity object that script performs, thus achieve the execution of script between different process, and achieve the moving object running in detached process to the control of the page run in page process.
The scheme provided according to another aspect of the present invention, after acting on behalf of object and script is sent to moving object, the dispatch interface of proxy object invocation moving object obtains the scheduling identification of pending method in script; Acting on behalf of after scheduling identification feeds back to the page by object, act on behalf of the instruction that object interception page process performs pending method in script, instruction is sent to moving object, this instruction is performed by moving object, and the execution result obtained after execution instruction is returned to and acts on behalf of object, thus achieve the execution of script between different process, and achieve the page run in page process to the control of the moving object running in detached process.
Above-mentioned explanation is only the general introduction of technical solution of the present invention, in order to the technique means of the present invention can be better understood, and can be implemented according to the content of specification sheets, and in order to 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.
Accompanying drawing explanation
By reading hereafter detailed description of the preferred embodiment, various other advantage and benefit will become clear for those of ordinary skill in the art and understand. Accompanying drawing is only for illustrating the object of preferred implementation, 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 schematic diagram that the establishment process of object and Flash plug-in unit moving object acted on behalf of by Flash plug-in unit in the present invention;
Fig. 2 shows the schema of script execution between process according to an embodiment of the invention;
Fig. 3 shows the schema of script execution between process in accordance with another embodiment of the present invention;
Fig. 4 shows the structure block diagram of script execution system between process according to an embodiment of the invention;
Fig. 5 shows the structure block diagram of script execution system between process in accordance with another embodiment of the present invention.
Embodiment
Exemplary embodiment of the present disclosure is described below with reference to accompanying drawings more in detail. Although show exemplary embodiment of the present disclosure in accompanying drawing, it should be understood, however, that the embodiment that can realize the disclosure in a variety of manners and should do not set forth here limits. On the contrary, it is provided that these embodiments are to can more thoroughly understand the disclosure, and can pass on complete for the scope of the present disclosure to the technician of this area.
Script execution between process provided by the invention refers to the script execution between page process and detached process. Wherein page process runs the process of Web page, and detached process is another process independent of page process. When the page has ActiveX plug-in unit, page process is run ActiveX plug-in unit and is acted on behalf of object, and detached process runs ActiveX plug-in unit moving object, and this ActiveX plug-in unit moving object is the object of real ActiveX plug-in unit. In the examples below, for ActiveX plug-in unit as Flash plug-in unit is described, but the present invention is not limited only to this.
Before the script execution introduced between page process and detached process, first introduce Flash plug-in unit and act on behalf of object and the establishment process of Flash plug-in unit moving object. Fig. 1 shows the schematic diagram that the establishment process of object and Flash plug-in unit moving object acted on behalf of by Flash plug-in unit in the present invention. As shown in Figure 1, running and have Web page and Flash plug-in unit to act on behalf of object in page process, running in detached process is the free page and Flash plug-in unit moving object.
Wherein, run the agency of the Flash in page process to the process liking the page process creation Flash moving object by tackling browser, replace the actual Flash moving object to be created and create. Specifically, the page has Flash, when browser creates Flash plug-in unit, can according to Flash plug-in unit CLSID (class mark, obtain by CLSIDFromProID) or ProgID (the character string identification symbol of assembly) inquiry registration table, checking whether system has installed this Flash plug-in unit, if installing, continuing establishment process. When page process continues to create Flash plug-in unit, interception CoGetClassObject, creates Flash plug-in unit and acts on behalf of object, and this Flash plug-in unit is acted on behalf of object and comprised a series of interface, comprise a lot of standard interfaces that IUnknown pointer will call, such as IOleObject, IViewObject etc. Then, when calling the CreateInstance of IClassFactory, the Flash plug-in unit created is acted on behalf of the IUnknown pointer that object returns to page process. Thus Flash plug-in unit is acted on behalf of Object Creation and is completed.
The Flash plug-in unit moving object run in detached process is when object acted on behalf of by page process activation Flash plug-in unit, creates in the detached process independent of page process. Specifically, page process activate Flash plug-in unit act on behalf of object time, extract the relevant informations such as the attribute of this Flash plug-in unit, URL, size, then create a detached process. First, create a file (document), i.e. the empty page, insert an object (object) wherein, this detached process calls CoGetClassObject, tackles this CoGetClassObject, creates a Flash plug-in unit moving object. This Flash plug-in unit moving object comprises a series of interfaces, comprises a lot of standard interfaces that IUnknown pointer will call, such as IOleObject, IViewObject etc. Then, when calling the CreateInstance of IClassFactory, the Flash plug-in unit moving object created is returned to the IUnknown pointer of detached process. Thus Flash plug-in unit moving object has created.
Then, in Flash plug-in unit acts on behalf of object and Flash plug-in unit moving object, create the communication window associated with plug-in object respectively, act on behalf of object for making Flash plug-in unit and communicate with Flash plug-in unit moving object. By these two communication windows, two objects can carry out for the size of Flash, focus, refreshing, script and out of Memory alternately.
Further, if there being nesting structure in Web page, namely page process is run multiple father's page and multiple subpage face. Whenever page process creation page and when acting on behalf of object, the object ID (also can comprise its URL) that acts on behalf of of the father's page acting on behalf of object ID (also can comprise its URL) and this subpage face in subpage face is sent to detached process, according to the hierarchical structure activity of constructing object of correspondence in detached process. In this case, the object of acting on behalf of run in page process is multiple, it is multiple for running the moving object in detached process, act on behalf of object and moving object one_to_one corresponding, each communication window acting on behalf of object and the communication window acting on behalf of moving object corresponding to object with this have corresponding attribute, are realized moving object and the communication of acting on behalf of object corresponding with it by these two communication windows.
Fig. 2 shows the schema of script execution 200 between process according to an embodiment of the invention. The method is applicable to act on behalf of, by the Flash plug-in unit run in page process, the script that object performs the Flash plug-in unit moving object running in detached process, and namely the method is the method for the page in the Flash plug-in unit moving object control page process running in detached process. As shown in Figure 2, method 200 starts from step S201, and wherein script is sent to Flash plug-in unit by communication window and acts on behalf of object by Flash plug-in unit moving object. The button created is clicked on Flash with user, triggering page blackening is example, when clicking the button on Flash as user, Flash plug-in unit moving object obtains script corresponding to button click operation, by communication window, this script is sent to Flash plug-in unit and acts on behalf of object.
Subsequently, method 200 enters step S202, and wherein Flash plug-in unit is acted on behalf of in object query page process and performed relevant interface with script, obtains script execution according to this interface. After the script that object receives above-mentioned button click operation correspondence acted on behalf of by Flash plug-in unit, inquiry and the IHTMLWindow interface obtained in page process, IHTMLWindow interface is perform relevant interface with script, ExecScript in this IHTMLWindow interface is the function for performing script, and namely ExecScript function provides script execution.
Subsequently, method 200 enters step S203, and wherein Flash plug-in unit is acted on behalf of object and performed this script according to script execution. Flash plug-in unit is acted on behalf of object and is performed script corresponding to above-mentioned button click operation according to the script execution that ExecScript function provides, and makes page blackening.
According to the script execution between the process that the present embodiment provides, after script is sent to and to act on behalf of object by moving object, act on behalf of in object query page process and perform relevant interface with script, the method of script execution is obtained according to this interface, and then according to the script that sends over of method executed activity object that script performs, thus achieve the execution of script between different process, and achieve the moving object running in detached process to the control of the page run in page process. Further, in the method, object is acted on behalf of by running in page process, and in detached process, running moving object so that real ActiveX plug-in unit is separated with page process, thus can not affect the page process when ActiveX plug-in unit is gone wrong, improve the stability of browser, when the safety issues such as virus especially occur when ActiveX plug-in unit, also page process can not be had an impact, it is to increase the security of browser; Meanwhile, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, it is to increase the stability of plug-in unit.
Fig. 3 shows the schema of script execution 300 between process in accordance with another embodiment of the present invention. The script of object acted on behalf of by the Flash plug-in unit that the method is applicable to perform to run in page process by the Flash plug-in unit moving object running in detached process, and namely the method is the method for Flash plug-in unit moving object in the page control detached process run in page process. If the page wants the information (such as attributes such as version number, path, URL) of acquisition Flash or the page to want to operate Flash (wanting to change the size of Flash window such as the page), can be realized by the method.
As shown in Figure 3, method 300 starts from step S301, and Flash plug-in unit is acted on behalf of object, by communication window, script is sent to Flash plug-in unit moving object. To obtain Flash version number, acting on behalf of object due to the Flash plug-in unit in page process is not real Flash plug-in unit, and it does not also know Flash version number, and thus Flash plug-in unit is acted on behalf of object and can not be fed back Flash version number directly to the page. After detached process has created Flash plug-in unit moving object, the variable of Flash plug-in unit moving object can be notified to the page, page developer writes the script obtaining Flash version number according to this variable in the page, and method pending in this script obtains Flash version number exactly. Flash plug-in unit is acted on behalf of object, by communication window, the script obtaining Flash version number is sent to Flash plug-in unit moving object.
Subsequently, method 300 enters step S302, wherein Flash plug-in unit acts on behalf of object by calling the dispatch interface of Flash plug-in unit moving object, allow Flash plug-in unit moving object perform the method obtaining the scheduling identification of pending method in script, after Flash plug-in unit moving object obtains this scheduling identification, by communication window, scheduling identification is returned to Flash plug-in unit act on behalf of object. Specifically, first page parsing script, the title of method pending in this script is transferred in the IDispatch interface that object acted on behalf of by Flash plug-in unit, IDispatch interface is dispatch interface, for the function called in the language program not supporting empty function table, IDispatch interface has GetIDsOfNames function and Invoke function, the title that wherein GetIDsOfNames function provides Application way returns the method for its dispatch id, and Invoke function provides the instruction of the dispatch id manner of execution of Application way. Owing to the scheduling identification (ID) that object cannot know pending method in script acted on behalf of by Flash plug-in unit, so the IDispatch interface that object calls Flash plug-in unit moving object by communication window acted on behalf of by Flash plug-in unit. And Flash plug-in unit moving object is the object of real Flash plug-in unit, so the method provided by calling the GetIDsOfNames function of Flash plug-in unit moving object, Flash plug-in unit moving object can be allowed to obtain the dispatch id of pending method, and then this dispatch id is returned to Flash plug-in unit by communication window and acts on behalf of object by Flash plug-in unit moving object.
Subsequently, method 300 enters step S303, and wherein the instruction performing pending method in script in object interception page process acted on behalf of by Flash plug-in unit, and this instruction is sent to Flash plug-in unit moving object. Specifically, after the dispatch id that object obtains pending method acted on behalf of by Flash plug-in unit, this dispatch id is fed back to the page, conveniently next step instruction that will perform Invoke (ID) of flow process page process, present method tackles the instruction of the Invoke (ID) of page process here, and the instruction of Invoke (ID) is sent to Flash plug-in unit moving object.
Subsequently, method 300 enters step S304, and wherein Flash plug-in unit moving object is by performing instruction, performs pending method in script, then execution result is returned to Flash plug-in unit and acts on behalf of object. Specifically, Flash plug-in unit moving object performs the instruction of Invoke (ID), thus perform method pending in script, obtain Flash version number, and Flash version number is returned to Flash plug-in unit and acts on behalf of object, then Flash plug-in unit is acted on behalf of object and Flash version number can be fed back to the page.
According to the script execution between the process that the present embodiment provides, after acting on behalf of object and script is sent to moving object, the dispatch interface of proxy object invocation moving object obtains the dispatch id of pending method in script; Acting on behalf of after dispatch id feeds back to the page by object, act on behalf of the instruction that object interception page process performs pending method in script, instruction is sent to moving object, this instruction is performed by moving object, and the execution result obtained after execution instruction is returned to and acts on behalf of object, thus achieve the execution of script between different process, and achieve the page run in page process to the control of the moving object running in detached process. Further, in the method, object is acted on behalf of by running in page process, and in detached process, running moving object so that real ActiveX plug-in unit is separated with page process, thus can not affect the page process when ActiveX plug-in unit is gone wrong, improve the stability of browser, when the safety issues such as virus especially occur when ActiveX plug-in unit, also page process can not be had an impact, it is to increase the security of browser; Meanwhile, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, it is to increase the stability of plug-in unit.
Fig. 4 shows the structure block diagram of script execution system between process according to an embodiment of the invention. As shown in Figure 4, this system comprises: runs the moving object 420 acted on behalf of object 410, run in detached process in page process and is acting on behalf of in object 410 and moving object 420 create one to communication window 430 respectively. This system is applicable to by the script acting on behalf of object 410 executed activity object 420, acts on behalf of object 410 and is communicated by one pair of communication window 430 with moving object 420.
Moving object 420 comprises sending module 421, is suitable for being sent to by script by communication window 430 acting on behalf of object 410. The button created is clicked on Flash with user, triggering page blackening is example, when clicking the button on Flash as user, moving object 420 obtains script corresponding to button click operation, is sent to by communication window 430 by this script by sending module 421 and acts on behalf of object 410.
Act on behalf of object 410 to comprise: inquiry module 411 and execution module 412. Inquiry module 411 is suitable for performing in query page process relevant interface with script, obtains script execution according to this interface; Execution module 412 is suitable for performing script according to script execution. After acting on behalf of object 410 and receiving script corresponding to above-mentioned button click operation, the IHTMLWindow interface in page process is inquired about and obtained to inquiry module 411, IHTMLWindow interface is perform relevant interface with script, ExecScript in this IHTMLWindow interface is the function for performing script, and namely ExecScript function provides script execution. Execution module 412 performs script corresponding to above-mentioned button click operation according to the script execution that ExecScript function provides, and makes page blackening.
The above-mentioned object 410 of acting on behalf of run in page process is the process of page process creation moving object by tackling browser, replaces the actual moving object to be created and creates; The moving object 420 run in detached process is when object 410 is acted on behalf of in the activation of page process, creates in the detached process independent of page process; Moving object 420 with act on behalf of in object 410 create respectively one to communication window 430, for making moving object 420, object 410 communicates with acting on behalf of.
Further, the object of acting on behalf of run in page process is multiple, it is multiple for running the moving object in detached process, act on behalf of object and moving object one_to_one corresponding, the communication window of the communication window and the moving object corresponding with acting on behalf of object of acting on behalf of object has corresponding attribute, one by this communication window is realized moving object and acts on behalf of communicating of object.
According to the script execution system between the process that the present embodiment provides, after script is sent to and to act on behalf of object by moving object, act on behalf of in object query page process and perform relevant interface with script, the method of script execution is obtained according to this interface, and then according to the script that sends over of method executed activity object that script performs, thus achieve the execution of script between different process, and achieve the moving object running in detached process to the control of the page run in page process. Further, in the present system, object is acted on behalf of by running in page process, and in detached process, running moving object so that real ActiveX plug-in unit is separated with page process, thus can not affect the page process when ActiveX plug-in unit is gone wrong, improve the stability of browser, when the safety issues such as virus especially occur when ActiveX plug-in unit, also page process can not be had an impact, it is to increase the security of browser; Meanwhile, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, it is to increase the stability of plug-in unit.
Fig. 5 shows the structure block diagram of script execution system between process in accordance with another embodiment of the present invention. As shown in Figure 5, this system comprises: runs the moving object 520 acted on behalf of object 510, run in detached process in page process and is acting on behalf of in object 510 and moving object 520 create one to communication window 530 respectively. This system is applicable to perform the script in page process by moving object 520, acts on behalf of object 510 and is communicated by one pair of communication window 530 with moving object 520.
Act on behalf of object 510 to comprise: sending module 511, scheduling identification acquisition module 512 and blocking module 513.
Sending module 511 is suitable for, by communication window, script is sent to moving object 520; After detached process has created moving object 520, can to the variable of page informing movement object 520, page developer writes script according to this variable in the page, and script is sent to moving object 520 by communication window 530 by sending module 511.
Scheduling identification acquisition module 512 is suitable for the dispatch interface by calling moving object 520, obtains the scheduling identification of pending method in script. Further, scheduling identification acquisition module 512 comprises calling module 514 and scheduling identification receiver module 515, calling module 514 is suitable for calling the dispatch interface of moving object 520, and the method allowing moving object 520 perform to obtain the scheduling identification of pending method in script obtains scheduling identification; Scheduling identification receiver module 515 is suitable for the scheduling identification that reception moving object 520 is returned by communication window 530. Specifically, first page parsing script, the title of method pending in this script is transferred in the IDispatch interface acting on behalf of object 510, IDispatch interface is dispatch interface, for the function called in the language program not supporting empty function table, IDispatch interface has GetIDsOfNames function and Invoke function, the title that wherein GetIDsOfNames function provides Application way returns the method for its dispatch id, and Invoke function provides the instruction of the dispatch id manner of execution of Application way. The dispatch id of pending method in script cannot be known, so calling module 514 calls the IDispatch interface of moving object 520 by communication window 530 owing to acting on behalf of object 510. And moving object 520 is the object of real plug-in unit, so the method provided by calling the GetIDsOfNames function of moving object 520, moving object 520 can be allowed to obtain the dispatch id of pending method, and then this dispatch id is returned to scheduling identification receiver module 515 by communication window 530 by moving object 520.
Blocking module 513 is suitable for tackling the instruction performing pending method in script in page process, and instruction is sent to moving object 520. After acting on behalf of object 510 and obtain the dispatch id of pending method, this dispatch id is fed back to the page, conveniently next step instruction that will perform Invoke (ID) of flow process page process, here, blocking module 513 tackles the instruction of the Invoke (ID) of page process, and the instruction of Invoke (ID) is sent to moving object 520.
Moving object 520 comprises: receiver module 521 and execution module 522. Receiver module 521 is suitable for the instruction of script and blocking module 513 transmission receiving sending module 511 transmission acted on behalf of in object 510; Execution module 522 is suitable for performing pending method in script by performing instruction, then execution result being returned to and act on behalf of object 510. Execution module 522 performs the instruction of Invoke (ID), thus performs method pending in script, and execution result is returned to and act on behalf of object 510, and then acting on behalf of object 510 can by execution result feedback to the page.
The above-mentioned object 510 of acting on behalf of run in page process is the process of page process creation moving object by tackling browser, replaces the actual moving object to be created and creates; The moving object 520 run in detached process is when object 510 is acted on behalf of in the activation of page process, creates in the detached process independent of page process; Moving object 520 with act on behalf of in object 510 create respectively one to communication window 530, for making moving object 520, object 510 communicates with acting on behalf of.
Further, the object of acting on behalf of run in page process is multiple, it is multiple for running the moving object in detached process, act on behalf of object and moving object one_to_one corresponding, the communication window of the communication window and the moving object corresponding with acting on behalf of object of acting on behalf of object has corresponding attribute, one by this communication window is realized moving object and acts on behalf of communicating of object.
According to the script execution system between the process that the present embodiment provides, after acting on behalf of object and script is sent to moving object, the dispatch interface of proxy object invocation moving object obtains the dispatch id of pending method in script; Acting on behalf of after dispatch id feeds back to the page by object, act on behalf of the instruction that object interception page process performs pending method in script, instruction is sent to moving object, this instruction is performed by moving object, and the execution result obtained after execution instruction is returned to and acts on behalf of object, thus achieve the execution of script between different process, and achieve the page run in page process to the control of the moving object running in detached process. Further, in the present system, object is acted on behalf of by running in page process, and in detached process, running moving object so that real ActiveX plug-in unit is separated with page process, thus can not affect the page process when ActiveX plug-in unit is gone wrong, improve the stability of browser, when the safety issues such as virus especially occur when ActiveX plug-in unit, also page process can not be had an impact, it is to increase the security of browser; Meanwhile, page process goes wrong can not affect the normal operation of ActiveX plug-in unit, it is to increase the stability of plug-in unit.
Present invention also offers a kind of browser, this browser can comprise the script execution system between the arbitrary process described by above-described embodiment.
Intrinsic not relevant to any certain computer, virtual system or other equipment with display at this algorithm provided. Various general-purpose system can also with use based on together with this teaching. According to description above, it is to construct the structure required by this type systematic is apparent. In addition, the present invention is not also for any certain programmed language. It should be appreciated that various programming language can be utilized to realize the content of the present invention described here, and the description done by language-specific above is the preferred forms in order to disclose the present invention.
In specification sheets mentioned herein, describe a large amount of detail. However, it is understood that embodiments of the invention can be put into practice when not having these details. In some instances, it is not shown specifically known method, structure and technology, so that not fuzzy understanding of this description.
Similarly, it is to be understood that, one or more in order to what simplify the disclosure and help to understand in each inventive aspect, above to, in the description of the 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. But, the method for the disclosure should be construed to the following intention of reflection: namely the present invention for required protection requires feature more more than the feature clearly recorded in each claim. More properly saying, as reflected in claim book below, inventive aspect is all features less than disclosed single embodiment above. Therefore, the claim book following embodiment is thus incorporated to this embodiment clearly, and wherein each claim itself is as the independent embodiment of the present invention.
Those skilled in the art it can be appreciated that the module in the equipment in embodiment can be carried out adaptively change and they are arranged in one or more equipment different from this embodiment. Module in embodiment or unit or assembly can be combined into a module or unit or assembly, and multiple submodule block or subelement or subgroup part can be put them in addition. Except at least some in such feature and/or process or unit mutually repels, it is possible to adopt any combination all processes or the unit of all features disclosed in this specification sheets (comprising adjoint claim, summary and accompanying drawing) and so disclosed any method or equipment to be combined. Unless expressly stated otherwise, each feature disclosed in this specification sheets (comprising adjoint claim, summary and accompanying drawing) can by providing alternative features that is identical, equivalent or similar object to replace.
In addition, the technician of this area can understand, although embodiments more described herein comprise in other embodiment some included feature instead of further feature, but the combination of the feature of different embodiment means to be within the scope of the present invention and forms different embodiments. Such as, in the following claims, the one of any of claimed embodiment can use with arbitrary array mode.
Each parts embodiment of the present invention with hardware implementing, or can realize with the software module run on one or more treater, or realizes with their combination. It will be understood by one skilled in the art that and microprocessor or digital signal processor (DSP) can be used in practice to realize the script execution system between process according to embodiments of the present invention and the some or all functions of the some or all parts in browser. Such as, the present invention can also be embodied as part or all the equipment for performing method as described herein or device program (computer program and computer program). The program of such the present invention of realization can store on a computer-readable medium, or can have the form of one or more signal. Such signal can be downloaded from internet website and obtain, or provides on carrier signal, or provides with any other form.
Should it is to be noted that above-described embodiment the present invention will be described instead of limits the invention, and those skilled in the art can design alternative embodiment when not departing from the scope of claims. In the claims, it should not any reference symbol construction between bracket is become limitations on claims. Word " comprises " element or step not getting rid of and exist and do not arrange in the claims. Word "a" or "an" before being positioned at element is not got rid of and be there is multiple such element. The present invention can by means of including the hardware of some different elements and realize by means of the computer suitably programmed. In the unit claim listing some devices, some in these devices can be carry out particular embodiment by same hardware branch. Word first, second and third-class use do not represent any order. Can be title by these word explanations.
Claims (7)
1. script execution between a process, the method is applicable to perform to run the script acting on behalf of object in page process by the moving object running in detached process, described object of acting on behalf of is communicated by the communication window set up in advance with moving object, and described method comprises:
Script is sent to described moving object by communication window by described object of acting on behalf of;
Described object of acting on behalf of is by calling the dispatch interface of described moving object, allowing described moving object perform the method obtaining the scheduling identification of pending method in described script, then described scheduling identification is returned to by communication window and described acts on behalf of object by described moving object;
Described object of acting on behalf of tackles the instruction performing pending method in described script in page process, and described instruction is sent to described moving object;
Described moving object, by performing described instruction, performs pending method in described script, then execution result is returned to and act on behalf of object;
Wherein, described moving object and described object of acting on behalf of carry out for the size of Flash, focus, refreshing or script alternately.
2. method according to claim 1, the described agency run in page process, to the process liking the page process creation moving object by tackling browser, replaces the actual moving object to be created and creates;
The described moving object run in detached process be page process activate described act on behalf of object time, in the detached process independent of browser page process create;
In described moving object, for making moving object, object communicates with acting on behalf of with acting on behalf of the described communication window that creates respectively in object.
3. method according to claim 2, the object of acting on behalf of run in described page process is multiple, it is multiple for running the moving object in described detached process, described act on behalf of object and moving object one_to_one corresponding, described act on behalf of the communication window of object and with the described communication window acting on behalf of moving object corresponding to object, there is corresponding attribute, realize moving object by these two communication windows and act on behalf of communicating of object.
4. a script execution system between process, described system comprises: runs the moving object acted on behalf of object, run in detached process in page process and acts on behalf of in object and moving object create one to communication window described respectively; This system is applicable to perform the script in page process by moving object, and communication window is communicated described moving object by object by described one with acting on behalf of;
Described object of acting on behalf of comprises:
Sending module, is suitable for, by communication window, script is sent to described moving object;
Scheduling identification acquisition module, is suitable for the dispatch interface by calling described moving object, obtains the scheduling identification of pending method in described script;
Blocking module, is suitable for tackling the instruction performing pending method in described script in page process, described instruction is sent to described moving object;
Described moving object comprises:
Receiver module, is suitable for receiving the described script of the sending module transmission acting on behalf of in object and the instruction of blocking module transmission;
Execution module, is suitable for performing pending method in described script by performing described instruction, then execution result is returned to and act on behalf of object;
Wherein, described moving object and described object of acting on behalf of carry out alternately for the size of Flash, focus, refreshing or script;
Described scheduling identification acquisition module comprises further:
Calling module, is suitable for calling the dispatch interface of described moving object, and the method allowing described moving object perform to obtain the scheduling identification of pending method in described script obtains described scheduling identification;
Scheduling identification receiver module, is suitable for receiving the described scheduling identification that described moving object is returned by communication window.
5. system according to claim 4, the described agency run in page process, to the process liking the page process creation moving object by tackling browser, replaces the actual moving object to be created and creates;
The described moving object run in detached process be page process activate described act on behalf of object time, in the detached process independent of browser page process create;
Described moving object with act on behalf of object creates respectively described one to communication window, for making moving object, object communicates with acting on behalf of.
6. system according to claim 5, the object of acting on behalf of run in described page process is multiple, it is multiple for running the moving object in described detached process, described act on behalf of object and moving object one_to_one corresponding, described act on behalf of the communication window of object and with the described communication window acting on behalf of moving object corresponding to object, there is corresponding attribute, one by this communication window being realized moving object and acts on behalf of communicating of object.
7. one kind comprises the browser of the script execution system between the process described in the arbitrary item of claim 4 to 6.
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210572598.2A CN103019867B (en) | 2012-12-25 | 2012-12-25 | Script execution between process, system and browser |
US14/655,159 US10218767B2 (en) | 2012-12-25 | 2013-08-30 | Method, system and browser for executing active object of browser |
PCT/CN2013/082659 WO2014101455A1 (en) | 2012-12-25 | 2013-08-30 | Method, system, and browser for executing active object of browser |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210572598.2A CN103019867B (en) | 2012-12-25 | 2012-12-25 | Script execution between process, system and browser |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103019867A CN103019867A (en) | 2013-04-03 |
CN103019867B true CN103019867B (en) | 2016-06-01 |
Family
ID=47968497
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210572598.2A Active CN103019867B (en) | 2012-12-25 | 2012-12-25 | Script execution between process, system and browser |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103019867B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2014101455A1 (en) * | 2012-12-25 | 2014-07-03 | 北京奇虎科技有限公司 | Method, system, and browser for executing active object of browser |
CN103034503B (en) * | 2012-12-25 | 2016-07-06 | 北京奇虎科技有限公司 | A kind of script execution, system and browser |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101308465A (en) * | 2008-05-08 | 2008-11-19 | 华为技术有限公司 | Local resource access method and device |
CN102156663A (en) * | 2011-03-22 | 2011-08-17 | 北京书生国际信息技术有限公司 | Implementation method and device of plugin |
CN102314510A (en) * | 2011-09-15 | 2012-01-11 | 奇智软件(北京)有限公司 | Method and system for executing browser control |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101639774B (en) * | 2009-08-31 | 2012-06-27 | 腾讯科技(深圳)有限公司 | Encapsulation method of browser control part and device thereof |
CN102436507B (en) * | 2011-12-28 | 2014-07-16 | 奇智软件(北京)有限公司 | Method and device for browsing web pages |
CN102567516B (en) * | 2011-12-28 | 2014-01-01 | 华为技术有限公司 | Script loading method and device |
-
2012
- 2012-12-25 CN CN201210572598.2A patent/CN103019867B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101308465A (en) * | 2008-05-08 | 2008-11-19 | 华为技术有限公司 | Local resource access method and device |
CN102156663A (en) * | 2011-03-22 | 2011-08-17 | 北京书生国际信息技术有限公司 | Implementation method and device of plugin |
CN102314510A (en) * | 2011-09-15 | 2012-01-11 | 奇智软件(北京)有限公司 | Method and system for executing browser control |
Also Published As
Publication number | Publication date |
---|---|
CN103019867A (en) | 2013-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9398077B2 (en) | Mobile applications | |
AU2005246392B2 (en) | Occasionally-connected application server | |
CN101394406B (en) | Method and apparatus for preventing duplicate button pressing by user | |
US20060031264A1 (en) | Synchronization protocol for occasionally-connected application server | |
CN110347942A (en) | Method for page jump, device, storage medium and computer equipment | |
US20080134214A1 (en) | Method for tracking an event through multiple module-specific files | |
CN103019733B (en) | A kind of for the activity object implementation of browser, system and browser | |
CN109062626A (en) | Exchange method, device and the equipment of Web page component and Native component | |
CN108574709B (en) | Method and device for realizing cross-domain operation | |
US7869585B2 (en) | Declarations for transformations within service sequences | |
CN111312352B (en) | Data processing method, device, equipment and medium based on block chain | |
CN103034503B (en) | A kind of script execution, system and browser | |
CN103746782A (en) | Method and apparatus for obtaining feedback information of application | |
EP3848824A1 (en) | Landing page processing method, apparatus, device and medium | |
US20120054327A1 (en) | Site redirection | |
US9648078B2 (en) | Identifying a browser for rendering an electronic document | |
CN103064709B (en) | Execution method, system and the browser of browser moving object | |
CN103019867B (en) | Script execution between process, system and browser | |
CN103019734B (en) | A kind of activity object implementation, system and browser | |
CN103019735B (en) | Execution method, system and the browser of browser moving object | |
US10218767B2 (en) | Method, system and browser for executing active object of browser | |
WO2002044949A9 (en) | Minimal identification of features | |
EP2777215B1 (en) | Method, apparatus and system for simultaneously transmitting or receiving multiple managed objects | |
CN101819524B (en) | Access method of RFID (Radio Frequency Identification Device) reader and interface driving device thereof | |
CN103077016B (en) | A kind of moving object creation method, device and browser |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220802 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |