CN105302654A - Method and apparatus for recovering browser kernel - Google Patents
Method and apparatus for recovering browser kernel Download PDFInfo
- Publication number
- CN105302654A CN105302654A CN201410359874.6A CN201410359874A CN105302654A CN 105302654 A CN105302654 A CN 105302654A CN 201410359874 A CN201410359874 A CN 201410359874A CN 105302654 A CN105302654 A CN 105302654A
- Authority
- CN
- China
- Prior art keywords
- assembly
- message
- log
- benchmark
- browser kernel
- 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.)
- Granted
Links
Landscapes
- Information Transfer Between Computers (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and an apparatus for recovering a browser kernel, and belongs to the technical field of internet. The method comprises: obtaining standard registration information of a pre-stored component extracted from an installation file of a target browser kernel; comparing the standard registration information of the component with current registration information of the component recorded in a local registration table; and if the current registration information is not matched with the standard registration information, importing the standard registration information of the component into the registration table. With the adoption of the method and the apparatus, the browser kernel can be recovered to work normally under the condition that component registration is incorrect.
Description
Technical field
The present invention relates to Internet technical field, particularly a kind of method and apparatus repairing browser kernel.
Background technology
Along with the develop rapidly of network technology, internet has become very important ingredient in people's daily life, work, study, and browser is that people access one of the most frequently used instrument in internet.Render engine (or claiming browser kernel) is provided with in browser, as MSHTML (browser kernel of IE), Gecko (browser kernel of red fox), Webkit (a kind of browser kernel of increasing income) etc., render engine is responsible for resolving and is performed web page code, and then plays up and displayed web page.
Browser kernel is generally made up of a large amount of assemblies, and the part of functions of browser kernel is responsible for by each assembly.When installing browser kernel, the registration process of assembly can be carried out, the log-on message of each assembly is written in the registration table of system.When carrying out webpage and loading, according to the log-on message of the assembly recorded in registration table, required assembly can be called to complete playing up of webpage.
Realizing in process of the present invention, inventor finds that prior art at least exists following problem:
In the registration process of assembly, for various reasons, often there will be the situation of registration mistake, this will cause a lot of webpage normally to show, and browser kernel cannot normally work.
Summary of the invention
In order to solve the problem of prior art, embodiments provide a kind of method and apparatus repairing browser kernel.Described technical scheme is as follows:
On the one hand, provide a kind of method of repairing browser kernel, described method comprises:
Obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored;
The current registration information of the described assembly recorded in the benchmark log-on message of described assembly and local registration table is contrasted;
If described current registration information does not mate with described benchmark log-on message, then the benchmark log-on message of described assembly is imported described registration table.
On the other hand, provide a kind of device repairing browser kernel, described device comprises:
Acquisition module, for obtaining the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored;
Detection module, for contrasting the current registration information of the described assembly recorded in the benchmark log-on message of described assembly and local registration table;
Processing module, if do not mated with described benchmark log-on message for described current registration information, then imports described registration table by the benchmark log-on message of described assembly.
The beneficial effect that the technical scheme that the embodiment of the present invention provides is brought is:
In the embodiment of the present invention, obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored, the current registration information of this assembly recorded in the benchmark log-on message of this assembly and local registration table is contrasted, if current registration information does not mate with benchmark log-on message, then the benchmark log-on message of this assembly is imported registration table, like this, can for the situation of component register mistake, the log-on message of mistake in registration table is revised, thus, browser kernel is normally worked.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme in the embodiment of the present invention, below the accompanying drawing used required in describing embodiment is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the method flow diagram of the reparation browser kernel that the embodiment of the present invention provides;
Fig. 2 is the schematic diagram of the manifest file of each assembly that the embodiment of the present invention provides;
Fig. 3 is the apparatus structure schematic diagram of the reparation browser kernel that the embodiment of the present invention provides;
Fig. 4 is the structural representation of the terminal that the embodiment of the present invention provides.
Embodiment
For making the object, technical solutions and advantages of the present invention clearly, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
Embodiment one
Embodiments provide a kind of method of repairing browser kernel, as shown in Figure 1, the treatment scheme of the method can comprise the steps:
Step 101, obtains the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored.
Step 102, contrasts the current registration information of this assembly recorded in the benchmark log-on message of this assembly and local registration table.
Step 103, if current registration information does not mate with benchmark log-on message, then imports registration table by the benchmark log-on message of this assembly.
In the embodiment of the present invention, obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored, the current registration information of this assembly recorded in the benchmark log-on message of this assembly and local registration table is contrasted, if current registration information does not mate with benchmark log-on message, then the benchmark log-on message of this assembly is imported registration table, like this, can for the situation of component register mistake, the log-on message of mistake in registration table is revised, thus, browser kernel is normally worked.
Embodiment two
Embodiments provide a kind of method of repairing browser kernel, the executive agent of the method can be terminal, as mobile phone, panel computer, desk-top computer etc.
In the embodiment of the present invention, the benchmark log-on message of assembly can extract the installation file from certain browser kernel, in the installation file of browser kernel, the processing mode of extraction assembly benchmark log-on message can be varied, following present a kind of feasible processing mode:
Step one, in the installation file of objective browser kernel, obtains the manifest file that each assembly is corresponding.
Wherein, objective browser kernel is the browser kernel needing detection failure, can be any browser kernel, as the browser kernel of IE (InternetExplorer, explorer), is called for short IE kernel.Installation file is the file in objective browser kernel installation kit.XML (the ExtensibleMarkupLanguage that manifest file is is suffix with " .manifest ", extend markup language) file, each assembly is to there being a manifest file, the wherein details of record description assembly, can be included in the storage address in installation kit, classid (class mark), interfaceid (interface identifier) etc.
Step 2, respectively in the manifest file that each assembly is corresponding, extracts the log-on message that each assembly is corresponding, and the benchmark log-on message as each assembly stores.
Wherein, log-on message needs to write the information in registration table in the registration process of assembly, and the log-on message that each assembly is corresponding, comprises classid, interfaceid etc. of each assembly.
In force, for above-mentioned steps one, step 2, after the installation kit obtaining objective browser kernel, decompress(ion) can be carried out to installation kit, then in corresponding file, obtain the manifest file of all component, in file, the manifest file of each assembly can be as shown in Figure 2.And then, classid, interfaceid of corresponding assembly can be extracted in the manifest file of each assembly, and the registration table path that classid, interfaceid are corresponding, the benchmark log-on message as assembly stores.This processing procedure can be completed by corresponding information extraction utility by technician, can certainly be completed by the instrument in browser client (as QQ browser, search dog browser etc., a lot of browser client can exist independent of browser kernel) in user side.
After step 2, can also following process be carried out: step 3, based on the benchmark log-on message of each assembly, generate registry script file.
Wherein, registry script file can be the file for carrying out information importing to registration table, as reg (a kind of file extension) file.
In force, after determining the benchmark log-on message of each assembly, can based on the registration table coordinates measurement reg file of classid, interfaceid of all component and correspondence, then reg file is stored in and is provided with browser kernel and detects in the browser client of repair function, can use in the process of subsequent detection and reparation.
Multiple version may be there is in some browser kernel, as the browser kernel of IE7.0, the browser kernel etc. of IE8.0, the assembly comprised in the browser kernel of different editions may be different, so, for the browser kernel of different editions, respectively by treatment scheme above, the benchmark log-on message of each assembly under arbitrary version can be determined, the reg file that each version information is corresponding can also be generated.
Below in conjunction with concrete processing mode, be described in detail the flow process shown in Fig. 1, content can be as follows:
Step 101, obtains the benchmark log-on message of at least one assembly extracted from the installation file of objective browser kernel prestored.
Optionally, for the situation of above-mentioned generation registry script file, the process of this step can be: in registry script file, obtains the benchmark log-on message of each assembly.
In force, terminal can be provided with and be provided with the browser client that browser kernel detects repair function, as QQ browser or search dog browser etc., browser client can exist independent of browser kernel.When user opens certain webpage by this browser client, then can trigger browser client before transmission web-page requests, detect the browser kernel of terminal local, browser client can read the benchmark log-on message of all component from the registry script file of above-mentioned storage.Specifically in registry script file, classid and interfaceid of each assembly can be read.
Optionally, objective browser kernel is existed to the situation of multiple version, can according to the version information of local objective browser kernel, obtain corresponding benchmark log-on message, accordingly, the processing procedure of step 101 can be as follows:
Obtain the first version information of the local objective browser kernel installed; According to the corresponding relation of the benchmark log-on message of the version information prestored and assembly, determine the benchmark log-on message of at least one assembly that first version information is corresponding; In corresponding relation, the benchmark log-on message of assembly extracts the installation file of the objective browser kernel of self-corresponding version information.
In force, each version of corresponding objective browser kernel can generate reg file respectively by mode above-mentioned, such as, the 1.reg that 1.0 versions are corresponding, the 2.reg that 2.0 versions are corresponding, the 3.reg that 3.0 versions are corresponding, etc., then the corresponding relation of storage version information and reg file.When user opens certain webpage by browser client, first can determine the version information (i.e. first version information) of objective browser kernel (as IE kernel), then search reg file corresponding to this version information according to above-mentioned corresponding relation, then read classid and interfaceid in reg file.
Step 102, contrasts the current registration information of this at least one assembly recorded in the benchmark log-on message of this at least one assembly and local registration table.
In force, the current registration information of all component of the objective browser kernel recorded in the benchmark log-on message of all component of objective browser kernel and local registration table can be contrasted, whether mate both judging, if lack the log-on message of certain assembly in registration table or the log-on message of certain assembly is different from corresponding benchmark log-on message, then judge that current registration information does not mate with benchmark log-on message, otherwise judge coupling.
Optionally, for the situation of above-mentioned use registry script file, the process of this step can be: classid, interfaceid of this each assembly recorded in classid, interfaceid of each assembly obtained and local registration table are contrasted.
In force, the every bar information in reg file can be traveled through, when reading information, registration table path in information comprise Software Classes the Interface interfaceid of certain assembly (corresponding) or Software Classes CLSID (classid of certain assembly corresponding), then in the registration table of this locality, obtain corresponding interfaceid or classid according to this registration table path, contrast with interfaceid or classid in this information, if the log-on message disappearance in registration table under this registration table path, or comparing result is not identical, then can judge that current registration information does not mate with benchmark log-on message, otherwise judge coupling.
Step 103, if current registration information does not mate with benchmark log-on message, then imports registration table by the benchmark log-on message of this at least one assembly.
In force, current registration information does not mate with benchmark log-on message, then illustrate in component register process, during by the log-on message of each assembly of objective browser kernel write registration table, there is log-on message write error or do not complete write, at this moment, the benchmark log-on message prestored can be imported registration table, thus the log-on message that can correct mistakes.Optionally, by the process that the benchmark log-on message of this at least one assembly imports registration table can be: the selection window of log-on message is repaired in display, wherein can comprise the option repaired and ignore, when receiving user and clicking the reparation instruction of Recovery Options triggering, the benchmark log-on message of corresponding assembly is imported registration table, when receiving user and clicking the ignore instruction ignoring option triggering, can not process, keep the existing content of registration table constant.
Optionally, for the situation of above-mentioned use registry script file, the process of this step can be: if current registration information does not mate with benchmark log-on message, then registry script file is imported described registration table.
Further, the process of this step can be: if classid, interfaceid of each assembly obtained in registry script file do not mate with classid, interfaceid of this each assembly recorded in local registration table, then registry script file is imported registration table.
In force, interfaceid and classid is in webpage render process, browser kernel call and charging assembly time, the index information needed for assembly is searched in assembly dynamic base, if there is mistake, then cannot load corresponding assembly, and then webpage cannot be completed play up, so, can before webpage be played up, matching detection is carried out to interfaceid and classid of assembly each in objective browser kernel, if find that interfaceid and classid of certain assembly in reg file does not mate with interfaceid and classid of corresponding assembly in registration table, then can carry out registration table importing by reg file, log-on message is wherein imported registration table.
In addition, if current registration information mates with benchmark log-on message (namely identical), then the benchmark log-on message of assembly can not be imported registration table, keep the content of registration table constant.
In the embodiment of the present invention, obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored, the current registration information of this assembly recorded in the benchmark log-on message of this assembly and local registration table is contrasted, if current registration information does not mate with benchmark log-on message, then the benchmark log-on message of this assembly is imported registration table, like this, can for the situation of component register mistake, the log-on message of mistake in registration table is revised, thus, browser kernel is normally worked.
Embodiment three
Based on identical technical conceive, the embodiment of the present invention additionally provides a kind of device repairing browser kernel, and as shown in Figure 3, described device comprises:
Acquisition module 310, for obtaining the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored;
Detection module 320, for contrasting the current registration information of the described assembly recorded in the benchmark log-on message of described assembly and local registration table;
Processing module 330, if do not mated with described benchmark log-on message for described current registration information, then imports described registration table by the benchmark log-on message of described assembly.
Optionally, also comprise memory module, for:
Before the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored in described acquisition, in the installation file of described objective browser kernel, obtain the manifest file that each assembly is corresponding;
Respectively in the manifest file that described each assembly is corresponding, extract the log-on message that each assembly is corresponding, the benchmark log-on message as each assembly stores.
Optionally, described memory module, also for: based on the benchmark log-on message of described each assembly, generate registry script file;
Described acquisition module 310, for: in described registry script file, obtain the benchmark log-on message of described each assembly;
Described processing module 330, for: if described current registration information does not mate with described benchmark log-on message, then described registry script file is imported described registration table.
Optionally, the log-on message that described each assembly is corresponding, comprising: classid, interfaceid of described each assembly;
Described acquisition module 310, for: in described registry script file, obtain classid and interfaceid of described each assembly;
Described detection module 320, for: classid, interfaceid of the described each assembly recorded in classid, interfaceid of the described each assembly obtained and local registration table are contrasted;
Described processing module 330, for: if classid, interfaceid of the described each assembly obtained do not mate with classid, interfaceid of the described each assembly recorded in local registration table, then described registry script file is imported described registration table.
Optionally, described acquisition module 310, for:
Obtain the first version information of the local objective browser kernel installed;
According to the corresponding relation of the benchmark log-on message of the version information prestored and assembly, determine the benchmark log-on message of the assembly that described first version information is corresponding; In described corresponding relation, the benchmark log-on message of assembly extracts the installation file of the objective browser kernel of self-corresponding version information.
In the embodiment of the present invention, obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored, the current registration information of this assembly recorded in the benchmark log-on message of this assembly and local registration table is contrasted, if current registration information does not mate with benchmark log-on message, then the benchmark log-on message of this assembly is imported registration table, like this, can for the situation of component register mistake, the log-on message of mistake in registration table is revised, thus, browser kernel is normally worked.
It should be noted that: the device of the reparation browser kernel that above-described embodiment provides is when repairing browser kernel, only be illustrated with the division of above-mentioned each functional module, in practical application, can distribute as required and by above-mentioned functions and be completed by different functional modules, inner structure by device is divided into different functional modules, to complete all or part of function described above.In addition, the device of the reparation browser kernel that above-described embodiment provides belongs to same design with the embodiment of the method for repairing browser kernel, and its specific implementation process refers to embodiment of the method, repeats no more here.
Embodiment four
Please refer to Fig. 4, it illustrates the terminal structure schematic diagram with Touch sensitive surface involved by the embodiment of the present invention, for implementing the method provided in above-described embodiment.Specifically:
Terminal 900 can comprise RF (RadioFrequency, radio frequency) circuit 110, the storer 120 including one or more computer-readable recording mediums, input block 130, display unit 140, sensor 150, voicefrequency circuit 160, WiFi (wirelessfidelity, Wireless Fidelity) module 170, include the parts such as processor 180 and power supply 190 that more than or processes core.It will be understood by those skilled in the art that the restriction of the not structure paired terminal of the terminal structure shown in Fig. 4, the parts more more or less than diagram can be comprised, or combine some parts, or different parts are arranged.Wherein:
RF circuit 110 can be used for receiving and sending messages or in communication process, the reception of signal and transmission, especially, after being received by the downlink information of base station, transfer to more than one or one processor 180 to process; In addition, base station is sent to by relating to up data.Usually, RF circuit 110 includes but not limited to antenna, at least one amplifier, tuner, one or more oscillator, subscriber identity module (SIM) card, transceiver, coupling mechanism, LNA (LowNoiseAmplifier, low noise amplifier), diplexer etc.In addition, RF circuit 110 can also by radio communication and network and other devices communicatings.Described radio communication can use arbitrary communication standard or agreement, include but not limited to GSM (GlobalSystemofMobilecommunication, global system for mobile communications), GPRS (GeneralPacketRadioService, general packet radio service), CDMA (CodeDivisionMultipleAccess, CDMA), WCDMA (WidebandCodeDivisionMultipleAccess, Wideband Code Division Multiple Access (WCDMA)), LTE (LongTermEvolution, Long Term Evolution), Email, SMS (ShortMessagingService, Short Message Service) etc.
Storer 120 can be used for storing software program and module, and processor 180 is stored in software program and the module of storer 120 by running, thus performs the application of various function and data processing.Storer 120 mainly can comprise storage program district and store data field, and wherein, storage program district can store operating system, application program (such as sound-playing function, image player function etc.) etc. needed at least one function; Store data field and can store the data (such as voice data, phone directory etc.) etc. created according to the use of terminal 900.In addition, storer 120 can comprise high-speed random access memory, can also comprise nonvolatile memory, such as at least one disk memory, flush memory device or other volatile solid-state parts.Correspondingly, storer 120 can also comprise Memory Controller, to provide the access of processor 180 and input block 130 pairs of storeies 120.
Input block 130 can be used for the numeral or the character information that receive input, and produces and to arrange with user and function controls relevant keyboard, mouse, control lever, optics or trace ball signal and inputs.Particularly, input block 130 can comprise Touch sensitive surface 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad, user can be collected or neighbouring touch operation (such as user uses any applicable object or the operations of annex on Touch sensitive surface 131 or near Touch sensitive surface 131 such as finger, stylus) thereon, and drive corresponding coupling arrangement according to the formula preset.Optionally, Touch sensitive surface 131 can comprise touch detecting apparatus and touch controller two parts.Wherein, touch detecting apparatus detects the touch orientation of user, and detects the signal that touch operation brings, and sends signal to touch controller; Touch controller receives touch information from touch detecting apparatus, and converts it to contact coordinate, then gives processor 180, and the order that energy receiving processor 180 is sent also is performed.In addition, the polytypes such as resistance-type, condenser type, infrared ray and surface acoustic wave can be adopted to realize Touch sensitive surface 131.Except Touch sensitive surface 131, input block 130 can also comprise other input equipments 132.Particularly, other input equipments 132 can include but not limited to one or more in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, control lever etc.
Display unit 140 can be used for the various graphical user interface showing information or the information being supplied to user and the terminal 900 inputted by user, and these graphical user interface can be made up of figure, text, icon, video and its combination in any.Display unit 140 can comprise display panel 141, optionally, the form such as LCD (LiquidCrystalDisplay, liquid crystal display), OLED (OrganicLight-EmittingDiode, Organic Light Emitting Diode) can be adopted to configure display panel 141.Further, Touch sensitive surface 131 can cover display panel 141, when Touch sensitive surface 131 detects thereon or after neighbouring touch operation, send processor 180 to determine the type of touch event, on display panel 141, provide corresponding vision to export with preprocessor 180 according to the type of touch event.Although in the diagram, Touch sensitive surface 131 and display panel 141 be as two independently parts realize input and input function, in certain embodiments, can by Touch sensitive surface 131 and display panel 141 integrated and realize input and output function.
Terminal 900 also can comprise at least one sensor 150, such as optical sensor, motion sensor and other sensors.Particularly, optical sensor can comprise ambient light sensor and proximity transducer, and wherein, ambient light sensor the light and shade of environmentally light can regulate the brightness of display panel 141, proximity transducer when terminal 900 moves in one's ear, can cut out display panel 141 and/or backlight.As the one of motion sensor, Gravity accelerometer can detect the size of all directions (are generally three axles) acceleration, size and the direction of gravity can be detected time static, can be used for identifying the application (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating) of mobile phone attitude, Vibration identification correlation function (such as passometer, knock) etc.; As for terminal 900 also other sensors such as configurable gyroscope, barometer, hygrometer, thermometer, infrared ray sensor, do not repeat them here.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal 900.Voicefrequency circuit 160 can by receive voice data conversion after electric signal, be transferred to loudspeaker 161, by loudspeaker 161 be converted to voice signal export; On the other hand, the voice signal of collection is converted to electric signal by microphone 162, voice data is converted to after being received by voicefrequency circuit 160, after again voice data output processor 180 being processed, through RF circuit 110 to send to such as another terminal, or export voice data to storer 120 to process further.Voicefrequency circuit 160 also may comprise earphone jack, to provide the communication of peripheral hardware earphone and terminal 900.
WiFi belongs to short range wireless transmission technology, and terminal 900 can help user to send and receive e-mail by WiFi module 170, browse webpage and access streaming video etc., and its broadband internet wireless for user provides is accessed.Although Fig. 4 shows WiFi module 170, be understandable that, it does not belong to must forming of terminal 900, can omit in the scope of essence not changing invention as required completely.
Processor 180 is control centers of terminal 900, utilize the various piece of various interface and the whole mobile phone of connection, software program in storer 120 and/or module is stored in by running or performing, and call the data be stored in storer 120, perform various function and the process data of terminal 900, thus integral monitoring is carried out to mobile phone.Optionally, processor 180 can comprise one or more process core; Preferably, processor 180 accessible site application processor and modem processor, wherein, application processor mainly processes operating system, user interface and application program etc., and modem processor mainly processes radio communication.Be understandable that, above-mentioned modem processor also can not be integrated in processor 180.
Terminal 900 also comprises the power supply 190 (such as battery) of powering to all parts, preferably, power supply can be connected with processor 180 logic by power-supply management system, thus realizes the functions such as management charging, electric discharge and power managed by power-supply management system.Power supply 190 can also comprise one or more direct current or AC power, recharging system, power failure detection circuit, power supply changeover device or the random component such as inverter, power supply status indicator.
Although not shown, terminal 900 can also comprise camera, bluetooth module etc., does not repeat them here.Specifically in the present embodiment, the display unit of terminal 900 is touch-screen displays, terminal 900 also includes storer, and one or more than one program, one of them or more than one program are stored in storer, and are configured to be performed by more than one or one processor state more than one or one routine package containing the instruction for carrying out following operation:
Obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored;
The current registration information of the described assembly recorded in the benchmark log-on message of described assembly and local registration table is contrasted;
If described current registration information does not mate with described benchmark log-on message, then the benchmark log-on message of described assembly is imported described registration table.
Optionally, before the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel that described acquisition prestores, also comprise:
In the installation file of described objective browser kernel, obtain the manifest file that each assembly is corresponding;
Respectively in the manifest file that described each assembly is corresponding, extract the log-on message that each assembly is corresponding, the benchmark log-on message as each assembly stores.
Optionally, described method also comprises: based on the benchmark log-on message of described each assembly, generates registry script file;
The benchmark log-on message of the assembly extracted from the installation file of objective browser kernel that described acquisition prestores, comprising: in described registry script file, obtains the benchmark log-on message of described each assembly;
If described current registration information does not mate with described benchmark log-on message, then the benchmark log-on message of described assembly is imported described registration table, comprise: if described current registration information does not mate with described benchmark log-on message, then described registry script file is imported described registration table.
Optionally, the log-on message that described each assembly is corresponding, comprising: classid, interfaceid of described each assembly;
Described in described registry script file, obtain the benchmark log-on message of described each assembly, comprising: in described registry script file, obtain classid and interfaceid of described each assembly;
The described current registration information by the described assembly recorded in the benchmark log-on message of described assembly and local registration table contrasts, and comprising: classid, interfaceid of the described each assembly recorded in classid, interfaceid of the described each assembly obtained and local registration table are contrasted;
If described current registration information does not mate with described benchmark log-on message, then described registry script file is imported described registration table, comprise: if classid, interfaceid of the described each assembly obtained do not mate with classid, interfaceid of the described each assembly recorded in local registration table, then described registry script file is imported described registration table.
Optionally, the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel that described acquisition prestores, comprising:
Obtain the first version information of the local objective browser kernel installed;
According to the corresponding relation of the benchmark log-on message of the version information prestored and assembly, determine the benchmark log-on message of the assembly that described first version information is corresponding; In described corresponding relation, the benchmark log-on message of assembly extracts the installation file of the objective browser kernel of self-corresponding version information.
In the embodiment of the present invention, obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored, the current registration information of this assembly recorded in the benchmark log-on message of this assembly and local registration table is contrasted, if current registration information does not mate with benchmark log-on message, then the benchmark log-on message of this assembly is imported registration table, like this, can for the situation of component register mistake, the log-on message of mistake in registration table is revised, thus, browser kernel is normally worked.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.
The foregoing is only preferred embodiment of the present invention, not in order to limit the present invention, within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. repair a method for browser kernel, it is characterized in that, described method comprises:
Obtain the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored;
The current registration information of the described assembly recorded in the benchmark log-on message of described assembly and local registration table is contrasted;
If described current registration information does not mate with described benchmark log-on message, then the benchmark log-on message of described assembly is imported described registration table.
2. method according to claim 1, is characterized in that, before the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel that described acquisition prestores, also comprises:
In the installation file of described objective browser kernel, obtain the manifest file that each assembly is corresponding;
Respectively in the manifest file that described each assembly is corresponding, extract the log-on message that each assembly is corresponding, the benchmark log-on message as each assembly stores.
3. method according to claim 2, is characterized in that, described method also comprises: based on the benchmark log-on message of described each assembly, generates registry script file;
The benchmark log-on message of the assembly extracted from the installation file of objective browser kernel that described acquisition prestores, comprising: in described registry script file, obtains the benchmark log-on message of described each assembly;
If described current registration information does not mate with described benchmark log-on message, then the benchmark log-on message of described assembly is imported described registration table, comprise: if described current registration information does not mate with described benchmark log-on message, then described registry script file is imported described registration table.
4. method according to claim 3, is characterized in that, the log-on message that described each assembly is corresponding, comprising: classid, interfaceid of described each assembly;
Described in described registry script file, obtain the benchmark log-on message of described each assembly, comprising: in described registry script file, obtain classid and interfaceid of described each assembly;
The described current registration information by the described assembly recorded in the benchmark log-on message of described assembly and local registration table contrasts, and comprising: classid, interfaceid of the described each assembly recorded in classid, interfaceid of the described each assembly obtained and local registration table are contrasted;
If described current registration information does not mate with described benchmark log-on message, then described registry script file is imported described registration table, comprise: if classid, interfaceid of the described each assembly obtained do not mate with classid, interfaceid of the described each assembly recorded in local registration table, then described registry script file is imported described registration table.
5. method according to claim 1, is characterized in that, the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel that described acquisition prestores, comprising:
Obtain the first version information of the local objective browser kernel installed;
According to the corresponding relation of the benchmark log-on message of the version information prestored and assembly, determine the benchmark log-on message of the assembly that described first version information is corresponding; In described corresponding relation, the benchmark log-on message of assembly extracts the installation file of the objective browser kernel of self-corresponding version information.
6. repair a device for browser kernel, it is characterized in that, described device comprises:
Acquisition module, for obtaining the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored;
Detection module, for contrasting the current registration information of the described assembly recorded in the benchmark log-on message of described assembly and local registration table;
Processing module, if do not mated with described benchmark log-on message for described current registration information, then imports described registration table by the benchmark log-on message of described assembly.
7. device according to claim 6, is characterized in that, also comprises memory module, for:
Before the benchmark log-on message of the assembly extracted from the installation file of objective browser kernel prestored in described acquisition, in the installation file of described objective browser kernel, obtain the manifest file that each assembly is corresponding;
Respectively in the manifest file that described each assembly is corresponding, extract the log-on message that each assembly is corresponding, the benchmark log-on message as each assembly stores.
8. device according to claim 7, is characterized in that, described memory module, also for: based on the benchmark log-on message of described each assembly, generate registry script file;
Described acquisition module, for: in described registry script file, obtain the benchmark log-on message of described each assembly;
Described processing module, for: if described current registration information does not mate with described benchmark log-on message, then described registry script file is imported described registration table.
9. device according to claim 8, is characterized in that, the log-on message that described each assembly is corresponding, comprising: classid, interfaceid of described each assembly;
Described acquisition module, for: in described registry script file, obtain classid and interfaceid of described each assembly;
Described detection module, for: classid, interfaceid of the described each assembly recorded in classid, interfaceid of the described each assembly obtained and local registration table are contrasted;
Described processing module, for: if classid, interfaceid of the described each assembly obtained do not mate with classid, interfaceid of the described each assembly recorded in local registration table, then described registry script file is imported described registration table.
10. device according to claim 6, is characterized in that, described acquisition module, for:
Obtain the first version information of the local objective browser kernel installed;
According to the corresponding relation of the benchmark log-on message of the version information prestored and assembly, determine the benchmark log-on message of the assembly that described first version information is corresponding; In described corresponding relation, the benchmark log-on message of assembly extracts the installation file of the objective browser kernel of self-corresponding version information.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410359874.6A CN105302654B (en) | 2014-07-25 | 2014-07-25 | A kind of method and apparatus for repairing browser kernel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410359874.6A CN105302654B (en) | 2014-07-25 | 2014-07-25 | A kind of method and apparatus for repairing browser kernel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105302654A true CN105302654A (en) | 2016-02-03 |
CN105302654B CN105302654B (en) | 2019-10-08 |
Family
ID=55199947
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410359874.6A Active CN105302654B (en) | 2014-07-25 | 2014-07-25 | A kind of method and apparatus for repairing browser kernel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105302654B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108170437A (en) * | 2016-12-07 | 2018-06-15 | 腾讯科技(深圳)有限公司 | A kind of application management method and terminal device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080030909A (en) * | 2006-10-02 | 2008-04-07 | 주식회사 베스트디지탈 | Method for monitoring software module and system restoring method after software module execution |
CN101777018A (en) * | 2010-02-08 | 2010-07-14 | 北京同有飞骥科技有限公司 | Copying and snapshot combined Windows system protection method |
CN102799500A (en) * | 2012-06-25 | 2012-11-28 | 腾讯科技(深圳)有限公司 | System repair method, device and storage medium |
CN103019872A (en) * | 2012-10-15 | 2013-04-03 | 北京奇虎科技有限公司 | Method and device for repairing browser |
CN103914357A (en) * | 2014-04-11 | 2014-07-09 | 珠海市君天电子科技有限公司 | IE (internet explorer) repair method and IE repair device |
-
2014
- 2014-07-25 CN CN201410359874.6A patent/CN105302654B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20080030909A (en) * | 2006-10-02 | 2008-04-07 | 주식회사 베스트디지탈 | Method for monitoring software module and system restoring method after software module execution |
CN101777018A (en) * | 2010-02-08 | 2010-07-14 | 北京同有飞骥科技有限公司 | Copying and snapshot combined Windows system protection method |
CN102799500A (en) * | 2012-06-25 | 2012-11-28 | 腾讯科技(深圳)有限公司 | System repair method, device and storage medium |
CN103019872A (en) * | 2012-10-15 | 2013-04-03 | 北京奇虎科技有限公司 | Method and device for repairing browser |
CN103914357A (en) * | 2014-04-11 | 2014-07-09 | 珠海市君天电子科技有限公司 | IE (internet explorer) repair method and IE repair device |
Non-Patent Citations (1)
Title |
---|
SHUDINGBO: "XPCOM指南-3_组件的内部结构", 《百度文库》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108170437A (en) * | 2016-12-07 | 2018-06-15 | 腾讯科技(深圳)有限公司 | A kind of application management method and terminal device |
Also Published As
Publication number | Publication date |
---|---|
CN105302654B (en) | 2019-10-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105320598A (en) | Software testing method and device | |
CN104639672B (en) | The method and apparatus for carrying out domain name mapping | |
CN104123218B (en) | Method, device and system for code coverage test | |
CN105528297A (en) | Method and device for testing web page | |
CN103473163A (en) | Application program detection method and device | |
CN105278937A (en) | Method and device for displaying pop-up box messages | |
CN104572430A (en) | Method, device and system for testing terminal application interface | |
CN104850406A (en) | Page switching method and device | |
CN105389259B (en) | A kind of method, apparatus and system for carrying out Application testing | |
CN104965716A (en) | Icon updating method, client apparatus, and terminal apparatus | |
CN104636255A (en) | Method and device for testing webpage application display effect | |
CN103310009A (en) | Method, device and terminal for updating webpage data | |
CN104298666A (en) | Web page sharing method and web page sharing device | |
CN104965722A (en) | Method and apparatus for displaying information | |
CN107276602A (en) | Radio frequency interference processing method, device, storage medium and terminal | |
CN105302452A (en) | Gesture interaction-based operation method and device | |
CN104423822A (en) | Automated test script recording method and device | |
CN107590397A (en) | A kind of method and apparatus for showing embedded webpage | |
CN104239163B (en) | Software repair and device | |
CN104133693B (en) | Installment state detection method, device and terminal | |
CN103399706A (en) | Page interaction method, device and terminal | |
CN104243394A (en) | Multimedia file playing method and device | |
CN104123210A (en) | Method, device and system for testing performance of browser | |
CN103729283B (en) | System log output method and device and terminal device | |
CN103336677B (en) | A kind of methods, devices and systems to display device output image |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20221125 Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518133 Patentee after: Shenzhen Yayue Technology Co.,Ltd. Address before: 2, 518000, East 403 room, SEG science and Technology Park, Zhenxing Road, Shenzhen, Guangdong, Futian District Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd. |
|
TR01 | Transfer of patent right |