-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
fixes brave/browser-laptop#5879 auditors: @bbondy @bsclifton
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,10 +41,10 @@ bool JavascriptEnvironment::Initialize() { | |
if (!js_flags.empty()) | ||
v8::V8::SetFlagsFromString(js_flags.c_str(), js_flags.size()); | ||
|
||
base::i18n::InitializeICU(); | ||
// base::i18n::InitializeICU(); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
bridiver
Author
Collaborator
|
||
|
||
gin::V8Initializer::LoadV8Snapshot(); | ||
gin::V8Initializer::LoadV8Natives(); | ||
// gin::V8Initializer::LoadV8Snapshot(); | ||
// gin::V8Initializer::LoadV8Natives(); | ||
gin::IsolateHolder::Initialize(gin::IsolateHolder::kNonStrictMode, | ||
gin::IsolateHolder::kStableV8Extras, | ||
gin::ArrayBufferAllocator::SharedInstance()); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -137,10 +137,6 @@ | |
], | ||
}], | ||
['_target_name=="node"', { | ||
'include_dirs': [ | ||
'../v8', | ||
'../v8/include', | ||
], | ||
'cflags!': [ | ||
'-fvisibility=hidden', | ||
'-fdata-sections', | ||
|
@@ -192,10 +188,25 @@ | |
], | ||
# Node is using networking API but linking with this itself. | ||
'libraries': [ '-lwinmm.lib' ], | ||
'variables': { | ||
'reference_symbols': [ | ||
'udata_setCommonData_56', | ||
'u_errorName_56', | ||
'ubidi_setPara_56', | ||
'ucsdet_getName_56', | ||
'uidna_openUTS46_56', | ||
'ulocdata_close_56', | ||
'unorm_normalize_56', | ||
'uregex_matches_56', | ||
'uspoof_open_56', | ||
'usearch_setPattern_56', | ||
'?createInstance@Transliterator@icu_56@@SAPEAV12@AEBVUnicodeString@2@W4UTransDirection@@AEAW4UErrorCode@@@Z', | ||
'??0MeasureFormat@icu_56@@QEAA@AEBVLocale@1@W4UMeasureFormatWidth@@AEAW4UErrorCode@@@Z', | ||
], | ||
This comment has been minimized.
Sorry, something went wrong.
bsclifton
Member
|
||
}, | ||
'msvs_settings': { | ||
'VCLinkerTool': { | ||
'EnableCOMDATFolding': '1', # disable | ||
'OptimizeReferences': '1', # disable | ||
'ForceSymbolReferences': [ '<@(reference_symbols)' ], | ||
}, | ||
}, | ||
}], | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
diff --git a/BUILD.gn b/BUILD.gn | ||
index 1dd7c61d5368a643cb9d8cc489f8833cd796cb5f..6a7b287db3357cdaaff4d822002cc4a8b26f4b44 100644 | ||
--- a/BUILD.gn | ||
+++ b/BUILD.gn | ||
@@ -3,6 +3,7 @@ | ||
# found in the LICENSE file. | ||
|
||
import("//third_party/icu/config.gni") | ||
+import("//build/config/chrome_build.gni") | ||
|
||
if (is_android) { | ||
import("//build/config/android/rules.gni") | ||
@@ -39,7 +40,9 @@ config("icu_config") { | ||
] | ||
|
||
if (!is_component_build) { | ||
+ if (!muon_build) { | ||
defines += [ "U_STATIC_IMPLEMENTATION" ] | ||
+ } | ||
} | ||
|
||
include_dirs = [ | ||
@@ -122,6 +125,21 @@ config("icu_code") { | ||
} | ||
} | ||
|
||
+if (muon_build) { | ||
+ group("icui18n") { | ||
+ public_deps = [ "//electron/build/node" ] | ||
+ public_configs = [ ":icu_config" ] | ||
+ } | ||
+ | ||
+ group("icuuc") { | ||
+ public_deps = [ "//electron/build/node" ] | ||
+ public_configs = [ ":icu_config" ] | ||
+ } | ||
+ | ||
+ group("icudata") { | ||
+ public_deps = [ "//electron/build/node:build_node" ] | ||
+ } | ||
+} else { | ||
component("icui18n") { | ||
# find source/i18n -maxdepth 1 ! -type d | egrep '\.(c|cpp|h)$' |\ | ||
# sort | sed 's/^\(.*\)$/ "\1",/' | ||
@@ -1054,3 +1072,4 @@ if (icu_use_data_file) { | ||
} | ||
} | ||
} | ||
+} |
1 comment
on commit fb89355
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comments left
Great job!! 😄 This was a NASTY issue
Should we remove these comments and (optionally) explain how ICU gets initialized?
Which I am curious about. This solution still loads from a snapshot, right? (as seen by having the snapshot_blob and natives_blob). What does that loading?