summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorboliu <boliu@chromium.org>2015-02-09 18:19:37 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-10 02:20:50 +0000
commit9963720b9c6c2e79dbff97d4c16f6b4bac4ab543 (patch)
tree91dc7c92e0e24e0b6d65fb8ac2e758bc873ae393
parent63643dbe9fd4db0dafaf5055dca59bef904e8431 (diff)
downloadchromium_src-9963720b9c6c2e79dbff97d4c16f6b4bac4ab543.zip
chromium_src-9963720b9c6c2e79dbff97d4c16f6b4bac4ab543.tar.gz
chromium_src-9963720b9c6c2e79dbff97d4c16f6b4bac4ab543.tar.bz2
Revert of Name V8 snapshot according to target architecture (32/64 bit). (patchset #5 id:80001 of https://codereview.chromium.org/903793002/)
Reason for revert: Some target_arch constants are wrong/missing, causing build breaks on those architectures. Original issue's description: > Name V8 snapshot according to target architecture (32/64 bit). > > Renaming webview copy of V8 snapshot to be able to differentiate > between snapshots for 32- and 64 bit architectures. > This is done so that snapshots for different architectures can be > repacked into the same APK. > > BUG=455699 > > Committed: https://crrev.com/0ae506b5a6eae5cf0e440752a4fb99b35e2b0f05 > Cr-Commit-Position: refs/heads/master@{#315314} TBR=torne@chromium.org,rmcilroy@chromium.org,mef@chromium.org,kkimlabs@chromium.org,gsennton@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=455699 Review URL: https://codereview.chromium.org/868363003 Cr-Commit-Position: refs/heads/master@{#315475}
-rw-r--r--android_webview/android_webview.gyp44
-rw-r--r--android_webview/android_webview_tests.gypi41
-rw-r--r--android_webview/apk/system_webview_apk_common.gypi18
-rw-r--r--android_webview/lib/main/aw_main_delegate.cc14
-rw-r--r--android_webview/snapshot_copying.gypi28
5 files changed, 38 insertions, 107 deletions
diff --git a/android_webview/android_webview.gyp b/android_webview/android_webview.gyp
index b511c36..753a220 100644
--- a/android_webview/android_webview.gyp
+++ b/android_webview/android_webview.gyp
@@ -56,50 +56,6 @@
}
],
}],
- ['v8_use_external_startup_data==1', {
- 'variables': {
- 'conditions': [
- ['(target_arch=="arm" or target_arch=="x86" or target_arch=="mips")', {
- 'arch_suffix':'32'
- }],
- ['(target_arch=="arm64" or target_arch=="x86_64" or target_arch=="mips64")', {
- 'arch_suffix':'64'
- }],
- ],
- },
- 'actions': [
- {
- 'action_name': 'rename_snapshot_blob',
- 'inputs': [
- '<(PRODUCT_DIR)/snapshot_blob.bin',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/snapshot_blob_<(arch_suffix).bin',
- ],
- 'action': [
- 'python',
- '<(DEPTH)/build/cp.py',
- '<@(_inputs)',
- '<@(_outputs)',
- ],
- },
- {
- 'action_name': 'rename_natives_blob',
- 'inputs': [
- '<(PRODUCT_DIR)/natives_blob.bin',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/natives_blob_<(arch_suffix).bin',
- ],
- 'action': [
- 'python',
- '<(DEPTH)/build/cp.py',
- '<@(_inputs)',
- '<@(_outputs)',
- ],
- },
- ],
- }],
],
},
{
diff --git a/android_webview/android_webview_tests.gypi b/android_webview/android_webview_tests.gypi
index aca7475..817654f 100644
--- a/android_webview/android_webview_tests.gypi
+++ b/android_webview/android_webview_tests.gypi
@@ -18,34 +18,36 @@
'native_lib_target': 'libstandalonelibwebviewchromium',
'resource_dir': 'test/shell/res',
'extensions_to_not_compress': 'pak,dat,bin',
- 'asset_location': '<(PRODUCT_DIR)/android_webview_apk/assets',
'extra_native_libs': ['<(SHARED_LIB_DIR)/libdrawgl.>(android_product_extension)'],
- 'snapshot_copy_files': '<(snapshot_copy_files)',
'additional_input_paths': [
- '<(asset_location)/webviewchromium.pak',
- '<(asset_location)/en-US.pak',
- '<(asset_location)/asset_file.html',
- '<(asset_location)/cookie_test.html',
- '<(asset_location)/asset_icon.png',
- '<(asset_location)/full_screen_video.js',
- '<(asset_location)/full_screen_video_test.html',
- '<(asset_location)/full_screen_video_inside_div_test.html',
- '<(asset_location)/multiple_videos_test.html',
- '<(asset_location)/video.mp4',
- '<@(snapshot_additional_input_paths)',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/webviewchromium.pak',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/en-US.pak',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/asset_file.html',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/cookie_test.html',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/asset_icon.png',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/full_screen_video.js',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/full_screen_video_test.html',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/full_screen_video_inside_div_test.html',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/multiple_videos_test.html',
+ '<(PRODUCT_DIR)/android_webview_apk/assets/video.mp4',
],
'conditions': [
['icu_use_data_file_flag==1', {
'additional_input_paths': [
- '<(asset_location)/icudtl.dat',
+ '<(PRODUCT_DIR)/icudtl.dat',
+ ],
+ }],
+ ['v8_use_external_startup_data==1', {
+ 'additional_input_paths': [
+ '<(PRODUCT_DIR)/natives_blob.bin',
+ '<(PRODUCT_DIR)/snapshot_blob.bin',
],
}],
],
- 'includes': [ 'snapshot_copying.gypi' ],
},
'copies': [
{
- 'destination': '<(asset_location)',
+ 'destination': '<(PRODUCT_DIR)/android_webview_apk/assets',
'files': [
'<(PRODUCT_DIR)/android_webview_assets/webviewchromium.pak',
'<(PRODUCT_DIR)/android_webview_assets/locales/en-US.pak',
@@ -57,7 +59,6 @@
'<(java_in_dir)/assets/full_screen_video_inside_div_test.html',
'<(java_in_dir)/assets/multiple_videos_test.html',
'<(java_in_dir)/assets/video.mp4',
- '<@(snapshot_copy_files)',
],
'conditions': [
['icu_use_data_file_flag==1', {
@@ -65,6 +66,12 @@
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
+ ['v8_use_external_startup_data==1', {
+ 'files': [
+ '<(PRODUCT_DIR)/natives_blob.bin',
+ '<(PRODUCT_DIR)/snapshot_blob.bin',
+ ],
+ }],
],
},
],
diff --git a/android_webview/apk/system_webview_apk_common.gypi b/android_webview/apk/system_webview_apk_common.gypi
index b471352..a8f5b6c 100644
--- a/android_webview/apk/system_webview_apk_common.gypi
+++ b/android_webview/apk/system_webview_apk_common.gypi
@@ -18,7 +18,6 @@
'R_package_relpath': 'com/android/webview/chromium',
'extensions_to_not_compress': 'pak,bin,dat',
'asset_location': '<(INTERMEDIATE_DIR)/assets/',
- 'snapshot_copy_files': '<(snapshot_copy_files)',
# TODO: crbug.com/442348 Update proguard.flags and re-enable.
'proguard_enabled': 'false',
'proguard_flags_paths': ['<(DEPTH)/android_webview/apk/java/proguard.flags'],
@@ -27,10 +26,6 @@
'<@(webview_locales_output_paks)',
'<(asset_location)/webviewchromium.pak',
'<(asset_location)/webview_licenses.notice',
- '<@(snapshot_additional_input_paths)',
- ],
- 'includes': [
- '../snapshot_copying.gypi',
],
'conditions': [
['icu_use_data_file_flag==1', {
@@ -38,6 +33,12 @@
'<(asset_location)/icudtl.dat',
],
}],
+ ['v8_use_external_startup_data==1', {
+ 'additional_input_paths': [
+ '<(asset_location)/natives_blob.bin',
+ '<(asset_location)/snapshot_blob.bin',
+ ],
+ }],
],
},
'copies': [
@@ -46,7 +47,6 @@
'files': [
'<@(webview_locales_input_paks)',
'<(PRODUCT_DIR)/android_webview_assets/webviewchromium.pak',
- '<@(snapshot_copy_files)',
],
'conditions': [
['icu_use_data_file_flag==1', {
@@ -54,6 +54,12 @@
'<(PRODUCT_DIR)/icudtl.dat',
],
}],
+ ['v8_use_external_startup_data==1', {
+ 'files': [
+ '<(PRODUCT_DIR)/natives_blob.bin',
+ '<(PRODUCT_DIR)/snapshot_blob.bin',
+ ],
+ }],
],
},
],
diff --git a/android_webview/lib/main/aw_main_delegate.cc b/android_webview/lib/main/aw_main_delegate.cc
index f8ea4a1..5ff728a 100644
--- a/android_webview/lib/main/aw_main_delegate.cc
+++ b/android_webview/lib/main/aw_main_delegate.cc
@@ -93,20 +93,10 @@ bool AwMainDelegate::BasicStartupComplete(int* exit_code) {
// In multi-process mode this code would live in
// AwContentBrowserClient::GetAdditionalMappedFilesForChildProcess.
#ifdef V8_USE_EXTERNAL_STARTUP_DATA
-#ifdef __LP64__
- const char kNativesFileName[] = "natives_blob_64.bin";
- const char kSnapshotFileName[] = "snapshot_blob_64.bin";
-#else
- const char kNativesFileName[] = "natives_blob_32.bin";
- const char kSnapshotFileName[] = "snapshot_blob_32.bin";
-#endif // __LP64__
- // TODO(gsennton) we should use
- // gin::IsolateHolder::kNativesFileName/kSnapshotFileName
- // here when those files have arch specific names http://crbug.com/455699
CHECK(AwAssets::RegisterAssetWithGlobalDescriptors(
- kV8NativesDataDescriptor, kNativesFileName));
+ kV8NativesDataDescriptor, gin::IsolateHolder::kNativesFileName));
CHECK(AwAssets::RegisterAssetWithGlobalDescriptors(
- kV8SnapshotDataDescriptor, kSnapshotFileName));
+ kV8SnapshotDataDescriptor, gin::IsolateHolder::kSnapshotFileName));
#endif
// TODO(mkosiba): make this CHECK when the android_webview_build uses an asset
// from the .apk too.
diff --git a/android_webview/snapshot_copying.gypi b/android_webview/snapshot_copying.gypi
deleted file mode 100644
index 1728cd6..0000000
--- a/android_webview/snapshot_copying.gypi
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- 'variables': {
- 'snapshot_additional_input_paths': [],
- 'snapshot_copy_files': [],
- 'conditions': [
- ['v8_use_external_startup_data==1 and (target_arch=="arm" or target_arch=="x86" or target_arch=="mips")', {
- 'snapshot_additional_input_paths': [
- '<(asset_location)/natives_blob_32.bin',
- '<(asset_location)/snapshot_blob_32.bin',
- ],
- 'snapshot_copy_files': [
- '<(PRODUCT_DIR)/natives_blob_32.bin',
- '<(PRODUCT_DIR)/snapshot_blob_32.bin',
- ],
- }],
- ['v8_use_external_startup_data==1 and (target_arch=="arm64" or target_arch=="x86_64" or target_arch=="mips64")', {
- 'snapshot_additional_input_paths': [
- '<(asset_location)/natives_blob_64.bin',
- '<(asset_location)/snapshot_blob_64.bin',
- ],
- 'snapshot_copy_files': [
- '<(PRODUCT_DIR)/natives_blob_64.bin',
- '<(PRODUCT_DIR)/snapshot_blob_64.bin',
- ],
- }],
- ],
- },
-}