mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
Create config_dir
if none exist for caching (#35761)
* Create config_dir if none exist for caching Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * remove specialized behaviour for ohos; copy prefs.json if necessary Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * downgrade the log to trace verbosity Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> * update wpt-test Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com> --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
parent
9f93ccd942
commit
86957be5f0
6 changed files with 40 additions and 7 deletions
|
@ -17,6 +17,7 @@ interface InitOpts {
|
|||
deviceType: string,
|
||||
osFullName: string,
|
||||
resourceDir: string,
|
||||
cacheDir: string,
|
||||
displayDensity: number,
|
||||
commandlineArgs: string,
|
||||
}
|
||||
|
@ -109,13 +110,16 @@ struct Index {
|
|||
.onLoad((xComponentContext) => {
|
||||
this.xComponentContext = xComponentContext as ServoXComponentInterface;
|
||||
let resource_dir: string = this.context.resourceDir;
|
||||
console.debug("Resources are located at %{public}s", resource_dir);
|
||||
let cache_dir: string = this.context.cacheDir;
|
||||
console.debug("resourceDir: ", resource_dir);
|
||||
console.debug("cacheDir: ", cache_dir);
|
||||
let init_options: InitOpts = {
|
||||
url: this.urlToLoad,
|
||||
deviceType: get_device_type(),
|
||||
osFullName: deviceInfo.osFullName,
|
||||
displayDensity: get_density(),
|
||||
resourceDir: resource_dir,
|
||||
cacheDir: cache_dir,
|
||||
commandlineArgs: this.CommandlineArgs
|
||||
}
|
||||
this.xComponentContext.initServo(init_options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue