diff --git a/DEPS b/DEPS index e1399768..ed5c4583 100644 --- a/DEPS +++ b/DEPS
@@ -44,7 +44,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling V8 # and whatever else without interference from each other. - 'v8_revision': '7e4c608ad9714906c1298918e5198200be3e5f5b', + 'v8_revision': '70df7e4d5c7d060da15204150368406da0a3ae74', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling swarming_client # and whatever else without interference from each other. @@ -96,7 +96,7 @@ # Three lines of non-changing comments so that # the commit queue can handle CLs rolling catapult # and whatever else without interference from each other. - 'catapult_revision': 'b7b743b57627c97cc62700ab07c1214bd677a37b', + 'catapult_revision': '041b58513c9679b8d609c6e67f50e37ed7e893d3', # Three lines of non-changing comments so that # the commit queue can handle CLs rolling libFuzzer # and whatever else without interference from each other.
diff --git a/ash/display/mirror_window_controller.cc b/ash/display/mirror_window_controller.cc index 66c0d86..b0e2d24f 100644 --- a/ash/display/mirror_window_controller.cc +++ b/ash/display/mirror_window_controller.cc
@@ -228,9 +228,11 @@ reflector_->AddMirroringLayer(mirror_window->layer()); } else { reflector_ = - aura::Env::GetInstance()->context_factory()->CreateReflector( - Shell::GetPrimaryRootWindow()->GetHost()->compositor(), - mirror_window->layer()); + aura::Env::GetInstance() + ->context_factory_private() + ->CreateReflector( + Shell::GetPrimaryRootWindow()->GetHost()->compositor(), + mirror_window->layer()); } } else { AshWindowTreeHost* ash_host = @@ -284,7 +286,7 @@ mirroring_host_info_map_.clear(); if (reflector_) { - aura::Env::GetInstance()->context_factory()->RemoveReflector( + aura::Env::GetInstance()->context_factory_private()->RemoveReflector( reflector_.get()); reflector_.reset(); }
diff --git a/ash/shell.cc b/ash/shell.cc index 4ed2409..66417d34 100644 --- a/ash/shell.cc +++ b/ash/shell.cc
@@ -652,6 +652,8 @@ display_manager_->RefreshFontParams(); aura::Env::GetInstance()->set_context_factory(init_params.context_factory); + aura::Env::GetInstance()->set_context_factory_private( + init_params.context_factory_private); // The WindowModalityController needs to be at the front of the input event // pretarget handler list to ensure that it processes input events when modal
diff --git a/ash/shell/content/client/shell_browser_main_parts.cc b/ash/shell/content/client/shell_browser_main_parts.cc index a83d25e..7fac63e 100644 --- a/ash/shell/content/client/shell_browser_main_parts.cc +++ b/ash/shell/content/client/shell_browser_main_parts.cc
@@ -135,6 +135,7 @@ ash::ShellInitParams init_params; init_params.delegate = delegate_; init_params.context_factory = content::GetContextFactory(); + init_params.context_factory_private = content::GetContextFactoryPrivate(); init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); ash::Shell::CreateInstance(init_params); ash::WmShell::Get()->CreateShelf();
diff --git a/ash/shell_init_params.h b/ash/shell_init_params.h index 8cff2f1..5849590 100644 --- a/ash/shell_init_params.h +++ b/ash/shell_init_params.h
@@ -22,6 +22,7 @@ struct ASH_EXPORT ShellInitParams { ShellDelegate* delegate = nullptr; ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; base::SequencedWorkerPool* blocking_pool = nullptr; };
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc index e28ad84..b28a856 100644 --- a/ash/test/ash_test_helper.cc +++ b/ash/test/ash_test_helper.cc
@@ -83,8 +83,10 @@ ui::InitializeInputMethodForTesting(); bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); // Creates Shell and hook with Desktop. if (!test_shell_delegate_) @@ -131,6 +133,7 @@ ShellInitParams init_params; init_params.delegate = test_shell_delegate_; init_params.context_factory = context_factory; + init_params.context_factory_private = context_factory_private; init_params.blocking_pool = ash_test_environment_->GetBlockingPool(); Shell::CreateInstance(init_params); aura::test::EnvTestHelper(aura::Env::GetInstance())
diff --git a/base/memory/shared_memory.h b/base/memory/shared_memory.h index e88568c..3c68e90a 100644 --- a/base/memory/shared_memory.h +++ b/base/memory/shared_memory.h
@@ -266,7 +266,9 @@ SHARE_CURRENT_MODE, }; +#if defined(OS_MACOSX) bool Share(SharedMemoryHandle* new_handle, ShareMode share_mode); +#endif bool ShareToProcessCommon(ProcessHandle process, SharedMemoryHandle* new_handle,
diff --git a/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.cc b/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.cc index 2a3d478..fef42d40 100644 --- a/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.cc +++ b/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.cc
@@ -137,19 +137,6 @@ gfx::RowSizeForBufferFormat(size.width(), format, 0)))); } -std::unique_ptr<gfx::GpuMemoryBuffer> -BlimpGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) { - if (handle.type != gfx::SHARED_MEMORY_BUFFER) - return nullptr; - - return base::WrapUnique<gfx::GpuMemoryBuffer>(new GpuMemoryBufferImpl( - size, format, base::MakeUnique<base::SharedMemory>(handle.handle, false), - handle.offset, handle.stride)); -} - void BlimpGpuMemoryBufferManager::SetDestructionSyncToken( gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) {
diff --git a/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.h b/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.h index 04e921c..1b09f66 100644 --- a/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.h +++ b/blimp/client/support/compositor/blimp_gpu_memory_buffer_manager.h
@@ -27,10 +27,6 @@ gfx::BufferFormat format, gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) override; - std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) override; void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) override;
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 17e1a61..80427f26 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn
@@ -58,9 +58,6 @@ config("feature_flags") { # Don't use deprecated V8 APIs anywhere. defines = [ "V8_DEPRECATION_WARNINGS" ] - if (enable_pdf) { - defines += [ "ENABLE_PDF=1" ] - } if (dcheck_always_on) { defines += [ "DCHECK_ALWAYS_ON=1" ] }
diff --git a/build/config/features.gni b/build/config/features.gni index 44fa391..53fe23f 100644 --- a/build/config/features.gni +++ b/build/config/features.gni
@@ -21,8 +21,6 @@ } declare_args() { - enable_pdf = !is_android && !is_ios && !is_chromecast - # Enables Native Client support. # Temporarily disable nacl on arm64 linux to get rid of compilation errors. # TODO(mcgrathr): When mipsel-nacl-clang is available, drop the exclusion.
diff --git a/cc/test/test_gpu_memory_buffer_manager.cc b/cc/test/test_gpu_memory_buffer_manager.cc index 4e5a653..fb6899f 100644 --- a/cc/test/test_gpu_memory_buffer_manager.cc +++ b/cc/test/test_gpu_memory_buffer_manager.cc
@@ -172,23 +172,6 @@ return result; } -std::unique_ptr<gfx::GpuMemoryBuffer> -TestGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) { - if (handle.type != gfx::SHARED_MEMORY_BUFFER) - return nullptr; - - last_gpu_memory_buffer_id_ += 1; - std::unique_ptr<gfx::GpuMemoryBuffer> result(new GpuMemoryBufferImpl( - this, last_gpu_memory_buffer_id_, size, format, - base::MakeUnique<base::SharedMemory>(handle.handle, false), handle.offset, - handle.stride)); - buffers_[last_gpu_memory_buffer_id_] = result.get(); - return result; -} - void TestGpuMemoryBufferManager::SetDestructionSyncToken( gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) {}
diff --git a/cc/test/test_gpu_memory_buffer_manager.h b/cc/test/test_gpu_memory_buffer_manager.h index f25e92a..befa88f 100644 --- a/cc/test/test_gpu_memory_buffer_manager.h +++ b/cc/test/test_gpu_memory_buffer_manager.h
@@ -29,10 +29,6 @@ gfx::BufferFormat format, gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) override; - std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) override; void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) override;
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn index 40ba93f..a4044b8 100644 --- a/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -239,13 +239,11 @@ # Needed to use the master_preferences functions "//chrome/installer/util:with_no_strings", "//content/public/app:both", + "//pdf", # For headless mode. "//headless:headless_shell_lib", ] - if (enable_plugins && enable_pdf) { - deps += [ "//pdf" ] - } public_deps = [ ":xdg_mime", # Needs to be public for installer to consume files. @@ -378,13 +376,10 @@ deps += [ ":child_dependencies", "//content/public/app:both", + "//pdf", ] } - if (enable_plugins && enable_pdf && !is_multi_dll_chrome) { - deps += [ "//pdf" ] - } - if (enable_package_mash_services) { deps += [ "//chrome/app/mash" ] } @@ -420,6 +415,7 @@ "//components/browser_watcher:browser_watcher_client", "//components/crash/content/app", "//content/public/app:child", + "//pdf", ] ldflags = [ @@ -439,10 +435,6 @@ configs += [ "//build/config/win:no_incremental_linking" ] } configs += [ "//build/config/compiler/pgo:default_pgo_flags" ] - - if (enable_plugins && enable_pdf) { - deps += [ "//pdf" ] - } } } copy("copy_first_run") { @@ -980,6 +972,7 @@ "//components/crash/content/app", "//components/policy:generated", "//content/public/app:both", + "//pdf", "//third_party/cld", ] @@ -993,10 +986,6 @@ "-ObjC", ] - if (enable_plugins && enable_pdf) { - deps += [ "//pdf" ] - } - if (enable_package_mash_services) { deps += [ "//chrome/app/mash" ] }
diff --git a/chrome/VERSION b/chrome/VERSION index 5a8746b..653ceaf 100644 --- a/chrome/VERSION +++ b/chrome/VERSION
@@ -1,4 +1,4 @@ MAJOR=57 MINOR=0 -BUILD=2951 +BUILD=2952 PATCH=0
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java index 1410b70..fa6dd935 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeFeatureList.java
@@ -58,6 +58,7 @@ public static final String CONTEXTUAL_SEARCH_SINGLE_ACTIONS = "ContextualSearchSingleActions"; /** Whether we show an important sites dialog in the "Clear Browsing Data" flow. */ public static final String IMPORTANT_SITES_IN_CBD = "ImportantSitesInCBD"; + public static final String IMPROVED_A2HS = "ImprovedA2HS"; public static final String NO_CREDIT_CARD_ABORT = "NoCreditCardAbort"; public static final String NTP_FAKE_OMNIBOX_TEXT = "NTPFakeOmniboxText"; public static final String NTP_FOREIGN_SESSIONS_SUGGESTIONS = "NTPForeignSessionsSuggestions"; @@ -71,7 +72,6 @@ public static final String VR_SHELL = "VrShell"; public static final String WEB_PAYMENTS = "WebPayments"; public static final String WEB_PAYMENTS_MODIFIERS = "WebPaymentsModifiers"; - public static final String WEBAPKS = "WebApks"; private static native boolean nativeIsEnabled(String featureName); }
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java b/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java index 3d2b55d8..2bafb9b 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/ChromeSwitches.java
@@ -196,11 +196,6 @@ public static final String PARTNER_HOMEPAGE_FOR_TESTING = "partner-homepage-for-testing"; /** - * Enables "Add to Home screen" to mint a WebApk. - */ - public static final String ENABLE_WEBAPK = "enable-improved-a2hs"; - - /** * Forces the WebAPK runtime dex to be extracted each time that Chrome is started. */ public static final String ALWAYS_EXTRACT_WEBAPK_RUNTIME_DEX_ON_STARTUP =
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java index ec6fdac..e727eac0 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/preferences/ChromePreferenceManager.java
@@ -356,16 +356,6 @@ writeBoolean(INSTANT_APPS_KEY, isEnabled); } - /** Checks the cached value for the WebAPK command line flag. */ - public boolean getCachedWebApkCommandLineEnabled() { - return mSharedPreferences.getBoolean(WEBAPK_COMMAND_LINE_KEY, false); - } - - /** Sets the cached value for the WebAPK command line flag. */ - public void setCachedWebApkCommandLineEnabled(boolean isEnabled) { - writeBoolean(WEBAPK_COMMAND_LINE_KEY, isEnabled); - } - /** Checks the cached value for the webapk feature. */ public boolean getCachedWebApkRuntimeEnabled() { return mSharedPreferences.getBoolean(WEBAPK_RUNTIME_KEY, false);
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java index e315d325..6db25e2 100644 --- a/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java +++ b/chrome/android/java/src/org/chromium/chrome/browser/webapps/ChromeWebApkHost.java
@@ -12,13 +12,11 @@ import android.support.v7.app.AlertDialog; import android.text.TextUtils; -import org.chromium.base.CommandLine; import org.chromium.base.ContextUtils; import org.chromium.base.Log; import org.chromium.base.annotations.CalledByNative; import org.chromium.chrome.R; import org.chromium.chrome.browser.ChromeFeatureList; -import org.chromium.chrome.browser.ChromeSwitches; import org.chromium.chrome.browser.ChromeVersionInfo; import org.chromium.chrome.browser.preferences.ChromePreferenceManager; import org.chromium.components.variations.VariationsAssociatedData; @@ -53,7 +51,7 @@ public static boolean canUseGooglePlayToInstallWebApk() { if (!isEnabled()) return false; return TextUtils.equals(VariationsAssociatedData.getVariationParamValue( - ChromeFeatureList.WEBAPKS, PLAY_INSTALL), "true"); + ChromeFeatureList.IMPROVED_A2HS, PLAY_INSTALL), "true"); } @CalledByNative @@ -79,22 +77,15 @@ /** * Show dialog warning user that "installation from unknown sources" is required by the WebAPK - * experiment if: - * - The user toggled the --enable-improved-a2hs command line flag via chrome://flags - * AND - * - WebAPKs are not disabled via variations kill switch. - * Must be run prior to {@link cacheEnabledStateForNextLaunch}. + * experiment if the user enabled "Improved Add to Home screen" via chrome://flags. */ public static void launchWebApkRequirementsDialogIfNeeded(Context context) { // Show dialog on Canary & Dev. Installation via "unknown sources" is disabled via // variations on other channels. if (!ChromeVersionInfo.isCanaryBuild() && !ChromeVersionInfo.isDevBuild()) return; - Context applicationContext = ContextUtils.getApplicationContext(); - boolean wasCommandLineFlagEnabled = ChromePreferenceManager.getInstance(applicationContext) - .getCachedWebApkCommandLineEnabled(); - if (computeEnabled() && !wasCommandLineFlagEnabled - && !installingFromUnknownSourcesAllowed(applicationContext)) { + if (ChromeFeatureList.isEnabled(ChromeFeatureList.IMPROVED_A2HS) + && !installingFromUnknownSourcesAllowed()) { showUnknownSourcesNeededDialog(context); } } @@ -107,40 +98,23 @@ ChromePreferenceManager preferenceManager = ChromePreferenceManager.getInstance(ContextUtils.getApplicationContext()); - boolean wasCommandLineEnabled = preferenceManager.getCachedWebApkCommandLineEnabled(); - boolean isCommandLineEnabled = isCommandLineFlagSet(); - if (isCommandLineEnabled != wasCommandLineEnabled) { - // {@link launchWebApkRequirementsDialogIfNeeded()} is skipped the first time Chrome is - // launched so do caching here instead. - preferenceManager.setCachedWebApkCommandLineEnabled(isCommandLineEnabled); - } - boolean wasEnabled = isEnabledInPrefs(); - boolean isEnabled = computeEnabled(); + boolean isEnabled = ChromeFeatureList.isEnabled(ChromeFeatureList.IMPROVED_A2HS); if (isEnabled != wasEnabled) { Log.d(TAG, "WebApk setting changed (%s => %s)", wasEnabled, isEnabled); preferenceManager.setCachedWebApkRuntimeEnabled(isEnabled); } } - /** Returns whether the --enable-improved-a2hs command line flag is set */ - private static boolean isCommandLineFlagSet() { - return CommandLine.getInstance().hasSwitch(ChromeSwitches.ENABLE_WEBAPK); - } - - /** Returns whether we should enable WebAPKs */ - private static boolean computeEnabled() { - return isCommandLineFlagSet() && ChromeFeatureList.isEnabled(ChromeFeatureList.WEBAPKS); - } - /** * Returns whether the user has enabled installing apps from sources other than the Google Play * Store. */ - private static boolean installingFromUnknownSourcesAllowed(Context context) { + private static boolean installingFromUnknownSourcesAllowed() { + Context applicationContext = ContextUtils.getApplicationContext(); try { - return Settings.Secure.getInt( - context.getContentResolver(), Settings.Secure.INSTALL_NON_MARKET_APPS) + return Settings.Secure.getInt(applicationContext.getContentResolver(), + Settings.Secure.INSTALL_NON_MARKET_APPS) == 1; } catch (Settings.SettingNotFoundException e) { return false;
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java index c3a5269e..37dddba9 100644 --- a/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java +++ b/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java
@@ -9,6 +9,7 @@ import android.content.pm.ResolveInfo; import android.test.suitebuilder.annotation.SmallTest; +import org.chromium.base.test.util.DisabledTest; import org.chromium.chrome.browser.ChromeActivity; import org.chromium.chrome.test.ChromeActivityTestCaseBase; @@ -95,7 +96,8 @@ resolveInfos, packageName).size()); } - @SmallTest + // @SmallTest + @DisabledTest(message = "crbug.com/673680") public void testIsPackageSpecializeHandler_withEphemeralResolver() { String packageName = ""; ResolveInfo info = new ResolveInfo();
diff --git a/chrome/app/BUILD.gn b/chrome/app/BUILD.gn index 9e95889..1460145 100644 --- a/chrome/app/BUILD.gn +++ b/chrome/app/BUILD.gn
@@ -318,6 +318,7 @@ "//components/startup_metric_utils/browser:lib", "//content/public/app:both", "//content/public/common", + "//pdf", "//ppapi/features", "//printing/features", "//ui/base", @@ -344,10 +345,6 @@ ] } - if (enable_pdf) { - deps += [ "//pdf" ] - } - if (enable_plugins && enable_nacl) { deps += [ "//components/nacl/browser",
diff --git a/chrome/app/chrome_main_delegate.cc b/chrome/app/chrome_main_delegate.cc index da97192..2d2b8c7 100644 --- a/chrome/app/chrome_main_delegate.cc +++ b/chrome/app/chrome_main_delegate.cc
@@ -51,6 +51,7 @@ #include "content/public/common/content_paths.h" #include "content/public/common/content_switches.h" #include "extensions/common/constants.h" +#include "pdf/features.h" #include "ppapi/features/features.h" #include "printing/features/features.h" #include "ui/base/material_design/material_design_controller.h" @@ -925,7 +926,7 @@ nacl_plugin::PPP_InitializeModule, nacl_plugin::PPP_ShutdownModule); #endif -#if BUILDFLAG(ENABLE_PLUGINS) && defined(ENABLE_PDF) +#if BUILDFLAG(ENABLE_PLUGINS) && BUILDFLAG(ENABLE_PDF) ChromeContentClient::SetPDFEntryFunctions( chrome_pdf::PPP_GetInterface, chrome_pdf::PPP_InitializeModule,
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index dc77e84d..7547369 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc
@@ -2018,7 +2018,7 @@ #if defined(OS_ANDROID) {"enable-improved-a2hs", IDS_FLAGS_ENABLE_WEBAPK, IDS_FLAGS_ENABLE_WEBAPK_DESCRIPTION, kOsAndroid, - SINGLE_VALUE_TYPE(switches::kEnableWebApk)}, + FEATURE_VALUE_TYPE(chrome::android::kImprovedA2HS)}, {"no-credit-card-abort", IDS_FLAGS_NO_CREDIT_CARD_ABORT, IDS_FLAGS_NO_CREDIT_CARD_ABORT_DESCRIPTION, kOsAndroid, FEATURE_VALUE_TYPE(chrome::android::kNoCreditCardAbort)},
diff --git a/chrome/browser/android/chrome_feature_list.cc b/chrome/browser/android/chrome_feature_list.cc index dfda1e8..e9339af 100644 --- a/chrome/browser/android/chrome_feature_list.cc +++ b/chrome/browser/android/chrome_feature_list.cc
@@ -45,6 +45,7 @@ &kContextualSearchSingleActions, &kDownloadsUiFeature, &kImportantSitesInCBD, + &kImprovedA2HS, &kNoCreditCardAbort, &kNTPFakeOmniboxTextFeature, &kNTPOfflinePagesFeature, @@ -53,7 +54,6 @@ &kSpecialLocaleFeature, &kSpecialLocaleWrapper, &kTabReparenting, - &kWebApks, &kWebPaymentsModifiers, &ntp_snippets::kContentSuggestionsFeature, &ntp_snippets::kIncreasedVisibility, @@ -91,6 +91,11 @@ const base::Feature kImportantSitesInCBD{"ImportantSitesInCBD", base::FEATURE_DISABLED_BY_DEFAULT}; +// Makes "Add to Home screen" in the app menu generate an APK for the shortcut +// URL which opens Chrome in fullscreen. +const base::Feature kImprovedA2HS{"ImprovedA2HS", + base::FEATURE_DISABLED_BY_DEFAULT}; + const base::Feature kNoCreditCardAbort{"NoCreditCardAbort", base::FEATURE_DISABLED_BY_DEFAULT}; @@ -118,10 +123,6 @@ const base::Feature kUserMediaScreenCapturing{ "UserMediaScreenCapturing", base::FEATURE_DISABLED_BY_DEFAULT}; -// Makes "Add to Home screen" in the app menu generate an APK for the shortcut -// URL which opens Chrome in fullscreen. -const base::Feature kWebApks{"WebApks", base::FEATURE_DISABLED_BY_DEFAULT}; - const base::Feature kWebPaymentsModifiers{"WebPaymentsModifiers", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/chrome/browser/android/chrome_feature_list.h b/chrome/browser/android/chrome_feature_list.h index 453429b2..b1e95737 100644 --- a/chrome/browser/android/chrome_feature_list.h +++ b/chrome/browser/android/chrome_feature_list.h
@@ -20,6 +20,7 @@ extern const base::Feature kContextualSearchSingleActions; extern const base::Feature kDownloadsUiFeature; extern const base::Feature kImportantSitesInCBD; +extern const base::Feature kImprovedA2HS; extern const base::Feature kNoCreditCardAbort; extern const base::Feature kNTPFakeOmniboxTextFeature; extern const base::Feature kNTPOfflinePagesFeature; @@ -29,7 +30,6 @@ extern const base::Feature kSpecialLocaleWrapper; extern const base::Feature kTabReparenting; extern const base::Feature kUserMediaScreenCapturing; -extern const base::Feature kWebApks; extern const base::Feature kWebPaymentsModifiers; bool RegisterChromeFeatureListJni(JNIEnv* env);
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc index bfb73d1f..2d7a02d6 100644 --- a/chrome/browser/chrome_content_browser_client.cc +++ b/chrome/browser/chrome_content_browser_client.cc
@@ -215,6 +215,7 @@ #elif defined(OS_CHROMEOS) #include "chrome/browser/chromeos/arc/arc_session_manager.h" #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_backend_delegate.h" +#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h" #include "chrome/browser/chromeos/arc/intent_helper/arc_navigation_throttle.h" #include "chrome/browser/chromeos/attestation/platform_verification_impl.h" #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" @@ -2813,6 +2814,7 @@ base::MakeUnique<chromeos::MTPFileSystemBackendDelegate>( storage_partition_path), base::MakeUnique<arc::ArcContentFileSystemBackendDelegate>(), + base::MakeUnique<arc::ArcDocumentsProviderBackendDelegate>(), external_mount_points, storage::ExternalMountPoints::GetSystemInstance()); backend->AddSystemMountPoints(); DCHECK(backend->CanHandleType(storage::kFileSystemTypeExternal));
diff --git a/chrome/browser/chromeos/BUILD.gn b/chrome/browser/chromeos/BUILD.gn index e04aed9..400a64c4 100644 --- a/chrome/browser/chromeos/BUILD.gn +++ b/chrome/browser/chromeos/BUILD.gn
@@ -243,6 +243,10 @@ "arc/fileapi/arc_content_file_system_service.h", "arc/fileapi/arc_content_file_system_url_util.cc", "arc/fileapi/arc_content_file_system_url_util.h", + "arc/fileapi/arc_documents_provider_async_file_util.cc", + "arc/fileapi/arc_documents_provider_async_file_util.h", + "arc/fileapi/arc_documents_provider_backend_delegate.cc", + "arc/fileapi/arc_documents_provider_backend_delegate.h", "arc/fileapi/arc_file_system_instance_util.cc", "arc/fileapi/arc_file_system_instance_util.h", "arc/intent_helper/arc_external_protocol_dialog.cc",
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc new file mode 100644 index 0000000..d14a96ac --- /dev/null +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.cc
@@ -0,0 +1,168 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h" + +#include "base/callback.h" +#include "base/files/file.h" +#include "base/files/file_path.h" +#include "base/logging.h" +#include "content/public/browser/browser_thread.h" +#include "storage/browser/blob/shareable_file_reference.h" + +using content::BrowserThread; + +namespace arc { + +ArcDocumentsProviderAsyncFileUtil::ArcDocumentsProviderAsyncFileUtil() = + default; + +ArcDocumentsProviderAsyncFileUtil::~ArcDocumentsProviderAsyncFileUtil() = + default; + +void ArcDocumentsProviderAsyncFileUtil::CreateOrOpen( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + int file_flags, + const CreateOrOpenCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + // TODO(nya): Implement this function if it is ever called. + NOTIMPLEMENTED(); + callback.Run(base::File(base::File::FILE_ERROR_INVALID_OPERATION), + base::Closure()); +} + +void ArcDocumentsProviderAsyncFileUtil::EnsureFileExists( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const EnsureFileExistsCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED, false); +} + +void ArcDocumentsProviderAsyncFileUtil::CreateDirectory( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + bool exclusive, + bool recursive, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::GetFileInfo( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + int fields, + const GetFileInfoCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. + callback.Run(base::File::FILE_ERROR_NOT_FOUND, base::File::Info()); +} + +void ArcDocumentsProviderAsyncFileUtil::ReadDirectory( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const ReadDirectoryCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. + callback.Run(base::File::FILE_ERROR_NOT_FOUND, EntryList(), + false /* has_more */); +} + +void ArcDocumentsProviderAsyncFileUtil::Touch( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const base::Time& last_access_time, + const base::Time& last_modified_time, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::Truncate( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + int64_t length, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::CopyFileLocal( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& src_url, + const storage::FileSystemURL& dest_url, + CopyOrMoveOption option, + const CopyFileProgressCallback& progress_callback, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::MoveFileLocal( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& src_url, + const storage::FileSystemURL& dest_url, + CopyOrMoveOption option, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::CopyInForeignFile( + std::unique_ptr<storage::FileSystemOperationContext> context, + const base::FilePath& src_file_path, + const storage::FileSystemURL& dest_url, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::DeleteFile( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::DeleteDirectory( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::DeleteRecursively( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const StatusCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + callback.Run(base::File::FILE_ERROR_ACCESS_DENIED); +} + +void ArcDocumentsProviderAsyncFileUtil::CreateSnapshotFile( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const CreateSnapshotFileCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. + callback.Run(base::File::FILE_ERROR_FAILED, base::File::Info(), + base::FilePath(), + scoped_refptr<storage::ShareableFileReference>()); +} + +} // namespace arc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h new file mode 100644 index 0000000..24037e2 --- /dev/null +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h
@@ -0,0 +1,97 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UTIL_H_ +#define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UTIL_H_ + +#include <memory> + +#include "base/callback.h" +#include "base/macros.h" +#include "storage/browser/fileapi/async_file_util.h" + +namespace arc { + +// The implementation of storage::AsyncFileUtil for media view. +// +// All of the methods must be called on the IO thread. +class ArcDocumentsProviderAsyncFileUtil : public storage::AsyncFileUtil { + public: + ArcDocumentsProviderAsyncFileUtil(); + ~ArcDocumentsProviderAsyncFileUtil() override; + + // storage::AsyncFileUtil overrides. + void CreateOrOpen( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + int file_flags, + const CreateOrOpenCallback& callback) override; + void EnsureFileExists( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const EnsureFileExistsCallback& callback) override; + void CreateDirectory( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + bool exclusive, + bool recursive, + const StatusCallback& callback) override; + void GetFileInfo(std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + int fields, + const GetFileInfoCallback& callback) override; + void ReadDirectory( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const ReadDirectoryCallback& callback) override; + void Touch(std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const base::Time& last_access_time, + const base::Time& last_modified_time, + const StatusCallback& callback) override; + void Truncate(std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + int64_t length, + const StatusCallback& callback) override; + void CopyFileLocal( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& src_url, + const storage::FileSystemURL& dest_url, + CopyOrMoveOption option, + const CopyFileProgressCallback& progress_callback, + const StatusCallback& callback) override; + void MoveFileLocal( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& src_url, + const storage::FileSystemURL& dest_url, + CopyOrMoveOption option, + const StatusCallback& callback) override; + void CopyInForeignFile( + std::unique_ptr<storage::FileSystemOperationContext> context, + const base::FilePath& src_file_path, + const storage::FileSystemURL& dest_url, + const StatusCallback& callback) override; + void DeleteFile(std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const StatusCallback& callback) override; + void DeleteDirectory( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const StatusCallback& callback) override; + void DeleteRecursively( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const StatusCallback& callback) override; + void CreateSnapshotFile( + std::unique_ptr<storage::FileSystemOperationContext> context, + const storage::FileSystemURL& url, + const CreateSnapshotFileCallback& callback) override; + + private: + DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderAsyncFileUtil); +}; + +} // namespace arc + +#endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_ASYNC_FILE_UTIL_H_
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc new file mode 100644 index 0000000..04114f3 --- /dev/null +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.cc
@@ -0,0 +1,69 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h" + +#include <utility> + +#include "base/logging.h" +#include "content/public/browser/browser_thread.h" +#include "storage/browser/fileapi/file_stream_reader.h" +#include "storage/browser/fileapi/file_stream_writer.h" +#include "url/gurl.h" + +using content::BrowserThread; + +namespace arc { + +ArcDocumentsProviderBackendDelegate::ArcDocumentsProviderBackendDelegate() = + default; + +ArcDocumentsProviderBackendDelegate::~ArcDocumentsProviderBackendDelegate() { + DCHECK_CURRENTLY_ON(BrowserThread::IO); +} + +storage::AsyncFileUtil* ArcDocumentsProviderBackendDelegate::GetAsyncFileUtil( + storage::FileSystemType type) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + return &async_file_util_; +} + +std::unique_ptr<storage::FileStreamReader> +ArcDocumentsProviderBackendDelegate::CreateFileStreamReader( + const storage::FileSystemURL& url, + int64_t offset, + int64_t max_bytes_to_read, + const base::Time& expected_modification_time, + storage::FileSystemContext* context) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. + return nullptr; +} + +std::unique_ptr<storage::FileStreamWriter> +ArcDocumentsProviderBackendDelegate::CreateFileStreamWriter( + const storage::FileSystemURL& url, + int64_t offset, + storage::FileSystemContext* context) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTREACHED(); // Read-only file system. + return nullptr; +} + +storage::WatcherManager* ArcDocumentsProviderBackendDelegate::GetWatcherManager( + storage::FileSystemType type) { + DCHECK_CURRENTLY_ON(BrowserThread::UI); + NOTREACHED(); // Non-watchable file system. + return nullptr; +} + +void ArcDocumentsProviderBackendDelegate::GetRedirectURLForContents( + const storage::FileSystemURL& url, + const storage::URLCallback& callback) { + DCHECK_CURRENTLY_ON(BrowserThread::IO); + NOTIMPLEMENTED(); // TODO(crbug.com/671511): Implement this function. + callback.Run(GURL()); +} + +} // namespace arc
diff --git a/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h new file mode 100644 index 0000000..a5ae642 --- /dev/null +++ b/chrome/browser/chromeos/arc/fileapi/arc_documents_provider_backend_delegate.h
@@ -0,0 +1,49 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEGATE_H_ +#define CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEGATE_H_ + +#include <memory> + +#include "base/macros.h" +#include "chrome/browser/chromeos/arc/fileapi/arc_documents_provider_async_file_util.h" +#include "chrome/browser/chromeos/fileapi/file_system_backend_delegate.h" + +namespace arc { + +// Implements ARC documents provider filesystem. +class ArcDocumentsProviderBackendDelegate + : public chromeos::FileSystemBackendDelegate { + public: + ArcDocumentsProviderBackendDelegate(); + ~ArcDocumentsProviderBackendDelegate() override; + + // FileSystemBackend::Delegate overrides. + storage::AsyncFileUtil* GetAsyncFileUtil( + storage::FileSystemType type) override; + std::unique_ptr<storage::FileStreamReader> CreateFileStreamReader( + const storage::FileSystemURL& url, + int64_t offset, + int64_t max_bytes_to_read, + const base::Time& expected_modification_time, + storage::FileSystemContext* context) override; + std::unique_ptr<storage::FileStreamWriter> CreateFileStreamWriter( + const storage::FileSystemURL& url, + int64_t offset, + storage::FileSystemContext* context) override; + storage::WatcherManager* GetWatcherManager( + storage::FileSystemType type) override; + void GetRedirectURLForContents(const storage::FileSystemURL& url, + const storage::URLCallback& callback) override; + + private: + ArcDocumentsProviderAsyncFileUtil async_file_util_; + + DISALLOW_COPY_AND_ASSIGN(ArcDocumentsProviderBackendDelegate); +}; + +} // namespace arc + +#endif // CHROME_BROWSER_CHROMEOS_ARC_FILEAPI_ARC_DOCUMENTS_PROVIDER_BACKEND_DELEGATE_H_
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.cc b/chrome/browser/chromeos/fileapi/file_system_backend.cc index d81fc87..9992f28 100644 --- a/chrome/browser/chromeos/fileapi/file_system_backend.cc +++ b/chrome/browser/chromeos/fileapi/file_system_backend.cc
@@ -49,7 +49,8 @@ url.type() == storage::kFileSystemTypeDrive || url.type() == storage::kFileSystemTypeProvided || url.type() == storage::kFileSystemTypeDeviceMediaAsFileStorage || - url.type() == storage::kFileSystemTypeArcContent; + url.type() == storage::kFileSystemTypeArcContent || + url.type() == storage::kFileSystemTypeArcDocumentsProvider; } FileSystemBackend::FileSystemBackend( @@ -57,6 +58,7 @@ std::unique_ptr<FileSystemBackendDelegate> file_system_provider_delegate, std::unique_ptr<FileSystemBackendDelegate> mtp_delegate, std::unique_ptr<FileSystemBackendDelegate> arc_content_delegate, + std::unique_ptr<FileSystemBackendDelegate> arc_documents_provider_delegate, scoped_refptr<storage::ExternalMountPoints> mount_points, storage::ExternalMountPoints* system_mount_points) : file_access_permissions_(new FileAccessPermissions()), @@ -65,6 +67,8 @@ file_system_provider_delegate_(std::move(file_system_provider_delegate)), mtp_delegate_(std::move(mtp_delegate)), arc_content_delegate_(std::move(arc_content_delegate)), + arc_documents_provider_delegate_( + std::move(arc_documents_provider_delegate)), mount_points_(mount_points), system_mount_points_(system_mount_points) {} @@ -101,6 +105,7 @@ case storage::kFileSystemTypeDeviceMediaAsFileStorage: case storage::kFileSystemTypeProvided: case storage::kFileSystemTypeArcContent: + case storage::kFileSystemTypeArcDocumentsProvider: return true; default: return false; @@ -253,6 +258,8 @@ return mtp_delegate_->GetAsyncFileUtil(type); case storage::kFileSystemTypeArcContent: return arc_content_delegate_->GetAsyncFileUtil(type); + case storage::kFileSystemTypeArcDocumentsProvider: + return arc_documents_provider_delegate_->GetAsyncFileUtil(type); default: NOTREACHED(); } @@ -306,7 +313,8 @@ url.type() == storage::kFileSystemTypeRestrictedNativeLocal || url.type() == storage::kFileSystemTypeDrive || url.type() == storage::kFileSystemTypeProvided || - url.type() == storage::kFileSystemTypeArcContent); + url.type() == storage::kFileSystemTypeArcContent || + url.type() == storage::kFileSystemTypeArcDocumentsProvider); return storage::FileSystemOperation::Create( url, context, base::MakeUnique<storage::FileSystemOperationContext>(context)); @@ -317,7 +325,8 @@ return url.type() == storage::kFileSystemTypeDrive || url.type() == storage::kFileSystemTypeProvided || url.type() == storage::kFileSystemTypeDeviceMediaAsFileStorage || - url.type() == storage::kFileSystemTypeArcContent; + url.type() == storage::kFileSystemTypeArcContent || + url.type() == storage::kFileSystemTypeArcDocumentsProvider; } bool FileSystemBackend::HasInplaceCopyImplementation( @@ -330,6 +339,7 @@ case storage::kFileSystemTypeNativeLocal: case storage::kFileSystemTypeRestrictedNativeLocal: case storage::kFileSystemTypeArcContent: + case storage::kFileSystemTypeArcDocumentsProvider: return false; default: NOTREACHED(); @@ -367,6 +377,9 @@ case storage::kFileSystemTypeArcContent: return arc_content_delegate_->CreateFileStreamReader( url, offset, max_bytes_to_read, expected_modification_time, context); + case storage::kFileSystemTypeArcDocumentsProvider: + return arc_documents_provider_delegate_->CreateFileStreamReader( + url, offset, max_bytes_to_read, expected_modification_time, context); default: NOTREACHED(); } @@ -399,6 +412,7 @@ // Read only file systems. case storage::kFileSystemTypeRestrictedNativeLocal: case storage::kFileSystemTypeArcContent: + case storage::kFileSystemTypeArcDocumentsProvider: return std::unique_ptr<storage::FileStreamWriter>(); default: NOTREACHED(); @@ -434,6 +448,7 @@ case storage::kFileSystemTypeNativeLocal: case storage::kFileSystemTypeRestrictedNativeLocal: case storage::kFileSystemTypeArcContent: + case storage::kFileSystemTypeArcDocumentsProvider: callback.Run(GURL()); return; default:
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend.h b/chrome/browser/chromeos/fileapi/file_system_backend.h index d2a04540..4a796d8 100644 --- a/chrome/browser/chromeos/fileapi/file_system_backend.h +++ b/chrome/browser/chromeos/fileapi/file_system_backend.h
@@ -73,6 +73,8 @@ std::unique_ptr<FileSystemBackendDelegate> file_system_provider_delegate, std::unique_ptr<FileSystemBackendDelegate> mtp_delegate, std::unique_ptr<FileSystemBackendDelegate> arc_content_delegate, + std::unique_ptr<FileSystemBackendDelegate> + arc_documents_provider_delegate, scoped_refptr<storage::ExternalMountPoints> mount_points, storage::ExternalMountPoints* system_mount_points); ~FileSystemBackend() override; @@ -155,6 +157,9 @@ // The delegate instance for the ARC content file system related operations. std::unique_ptr<FileSystemBackendDelegate> arc_content_delegate_; + // The delegate instance for the ARC documents provider related operations. + std::unique_ptr<FileSystemBackendDelegate> arc_documents_provider_delegate_; + // Mount points specific to the owning context (i.e. per-profile mount // points). //
diff --git a/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc b/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc index 8d5e739..a2619f0a 100644 --- a/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc +++ b/chrome/browser/chromeos/fileapi/file_system_backend_unittest.cc
@@ -45,6 +45,7 @@ nullptr, // file_system_provider_delegate nullptr, // mtp_delegate nullptr, // arc_content_delegate + nullptr, // arc_documents_provider_delegate mount_points.get(), storage::ExternalMountPoints::GetSystemInstance()); backend.AddSystemMountPoints(); std::vector<base::FilePath> root_dirs = backend.GetRootDirectories(); @@ -67,12 +68,13 @@ scoped_refptr<storage::ExternalMountPoints> system_mount_points( storage::ExternalMountPoints::CreateRefCounted()); - chromeos::FileSystemBackend backend(nullptr, // drive_delegate - nullptr, // file_system_provider_delegate - nullptr, // mtp_delegate - nullptr, // arc_content_delegate - mount_points.get(), - system_mount_points.get()); + chromeos::FileSystemBackend backend( + nullptr, // drive_delegate + nullptr, // file_system_provider_delegate + nullptr, // mtp_delegate + nullptr, // arc_content_delegate + nullptr, // arc_documents_provider_delegate + mount_points.get(), system_mount_points.get()); const size_t initial_root_dirs_size = backend.GetRootDirectories().size(); @@ -112,12 +114,13 @@ storage::ExternalMountPoints::CreateRefCounted()); scoped_refptr<storage::ExternalMountPoints> system_mount_points( storage::ExternalMountPoints::CreateRefCounted()); - chromeos::FileSystemBackend backend(nullptr, // drive_delegate - nullptr, // file_system_provider_delegate - nullptr, // mtp_delegate - nullptr, // arc_content_delegate - mount_points.get(), - system_mount_points.get()); + chromeos::FileSystemBackend backend( + nullptr, // drive_delegate + nullptr, // file_system_provider_delegate + nullptr, // mtp_delegate + nullptr, // arc_content_delegate + nullptr, // arc_documents_provider_delegate + mount_points.get(), system_mount_points.get()); std::string extension("ddammdhioacbehjngdmkjcjbnfginlla"); @@ -181,12 +184,13 @@ storage::ExternalMountPoints::CreateRefCounted()); scoped_refptr<storage::ExternalMountPoints> system_mount_points( storage::ExternalMountPoints::CreateRefCounted()); - chromeos::FileSystemBackend backend(nullptr, // drive_delegate - nullptr, // file_system_provider_delegate - nullptr, // mtp_delegate - nullptr, // arc_content_delegate - mount_points.get(), - system_mount_points.get()); + chromeos::FileSystemBackend backend( + nullptr, // drive_delegate + nullptr, // file_system_provider_delegate + nullptr, // mtp_delegate + nullptr, // arc_content_delegate + nullptr, // arc_documents_provider_delegate + mount_points.get(), system_mount_points.get()); const storage::FileSystemType type = storage::kFileSystemTypeNativeLocal; const storage::FileSystemMountOption option =
diff --git a/chrome/browser/platform_util_unittest.cc b/chrome/browser/platform_util_unittest.cc index b17f480..a929cb67 100644 --- a/chrome/browser/platform_util_unittest.cc +++ b/chrome/browser/platform_util_unittest.cc
@@ -56,7 +56,7 @@ // New FileSystemBackend that uses our MockSpecialStoragePolicy. chromeos::FileSystemBackend* backend = new chromeos::FileSystemBackend( - nullptr, nullptr, nullptr, nullptr, external_mount_points, + nullptr, nullptr, nullptr, nullptr, nullptr, external_mount_points, storage::ExternalMountPoints::GetSystemInstance()); additional_backends->push_back(backend); }
diff --git a/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js b/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js index ffbb268..f15709c2 100644 --- a/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js +++ b/chrome/browser/resources/bluetooth_internals/bluetooth_internals.js
@@ -10,6 +10,7 @@ // Expose for testing. var adapterBroker = null; var devices = null; +var sidebarObj = null; cr.define('bluetooth_internals', function() { /** @const */ var DevicesPage = devices_page.DevicesPage; @@ -109,9 +110,9 @@ } function setupPages() { - var sidebar = new window.sidebar.Sidebar($('sidebar')); - $('menu-btn').addEventListener('click', function() { sidebar.open(); }); - PageManager.addObserver(sidebar); + sidebarObj = new window.sidebar.Sidebar($('sidebar')); + $('menu-btn').addEventListener('click', function() { sidebarObj.open(); }); + PageManager.addObserver(sidebarObj); PageManager.addObserver(new PageObserver()); devicesPage = new DevicesPage();
diff --git a/chrome/browser/resources/md_downloads/crisper.js b/chrome/browser/resources/md_downloads/crisper.js index 59d0114..9af2257 100644 --- a/chrome/browser/resources/md_downloads/crisper.js +++ b/chrome/browser/resources/md_downloads/crisper.js
@@ -48,11 +48,11 @@ // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -var CrSearchFieldBehavior={properties:{label:{type:String,value:""},clearLabel:{type:String,value:""},showingSearch:{type:Boolean,value:false,notify:true,observer:"showingSearchChanged_",reflectToAttribute:true},lastValue_:{type:String,value:""}},getSearchInput:function(){},getValue:function(){return this.getSearchInput().value},setValue:function(value,opt_noEvent){var searchInput=this.getSearchInput();searchInput.value=value;if(searchInput.bindValue!=undefined)searchInput.bindValue=value;this.onValueChanged_(value,!!opt_noEvent)},showAndFocus:function(){this.showingSearch=true;this.focus_()},focus_:function(){this.getSearchInput().focus()},onSearchTermSearch:function(){this.onValueChanged_(this.getValue(),false)},onValueChanged_:function(newValue,noEvent){if(newValue==this.lastValue_)return;this.lastValue_=newValue;if(!noEvent)this.fire("search-changed",newValue)},onSearchTermKeydown:function(e){if(e.key=="Escape")this.showingSearch=false},showingSearchChanged_:function(current,previous){if(previous==undefined)return;if(this.showingSearch){this.focus_();return}this.setValue("");this.getSearchInput().blur()}}; +var CrSearchFieldBehavior={properties:{label:{type:String,value:""},clearLabel:{type:String,value:""},lastValue_:{type:String,value:""}},getSearchInput:function(){},getValue:function(){return this.getSearchInput().value},setValue:function(value,opt_noEvent){var searchInput=this.getSearchInput();searchInput.value=value;this.onValueChanged_(value,!!opt_noEvent)},onSearchTermSearch:function(){this.onValueChanged_(this.getValue(),false)},onValueChanged_:function(newValue,noEvent){if(newValue==this.lastValue_)return;this.lastValue_=newValue;if(!noEvent)this.fire("search-changed",newValue)}}; // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -Polymer({is:"cr-toolbar-search-field",behaviors:[CrSearchFieldBehavior],properties:{narrow:{type:Boolean,reflectToAttribute:true},label:String,clearLabel:String,spinnerActive:{type:Boolean,reflectToAttribute:true},hasSearchText_:{type:Boolean,reflectToAttribute:true},isSpinnerShown_:{type:Boolean,computed:"computeIsSpinnerShown_(spinnerActive, showingSearch)"},searchFocused_:{type:Boolean,value:false}},listeners:{click:"showSearch_"},getSearchInput:function(){return this.$.searchInput},setValue:function(value,opt_noEvent){CrSearchFieldBehavior.setValue.call(this,value,opt_noEvent);this.onSearchInput_()},isSearchFocused:function(){return this.searchFocused_},computeIconTabIndex_:function(narrow){return narrow?0:-1},computeIsSpinnerShown_:function(){return this.spinnerActive&&this.showingSearch},onInputFocus_:function(){this.searchFocused_=true},onInputBlur_:function(){this.searchFocused_=false;if(!this.hasSearchText_)this.showingSearch=false},onSearchInput_:function(){var newValue=this.$.searchInput.value;this.hasSearchText_=newValue!="";if(newValue!="")this.showingSearch=true},showSearch_:function(e){if(e.target!=this.$.clearSearch)this.showingSearch=true},clearSearch_:function(e){this.setValue("");this.getSearchInput().focus()}}); +Polymer({is:"cr-toolbar-search-field",behaviors:[CrSearchFieldBehavior],properties:{narrow:{type:Boolean,reflectToAttribute:true},showingSearch:{type:Boolean,value:false,notify:true,observer:"showingSearchChanged_",reflectToAttribute:true},label:String,clearLabel:String,spinnerActive:{type:Boolean,reflectToAttribute:true},hasSearchText_:{type:Boolean,reflectToAttribute:true},isSpinnerShown_:{type:Boolean,computed:"computeIsSpinnerShown_(spinnerActive, showingSearch)"},searchFocused_:{type:Boolean,value:false}},listeners:{click:"showSearch_"},getSearchInput:function(){return this.$.searchInput},setValue:function(value,opt_noEvent){CrSearchFieldBehavior.setValue.call(this,value,opt_noEvent);this.onSearchInput_()},isSearchFocused:function(){return this.searchFocused_},showAndFocus:function(){this.showingSearch=true;this.focus_()},focus_:function(){this.getSearchInput().focus()},computeIconTabIndex_:function(narrow){return narrow?0:-1},computeIsSpinnerShown_:function(){return this.spinnerActive&&this.showingSearch},onInputFocus_:function(){this.searchFocused_=true},onInputBlur_:function(){this.searchFocused_=false;if(!this.hasSearchText_)this.showingSearch=false},onSearchInput_:function(){var newValue=this.$.searchInput.value;this.hasSearchText_=newValue!="";if(newValue!="")this.showingSearch=true},onSearchTermKeydown_:function(e){if(e.key=="Escape")this.showingSearch=false},showSearch_:function(e){if(e.target!=this.$.clearSearch)this.showingSearch=true},clearSearch_:function(e){this.setValue("");this.focus_()},showingSearchChanged_:function(current,previous){if(previous==undefined)return;if(this.showingSearch){this.focus_();return}this.setValue("");this.getSearchInput().blur()}}); // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/md_downloads/vulcanized.html b/chrome/browser/resources/md_downloads/vulcanized.html index 282db70..e2c4fe97 100644 --- a/chrome/browser/resources/md_downloads/vulcanized.html +++ b/chrome/browser/resources/md_downloads/vulcanized.html
@@ -3057,7 +3057,7 @@ </paper-icon-button> <div id="searchTerm"> <label id="prompt" for="searchInput">[[label]]</label> - <input id="searchInput" type="search" on-input="onSearchInput_" on-search="onSearchTermSearch" on-keydown="onSearchTermKeydown" on-focus="onInputFocus_" on-blur="onInputBlur_" incremental="" autofocus=""> + <input id="searchInput" type="search" on-input="onSearchInput_" on-search="onSearchTermSearch" on-keydown="onSearchTermKeydown_" on-focus="onInputFocus_" on-blur="onInputBlur_" incremental="" autofocus=""> </div> <template is="dom-if" if="[[hasSearchText_]]">
diff --git a/chrome/browser/resources/md_history/app.crisper.js b/chrome/browser/resources/md_history/app.crisper.js index 299b3ab..97e35a1 100644 --- a/chrome/browser/resources/md_history/app.crisper.js +++ b/chrome/browser/resources/md_history/app.crisper.js
@@ -21,11 +21,11 @@ // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -var CrSearchFieldBehavior={properties:{label:{type:String,value:""},clearLabel:{type:String,value:""},showingSearch:{type:Boolean,value:false,notify:true,observer:"showingSearchChanged_",reflectToAttribute:true},lastValue_:{type:String,value:""}},getSearchInput:function(){},getValue:function(){return this.getSearchInput().value},setValue:function(value,opt_noEvent){var searchInput=this.getSearchInput();searchInput.value=value;if(searchInput.bindValue!=undefined)searchInput.bindValue=value;this.onValueChanged_(value,!!opt_noEvent)},showAndFocus:function(){this.showingSearch=true;this.focus_()},focus_:function(){this.getSearchInput().focus()},onSearchTermSearch:function(){this.onValueChanged_(this.getValue(),false)},onValueChanged_:function(newValue,noEvent){if(newValue==this.lastValue_)return;this.lastValue_=newValue;if(!noEvent)this.fire("search-changed",newValue)},onSearchTermKeydown:function(e){if(e.key=="Escape")this.showingSearch=false},showingSearchChanged_:function(current,previous){if(previous==undefined)return;if(this.showingSearch){this.focus_();return}this.setValue("");this.getSearchInput().blur()}}; +var CrSearchFieldBehavior={properties:{label:{type:String,value:""},clearLabel:{type:String,value:""},lastValue_:{type:String,value:""}},getSearchInput:function(){},getValue:function(){return this.getSearchInput().value},setValue:function(value,opt_noEvent){var searchInput=this.getSearchInput();searchInput.value=value;this.onValueChanged_(value,!!opt_noEvent)},onSearchTermSearch:function(){this.onValueChanged_(this.getValue(),false)},onValueChanged_:function(newValue,noEvent){if(newValue==this.lastValue_)return;this.lastValue_=newValue;if(!noEvent)this.fire("search-changed",newValue)}}; // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -Polymer({is:"cr-toolbar-search-field",behaviors:[CrSearchFieldBehavior],properties:{narrow:{type:Boolean,reflectToAttribute:true},label:String,clearLabel:String,spinnerActive:{type:Boolean,reflectToAttribute:true},hasSearchText_:{type:Boolean,reflectToAttribute:true},isSpinnerShown_:{type:Boolean,computed:"computeIsSpinnerShown_(spinnerActive, showingSearch)"},searchFocused_:{type:Boolean,value:false}},listeners:{click:"showSearch_"},getSearchInput:function(){return this.$.searchInput},setValue:function(value,opt_noEvent){CrSearchFieldBehavior.setValue.call(this,value,opt_noEvent);this.onSearchInput_()},isSearchFocused:function(){return this.searchFocused_},computeIconTabIndex_:function(narrow){return narrow?0:-1},computeIsSpinnerShown_:function(){return this.spinnerActive&&this.showingSearch},onInputFocus_:function(){this.searchFocused_=true},onInputBlur_:function(){this.searchFocused_=false;if(!this.hasSearchText_)this.showingSearch=false},onSearchInput_:function(){var newValue=this.$.searchInput.value;this.hasSearchText_=newValue!="";if(newValue!="")this.showingSearch=true},showSearch_:function(e){if(e.target!=this.$.clearSearch)this.showingSearch=true},clearSearch_:function(e){this.setValue("");this.getSearchInput().focus()}}); +Polymer({is:"cr-toolbar-search-field",behaviors:[CrSearchFieldBehavior],properties:{narrow:{type:Boolean,reflectToAttribute:true},showingSearch:{type:Boolean,value:false,notify:true,observer:"showingSearchChanged_",reflectToAttribute:true},label:String,clearLabel:String,spinnerActive:{type:Boolean,reflectToAttribute:true},hasSearchText_:{type:Boolean,reflectToAttribute:true},isSpinnerShown_:{type:Boolean,computed:"computeIsSpinnerShown_(spinnerActive, showingSearch)"},searchFocused_:{type:Boolean,value:false}},listeners:{click:"showSearch_"},getSearchInput:function(){return this.$.searchInput},setValue:function(value,opt_noEvent){CrSearchFieldBehavior.setValue.call(this,value,opt_noEvent);this.onSearchInput_()},isSearchFocused:function(){return this.searchFocused_},showAndFocus:function(){this.showingSearch=true;this.focus_()},focus_:function(){this.getSearchInput().focus()},computeIconTabIndex_:function(narrow){return narrow?0:-1},computeIsSpinnerShown_:function(){return this.spinnerActive&&this.showingSearch},onInputFocus_:function(){this.searchFocused_=true},onInputBlur_:function(){this.searchFocused_=false;if(!this.hasSearchText_)this.showingSearch=false},onSearchInput_:function(){var newValue=this.$.searchInput.value;this.hasSearchText_=newValue!="";if(newValue!="")this.showingSearch=true},onSearchTermKeydown_:function(e){if(e.key=="Escape")this.showingSearch=false},showSearch_:function(e){if(e.target!=this.$.clearSearch)this.showingSearch=true},clearSearch_:function(e){this.setValue("");this.focus_()},showingSearchChanged_:function(current,previous){if(previous==undefined)return;if(this.showingSearch){this.focus_();return}this.setValue("");this.getSearchInput().blur()}}); // Copyright 2016 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
diff --git a/chrome/browser/resources/md_history/app.vulcanized.html b/chrome/browser/resources/md_history/app.vulcanized.html index 53d667c8..08b740a 100644 --- a/chrome/browser/resources/md_history/app.vulcanized.html +++ b/chrome/browser/resources/md_history/app.vulcanized.html
@@ -1925,7 +1925,7 @@ </paper-icon-button> <div id="searchTerm"> <label id="prompt" for="searchInput">[[label]]</label> - <input id="searchInput" type="search" on-input="onSearchInput_" on-search="onSearchTermSearch" on-keydown="onSearchTermKeydown" on-focus="onInputFocus_" on-blur="onInputBlur_" incremental="" autofocus=""> + <input id="searchInput" type="search" on-input="onSearchInput_" on-search="onSearchTermSearch" on-keydown="onSearchTermKeydown_" on-focus="onInputFocus_" on-blur="onInputBlur_" incremental="" autofocus=""> </div> <template is="dom-if" if="[[hasSearchText_]]">
diff --git a/chrome/browser/ssl/ssl_error_handler.cc b/chrome/browser/ssl/ssl_error_handler.cc index 8595750..7b8f6e7 100644 --- a/chrome/browser/ssl/ssl_error_handler.cc +++ b/chrome/browser/ssl/ssl_error_handler.cc
@@ -431,13 +431,14 @@ } void SSLErrorHandler::HandleCertDateInvalidError() { + const base::TimeTicks now = base::TimeTicks::Now(); network_time::NetworkTimeTracker* tracker = g_network_time_tracker ? g_network_time_tracker : g_browser_process->network_time_tracker(); timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds( g_interstitial_delay_in_milliseconds), base::Bind(&SSLErrorHandler::HandleCertDateInvalidErrorImpl, - base::Unretained(this))); + base::Unretained(this), now)); // Try kicking off a time fetch to get an up-to-date estimate of the // true time. This will only have an effect if network time is // unavailable or if there is not already a query in progress. @@ -447,8 +448,8 @@ // will be deleted. if (!tracker->StartTimeFetch( base::Bind(&SSLErrorHandler::HandleCertDateInvalidErrorImpl, - weak_ptr_factory_.GetWeakPtr()))) { - HandleCertDateInvalidErrorImpl(); + weak_ptr_factory_.GetWeakPtr(), now))) { + HandleCertDateInvalidErrorImpl(now); return; } @@ -456,7 +457,14 @@ g_timer_started_callback->Run(web_contents_); } -void SSLErrorHandler::HandleCertDateInvalidErrorImpl() { +void SSLErrorHandler::HandleCertDateInvalidErrorImpl( + base::TimeTicks started_handling_error) { + UMA_HISTOGRAM_CUSTOM_TIMES( + "interstitial.ssl_error_handler.cert_date_error_delay", + base::TimeTicks::Now() - started_handling_error, + base::TimeDelta::FromMilliseconds(1), base::TimeDelta::FromSeconds(4), + 50); + network_time::NetworkTimeTracker* tracker = g_network_time_tracker ? g_network_time_tracker : g_browser_process->network_time_tracker();
diff --git a/chrome/browser/ssl/ssl_error_handler.h b/chrome/browser/ssl/ssl_error_handler.h index b64f05e..77b4aaf 100644 --- a/chrome/browser/ssl/ssl_error_handler.h +++ b/chrome/browser/ssl/ssl_error_handler.h
@@ -137,7 +137,7 @@ void DeleteSSLErrorHandler(); void HandleCertDateInvalidError(); - void HandleCertDateInvalidErrorImpl(); + void HandleCertDateInvalidErrorImpl(base::TimeTicks started_handling_error); content::WebContents* web_contents_; const int cert_error_;
diff --git a/chrome/browser/ssl/ssl_error_handler_unittest.cc b/chrome/browser/ssl/ssl_error_handler_unittest.cc index 34b6395f..d7cafeb 100644 --- a/chrome/browser/ssl/ssl_error_handler_unittest.cc +++ b/chrome/browser/ssl/ssl_error_handler_unittest.cc
@@ -8,6 +8,7 @@ #include "base/macros.h" #include "base/metrics/field_trial.h" #include "base/run_loop.h" +#include "base/test/histogram_tester.h" #include "base/test/simple_test_clock.h" #include "base/test/simple_test_tick_clock.h" #include "base/time/time.h" @@ -36,6 +37,13 @@ #include "net/url_request/url_request_test_util.h" #include "testing/gtest/include/gtest/gtest.h" +namespace { + +const char kCertDateErrorHistogram[] = + "interstitial.ssl_error_handler.cert_date_error_delay"; + +} // namespace + class SSLErrorHandlerForTest : public SSLErrorHandler { public: SSLErrorHandlerForTest(Profile* profile, @@ -444,8 +452,10 @@ } TEST_F(SSLErrorHandlerDateInvalidTest, TimeQueryStarted) { + base::HistogramTester histograms; base::Time network_time; base::TimeDelta uncertainty; + SSLErrorHandler::SetInterstitialDelayForTest(base::TimeDelta::FromHours(1)); EXPECT_EQ(network_time::NetworkTimeTracker::NETWORK_TIME_NO_SYNC_ATTEMPT, tracker()->GetNetworkTime(&network_time, &uncertainty)); @@ -465,11 +475,14 @@ EXPECT_TRUE(error_handler()->bad_clock_interstitial_shown()); EXPECT_FALSE(error_handler()->IsTimerRunning()); + // Check that the histogram for the delay was recorded. + histograms.ExpectTotalCount(kCertDateErrorHistogram, 1); } // Tests that an SSL interstitial is shown if the accuracy of the system // clock can't be determined because network time is unavailable. TEST_F(SSLErrorHandlerDateInvalidTest, NoTimeQueries) { + base::HistogramTester histograms; base::Time network_time; base::TimeDelta uncertainty; EXPECT_EQ(network_time::NetworkTimeTracker::NETWORK_TIME_NO_SYNC_ATTEMPT, @@ -482,6 +495,8 @@ EXPECT_FALSE(error_handler()->IsTimerRunning()); EXPECT_FALSE(error_handler()->bad_clock_interstitial_shown()); EXPECT_TRUE(error_handler()->ssl_interstitial_shown()); + // Check that the histogram for the delay was recorded. + histograms.ExpectTotalCount(kCertDateErrorHistogram, 1); } // Runs |quit_closure| on the UI thread once a URL request has been @@ -497,6 +512,7 @@ // Tests that an SSL interstitial is shown if determing the accuracy of // the system clock times out (e.g. because a network time query hangs). TEST_F(SSLErrorHandlerDateInvalidTest, TimeQueryHangs) { + base::HistogramTester histograms; base::Time network_time; base::TimeDelta uncertainty; EXPECT_EQ(network_time::NetworkTimeTracker::NETWORK_TIME_NO_SYNC_ATTEMPT, @@ -521,6 +537,9 @@ EXPECT_TRUE(error_handler()->ssl_interstitial_shown()); EXPECT_FALSE(error_handler()->IsTimerRunning()); + // Check that the histogram for the delay was recorded. + histograms.ExpectTotalCount(kCertDateErrorHistogram, 1); + // Clear the error handler to test that, when the request completes, // it doesn't try to call a callback on a deleted SSLErrorHandler. ClearErrorHandler();
diff --git a/chrome/browser/ui/ash/ash_init.cc b/chrome/browser/ui/ash/ash_init.cc index e64b95b3..be79194e 100644 --- a/chrome/browser/ui/ash/ash_init.cc +++ b/chrome/browser/ui/ash/ash_init.cc
@@ -62,6 +62,8 @@ // Shell takes ownership of ChromeShellDelegate. shell_init_params.delegate = new ChromeShellDelegate; shell_init_params.context_factory = content::GetContextFactory(); + shell_init_params.context_factory_private = + content::GetContextFactoryPrivate(); shell_init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); ash::Shell* shell = ash::Shell::CreateInstance(shell_init_params);
diff --git a/chrome/browser/ui/views/chrome_views_delegate.cc b/chrome/browser/ui/views/chrome_views_delegate.cc index 3047818..0b66f16 100644 --- a/chrome/browser/ui/views/chrome_views_delegate.cc +++ b/chrome/browser/ui/views/chrome_views_delegate.cc
@@ -479,6 +479,10 @@ return content::GetContextFactory(); } +ui::ContextFactoryPrivate* ChromeViewsDelegate::GetContextFactoryPrivate() { + return content::GetContextFactoryPrivate(); +} + std::string ChromeViewsDelegate::GetApplicationName() { return version_info::GetProductName(); }
diff --git a/chrome/browser/ui/views/chrome_views_delegate.h b/chrome/browser/ui/views/chrome_views_delegate.h index cea43d8..7b9431a2 100644 --- a/chrome/browser/ui/views/chrome_views_delegate.h +++ b/chrome/browser/ui/views/chrome_views_delegate.h
@@ -54,6 +54,7 @@ bool WindowManagerProvidesTitleBar(bool maximized) override; #endif ui::ContextFactory* GetContextFactory() override; + ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; std::string GetApplicationName() override; #if defined(OS_WIN) int GetAppbarAutohideEdges(HMONITOR monitor,
diff --git a/chrome/common/BUILD.gn b/chrome/common/BUILD.gn index df8259b8..95e78576 100644 --- a/chrome/common/BUILD.gn +++ b/chrome/common/BUILD.gn
@@ -8,9 +8,14 @@ import("//chrome/process_version_rc_template.gni") # For branding_file_path. import("//extensions/features/features.gni") import("//mojo/public/tools/bindings/mojom.gni") +import("//pdf/features.gni") import("//ppapi/features/features.gni") import("//tools/grit/grit_rule.gni") +if (enable_pdf) { + assert(enable_plugins, "PDF support requires plugins be enabled.") +} + grit("resources") { source = "common_resources.grd" use_qualified_include = true @@ -221,6 +226,7 @@ "//mojo/edk/system", "//mojo/public/cpp/bindings", "//net", + "//pdf:features", "//ppapi/features", "//printing/features", "//skia",
diff --git a/chrome/common/chrome_content_client.cc b/chrome/common/chrome_content_client.cc index 20ba8876..8d3124c 100644 --- a/chrome/common/chrome_content_client.cc +++ b/chrome/common/chrome_content_client.cc
@@ -44,6 +44,7 @@ #include "extensions/features/features.h" #include "gpu/config/gpu_info.h" #include "net/http/http_util.h" +#include "pdf/features.h" #include "ppapi/features/features.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/layout.h" @@ -90,14 +91,14 @@ namespace { #if BUILDFLAG(ENABLE_PLUGINS) -#if defined(ENABLE_PDF) +#if BUILDFLAG(ENABLE_PDF) const char kPDFPluginExtension[] = "pdf"; const char kPDFPluginDescription[] = "Portable Document Format"; const char kPDFPluginOutOfProcessMimeType[] = "application/x-google-chrome-pdf"; const uint32_t kPDFPluginPermissions = ppapi::PERMISSION_PRIVATE | ppapi::PERMISSION_DEV; -#endif // defined(ENABLE_PDF) +#endif // BUILDFLAG(ENABLE_PDF) content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface; content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module; @@ -151,7 +152,7 @@ // not marked internal, aside from being automatically registered, they're just // regular plugins). void ComputeBuiltInPlugins(std::vector<content::PepperPluginInfo>* plugins) { -#if defined(ENABLE_PDF) +#if BUILDFLAG(ENABLE_PDF) content::PepperPluginInfo pdf_info; pdf_info.is_internal = true; pdf_info.is_out_of_process = true; @@ -169,7 +170,7 @@ pdf_info.internal_entry_points.shutdown_module = g_pdf_shutdown_module; pdf_info.permissions = kPDFPluginPermissions; plugins->push_back(pdf_info); -#endif // defined(ENABLE_PDF) +#endif // BUILDFLAG(ENABLE_PDF) #if !defined(DISABLE_NACL) // Handle Native Client just like the PDF plugin. This means that it is
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index e656b88..cb985991 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc
@@ -965,9 +965,6 @@ // unresponsive web content. const char kEnableHungRendererInfoBar[] = "enable-hung-renderer-infobar"; -// Enables "Add to Home screen" in the app menu to generate WebAPKs. -const char kEnableWebApk[] = "enable-improved-a2hs"; - // Forces the update menu badge to show. const char kForceShowUpdateMenuBadge[] = "force-show-update-menu-badge";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index 7d4716c..efcf7e7 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h
@@ -284,7 +284,6 @@ extern const char kEnableHostedMode[]; extern const char kEnableHungRendererInfoBar[]; extern const char kEnableVrShell[]; -extern const char kEnableWebApk[]; extern const char kForceShowUpdateMenuBadge[]; extern const char kForceShowUpdateMenuItem[]; extern const char kForceShowUpdateMenuItemCustomSummary[];
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn index 4fab88d..ba77850 100644 --- a/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -130,6 +130,7 @@ "//media:media_features", "//net", "//net:test_support", + "//pdf", "//ppapi/features", "//printing/features", "//skia", @@ -227,10 +228,6 @@ ] } - if (enable_plugins && enable_pdf) { - public_deps += [ "//pdf" ] - } - if (use_ash) { sources += [ "base/default_ash_event_generator_delegate.cc", @@ -776,12 +773,10 @@ "//ash/drag_drop/drag_drop_interactive_uitest.cc", "//ash/wm/ash_native_cursor_manager_interactive_uitest.cc", ] - if (is_chromeos) { - sources -= [ - # Use only the _chromeos version on ChromeOS. - "base/view_event_test_platform_part_default.cc", - ] - } + sources -= [ + # Use only the _chromeos version on Ash / Chrome OS. + "base/view_event_test_platform_part_default.cc", + ] deps += [ "//ash/test:interactive_ui_test_support" ] } @@ -2358,7 +2353,7 @@ if (use_dbus) { deps += [ "//dbus:test_support" ] } - } else { + } else { # !is_chromeos sources -= [ "../browser/extensions/api/enterprise_device_attributes/enterprise_device_attributes_apitest.cc", "../browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_apitest_nss.cc", @@ -2368,9 +2363,6 @@ "../browser/net/nss_context_chromeos_browsertest.cc", "data/webui/certificate_viewer_ui_test-inl.h", ] - if (use_ash) { - sources -= [ "../browser/ui/ash/keyboard_controller_browsertest.cc" ] - } if (toolkit_views) { sources -= [ "../browser/ui/views/select_file_dialog_extension_browsertest.cc" ] } @@ -2430,23 +2422,6 @@ "../browser/media_galleries/fileapi/iapps_finder_impl_win_browsertest.cc", ] } - if (!is_chromeos && use_ash) { - sources -= [ - # On Windows and Linux, we currently don't support enough of the - # ash environment to run these unit tests. - # - # TODO: enable these on windows and linux. - "../browser/ui/ash/accelerator_commands_browsertest.cc", - "../browser/ui/ash/accelerator_controller_browsertest.cc", - "../browser/ui/ash/launcher/chrome_launcher_controller_impl_browsertest.cc", - "../browser/ui/ash/launcher/launcher_favicon_loader_browsertest.cc", - "../browser/ui/ash/shelf_browsertest.cc", - ] - - if (toolkit_views) { - sources -= [ "../browser/ui/views/frame/browser_non_client_frame_view_ash_browsertest.cc" ] - } - } if (is_mac) { # Other platforms only need .pak files, and can build this target # standalone much faster. @@ -4154,11 +4129,8 @@ "//ash/test:test_support_with_content", ] - # We eventually want to compile both in Win Aura builds, see - # http://crbug.com/155545. - if (!is_win) { - sources -= [ "../browser/ui/window_sizer/window_sizer_unittest.cc" ] - } + # Chrome OS uses window_sizer_ash_unittest.cc + sources -= [ "../browser/ui/window_sizer/window_sizer_unittest.cc" ] } if (use_aura) { deps += [
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc index 2f7858b..16e9a03 100644 --- a/chrome/test/base/view_event_test_base.cc +++ b/chrome/test/base/view_event_test_base.cc
@@ -74,12 +74,17 @@ // The ContextFactory must exist before any Compositors are created. bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); views_delegate_.set_context_factory(context_factory); + views_delegate_.set_context_factory_private(context_factory_private); views_delegate_.set_use_desktop_native_widgets(true); - platform_part_.reset(ViewEventTestPlatformPart::Create(context_factory)); + platform_part_.reset(ViewEventTestPlatformPart::Create( + context_factory, context_factory_private)); gfx::NativeWindow context = platform_part_->GetContext(); window_ = views::Widget::CreateWindowWithContext(this, context); window_->Show();
diff --git a/chrome/test/base/view_event_test_platform_part.h b/chrome/test/base/view_event_test_platform_part.h index 4fe53fc..f4eb2740 100644 --- a/chrome/test/base/view_event_test_platform_part.h +++ b/chrome/test/base/view_event_test_platform_part.h
@@ -10,6 +10,7 @@ namespace ui { class ContextFactory; +class ContextFactoryPrivate; } // A helper class owned by tests that performs platform specific initialization. @@ -22,7 +23,9 @@ // Set up the platform-specific environment. Teardown is performed in the // destructor. - static ViewEventTestPlatformPart* Create(ui::ContextFactory* context_factory); + static ViewEventTestPlatformPart* Create( + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); // The Widget context for creating the test window. This will be the Ash root // window on ChromeOS environments. Otherwise it should return NULL.
diff --git a/chrome/test/base/view_event_test_platform_part_chromeos.cc b/chrome/test/base/view_event_test_platform_part_chromeos.cc index a18104b6..8e9865e7 100644 --- a/chrome/test/base/view_event_test_platform_part_chromeos.cc +++ b/chrome/test/base/view_event_test_platform_part_chromeos.cc
@@ -30,8 +30,9 @@ // ViewEventTestPlatformPart implementation for ChromeOS (chromeos=1). class ViewEventTestPlatformPartChromeOS : public ViewEventTestPlatformPart { public: - explicit ViewEventTestPlatformPartChromeOS( - ui::ContextFactory* context_factory); + ViewEventTestPlatformPartChromeOS( + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); ~ViewEventTestPlatformPartChromeOS() override; // Overridden from ViewEventTestPlatformPart: @@ -47,7 +48,8 @@ }; ViewEventTestPlatformPartChromeOS::ViewEventTestPlatformPartChromeOS( - ui::ContextFactory* context_factory) { + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { // Ash Shell can't just live on its own without a browser process, we need to // also create the message center. message_center::MessageCenter::Initialize(); @@ -65,6 +67,7 @@ ash::ShellInitParams init_params; init_params.delegate = shell_delegate; init_params.context_factory = context_factory; + init_params.context_factory_private = context_factory_private; init_params.blocking_pool = content::BrowserThread::GetBlockingPool(); base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( switches::kHostWindowBounds, "0+0-1280x800"); @@ -91,6 +94,8 @@ // static ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create( - ui::ContextFactory* context_factory) { - return new ViewEventTestPlatformPartChromeOS(context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new ViewEventTestPlatformPartChromeOS(context_factory, + context_factory_private); }
diff --git a/chrome/test/base/view_event_test_platform_part_default.cc b/chrome/test/base/view_event_test_platform_part_default.cc index aabd0fb..8d32515 100644 --- a/chrome/test/base/view_event_test_platform_part_default.cc +++ b/chrome/test/base/view_event_test_platform_part_default.cc
@@ -19,8 +19,9 @@ // ViewEventTestPlatformPart implementation for Views, but non-CrOS. class ViewEventTestPlatformPartDefault : public ViewEventTestPlatformPart { public: - explicit ViewEventTestPlatformPartDefault( - ui::ContextFactory* context_factory) { + ViewEventTestPlatformPartDefault( + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { #if defined(USE_AURA) DCHECK(!display::Screen::GetScreen()); #if defined(USE_X11) && !defined(OS_CHROMEOS) @@ -32,6 +33,7 @@ #endif env_ = aura::Env::CreateInstance(); env_->set_context_factory(context_factory); + env_->set_context_factory_private(context_factory_private); #endif } @@ -56,6 +58,8 @@ // static ViewEventTestPlatformPart* ViewEventTestPlatformPart::Create( - ui::ContextFactory* context_factory) { - return new ViewEventTestPlatformPartDefault(context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new ViewEventTestPlatformPartDefault(context_factory, + context_factory_private); }
diff --git a/chrome/test/data/webui/bluetooth_internals_browsertest.js b/chrome/test/data/webui/bluetooth_internals_browsertest.js index ae30e2da9..1def822 100644 --- a/chrome/test/data/webui/bluetooth_internals_browsertest.js +++ b/chrome/test/data/webui/bluetooth_internals_browsertest.js
@@ -228,6 +228,7 @@ TEST_F('BluetoothInternalsTest', 'Startup_BluetoothInternals', function() { var adapterFactory = null; var deviceTable = null; + var sidebarNode = null; var fakeDeviceInfo1 = this.fakeDeviceInfo1; var fakeDeviceInfo2 = this.fakeDeviceInfo2; @@ -238,7 +239,6 @@ adapterFactory = this.adapterFactory; }.bind(this)); - suite('BluetoothInternalsUITest', function() { var EXPECTED_DEVICES = 2; @@ -255,6 +255,7 @@ setup(function() { deviceTable = document.querySelector('#devices table'); + sidebarNode = document.querySelector('#sidebar'); devices.splice(0, devices.length); adapterBroker.adapterClient_.deviceAdded(fakeDeviceInfo1()); adapterBroker.adapterClient_.deviceAdded(fakeDeviceInfo2()); @@ -262,6 +263,7 @@ teardown(function() { adapterFactory.reset(); + sidebarObj.close(); }); /** @@ -425,6 +427,44 @@ adapterBroker.adapterClient_.deviceChanged(newDeviceInfo3); expectEquals('-17', rssiColumn.textContent); }); + + /* Sidebar Tests */ + test('Sidebar_Setup', function() { + var sidebarItems = Array.from( + sidebarNode.querySelectorAll('.sidebar-content li')); + + ['devices'].forEach(function(pageName) { + expectTrue(sidebarItems.some(function(item) { + return item.dataset.pageName === pageName; + })); + }); + }); + + test('Sidebar_DefaultState', function() { + // Sidebar should be closed by default. + expectFalse(sidebarNode.classList.contains('open')); + }); + + test('Sidebar_OpenClose', function() { + sidebarObj.open(); + expectTrue(sidebarNode.classList.contains('open')); + sidebarObj.close(); + expectFalse(sidebarNode.classList.contains('open')); + }); + + test('Sidebar_OpenTwice', function() { + // Multiple calls to open shouldn't change the state. + sidebarObj.open(); + sidebarObj.open(); + expectTrue(sidebarNode.classList.contains('open')); + }); + + test('Sidebar_CloseTwice', function() { + // Multiple calls to close shouldn't change the state. + sidebarObj.close(); + sidebarObj.close(); + expectFalse(sidebarNode.classList.contains('open')); + }); }); // Run all registered tests.
diff --git a/chromeos/attestation/attestation_flow.cc b/chromeos/attestation/attestation_flow.cc index c82cbe55..c1e55973 100644 --- a/chromeos/attestation/attestation_flow.cc +++ b/chromeos/attestation/attestation_flow.cc
@@ -4,9 +4,13 @@ #include "chromeos/attestation/attestation_flow.h" +#include <algorithm> #include <utility> #include "base/bind.h" +#include "base/memory/ptr_util.h" +#include "base/message_loop/message_loop.h" +#include "base/timer/timer.h" #include "chromeos/cryptohome/async_method_caller.h" #include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/dbus/cryptohome_client.h" @@ -17,6 +21,14 @@ namespace { +// A reasonable timeout that gives enough time for attestation to be ready, +// yet does not make the caller wait too long. +constexpr uint16_t kReadyTimeoutInSeconds = 60; + +// Delay before checking again whether the TPM has been prepared for +// attestation. +constexpr uint16_t kRetryDelayInMilliseconds = 300; + // Redirects to one of three callbacks based on a boolean value and dbus call // status. // @@ -29,10 +41,11 @@ void DBusBoolRedirectCallback(const base::Closure& on_true, const base::Closure& on_false, const base::Closure& on_fail, + const std::string& on_fail_message, DBusMethodCallStatus status, bool value) { if (status != DBUS_METHOD_CALL_SUCCESS) { - LOG(ERROR) << "Attestation: Failed to query enrollment state."; + LOG(ERROR) << "Attestation: Failed to " << on_fail_message << "."; if (!on_fail.is_null()) on_fail.Run(); return; @@ -95,6 +108,9 @@ : async_caller_(async_caller), cryptohome_client_(cryptohome_client), server_proxy_(std::move(server_proxy)), + ready_timeout_(base::TimeDelta::FromSeconds(kReadyTimeoutInSeconds)), + retry_delay_( + base::TimeDelta::FromMilliseconds(kRetryDelayInMilliseconds)), weak_factory_(this) {} AttestationFlow::~AttestationFlow() { @@ -108,19 +124,33 @@ const CertificateCallback& callback) { // If this device has not enrolled with the Privacy CA, we need to do that // first. Once enrolled we can proceed with the certificate request. - base::Closure do_cert_request = base::Bind( + const base::Closure do_cert_request = base::Bind( &AttestationFlow::StartCertificateRequest, weak_factory_.GetWeakPtr(), certificate_profile, account_id, request_origin, force_new_key, callback); - base::Closure on_enroll_failure = base::Bind(callback, false, ""); - base::Closure do_enroll = base::Bind(&AttestationFlow::StartEnroll, - weak_factory_.GetWeakPtr(), - on_enroll_failure, - do_cert_request); - cryptohome_client_->TpmAttestationIsEnrolled(base::Bind( - &DBusBoolRedirectCallback, - do_cert_request, // If enrolled, proceed with cert request. - do_enroll, // If not enrolled, initiate enrollment. - on_enroll_failure)); + const base::Closure on_failure = base::Bind(callback, false, ""); + const base::Closure initiate_enroll = base::Bind( + &AttestationFlow::WaitForAttestationReadyAndStartEnroll, + weak_factory_.GetWeakPtr(), base::TimeTicks::Now() + ready_timeout_, + on_failure, + base::Bind(&AttestationFlow::StartEnroll, weak_factory_.GetWeakPtr(), + on_failure, do_cert_request)); + cryptohome_client_->TpmAttestationIsEnrolled( + base::Bind(&DBusBoolRedirectCallback, + do_cert_request, // If enrolled, proceed with cert request. + initiate_enroll, // If not enrolled, initiate enrollment. + on_failure, "check enrollment state")); +} + +void AttestationFlow::WaitForAttestationReadyAndStartEnroll( + base::TimeTicks end_time, + const base::Closure& on_failure, + const base::Closure& next_task) { + const base::Closure retry_initiate_enroll = + base::Bind(&AttestationFlow::CheckAttestationReadyAndReschedule, + weak_factory_.GetWeakPtr(), end_time, on_failure, next_task); + cryptohome_client_->TpmAttestationIsPrepared( + base::Bind(&DBusBoolRedirectCallback, next_task, retry_initiate_enroll, + on_failure, "check for attestation readiness")); } void AttestationFlow::StartEnroll(const base::Closure& on_failure, @@ -211,18 +241,19 @@ callback)); } else { // If the key already exists, query the existing certificate. - base::Closure on_key_exists = base::Bind( + const base::Closure on_key_exists = base::Bind( &AttestationFlow::GetExistingCertificate, weak_factory_.GetWeakPtr(), key_type, account_id, key_name, callback); // If the key does not exist, call this method back with |generate_new_key| // set to true. - base::Closure on_key_not_exists = base::Bind( + const base::Closure on_key_not_exists = base::Bind( &AttestationFlow::StartCertificateRequest, weak_factory_.GetWeakPtr(), certificate_profile, account_id, request_origin, true, callback); cryptohome_client_->TpmAttestationDoesKeyExist( key_type, cryptohome::Identification(account_id), key_name, base::Bind(&DBusBoolRedirectCallback, on_key_exists, on_key_not_exists, - base::Bind(callback, false, ""))); + base::Bind(callback, false, ""), + "check for existence of attestation key")); } } @@ -277,6 +308,25 @@ base::Bind(&DBusDataMethodCallback, callback)); } +void AttestationFlow::CheckAttestationReadyAndReschedule( + base::TimeTicks end_time, + const base::Closure& on_failure, + const base::Closure& next_task) { + if (base::TimeTicks::Now() < end_time) { + LOG(WARNING) << "Attestation: Not prepared yet." + << " Retrying in " << retry_delay_ << "."; + base::MessageLoop::current()->task_runner()->PostDelayedTask( + FROM_HERE, + base::Bind(&AttestationFlow::WaitForAttestationReadyAndStartEnroll, + weak_factory_.GetWeakPtr(), end_time, on_failure, next_task), + retry_delay_); + } else { + LOG(ERROR) << "Attestation: Not prepared. Giving up on retrying."; + if (!on_failure.is_null()) + on_failure.Run(); + } +} + ServerProxy::~ServerProxy() {} PrivacyCAType ServerProxy::GetType() {
diff --git a/chromeos/attestation/attestation_flow.h b/chromeos/attestation/attestation_flow.h index 26a7292..d77e6cb 100644 --- a/chromeos/attestation/attestation_flow.h +++ b/chromeos/attestation/attestation_flow.h
@@ -11,6 +11,8 @@ #include "base/callback_forward.h" #include "base/macros.h" #include "base/memory/weak_ptr.h" +#include "base/time/time.h" +#include "base/timer/timer.h" #include "chromeos/attestation/attestation_constants.h" #include "chromeos/chromeos_export.h" #include "chromeos/dbus/dbus_method_call_status.h" @@ -46,11 +48,14 @@ // Implements the message flow for Chrome OS attestation tasks. Generally this // consists of coordinating messages between the Chrome OS attestation service // and the Chrome OS Privacy CA server. Sample usage: +// // AttestationFlow flow(AsyncMethodCaller::GetInstance(), // DBusThreadManager::Get().GetCryptohomeClient(), // std::move(my_server_proxy)); // AttestationFlow::CertificateCallback callback = base::Bind(&MyCallback); // flow.GetCertificate(ENTERPRISE_USER_CERTIFICATE, false, callback); +// +// This class is not thread safe. class CHROMEOS_EXPORT AttestationFlow { public: typedef base::Callback<void(bool success, @@ -82,6 +87,21 @@ std::unique_ptr<ServerProxy> server_proxy); virtual ~AttestationFlow(); + // Sets the timeout for attestation to be ready. + void set_ready_timeout(base::TimeDelta ready_timeout) { + ready_timeout_ = ready_timeout; + } + // Gets the timeout for attestation to be ready. + base::TimeDelta ready_timeout() const { return ready_timeout_; } + + // Sets the retry delay. + void set_retry_delay(base::TimeDelta retry_delay) { + retry_delay_ = retry_delay; + } + + // Returns the retry delay. + base::TimeDelta retry_delay() { return retry_delay_; } + // Gets an attestation certificate for a hardware-protected key. If a key for // the given profile does not exist, it will be generated and a certificate // request will be made to the Chrome OS Privacy CA to issue a certificate for @@ -109,7 +129,19 @@ const CertificateCallback& callback); private: - // Asynchronously initiates the attestation enrollment flow. + // Asynchronously waits for attestation to be ready and start enrollment once + // it is. If attestation is not ready by the time the flow's timeout is + // reached, fail. + // + // Parameters + // retries_left - Number of retries left (-1 for infinite retries). + // on_failure - Called if any failure occurs. + // next_task - Called on successful enrollment. + void WaitForAttestationReadyAndStartEnroll(base::TimeTicks end_time, + const base::Closure& on_failure, + const base::Closure& next_task); + + // Called when attestation is prepared, to start the actual enrollment flow. // // Parameters // on_failure - Called if any failure occurs. @@ -223,10 +255,25 @@ const std::string& key_name, const CertificateCallback& callback); + // Checks whether attestation is ready. If it is, runs |next_task|. If not, + // reschedules a check after a delay unless we are out of retry time, in + // which case we run |on_failure|. + // + // Parameters + // end_time - The time at or past which we give up retrying. + // on_failure - Called if any failure occurs or after we give up retrying. + // next_task - Called when attestation is ready. + void CheckAttestationReadyAndReschedule(base::TimeTicks end_time, + const base::Closure& on_failure, + const base::Closure& next_task); + cryptohome::AsyncMethodCaller* async_caller_; CryptohomeClient* cryptohome_client_; std::unique_ptr<ServerProxy> server_proxy_; + base::TimeDelta ready_timeout_; + base::TimeDelta retry_delay_; + base::WeakPtrFactory<AttestationFlow> weak_factory_; DISALLOW_COPY_AND_ASSIGN(AttestationFlow);
diff --git a/chromeos/attestation/attestation_flow_unittest.cc b/chromeos/attestation/attestation_flow_unittest.cc index 0b40dd667..9025532 100644 --- a/chromeos/attestation/attestation_flow_unittest.cc +++ b/chromeos/attestation/attestation_flow_unittest.cc
@@ -7,9 +7,12 @@ #include "base/bind.h" #include "base/location.h" +#include "base/memory/ptr_util.h" #include "base/run_loop.h" #include "base/single_thread_task_runner.h" #include "base/threading/thread_task_runner_handle.h" +#include "base/time/tick_clock.h" +#include "base/timer/timer.h" #include "chromeos/attestation/mock_attestation_flow.h" #include "chromeos/cryptohome/cryptohome_parameters.h" #include "chromeos/cryptohome/mock_async_method_caller.h" @@ -68,12 +71,32 @@ } // namespace class AttestationFlowTest : public testing::Test { + public: + void QuitRunLoopCertificateCallback( + const AttestationFlow::CertificateCallback& callback, + bool success, + const std::string& cert) { + LOG(WARNING) << "Quitting run loop."; + run_loop_->Quit(); + if (!callback.is_null()) + callback.Run(success, cert); + } + protected: + void RunUntilIdle() { + base::RunLoop run_loop; + run_loop_ = &run_loop; + run_loop_->RunUntilIdle(); + } + void Run() { base::RunLoop run_loop; - run_loop.RunUntilIdle(); + run_loop_ = &run_loop; + run_loop_->Run(); } + base::MessageLoop message_loop_; + base::RunLoop* run_loop_; }; TEST_F(AttestationFlowTest, GetCertificate) { @@ -86,6 +109,93 @@ .InSequence(flow_order) .WillRepeatedly(Invoke(DBusCallbackFalse)); + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .InSequence(flow_order) + .WillOnce(Invoke(DBusCallbackTrue)); + + // Use StrictMock when we want to verify invocation frequency. + StrictMock<cryptohome::MockAsyncMethodCaller> async_caller; + async_caller.SetUp(true, cryptohome::MOUNT_ERROR_NONE); + EXPECT_CALL(async_caller, AsyncTpmAttestationCreateEnrollRequest(_, _)) + .Times(1) + .InSequence(flow_order); + + std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>()); + proxy->DeferToFake(true); + EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault()); + EXPECT_CALL( + *proxy, + SendEnrollRequest( + cryptohome::MockAsyncMethodCaller::kFakeAttestationEnrollRequest, _)) + .Times(1) + .InSequence(flow_order); + + std::string fake_enroll_response = + cryptohome::MockAsyncMethodCaller::kFakeAttestationEnrollRequest; + fake_enroll_response += "_response"; + EXPECT_CALL(async_caller, + AsyncTpmAttestationEnroll(_, fake_enroll_response, _)) + .Times(1) + .InSequence(flow_order); + + const AccountId account_id = AccountId::FromUserEmail("fake@test.com"); + EXPECT_CALL(async_caller, + AsyncTpmAttestationCreateCertRequest( + _, PROFILE_ENTERPRISE_USER_CERTIFICATE, + cryptohome::Identification(account_id), "fake_origin", _)) + .Times(1) + .InSequence(flow_order); + + EXPECT_CALL( + *proxy, + SendCertificateRequest( + cryptohome::MockAsyncMethodCaller::kFakeAttestationCertRequest, _)) + .Times(1) + .InSequence(flow_order); + + std::string fake_cert_response = + cryptohome::MockAsyncMethodCaller::kFakeAttestationCertRequest; + fake_cert_response += "_response"; + EXPECT_CALL(async_caller, AsyncTpmAttestationFinishCertRequest( + fake_cert_response, KEY_USER, + cryptohome::Identification(account_id), + kEnterpriseUserKey, _)) + .Times(1) + .InSequence(flow_order); + + StrictMock<MockObserver> observer; + EXPECT_CALL( + observer, + MockCertificateCallback( + true, cryptohome::MockAsyncMethodCaller::kFakeAttestationCert)) + .Times(1) + .InSequence(flow_order); + AttestationFlow::CertificateCallback mock_callback = base::Bind( + &MockObserver::MockCertificateCallback, base::Unretained(&observer)); + + std::unique_ptr<ServerProxy> proxy_interface(proxy.release()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); + flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, account_id, + "fake_origin", true, mock_callback); + RunUntilIdle(); +} + +TEST_F(AttestationFlowTest, GetCertificate_Attestation_Not_Prepared) { + // Verify the order of calls in a sequence. + Sequence flow_order; + + // Use DBusCallbackFalse so the full enrollment flow is triggered. + chromeos::MockCryptohomeClient client; + EXPECT_CALL(client, TpmAttestationIsEnrolled(_)) + .InSequence(flow_order) + .WillRepeatedly(Invoke(DBusCallbackFalse)); + + // It will take a bit for attestation to be prepared. + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .InSequence(flow_order) + .WillOnce(Invoke(DBusCallbackFalse)) + .WillOnce(Invoke(DBusCallbackTrue)); + // Use StrictMock when we want to verify invocation frequency. StrictMock<cryptohome::MockAsyncMethodCaller> async_caller; async_caller.SetUp(true, cryptohome::MOUNT_ERROR_NONE); @@ -128,9 +238,7 @@ EXPECT_CALL(async_caller, AsyncTpmAttestationFinishCertRequest( fake_cert_response, KEY_USER, cryptohome::Identification(account_id), - kEnterpriseUserKey, _)) - .Times(1) - .InSequence(flow_order); + kEnterpriseUserKey, _)); StrictMock<MockObserver> observer; EXPECT_CALL(observer, MockCertificateCallback( @@ -138,14 +246,49 @@ cryptohome::MockAsyncMethodCaller::kFakeAttestationCert)) .Times(1) .InSequence(flow_order); - AttestationFlow::CertificateCallback mock_callback = base::Bind( - &MockObserver::MockCertificateCallback, - base::Unretained(&observer)); + AttestationFlow::CertificateCallback callback = base::Bind( + &AttestationFlowTest::QuitRunLoopCertificateCallback, + base::Unretained(this), base::Bind(&MockObserver::MockCertificateCallback, + base::Unretained(&observer))); std::unique_ptr<ServerProxy> proxy_interface(proxy.release()); AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); + flow.set_retry_delay(base::TimeDelta::FromMilliseconds(30)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, account_id, - "fake_origin", true, mock_callback); + "fake_origin", true, callback); + + Run(); +} + +TEST_F(AttestationFlowTest, GetCertificate_Attestation_Never_Prepared) { + StrictMock<cryptohome::MockAsyncMethodCaller> async_caller; + async_caller.SetUp(false, cryptohome::MOUNT_ERROR_NONE); + + chromeos::MockCryptohomeClient client; + EXPECT_CALL(client, TpmAttestationIsEnrolled(_)) + .WillRepeatedly(Invoke(DBusCallbackFalse)); + + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .WillRepeatedly(Invoke(DBusCallbackFalse)); + + // We're not expecting any server calls in this case; StrictMock will verify. + std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>()); + EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault()); + + StrictMock<MockObserver> observer; + EXPECT_CALL(observer, MockCertificateCallback(false, "")).Times(1); + AttestationFlow::CertificateCallback callback = base::Bind( + &AttestationFlowTest::QuitRunLoopCertificateCallback, + base::Unretained(this), base::Bind(&MockObserver::MockCertificateCallback, + base::Unretained(&observer))); + + std::unique_ptr<ServerProxy> proxy_interface(proxy.release()); + AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); + flow.set_ready_timeout(base::TimeDelta::FromMilliseconds(20)); + flow.set_retry_delay(base::TimeDelta::FromMilliseconds(6)); + flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), + "fake_origin", true, callback); + Run(); } @@ -159,6 +302,9 @@ EXPECT_CALL(client, TpmAttestationIsEnrolled(_)) .WillRepeatedly(Invoke(DBusCallbackFalse)); + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .WillOnce(Invoke(DBusCallbackTrue)); + // We're not expecting any server calls in this case; StrictMock will verify. std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>()); EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault()); @@ -174,7 +320,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_EKRejected) { @@ -187,6 +333,9 @@ EXPECT_CALL(client, TpmAttestationIsEnrolled(_)) .WillRepeatedly(Invoke(DBusCallbackFalse)); + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .WillOnce(Invoke(DBusCallbackTrue)); + std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>()); proxy->DeferToFake(false); EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault()); @@ -205,7 +354,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_FailEnroll) { @@ -224,6 +373,9 @@ EXPECT_CALL(client, TpmAttestationIsEnrolled(_)) .WillRepeatedly(Invoke(DBusCallbackFalse)); + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .WillOnce(Invoke(DBusCallbackTrue)); + std::unique_ptr<MockServerProxy> proxy(new StrictMock<MockServerProxy>()); proxy->DeferToFake(true); EXPECT_CALL(*proxy, GetType()).WillRepeatedly(DoDefault()); @@ -241,7 +393,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetMachineCertificateAlreadyEnrolled) { @@ -283,7 +435,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_MACHINE_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_FailCreateCertRequest) { @@ -312,7 +464,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_CertRequestRejected) { @@ -344,7 +496,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_FailIsEnrolled) { @@ -369,7 +521,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_CheckExisting) { @@ -415,7 +567,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", false, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, GetCertificate_AlreadyExists) { @@ -448,7 +600,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", false, mock_callback); - Run(); + RunUntilIdle(); } TEST_F(AttestationFlowTest, AlternatePCA) { @@ -462,6 +614,9 @@ EXPECT_CALL(client, TpmAttestationIsEnrolled(_)) .WillRepeatedly(Invoke(DBusCallbackFalse)); + EXPECT_CALL(client, TpmAttestationIsPrepared(_)) + .WillRepeatedly(Invoke(DBusCallbackTrue)); + NiceMock<cryptohome::MockAsyncMethodCaller> async_caller; async_caller.SetUp(true, cryptohome::MOUNT_ERROR_NONE); EXPECT_CALL(async_caller, @@ -483,7 +638,7 @@ AttestationFlow flow(&async_caller, &client, std::move(proxy_interface)); flow.GetCertificate(PROFILE_ENTERPRISE_USER_CERTIFICATE, EmptyAccountId(), "", true, mock_callback); - Run(); + RunUntilIdle(); } } // namespace attestation
diff --git a/components/exo/display.cc b/components/exo/display.cc index fe97bc8..505a7a7 100644 --- a/components/exo/display.cc +++ b/components/exo/display.cc
@@ -24,10 +24,9 @@ #if defined(USE_OZONE) #include <GLES2/gl2extchromium.h> #include "components/exo/buffer.h" -#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" +#include "gpu/ipc/client/gpu_memory_buffer_impl_ozone_native_pixmap.h" #include "third_party/khronos/GLES2/gl2.h" #include "third_party/khronos/GLES2/gl2ext.h" -#include "ui/aura/env.h" #endif namespace exo { @@ -77,10 +76,9 @@ handle.native_pixmap_handle.planes.push_back(plane); std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer = - aura::Env::GetInstance() - ->context_factory() - ->GetGpuMemoryBufferManager() - ->CreateGpuMemoryBufferFromHandle(handle, size, format); + gpu::GpuMemoryBufferImplOzoneNativePixmap::CreateFromHandle( + handle, size, format, gfx::BufferUsage::GPU_READ, + gpu::GpuMemoryBufferImpl::DestructionCallback()); if (!gpu_memory_buffer) { LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; return nullptr;
diff --git a/components/exo/shared_memory.cc b/components/exo/shared_memory.cc index d0b2176..4b6f6806 100644 --- a/components/exo/shared_memory.cc +++ b/components/exo/shared_memory.cc
@@ -13,9 +13,8 @@ #include "base/memory/ptr_util.h" #include "base/trace_event/trace_event.h" #include "components/exo/buffer.h" -#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h" +#include "gpu/ipc/client/gpu_memory_buffer_impl_shared_memory.h" #include "third_party/khronos/GLES2/gl2.h" -#include "ui/aura/env.h" #include "ui/compositor/compositor.h" #include "ui/gfx/buffer_format_util.h" #include "ui/gfx/geometry/size.h" @@ -70,10 +69,9 @@ handle.stride = stride; std::unique_ptr<gfx::GpuMemoryBuffer> gpu_memory_buffer = - aura::Env::GetInstance() - ->context_factory() - ->GetGpuMemoryBufferManager() - ->CreateGpuMemoryBufferFromHandle(handle, size, format); + gpu::GpuMemoryBufferImplSharedMemory::CreateFromHandle( + handle, size, format, gfx::BufferUsage::GPU_READ, + gpu::GpuMemoryBufferImpl::DestructionCallback()); if (!gpu_memory_buffer) { LOG(ERROR) << "Failed to create GpuMemoryBuffer from handle"; return nullptr;
diff --git a/components/exo/surface.cc b/components/exo/surface.cc index f295aaa..6635a19 100644 --- a/components/exo/surface.cc +++ b/components/exo/surface.cc
@@ -144,16 +144,21 @@ //////////////////////////////////////////////////////////////////////////////// // Surface, public: +// TODO(fsamuel): exo should not use context_factory_private. Instead, we should +// request a CompositorFrameSink from the aura::Window. Setting up the +// BeginFrame hierarchy should be an internal implementation detail of aura or +// mus in aura-mus. Surface::Surface() : window_(new aura::Window(new CustomWindowDelegate(this))), - frame_sink_id_( - aura::Env::GetInstance()->context_factory()->AllocateFrameSinkId()) { + frame_sink_id_(aura::Env::GetInstance() + ->context_factory_private() + ->AllocateFrameSinkId()) { cc::mojom::MojoCompositorFrameSinkClientPtr frame_sink_holder_ptr; cc::mojom::MojoCompositorFrameSinkClientRequest frame_sink_client_request = mojo::GetProxy(&frame_sink_holder_ptr); std::unique_ptr<CompositorFrameSink> frame_sink(new CompositorFrameSink( frame_sink_id_, - aura::Env::GetInstance()->context_factory()->GetSurfaceManager(), + aura::Env::GetInstance()->context_factory_private()->GetSurfaceManager(), std::move(frame_sink_holder_ptr))); compositor_frame_sink_holder_ = new CompositorFrameSinkHolder( this, std::move(frame_sink), std::move(frame_sink_client_request));
diff --git a/components/exo/surface_unittest.cc b/components/exo/surface_unittest.cc index 2e82a57..f48ea71 100644 --- a/components/exo/surface_unittest.cc +++ b/components/exo/surface_unittest.cc
@@ -195,7 +195,7 @@ const cc::CompositorFrame& GetFrameFromSurface(Surface* surface) { cc::SurfaceId surface_id = surface->GetSurfaceId(); cc::SurfaceManager* surface_manager = - aura::Env::GetInstance()->context_factory()->GetSurfaceManager(); + aura::Env::GetInstance()->context_factory_private()->GetSurfaceManager(); const cc::CompositorFrame& frame = surface_manager->GetSurfaceForId(surface_id)->GetEligibleFrame(); return frame;
diff --git a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc index 16e2cf4..170b815 100644 --- a/content/browser/accessibility/dump_accessibility_tree_browsertest.cc +++ b/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
@@ -300,6 +300,11 @@ } IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, + AccessibilityAriaHiddenIframeBody) { + RunAriaTest(FILE_PATH_LITERAL("aria-hidden-iframe-body.html")); +} + +IN_PROC_BROWSER_TEST_F(DumpAccessibilityTreeTest, MAYBE(AccessibilityAriaFlowto)) { RunAriaTest(FILE_PATH_LITERAL("aria-flowto.html")); }
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 601fcd6..ff0c374 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc
@@ -1381,6 +1381,8 @@ switches::kUseMusInRenderer); if (aura::Env::GetInstance() && !use_mus_in_renderer) { aura::Env::GetInstance()->set_context_factory(GetContextFactory()); + aura::Env::GetInstance()->set_context_factory_private( + GetContextFactoryPrivate()); } #endif // defined(USE_AURA) #endif // defined(OS_ANDROID)
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc index d3558b1c..6cfbdfb 100644 --- a/content/browser/compositor/gpu_process_transport_factory.cc +++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -668,6 +668,11 @@ return this; } +ui::ContextFactoryPrivate* +GpuProcessTransportFactory::GetContextFactoryPrivate() { + return this; +} + cc::FrameSinkId GpuProcessTransportFactory::AllocateFrameSinkId() { return cc::FrameSinkId(0, next_sink_id_++); }
diff --git a/content/browser/compositor/gpu_process_transport_factory.h b/content/browser/compositor/gpu_process_transport_factory.h index a19b35a..ad55470 100644 --- a/content/browser/compositor/gpu_process_transport_factory.h +++ b/content/browser/compositor/gpu_process_transport_factory.h
@@ -31,9 +31,9 @@ class ContextProviderCommandBuffer; class OutputDeviceBacking; -class GpuProcessTransportFactory - : public ui::ContextFactory, - public ImageTransportFactory { +class GpuProcessTransportFactory : public ui::ContextFactory, + public ui::ContextFactoryPrivate, + public ImageTransportFactory { public: GpuProcessTransportFactory(); @@ -42,16 +42,20 @@ // ui::ContextFactory implementation. void CreateCompositorFrameSink( base::WeakPtr<ui::Compositor> compositor) override; + scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; + uint32_t GetImageTextureTarget(gfx::BufferFormat format, + gfx::BufferUsage usage) override; + bool DoesCreateTestContexts() override; + gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; + cc::TaskGraphRunner* GetTaskGraphRunner() override; + void AddObserver(ui::ContextFactoryObserver* observer) override; + void RemoveObserver(ui::ContextFactoryObserver* observer) override; + + // ui::ContextFactoryPrivate implementation. std::unique_ptr<ui::Reflector> CreateReflector(ui::Compositor* source, ui::Layer* target) override; void RemoveReflector(ui::Reflector* reflector) override; void RemoveCompositor(ui::Compositor* compositor) override; - scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; - bool DoesCreateTestContexts() override; - uint32_t GetImageTextureTarget(gfx::BufferFormat format, - gfx::BufferUsage usage) override; - gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; - cc::TaskGraphRunner* GetTaskGraphRunner() override; cc::FrameSinkId AllocateFrameSinkId() override; void SetDisplayVisible(ui::Compositor* compositor, bool visible) override; void ResizeDisplay(ui::Compositor* compositor, @@ -64,11 +68,10 @@ base::TimeTicks timebase, base::TimeDelta interval) override; void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override; - void AddObserver(ui::ContextFactoryObserver* observer) override; - void RemoveObserver(ui::ContextFactoryObserver* observer) override; // ImageTransportFactory implementation. ui::ContextFactory* GetContextFactory() override; + ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; cc::SurfaceManager* GetSurfaceManager() override; display_compositor::GLHelper* GetGLHelper() override; void SetGpuChannelEstablishFactory(
diff --git a/content/browser/compositor/image_transport_factory.h b/content/browser/compositor/image_transport_factory.h index ffd336a..e10d8ab 100644 --- a/content/browser/compositor/image_transport_factory.h +++ b/content/browser/compositor/image_transport_factory.h
@@ -23,6 +23,7 @@ namespace ui { class Compositor; class ContextFactory; +class ContextFactoryPrivate; } namespace display_compositor { @@ -60,6 +61,11 @@ // Gets the image transport factory as a context factory for the compositor. virtual ui::ContextFactory* GetContextFactory() = 0; + // Gets the image transport factory as the privileged context factory for the + // compositor. TODO(fsamuel): This interface should eventually go away once + // Mus subsumes this functionality. + virtual ui::ContextFactoryPrivate* GetContextFactoryPrivate() = 0; + // Gets a GLHelper instance, associated with the shared context. This // GLHelper will get destroyed whenever the shared context is lost // (ImageTransportFactoryObserver::OnLostResources is called).
diff --git a/content/browser/compositor/reflector_impl_unittest.cc b/content/browser/compositor/reflector_impl_unittest.cc index 3948dd5..d5948565 100644 --- a/content/browser/compositor/reflector_impl_unittest.cc +++ b/content/browser/compositor/reflector_impl_unittest.cc
@@ -123,8 +123,11 @@ public: void SetUp() override { bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); ImageTransportFactory::InitializeForUnitTests( std::unique_ptr<ImageTransportFactory>( new NoTransportImageTransportFactory)); @@ -134,8 +137,9 @@ begin_frame_source_.reset(new cc::DelayBasedBeginFrameSource( base::MakeUnique<cc::DelayBasedTimeSource>( compositor_task_runner_.get()))); - compositor_.reset( - new ui::Compositor(context_factory, compositor_task_runner_.get())); + compositor_.reset(new ui::Compositor(context_factory, + context_factory_private, + compositor_task_runner_.get())); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); auto context_provider = cc::TestContextProvider::Create();
diff --git a/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc b/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc index 5ec01a8..48f0309 100644 --- a/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc +++ b/content/browser/compositor/software_browser_compositor_output_surface_unittest.cc
@@ -95,11 +95,14 @@ void SoftwareBrowserCompositorOutputSurfaceTest::SetUp() { bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; - compositor_.reset( - new ui::Compositor(context_factory, message_loop_.task_runner().get())); + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); + + compositor_.reset(new ui::Compositor(context_factory, context_factory_private, + message_loop_.task_runner().get())); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); }
diff --git a/content/browser/compositor/software_output_device_ozone_unittest.cc b/content/browser/compositor/software_output_device_ozone_unittest.cc index 4f4eebc..8c072d2c 100644 --- a/content/browser/compositor/software_output_device_ozone_unittest.cc +++ b/content/browser/compositor/software_output_device_ozone_unittest.cc
@@ -86,14 +86,16 @@ } void SoftwareOutputDeviceOzoneTest::SetUp() { - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output_); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(enable_pixel_output_, &context_factory, + &context_factory_private); const gfx::Size size(500, 400); window_ = ui::OzonePlatform::GetInstance()->CreatePlatformWindow( &window_delegate_, gfx::Rect(size)); - compositor_.reset( - new ui::Compositor(context_factory, base::ThreadTaskRunnerHandle::Get())); + compositor_.reset(new ui::Compositor(context_factory, nullptr, + base::ThreadTaskRunnerHandle::Get())); compositor_->SetAcceleratedWidget(window_delegate_.GetAcceleratedWidget()); compositor_->SetScaleAndSize(1.0f, size);
diff --git a/content/browser/compositor/surface_utils.cc b/content/browser/compositor/surface_utils.cc index 33e5468a..27cceec 100644 --- a/content/browser/compositor/surface_utils.cc +++ b/content/browser/compositor/surface_utils.cc
@@ -164,7 +164,7 @@ return ContextProviderFactoryImpl::GetInstance()->AllocateFrameSinkId(); #else ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - return factory->GetContextFactory()->AllocateFrameSinkId(); + return factory->GetContextFactoryPrivate()->AllocateFrameSinkId(); #endif } @@ -175,7 +175,7 @@ ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); if (factory == NULL) return nullptr; - return factory->GetContextFactory()->GetSurfaceManager(); + return factory->GetContextFactoryPrivate()->GetSurfaceManager(); #endif }
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.cc b/content/browser/compositor/test/no_transport_image_transport_factory.cc index 150c9a69..8c4d6cdf 100644 --- a/content/browser/compositor/test/no_transport_image_transport_factory.cc +++ b/content/browser/compositor/test/no_transport_image_transport_factory.cc
@@ -33,6 +33,11 @@ return context_factory_.get(); } +ui::ContextFactoryPrivate* +NoTransportImageTransportFactory::GetContextFactoryPrivate() { + return context_factory_.get(); +} + display_compositor::GLHelper* NoTransportImageTransportFactory::GetGLHelper() { if (!gl_helper_) { context_provider_ = context_factory_->SharedMainThreadContextProvider();
diff --git a/content/browser/compositor/test/no_transport_image_transport_factory.h b/content/browser/compositor/test/no_transport_image_transport_factory.h index 9211e1a..3961b4a 100644 --- a/content/browser/compositor/test/no_transport_image_transport_factory.h +++ b/content/browser/compositor/test/no_transport_image_transport_factory.h
@@ -30,6 +30,7 @@ // ImageTransportFactory implementation. ui::ContextFactory* GetContextFactory() override; + ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; display_compositor::GLHelper* GetGLHelper() override; void SetGpuChannelEstablishFactory( gpu::GpuChannelEstablishFactory* factory) override;
diff --git a/content/browser/context_factory.cc b/content/browser/context_factory.cc index b9dfacc0..aacdf25f 100644 --- a/content/browser/context_factory.cc +++ b/content/browser/context_factory.cc
@@ -13,4 +13,9 @@ return ImageTransportFactory::GetInstance()->GetContextFactory(); } +ui::ContextFactoryPrivate* GetContextFactoryPrivate() { + DCHECK(ImageTransportFactory::GetInstance()); + return ImageTransportFactory::GetInstance()->GetContextFactoryPrivate(); +} + } // namespace content
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc index 36fe6ea..7c45027a1 100644 --- a/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc +++ b/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc
@@ -183,7 +183,7 @@ #if !defined(OS_ANDROID) ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); cc::Surface* surface = manager->GetSurfaceForId(id); EXPECT_TRUE(surface); // There should be a SurfaceSequence created by the RWHVChildFrame.
diff --git a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc index 8bfa069..e15944a 100644 --- a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc +++ b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
@@ -276,7 +276,7 @@ #if !defined(OS_ANDROID) ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); cc::Surface* surface = manager->GetSurfaceForId(id); EXPECT_TRUE(surface); // There should be a SurfaceSequence created by the RWHVGuest. @@ -300,7 +300,7 @@ #if !defined(OS_ANDROID) ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); cc::Surface* surface = manager->GetSurfaceForId(id); EXPECT_TRUE(surface); // There should be a SurfaceSequence created by the RWHVGuest.
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc index 5b9d77d..f700c1f92 100644 --- a/content/browser/gpu/browser_gpu_memory_buffer_manager.cc +++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.cc
@@ -78,23 +78,6 @@ std::unique_ptr<gfx::GpuMemoryBuffer> result; }; -struct BrowserGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandleRequest - : public CreateGpuMemoryBufferRequest { - CreateGpuMemoryBufferFromHandleRequest( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format, - int client_id) - : CreateGpuMemoryBufferRequest(size, - format, - gfx::BufferUsage::GPU_READ, - client_id, - gpu::kNullSurfaceHandle), - handle(handle) {} - ~CreateGpuMemoryBufferFromHandleRequest() {} - gfx::GpuMemoryBufferHandle handle; -}; - BrowserGpuMemoryBufferManager::BrowserGpuMemoryBufferManager( int gpu_client_id, uint64_t gpu_client_tracing_id) @@ -154,31 +137,6 @@ return AllocateGpuMemoryBufferForSurface(size, format, usage, surface_handle); } -std::unique_ptr<gfx::GpuMemoryBuffer> -BrowserGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) { - DCHECK(!BrowserThread::CurrentlyOn(BrowserThread::IO)); - - CreateGpuMemoryBufferFromHandleRequest request(handle, size, format, - gpu_client_id_); - BrowserThread::PostTask( - BrowserThread::IO, FROM_HERE, - base::Bind(&BrowserGpuMemoryBufferManager:: - HandleCreateGpuMemoryBufferFromHandleOnIO, - base::Unretained(this), // Safe as we wait for result below. - base::Unretained(&request))); - - // We're blocking the UI thread, which is generally undesirable. - TRACE_EVENT0( - "browser", - "BrowserGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle"); - base::ThreadRestrictions::ScopedAllowWait allow_wait; - request.event.Wait(); - return std::move(request.result); -} - void BrowserGpuMemoryBufferManager::AllocateGpuMemoryBufferForChildProcess( gfx::GpuMemoryBufferId id, const gfx::Size& size, @@ -378,33 +336,6 @@ request->event.Signal(); } -void BrowserGpuMemoryBufferManager::HandleCreateGpuMemoryBufferFromHandleOnIO( - CreateGpuMemoryBufferFromHandleRequest* request) { - DCHECK_CURRENTLY_ON(BrowserThread::IO); - - gfx::GpuMemoryBufferId new_id = content::GetNextGenericSharedMemoryId(); - - BufferMap& buffers = clients_[request->client_id]; - auto insert_result = buffers.insert(std::make_pair( - new_id, BufferInfo(request->size, request->handle.type, - request->format, request->usage, 0))); - DCHECK(insert_result.second); - - gfx::GpuMemoryBufferHandle handle = request->handle; - handle.id = new_id; - - // Note: Unretained is safe as IO thread is stopped before manager is - // destroyed. - request->result = gpu::GpuMemoryBufferImpl::CreateFromHandle( - handle, request->size, request->format, request->usage, - base::Bind( - &GpuMemoryBufferDeleted, - BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), - base::Bind(&BrowserGpuMemoryBufferManager::DestroyGpuMemoryBufferOnIO, - base::Unretained(this), new_id, request->client_id))); - request->event.Signal(); -} - void BrowserGpuMemoryBufferManager::HandleGpuMemoryBufferCreatedOnIO( CreateGpuMemoryBufferRequest* request, const gfx::GpuMemoryBufferHandle& handle) {
diff --git a/content/browser/gpu/browser_gpu_memory_buffer_manager.h b/content/browser/gpu/browser_gpu_memory_buffer_manager.h index 998abd4..7ead1a6a 100644 --- a/content/browser/gpu/browser_gpu_memory_buffer_manager.h +++ b/content/browser/gpu/browser_gpu_memory_buffer_manager.h
@@ -47,10 +47,6 @@ gfx::BufferFormat format, gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) override; - std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) override; void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) override; @@ -93,7 +89,6 @@ }; struct CreateGpuMemoryBufferRequest; - struct CreateGpuMemoryBufferFromHandleRequest; using CreateDelegate = base::Callback<void(GpuProcessHost* host, gfx::GpuMemoryBufferId id, @@ -111,8 +106,6 @@ // Functions that handle synchronous buffer creation requests. void HandleCreateGpuMemoryBufferOnIO(CreateGpuMemoryBufferRequest* request); - void HandleCreateGpuMemoryBufferFromHandleOnIO( - CreateGpuMemoryBufferFromHandleRequest* request); void HandleGpuMemoryBufferCreatedOnIO( CreateGpuMemoryBufferRequest* request, const gfx::GpuMemoryBufferHandle& handle);
diff --git a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc index 414a5fc..2cb5b47 100644 --- a/content/browser/media/capture/desktop_capture_device_aura_unittest.cc +++ b/content/browser/media/capture/desktop_capture_device_aura_unittest.cc
@@ -100,14 +100,16 @@ protected: void SetUp() override { // The ContextFactory must exist before any Compositors are created. + bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); helper_.reset( new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); - helper_->SetUp(context_factory); + helper_->SetUp(context_factory, context_factory_private); new wm::DefaultActivationClient(helper_->root_window()); - // We need a window to cover desktop area so that DesktopCaptureDeviceAura // can use gfx::NativeWindow::GetWindowAtScreenPoint() to locate the // root window associated with the primary display.
diff --git a/content/browser/renderer_host/browser_compositor_view_mac.mm b/content/browser/renderer_host/browser_compositor_view_mac.mm index 93944dc8..84087ff 100644 --- a/content/browser/renderer_host/browser_compositor_view_mac.mm +++ b/content/browser/renderer_host/browser_compositor_view_mac.mm
@@ -99,6 +99,7 @@ RecyclableCompositorMac::RecyclableCompositorMac() : accelerated_widget_mac_(new ui::AcceleratedWidgetMac()), compositor_(content::GetContextFactory(), + content::GetContextFactoryPrivate(), ui::WindowResizeHelperMac::Get()->task_runner()) { compositor_.SetAcceleratedWidget( accelerated_widget_mac_->accelerated_widget()); @@ -175,7 +176,7 @@ root_layer_.reset(new ui::Layer(ui::LAYER_SOLID_COLOR)); ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); delegated_frame_host_.reset(new DelegatedFrameHost( - factory->GetContextFactory()->AllocateFrameSinkId(), this)); + factory->GetContextFactoryPrivate()->AllocateFrameSinkId(), this)); SetRenderWidgetHostIsHidden(render_widget_host_is_hidden); SetNSViewAttachedToWindow(ns_view_attached_to_window);
diff --git a/content/browser/renderer_host/delegated_frame_host.cc b/content/browser/renderer_host/delegated_frame_host.cc index 0ba9c7b..31fc6063 100644 --- a/content/browser/renderer_host/delegated_frame_host.cc +++ b/content/browser/renderer_host/delegated_frame_host.cc
@@ -79,13 +79,14 @@ ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); factory->GetContextFactory()->AddObserver(this); id_allocator_.reset(new cc::SurfaceIdAllocator()); - factory->GetContextFactory()->GetSurfaceManager()->RegisterFrameSinkId( + factory->GetContextFactoryPrivate()->GetSurfaceManager()->RegisterFrameSinkId( frame_sink_id_); - factory->GetContextFactory() + factory->GetContextFactoryPrivate() ->GetSurfaceManager() ->RegisterSurfaceFactoryClient(frame_sink_id_, this); surface_factory_ = base::MakeUnique<cc::SurfaceFactory>( - frame_sink_id_, factory->GetContextFactory()->GetSurfaceManager(), this); + frame_sink_id_, factory->GetContextFactoryPrivate()->GetSurfaceManager(), + this); } void DelegatedFrameHost::WasShown(const ui::LatencyInfo& latency_info) { @@ -478,7 +479,7 @@ } else { ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); bool allocated_new_local_frame_id = false; if (!local_frame_id_.is_valid() || frame_size != current_surface_size_ || frame_size_in_dip != current_frame_size_in_dip_) { @@ -833,11 +834,12 @@ ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); factory->GetContextFactory()->RemoveObserver(this); surface_factory_->EvictSurface(); - factory->GetContextFactory() + factory->GetContextFactoryPrivate() ->GetSurfaceManager() ->UnregisterSurfaceFactoryClient(frame_sink_id_); - factory->GetContextFactory()->GetSurfaceManager()->InvalidateFrameSinkId( - frame_sink_id_); + factory->GetContextFactoryPrivate() + ->GetSurfaceManager() + ->InvalidateFrameSinkId(frame_sink_id_); DCHECK(!vsync_manager_.get()); }
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 49da75d..f928a0e 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -391,7 +391,7 @@ ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::FrameSinkId frame_sink_id = is_guest_view_hack_ - ? factory->GetContextFactory()->AllocateFrameSinkId() + ? factory->GetContextFactoryPrivate()->AllocateFrameSinkId() : cc::FrameSinkId( base::checked_cast<uint32_t>(host_->GetProcess()->GetID()), base::checked_cast<uint32_t>(host_->GetRoutingID()));
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc index 022fd7ea..ddcc2f3 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -498,7 +498,8 @@ aura_test_helper_.reset( new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); aura_test_helper_->SetUp( - ImageTransportFactory::GetInstance()->GetContextFactory()); + ImageTransportFactory::GetInstance()->GetContextFactory(), + ImageTransportFactory::GetInstance()->GetContextFactoryPrivate()); new wm::DefaultActivationClient(aura_test_helper_->root_window()); browser_context_.reset(new TestBrowserContext); @@ -1685,7 +1686,7 @@ FakeSurfaceObserver manager_observer; ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); manager->AddObserver(&manager_observer); gfx::Size view_size(100, 100); @@ -1753,7 +1754,7 @@ FakeSurfaceObserver manager_observer; ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); manager->AddObserver(&manager_observer); gfx::Size view_size(100, 100); @@ -1919,7 +1920,7 @@ if (id.is_valid()) { ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); cc::SurfaceManager* manager = - factory->GetContextFactory()->GetSurfaceManager(); + factory->GetContextFactoryPrivate()->GetSurfaceManager(); cc::Surface* surface = manager->GetSurfaceForId(id); EXPECT_TRUE(surface);
diff --git a/content/child/blink_platform_impl.cc b/content/child/blink_platform_impl.cc index a27995e..872234e 100644 --- a/content/child/blink_platform_impl.cc +++ b/content/child/blink_platform_impl.cc
@@ -632,9 +632,6 @@ {"DocumentXMLTreeViewer.js", IDR_DOCUMENTXMLTREEVIEWER_JS, ui::SCALE_FACTOR_NONE}, - {"PrivateScriptRunner.js", - IDR_PRIVATE_SCRIPT_PRIVATESCRIPTRUNNER_JS, - ui::SCALE_FACTOR_NONE}, #ifdef IDR_PICKER_COMMON_JS {"pickerCommon.js", IDR_PICKER_COMMON_JS, ui::SCALE_FACTOR_NONE}, {"pickerCommon.css", IDR_PICKER_COMMON_CSS, ui::SCALE_FACTOR_NONE},
diff --git a/content/child/child_gpu_memory_buffer_manager.cc b/content/child/child_gpu_memory_buffer_manager.cc index 2900180..6b8042c 100644 --- a/content/child/child_gpu_memory_buffer_manager.cc +++ b/content/child/child_gpu_memory_buffer_manager.cc
@@ -64,15 +64,6 @@ return std::move(buffer); } -std::unique_ptr<gfx::GpuMemoryBuffer> -ChildGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) { - NOTIMPLEMENTED(); - return nullptr; -} - void ChildGpuMemoryBufferManager::SetDestructionSyncToken( gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) {
diff --git a/content/child/child_gpu_memory_buffer_manager.h b/content/child/child_gpu_memory_buffer_manager.h index 3144b29..c349be5 100644 --- a/content/child/child_gpu_memory_buffer_manager.h +++ b/content/child/child_gpu_memory_buffer_manager.h
@@ -24,10 +24,6 @@ gfx::BufferFormat format, gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) override; - std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) override; void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) override;
diff --git a/content/public/browser/context_factory.h b/content/public/browser/context_factory.h index 07f24622..adcd8a5 100644 --- a/content/public/browser/context_factory.h +++ b/content/public/browser/context_factory.h
@@ -9,6 +9,7 @@ namespace ui { class ContextFactory; +class ContextFactoryPrivate; } namespace content { @@ -17,6 +18,12 @@ // owned by content. CONTENT_EXPORT ui::ContextFactory* GetContextFactory(); +// Returns the singleton ContextFactoryPrivate used by content. The return value +// is owned by content. +// TODO(fsamuel): Once Mus is used on all platforms, this private interface +// should not be necessary. +CONTENT_EXPORT ui::ContextFactoryPrivate* GetContextFactoryPrivate(); + } // namespace content #endif // CONTENT_PUBLIC_BROWSER_CONTEXT_FACTORY_H_
diff --git a/content/public/test/test_renderer_host.cc b/content/public/test/test_renderer_host.cc index 6817a5a0..38f524e 100644 --- a/content/public/test/test_renderer_host.cc +++ b/content/public/test/test_renderer_host.cc
@@ -252,10 +252,12 @@ #if defined(USE_AURA) ui::ContextFactory* context_factory = ImageTransportFactory::GetInstance()->GetContextFactory(); + ui::ContextFactoryPrivate* context_factory_private = + ImageTransportFactory::GetInstance()->GetContextFactoryPrivate(); aura_test_helper_.reset( new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); - aura_test_helper_->SetUp(context_factory); + aura_test_helper_->SetUp(context_factory, context_factory_private); new wm::DefaultActivationClient(aura_test_helper_->root_window()); #endif
diff --git a/content/test/data/accessibility/aria/aria-hidden-iframe-body-expected-blink.txt b/content/test/data/accessibility/aria/aria-hidden-iframe-body-expected-blink.txt new file mode 100644 index 0000000..30f0eb4 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-hidden-iframe-body-expected-blink.txt
@@ -0,0 +1,4 @@ +rootWebArea focusable readOnly +++group readOnly +++++iframe focusable readOnly +++++++rootWebArea focusable readOnly
diff --git a/content/test/data/accessibility/aria/aria-hidden-iframe-body.html b/content/test/data/accessibility/aria/aria-hidden-iframe-body.html new file mode 100644 index 0000000..ec3d16b1 --- /dev/null +++ b/content/test/data/accessibility/aria/aria-hidden-iframe-body.html
@@ -0,0 +1,9 @@ +<!DOCTYPE html> +<!-- +@BLINK-ALLOW:editable +@BLINK-ALLOW:focusable +@BLINK-ALLOW:readOnly +@BLINK-ALLOW:richlyEditable +--> +<iframe srcdoc="<body contenteditable aria-hidden='true'> </body>"> +</iframe>
diff --git a/extensions/common/url_pattern.cc b/extensions/common/url_pattern.cc index 81edf7f..fcd50f67 100644 --- a/extensions/common/url_pattern.cc +++ b/extensions/common/url_pattern.cc
@@ -75,21 +75,21 @@ const char kPathSeparator[] = "/"; -bool IsStandardScheme(const std::string& scheme) { +bool IsStandardScheme(base::StringPiece scheme) { // "*" gets the same treatment as a standard scheme. if (scheme == "*") return true; - return url::IsStandard(scheme.c_str(), + return url::IsStandard(scheme.data(), url::Component(0, static_cast<int>(scheme.length()))); } -bool IsValidPortForScheme(const std::string& scheme, const std::string& port) { +bool IsValidPortForScheme(base::StringPiece scheme, base::StringPiece port) { if (port == "*") return true; // Only accept non-wildcard ports if the scheme uses ports. - if (url::DefaultPortForScheme(scheme.c_str(), scheme.length()) == + if (url::DefaultPortForScheme(scheme.data(), scheme.length()) == url::PORT_UNSPECIFIED) { return false; } @@ -107,10 +107,10 @@ // the path will have only a single wildcard at the end. This makes figuring // out overlap much easier. It seems like there is probably a computer-sciency // way to solve the general case, but we don't need that yet. -std::string StripTrailingWildcard(const std::string& path) { - size_t wildcard_index = path.find('*'); - size_t path_last = path.size() - 1; - return wildcard_index == path_last ? path.substr(0, path_last) : path; +base::StringPiece StripTrailingWildcard(base::StringPiece path) { + if (path.ends_with("*")) + path.remove_suffix(1); + return path; } // Removes trailing dot from |host_piece| if any. @@ -123,7 +123,7 @@ } // namespace // static -bool URLPattern::IsValidSchemeForExtensions(const std::string& scheme) { +bool URLPattern::IsValidSchemeForExtensions(base::StringPiece scheme) { for (size_t i = 0; i < arraysize(kValidSchemes); ++i) { if (scheme == kValidSchemes[i]) return true; @@ -143,7 +143,7 @@ match_subdomains_(false), port_("*") {} -URLPattern::URLPattern(int valid_schemes, const std::string& pattern) +URLPattern::URLPattern(int valid_schemes, base::StringPiece pattern) // Strict error checking is used, because this constructor is only // appropriate when we know |pattern| is valid. : valid_schemes_(valid_schemes), @@ -176,7 +176,7 @@ return out << '"' << url_pattern.GetAsString() << '"'; } -URLPattern::ParseResult URLPattern::Parse(const std::string& pattern) { +URLPattern::ParseResult URLPattern::Parse(base::StringPiece pattern) { spec_.clear(); SetMatchAllURLs(false); SetMatchSubdomains(false); @@ -193,12 +193,12 @@ bool has_standard_scheme_separator = true; // Some urls also use ':' alone as the scheme separator. - if (scheme_end_pos == std::string::npos) { + if (scheme_end_pos == base::StringPiece::npos) { scheme_end_pos = pattern.find(':'); has_standard_scheme_separator = false; } - if (scheme_end_pos == std::string::npos) + if (scheme_end_pos == base::StringPiece::npos) return PARSE_ERROR_MISSING_SCHEME_SEPARATOR; if (!SetScheme(pattern.substr(0, scheme_end_pos))) @@ -222,7 +222,7 @@ path_start_pos = host_start_pos; } else if (scheme_ == url::kFileScheme) { size_t host_end_pos = pattern.find(kPathSeparator, host_start_pos); - if (host_end_pos == std::string::npos) { + if (host_end_pos == base::StringPiece::npos) { // Allow hostname omission. // e.g. file://* is interpreted as file:///*, // file://foo* is interpreted as file:///foo*. @@ -239,10 +239,13 @@ if (host_start_pos == host_end_pos) return PARSE_ERROR_EMPTY_HOST; - if (host_end_pos == std::string::npos) + if (host_end_pos == base::StringPiece::npos) return PARSE_ERROR_EMPTY_PATH; - host_ = pattern.substr(host_start_pos, host_end_pos - host_start_pos); + // TODO(devlin): This whole series is expensive. Luckily we don't do it + // *too* often, but it could be optimized. + pattern.substr(host_start_pos, host_end_pos - host_start_pos) + .CopyToString(&host_); // The first component can optionally be '*' to match all subdomains. std::vector<std::string> host_components = base::SplitString( @@ -290,9 +293,9 @@ valid_schemes_ = valid_schemes; } -void URLPattern::SetHost(const std::string& host) { +void URLPattern::SetHost(base::StringPiece host) { spec_.clear(); - host_ = host; + host.CopyToString(&host_); } void URLPattern::SetMatchAllURLs(bool val) { @@ -312,9 +315,9 @@ match_subdomains_ = val; } -bool URLPattern::SetScheme(const std::string& scheme) { +bool URLPattern::SetScheme(base::StringPiece scheme) { spec_.clear(); - scheme_ = scheme; + scheme.CopyToString(&scheme_); if (scheme_ == "*") { valid_schemes_ &= (SCHEME_HTTP | SCHEME_HTTPS); } else if (!IsValidScheme(scheme_)) { @@ -323,7 +326,7 @@ return true; } -bool URLPattern::IsValidScheme(const std::string& scheme) const { +bool URLPattern::IsValidScheme(base::StringPiece scheme) const { if (valid_schemes_ == SCHEME_ALL) return true; @@ -335,18 +338,18 @@ return false; } -void URLPattern::SetPath(const std::string& path) { +void URLPattern::SetPath(base::StringPiece path) { spec_.clear(); - path_ = path; + path.CopyToString(&path_); path_escaped_ = path_; base::ReplaceSubstringsAfterOffset(&path_escaped_, 0, "\\", "\\\\"); base::ReplaceSubstringsAfterOffset(&path_escaped_, 0, "?", "\\?"); } -bool URLPattern::SetPort(const std::string& port) { +bool URLPattern::SetPort(base::StringPiece port) { spec_.clear(); if (IsValidPortForScheme(scheme_, port)) { - port_ = port; + port.CopyToString(&port_); return true; } return false; @@ -362,15 +365,17 @@ test_url = test.inner_url(); } - if (!MatchesScheme(test_url->scheme())) + if (!MatchesScheme(test_url->scheme_piece())) return false; if (match_all_urls_) return true; std::string path_for_request = test.PathForRequest(); - if (has_inner_url) - path_for_request = test_url->path() + path_for_request; + if (has_inner_url) { + path_for_request = base::StringPrintf("%s%s", test_url->path_piece().data(), + path_for_request.c_str()); + } return MatchesSecurityOriginHelper(*test_url) && MatchesPath(path_for_request); @@ -395,19 +400,18 @@ return MatchesSecurityOriginHelper(*test_url); } -bool URLPattern::MatchesScheme(const std::string& test) const { +bool URLPattern::MatchesScheme(base::StringPiece test) const { if (!IsValidScheme(test)) return false; return scheme_ == "*" || test == scheme_; } -bool URLPattern::MatchesHost(const std::string& host) const { - std::string test(url::kHttpScheme); - test += url::kStandardSchemeSeparator; - test += host; - test += "/"; - return MatchesHost(GURL(test)); +bool URLPattern::MatchesHost(base::StringPiece host) const { + // TODO(devlin): This is a bit sad. Parsing urls is expensive. + return MatchesHost( + GURL(base::StringPrintf("%s%s%s/", url::kHttpScheme, + url::kStandardSchemeSeparator, host.data()))); } bool URLPattern::MatchesHost(const GURL& test) const { @@ -481,11 +485,16 @@ return !ImpliesAllHosts() && scheme_ != "*" && !match_subdomains_; } -bool URLPattern::MatchesPath(const std::string& test) const { +bool URLPattern::MatchesPath(base::StringPiece test) const { // Make the behaviour of OverlapsWith consistent with MatchesURL, which is // need to match hosted apps on e.g. 'google.com' also run on 'google.com/'. - if (test + "/*" == path_escaped_) + // The below if is a no-copy way of doing (test + "/*" == path_escaped_). + if (path_escaped_.length() == test.length() + 2 && + base::StartsWith(path_escaped_.c_str(), test, + base::CompareCase::SENSITIVE) && + base::EndsWith(path_escaped_, "/*", base::CompareCase::SENSITIVE)) { return true; + } return base::MatchPattern(test, path_escaped_); } @@ -523,7 +532,7 @@ if (!path_.empty()) spec += path_; - spec_ = spec; + spec_ = std::move(spec); return spec_; } @@ -581,7 +590,7 @@ return true; } -bool URLPattern::MatchesPortPattern(const std::string& port) const { +bool URLPattern::MatchesPortPattern(base::StringPiece port) const { return port_ == "*" || port_ == port; }
diff --git a/extensions/common/url_pattern.h b/extensions/common/url_pattern.h index bcdc7f6..d844a1ba 100644 --- a/extensions/common/url_pattern.h +++ b/extensions/common/url_pattern.h
@@ -9,6 +9,8 @@ #include <string> #include <vector> +#include "base/strings/string_piece.h" + class GURL; // A pattern that can be used to match URLs. A URLPattern is a very restricted @@ -81,13 +83,13 @@ static const char kAllUrlsPattern[]; // Returns true if the given |scheme| is considered valid for extensions. - static bool IsValidSchemeForExtensions(const std::string& scheme); + static bool IsValidSchemeForExtensions(base::StringPiece scheme); explicit URLPattern(int valid_schemes); // Convenience to construct a URLPattern from a string. If the string is not // known ahead of time, use Parse() instead, which returns success or failure. - URLPattern(int valid_schemes, const std::string& pattern); + URLPattern(int valid_schemes, base::StringPiece pattern); URLPattern(); URLPattern(const URLPattern& other); @@ -101,7 +103,7 @@ // URLPattern::PARSE_SUCCESS on success, or an error code otherwise. On // failure, this instance will have some intermediate values and is in an // invalid state. - ParseResult Parse(const std::string& pattern_str); + ParseResult Parse(base::StringPiece pattern_str); // Gets the bitmask of valid schemes. int valid_schemes() const { return valid_schemes_; } @@ -110,7 +112,7 @@ // Gets the host the pattern matches. This can be an empty string if the // pattern matches all hosts (the input was <scheme>://*/<whatever>). const std::string& host() const { return host_; } - void SetHost(const std::string& host); + void SetHost(base::StringPiece host); // Gets whether to match subdomains of host(). bool match_subdomains() const { return match_subdomains_; } @@ -119,7 +121,7 @@ // Gets the path the pattern matches with the leading slash. This can have // embedded asterisks which are interpreted using glob rules. const std::string& path() const { return path_; } - void SetPath(const std::string& path); + void SetPath(base::StringPiece path); // Returns true if this pattern matches all urls. bool match_all_urls() const { return match_all_urls_; } @@ -128,14 +130,14 @@ // Sets the scheme for pattern matches. This can be a single '*' if the // pattern matches all valid schemes (as defined by the valid_schemes_ // property). Returns false on failure (if the scheme is not valid). - bool SetScheme(const std::string& scheme); + bool SetScheme(base::StringPiece scheme); // Note: You should use MatchesScheme() instead of this getter unless you // absolutely need the exact scheme. This is exposed for testing. const std::string& scheme() const { return scheme_; } // Returns true if the specified scheme can be used in this URL pattern, and // false otherwise. Uses valid_schemes_ to determine validity. - bool IsValidScheme(const std::string& scheme) const; + bool IsValidScheme(base::StringPiece scheme) const; // Returns true if this instance matches the specified URL. bool MatchesURL(const GURL& test) const; @@ -147,14 +149,14 @@ // Note that if test is "filesystem", this may fail whereas MatchesURL // may succeed. MatchesURL is smart enough to look at the inner_url instead // of the outer "filesystem:" part. - bool MatchesScheme(const std::string& test) const; + bool MatchesScheme(base::StringPiece test) const; // Returns true if |test| matches our host. - bool MatchesHost(const std::string& test) const; + bool MatchesHost(base::StringPiece test) const; bool MatchesHost(const GURL& test) const; // Returns true if |test| matches our path. - bool MatchesPath(const std::string& test) const; + bool MatchesPath(base::StringPiece test) const; // Returns true if the pattern is vague enough that it implies all hosts, // such as *://*/*. @@ -168,7 +170,7 @@ bool MatchesSingleOrigin() const; // Sets the port. Returns false if the port is invalid. - bool SetPort(const std::string& port); + bool SetPort(base::StringPiece port); const std::string& port() const { return port_; } // Returns a string representing this instance. @@ -216,7 +218,7 @@ bool MatchesSecurityOriginHelper(const GURL& test) const; // Returns true if our port matches the |port| pattern (it may be "*"). - bool MatchesPortPattern(const std::string& port) const; + bool MatchesPortPattern(base::StringPiece port) const; // If the URLPattern contains a wildcard scheme, returns a list of // equivalent literal schemes, otherwise returns the current scheme.
diff --git a/extensions/shell/browser/shell_browser_main_parts.cc b/extensions/shell/browser/shell_browser_main_parts.cc index 8dff54e..de4c46db 100644 --- a/extensions/shell/browser/shell_browser_main_parts.cc +++ b/extensions/shell/browser/shell_browser_main_parts.cc
@@ -155,6 +155,8 @@ #if defined(USE_AURA) aura::Env::GetInstance()->set_context_factory(content::GetContextFactory()); + aura::Env::GetInstance()->set_context_factory_private( + content::GetContextFactoryPrivate()); #endif storage_monitor::StorageMonitor::Create();
diff --git a/gpu/command_buffer/client/gpu_memory_buffer_manager.h b/gpu/command_buffer/client/gpu_memory_buffer_manager.h index 7fb14af1..b75780bb 100644 --- a/gpu/command_buffer/client/gpu_memory_buffer_manager.h +++ b/gpu/command_buffer/client/gpu_memory_buffer_manager.h
@@ -28,12 +28,6 @@ gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) = 0; - // Creates a GpuMemoryBuffer from existing handle. - virtual std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) = 0; - // Associates destruction sync point with |buffer|. virtual void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) = 0;
diff --git a/gpu/ipc/client/gpu_memory_buffer_impl.cc b/gpu/ipc/client/gpu_memory_buffer_impl.cc index 185e921..a673cbf2 100644 --- a/gpu/ipc/client/gpu_memory_buffer_impl.cc +++ b/gpu/ipc/client/gpu_memory_buffer_impl.cc
@@ -30,7 +30,8 @@ GpuMemoryBufferImpl::~GpuMemoryBufferImpl() { DCHECK(!mapped_); - callback_.Run(destruction_sync_token_); + if (!callback_.is_null()) + callback_.Run(destruction_sync_token_); } // static
diff --git a/gpu/ipc/client/gpu_memory_buffer_impl.h b/gpu/ipc/client/gpu_memory_buffer_impl.h index a8dc56b7..43e23e3 100644 --- a/gpu/ipc/client/gpu_memory_buffer_impl.h +++ b/gpu/ipc/client/gpu_memory_buffer_impl.h
@@ -24,9 +24,9 @@ ~GpuMemoryBufferImpl() override; // Creates an instance from the given |handle|. |size| and |internalformat| - // should match what was used to allocate the |handle|. |callback| is - // called when instance is deleted, which is not necessarily on the same - // thread as this function was called on and instance was created on. + // should match what was used to allocate the |handle|. |callback|, if + // non-null, is called when instance is deleted, which is not necessarily on + // the same thread as this function was called on and instance was created on. static std::unique_ptr<GpuMemoryBufferImpl> CreateFromHandle( const gfx::GpuMemoryBufferHandle& handle, const gfx::Size& size,
diff --git a/mash/example/views_examples/BUILD.gn b/mash/example/views_examples/BUILD.gn index 49e7d3a6..5291293b 100644 --- a/mash/example/views_examples/BUILD.gn +++ b/mash/example/views_examples/BUILD.gn
@@ -36,7 +36,6 @@ data_deps = [ ":manifest", - "//services/ui", ] }
diff --git a/mash/example/views_examples/views_examples.cc b/mash/example/views_examples/views_examples.cc index 43b82f2..d266ec2 100644 --- a/mash/example/views_examples/views_examples.cc +++ b/mash/example/views_examples/views_examples.cc
@@ -20,12 +20,6 @@ #include "ui/views/examples/example_base.h" #include "ui/views/examples/examples_window.h" #include "ui/views/mus/aura_init.h" -#include "ui/views/mus/window_manager_connection.h" - -namespace views { -class AuraInit; -class WindowManagerConnection; -} class ViewsExamples : public service_manager::Service, @@ -41,9 +35,8 @@ tracing_.Initialize(context()->connector(), context()->identity().name()); aura_init_ = base::MakeUnique<views::AuraInit>( context()->connector(), context()->identity(), - "views_mus_resources.pak"); - window_manager_connection_ = views::WindowManagerConnection::Create( - context()->connector(), context()->identity()); + "views_mus_resources.pak", std::string(), nullptr, + views::AuraInit::Mode::AURA_MUS); } bool OnConnect(const service_manager::ServiceInfo& remote_info, service_manager::InterfaceRegistry* registry) override { @@ -67,7 +60,6 @@ tracing::Provider tracing_; std::unique_ptr<views::AuraInit> aura_init_; - std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; DISALLOW_COPY_AND_ASSIGN(ViewsExamples); };
diff --git a/mash/task_viewer/BUILD.gn b/mash/task_viewer/BUILD.gn index 8e70981..0dd52ca4 100644 --- a/mash/task_viewer/BUILD.gn +++ b/mash/task_viewer/BUILD.gn
@@ -25,10 +25,6 @@ "//ui/views", "//ui/views/mus:for_mojo_application", ] - - data_deps = [ - "//services/ui", - ] } service("task_viewer") {
diff --git a/mash/task_viewer/task_viewer.cc b/mash/task_viewer/task_viewer.cc index 8bfcfd44..ba22d0f2 100644 --- a/mash/task_viewer/task_viewer.cc +++ b/mash/task_viewer/task_viewer.cc
@@ -31,7 +31,7 @@ #include "ui/views/controls/table/table_view.h" #include "ui/views/controls/table/table_view_observer.h" #include "ui/views/mus/aura_init.h" -#include "ui/views/mus/window_manager_connection.h" +#include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" namespace mash { @@ -295,9 +295,8 @@ tracing_.Initialize(context()->connector(), context()->identity().name()); aura_init_ = base::MakeUnique<views::AuraInit>( - context()->connector(), context()->identity(), "views_mus_resources.pak"); - window_manager_connection_ = views::WindowManagerConnection::Create( - context()->connector(), context()->identity()); + context()->connector(), context()->identity(), "views_mus_resources.pak", + std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); } bool TaskViewer::OnConnect(const service_manager::ServiceInfo& remote_info,
diff --git a/mash/task_viewer/task_viewer.h b/mash/task_viewer/task_viewer.h index cf1b8ecd..0f15d31 100644 --- a/mash/task_viewer/task_viewer.h +++ b/mash/task_viewer/task_viewer.h
@@ -19,7 +19,6 @@ namespace views { class AuraInit; class Widget; -class WindowManagerConnection; } namespace mash { @@ -53,7 +52,6 @@ tracing::Provider tracing_; std::unique_ptr<views::AuraInit> aura_init_; - std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; DISALLOW_COPY_AND_ASSIGN(TaskViewer); };
diff --git a/mash/test/mash_test_suite.cc b/mash/test/mash_test_suite.cc index 1571568..5d42365d 100644 --- a/mash/test/mash_test_suite.cc +++ b/mash/test/mash_test_suite.cc
@@ -32,8 +32,14 @@ env_ = aura::Env::CreateInstance(aura::Env::Mode::MUS); gl::GLSurfaceTestSupport::InitializeOneOff(); const bool enable_pixel_output = false; - env_->set_context_factory( - ui::InitializeContextFactoryForTests(enable_pixel_output)); + + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); + + env_->set_context_factory(context_factory); + env_->set_context_factory_private(context_factory_private); } void MashTestSuite::Shutdown() {
diff --git a/mash/webtest/BUILD.gn b/mash/webtest/BUILD.gn index 02aeb14..9b75776 100644 --- a/mash/webtest/BUILD.gn +++ b/mash/webtest/BUILD.gn
@@ -24,6 +24,7 @@ "//services/service_manager/public/interfaces", "//services/tracing/public/cpp", "//services/ui/public/cpp", + "//ui/aura", "//ui/gfx/geometry/mojo", "//ui/native_theme", "//ui/views", @@ -52,7 +53,6 @@ data_deps = [ ":manifest", - "//services/ui", ] }
diff --git a/mash/webtest/webtest.cc b/mash/webtest/webtest.cc index 64b1aee..338943ab 100644 --- a/mash/webtest/webtest.cc +++ b/mash/webtest/webtest.cc
@@ -20,9 +20,8 @@ #include "services/service_manager/public/cpp/service_context.h" #include "services/service_manager/public/cpp/service_runner.h" #include "services/tracing/public/cpp/provider.h" -#include "services/ui/public/cpp/window.h" -#include "services/ui/public/cpp/window_tree_client.h" -#include "ui/aura/mus/mus_util.h" +#include "ui/aura/mus/window_port_mus.h" +#include "ui/aura/window.h" #include "ui/gfx/canvas.h" #include "ui/gfx/paint_throbber.h" #include "ui/native_theme/native_theme.h" @@ -31,7 +30,7 @@ #include "ui/views/controls/textfield/textfield.h" #include "ui/views/controls/textfield/textfield_controller.h" #include "ui/views/mus/aura_init.h" -#include "ui/views/mus/window_manager_connection.h" +#include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" #include "url/gurl.h" @@ -41,6 +40,12 @@ namespace mash { namespace webtest { +namespace { + +// Callback from Embed(). +void EmbedCallback(bool result) {} + +} // namespace class UI : public views::WidgetDelegateView, public navigation::mojom::ViewClient { @@ -89,13 +94,16 @@ void ViewHierarchyChanged( const views::View::ViewHierarchyChangedDetails& details) override { if (details.is_add && GetWidget() && !content_area_) { - ui::Window* window = aura::GetMusWindow(GetWidget()->GetNativeWindow()); - content_area_ = window->window_tree()->NewWindow(nullptr); + aura::Window* window = GetWidget()->GetNativeWindow(); + content_area_ = new aura::Window(nullptr); + content_area_->Init(ui::LAYER_NOT_DRAWN); window->AddChild(content_area_); ui::mojom::WindowTreeClientPtr client; view_->GetWindowTreeClient(GetProxy(&client)); - content_area_->Embed(std::move(client)); + const uint32_t embed_flags = 0; // Nothing special. + aura::WindowPortMus::Get(content_area_) + ->Embed(std::move(client), embed_flags, base::Bind(&EmbedCallback)); } } @@ -135,7 +143,7 @@ void NavigationListPruned(bool from_front, int count) override {} Webtest* webtest_; - ui::Window* content_area_ = nullptr; + aura::Window* content_area_ = nullptr; navigation::mojom::ViewPtr view_; mojo::Binding<navigation::mojom::ViewClient> view_client_binding_; base::string16 current_title_; @@ -161,9 +169,8 @@ void Webtest::OnStart() { tracing_.Initialize(context()->connector(), context()->identity().name()); aura_init_ = base::MakeUnique<views::AuraInit>( - context()->connector(), context()->identity(), "views_mus_resources.pak"); - window_manager_connection_ = views::WindowManagerConnection::Create( - context()->connector(), context()->identity()); + context()->connector(), context()->identity(), "views_mus_resources.pak", + std::string(), nullptr, views::AuraInit::Mode::AURA_MUS); } bool Webtest::OnConnect(const service_manager::ServiceInfo& remote_info,
diff --git a/mash/webtest/webtest.h b/mash/webtest/webtest.h index 3a54053..b031d7a5 100644 --- a/mash/webtest/webtest.h +++ b/mash/webtest/webtest.h
@@ -17,7 +17,6 @@ namespace views { class AuraInit; class Widget; -class WindowManagerConnection; } namespace mash { @@ -51,7 +50,6 @@ tracing::Provider tracing_; std::unique_ptr<views::AuraInit> aura_init_; - std::unique_ptr<views::WindowManagerConnection> window_manager_connection_; DISALLOW_COPY_AND_ASSIGN(Webtest); };
diff --git a/pdf/BUILD.gn b/pdf/BUILD.gn index 4e4d94655..8afa86c 100644 --- a/pdf/BUILD.gn +++ b/pdf/BUILD.gn
@@ -2,86 +2,99 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("//build/buildflag_header.gni") import("//build/config/features.gni") +import("//pdf/features.gni") import("//testing/test.gni") import("//third_party/pdfium/pdfium.gni") -assert(enable_pdf) - -pdf_engine = 0 # 0 PDFium - -static_library("pdf") { - deps = [ - "//base", - "//gin", - "//net", - "//ppapi/cpp:objects", - "//ppapi/cpp/private:internal_module", - "//ui/base", - ] - - sources = [ - "chunk_stream.cc", - "chunk_stream.h", - "document_loader.cc", - "document_loader.h", - "draw_utils.cc", - "draw_utils.h", - "out_of_process_instance.cc", - "out_of_process_instance.h", - "paint_aggregator.cc", - "paint_aggregator.h", - "paint_manager.cc", - "paint_manager.h", - "pdf.cc", - "pdf.h", - "pdf_engine.h", - "preview_mode_client.cc", - "preview_mode_client.h", - ] - - if (pdf_engine == 0) { - deps += [ - "//pdf/pdfium/fuzzers", - "//third_party/pdfium", - ] - - sources += [ - "pdfium/pdfium_api_string_buffer_adapter.cc", - "pdfium/pdfium_api_string_buffer_adapter.h", - "pdfium/pdfium_assert_matching_enums.cc", - "pdfium/pdfium_engine.cc", - "pdfium/pdfium_engine.h", - "pdfium/pdfium_mem_buffer_file_read.cc", - "pdfium/pdfium_mem_buffer_file_read.h", - "pdfium/pdfium_mem_buffer_file_write.cc", - "pdfium/pdfium_mem_buffer_file_write.h", - "pdfium/pdfium_page.cc", - "pdfium/pdfium_page.h", - "pdfium/pdfium_range.cc", - "pdfium/pdfium_range.h", - ] - } - - defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] - if (pdf_enable_xfa) { - defines += [ "PDF_ENABLE_XFA" ] - } +# Generate a buildflag header for compile-time checking of PDF support. +buildflag_header("features") { + header = "features.h" + flags = [ "ENABLE_PDF=$enable_pdf" ] } -test("pdf_unittests") { - sources = [ - "chunk_stream_unittest.cc", - "run_all_unittests.cc", - ] +if (enable_pdf) { + pdf_engine = 0 # 0 PDFium - deps = [ - ":pdf", - "//base", - "//base/test:test_support", - "//ppapi/c", - "//ppapi/cpp", - "//testing/gmock", - "//testing/gtest", - ] + static_library("pdf") { + deps = [ + "//base", + "//gin", + "//net", + "//ppapi/cpp:objects", + "//ppapi/cpp/private:internal_module", + "//ui/base", + ] + + sources = [ + "chunk_stream.cc", + "chunk_stream.h", + "document_loader.cc", + "document_loader.h", + "draw_utils.cc", + "draw_utils.h", + "out_of_process_instance.cc", + "out_of_process_instance.h", + "paint_aggregator.cc", + "paint_aggregator.h", + "paint_manager.cc", + "paint_manager.h", + "pdf.cc", + "pdf.h", + "pdf_engine.h", + "preview_mode_client.cc", + "preview_mode_client.h", + ] + + if (pdf_engine == 0) { + deps += [ + "//pdf/pdfium/fuzzers", + "//third_party/pdfium", + ] + + sources += [ + "pdfium/pdfium_api_string_buffer_adapter.cc", + "pdfium/pdfium_api_string_buffer_adapter.h", + "pdfium/pdfium_assert_matching_enums.cc", + "pdfium/pdfium_engine.cc", + "pdfium/pdfium_engine.h", + "pdfium/pdfium_mem_buffer_file_read.cc", + "pdfium/pdfium_mem_buffer_file_read.h", + "pdfium/pdfium_mem_buffer_file_write.cc", + "pdfium/pdfium_mem_buffer_file_write.h", + "pdfium/pdfium_page.cc", + "pdfium/pdfium_page.h", + "pdfium/pdfium_range.cc", + "pdfium/pdfium_range.h", + ] + } + + defines = [ "PDFIUM_PRINT_TEXT_WITH_GDI" ] + if (pdf_enable_xfa) { + defines += [ "PDF_ENABLE_XFA" ] + } + } + + test("pdf_unittests") { + sources = [ + "chunk_stream_unittest.cc", + "run_all_unittests.cc", + ] + + deps = [ + ":pdf", + "//base", + "//base/test:test_support", + "//ppapi/c", + "//ppapi/cpp", + "//testing/gmock", + "//testing/gtest", + ] + } +} else { + # Dummy group when PDF support is disabled so targets can unconditionally + # depend on it. + group("pdf") { + } }
diff --git a/pdf/features.gni b/pdf/features.gni new file mode 100644 index 0000000..aea81fba --- /dev/null +++ b/pdf/features.gni
@@ -0,0 +1,13 @@ +# Copyright 2016 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/chromecast_build.gni") + +# Most build code won't need to include this file. Instead you can +# unconditionally depend on "//pdf" which will be a no-op when PDF support is +# disabled. + +declare_args() { + enable_pdf = !is_android && !is_ios && !is_chromecast +}
diff --git a/printing/BUILD.gn b/printing/BUILD.gn index b3ffe95..159f436 100644 --- a/printing/BUILD.gn +++ b/printing/BUILD.gn
@@ -5,6 +5,7 @@ import("//build/config/features.gni") import("//build/config/sysroot.gni") import("//build/config/ui.gni") +import("//pdf/features.gni") import("//printing/features/features.gni") import("//testing/test.gni") if (is_mac) { @@ -14,6 +15,13 @@ import("//build/config/android/rules.gni") } +if ((enable_basic_printing && is_win) || enable_print_preview) { + # Windows basic printing or print preview requires pdf enabled. + assert(enable_pdf, + "Windows basic printing or print preview needs pdf: " + + "set enable_pdf=true.") +} + component("printing") { sources = [ "backend/print_backend.cc",
diff --git a/printing/features/features.gni b/printing/features/features.gni index 651b7a7a..a41202a2 100644 --- a/printing/features/features.gni +++ b/printing/features/features.gni
@@ -15,10 +15,3 @@ use_cups = (is_desktop_linux || is_mac) && !is_chromecast } - -if ((enable_basic_printing && is_win) || enable_print_preview) { - # Windows basic printing or print preview requires pdf enabled. - assert(enable_pdf, - "Windows basic printing or print preview needs pdf: " + - "set enable_pdf=true.") -}
diff --git a/services/ui/common/server_gpu_memory_buffer_manager.cc b/services/ui/common/server_gpu_memory_buffer_manager.cc index 490de2f..a420040 100644 --- a/services/ui/common/server_gpu_memory_buffer_manager.cc +++ b/services/ui/common/server_gpu_memory_buffer_manager.cc
@@ -67,15 +67,6 @@ weak_factory_.GetWeakPtr(), id, client_id_)); } -std::unique_ptr<gfx::GpuMemoryBuffer> -ServerGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) { - NOTIMPLEMENTED(); - return nullptr; -} - void ServerGpuMemoryBufferManager::SetDestructionSyncToken( gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) {
diff --git a/services/ui/common/server_gpu_memory_buffer_manager.h b/services/ui/common/server_gpu_memory_buffer_manager.h index 7a610f3..c86117b6 100644 --- a/services/ui/common/server_gpu_memory_buffer_manager.h +++ b/services/ui/common/server_gpu_memory_buffer_manager.h
@@ -44,10 +44,6 @@ gfx::BufferFormat format, gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) override; - std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) override; void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) override;
diff --git a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc index ab51a93..e91fce82 100644 --- a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc +++ b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.cc
@@ -131,15 +131,6 @@ return std::move(buffer); } -std::unique_ptr<gfx::GpuMemoryBuffer> -ClientGpuMemoryBufferManager::CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) { - NOTIMPLEMENTED(); - return nullptr; -} - void ClientGpuMemoryBufferManager::SetDestructionSyncToken( gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) {
diff --git a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h index 88f4dcc7..26d78ea5 100644 --- a/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h +++ b/services/ui/public/cpp/gpu/client_gpu_memory_buffer_manager.h
@@ -43,10 +43,6 @@ gfx::BufferFormat format, gfx::BufferUsage usage, gpu::SurfaceHandle surface_handle) override; - std::unique_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBufferFromHandle( - const gfx::GpuMemoryBufferHandle& handle, - const gfx::Size& size, - gfx::BufferFormat format) override; void SetDestructionSyncToken(gfx::GpuMemoryBuffer* buffer, const gpu::SyncToken& sync_token) override; int counter_ = 0;
diff --git a/storage/browser/fileapi/file_system_context.cc b/storage/browser/fileapi/file_system_context.cc index d6308377..1424895 100644 --- a/storage/browser/fileapi/file_system_context.cc +++ b/storage/browser/fileapi/file_system_context.cc
@@ -104,6 +104,7 @@ case kFileSystemTypeRestrictedNativeLocal: case kFileSystemTypeArcContent: + case kFileSystemTypeArcDocumentsProvider: return FILE_PERMISSION_READ_ONLY | FILE_PERMISSION_USE_FILE_PERMISSION;
diff --git a/storage/common/fileapi/file_system_types.h b/storage/common/fileapi/file_system_types.h index 6ac262c..cc4e101 100644 --- a/storage/common/fileapi/file_system_types.h +++ b/storage/common/fileapi/file_system_types.h
@@ -126,6 +126,9 @@ // A filesystem to provide access to contents managed by ARC. kFileSystemTypeArcContent, + // A filesystem to provide access to documents providers in ARC. + kFileSystemTypeArcDocumentsProvider, + // -------------------------------------------------------------------- // Marks the end of internal type enum. (This is not the actual fs type) // New internal filesystem types must be added above this line.
diff --git a/storage/common/fileapi/file_system_util.cc b/storage/common/fileapi/file_system_util.cc index 1116fcd..fa6aaa08 100644 --- a/storage/common/fileapi/file_system_util.cc +++ b/storage/common/fileapi/file_system_util.cc
@@ -323,6 +323,8 @@ return "DeviceMediaStorage"; case kFileSystemTypeArcContent: return "ArcContent"; + case kFileSystemTypeArcDocumentsProvider: + return "ArcDocumentsProvider"; case kFileSystemInternalTypeEnumStart: case kFileSystemInternalTypeEnumEnd: NOTREACHED();
diff --git a/third_party/WebKit/LayoutTests/TestExpectations b/third_party/WebKit/LayoutTests/TestExpectations index cb60b2ed..9524f04 100644 --- a/third_party/WebKit/LayoutTests/TestExpectations +++ b/third_party/WebKit/LayoutTests/TestExpectations
@@ -98,6 +98,8 @@ crbug.com/646176 virtual/spinvalidation/ [ Skip ] crbug.com/646176 virtual/spinvalidation/paint/invalidation/ [ Pass ] +crbug.com/646176 virtual/spinvalidation/compositing/overflow/scroller-with-border-radius.html [ Pass ] + crbug.com/645667 virtual/spinvalidation/paint/invalidation/filter-repaint-accelerated-on-accelerated-filter.html [ Crash ] crbug.com/645667 virtual/spinvalidation/paint/invalidation/position-change-keeping-geometry.html [ Crash ] crbug.com/645667 virtual/spinvalidation/paint/invalidation/compositing/resize-repaint.html [ Crash ] @@ -1202,8 +1204,6 @@ crbug.com/253763 fast/text-autosizing/first-line-scale-factor.html [ Failure ] -crbug.com/390377 [ Release ] fast/dom/private_script_unittest.html [ Skip ] - crbug.com/613887 http/tests/preload/meta-viewport-link-headers.html [ Failure Pass ] crbug.com/613887 virtual/mojo-loading/http/tests/preload/meta-viewport-link-headers.html [ Failure Pass ] crbug.com/564403 [ Win Debug ] http/tests/inspector/service-workers/service-worker-manager.html [ Failure Pass Timeout ]
diff --git a/third_party/WebKit/LayoutTests/accessibility/contenteditable-on-aria-hidden-body.html b/third_party/WebKit/LayoutTests/accessibility/contenteditable-on-aria-hidden-body.html new file mode 100644 index 0000000..f1fb7b6f --- /dev/null +++ b/third_party/WebKit/LayoutTests/accessibility/contenteditable-on-aria-hidden-body.html
@@ -0,0 +1,28 @@ +<!DOCTYPE html> +<script src="../resources/testharness.js"></script> +<script src="../resources/testharnessreport.js"></script> + +<body contenteditable aria-hidden="true"> + + + <script> + test(function() { + var axDocument = accessibilityController.rootElement;; + assert_equals(axDocument.childrenCount, 0); + + assert_true(axDocument.isReadOnly); + assert_false(axDocument.isEditable); + assert_false(axDocument.isRichlyEditable); + }, 'The document should not be marked editable because the body is aria-hidden.'); + + test(function() { + document.body.setAttribute('aria-hidden', 'false'); + var axDocument = accessibilityController.rootElement; + assert_equals(axDocument.childrenCount, 1); + + assert_false(axDocument.isReadOnly); + assert_true(axDocument.isEditable); + assert_true(axDocument.isRichlyEditable); + }, 'The document should be marked editable because the body is aria-hidden="false".'); + </script> +</body>
diff --git a/third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html b/third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html index eb935da..b7ccb3b 100644 --- a/third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html +++ b/third_party/WebKit/LayoutTests/animations/interpolation/offset-anchor-interpolation.html
@@ -27,18 +27,11 @@ {at: 1.5, is: '25px 15px'}, ]); -assertInterpolation({ +assertNoInterpolation({ property: 'offset-anchor', from: 'initial', to: '60% 40%', -}, [ - {at: -0.3, is: '47% 53%'}, - {at: 0, is: '50% 50%'}, - {at: 0.3, is: '53% 47%'}, - {at: 0.6, is: '56% 44%'}, - {at: 1, is: '60% 40%'}, - {at: 1.5, is: '65% 35%'}, -]); +}); assertInterpolation({ property: 'offset-anchor', @@ -53,18 +46,11 @@ {at: 1.5, is: '15px 25px'}, ]); -assertInterpolation({ - property: 'offset-anchor', +assertNoInterpolation({ + property: 'offset-position', from: 'unset', to: '50% 10px', -}, [ - {at: -0.3, is: '50% calc(-3px + 65%)'}, - {at: 0, is: '50% 50%'}, - {at: 0.3, is: '50% calc(3px + 35%)'}, - {at: 0.6, is: '50% calc(6px + 20%)'}, - {at: 1, is: '50% 10px'}, - {at: 1.5, is: '50% calc(15px - 25%)'}, -]); +}); assertInterpolation({ property: 'offset-anchor',
diff --git a/third_party/WebKit/LayoutTests/css3/motion-path/offset-anchor.html b/third_party/WebKit/LayoutTests/css3/motion-path/offset-anchor.html index 44b4480..9eea08c 100644 --- a/third_party/WebKit/LayoutTests/css3/motion-path/offset-anchor.html +++ b/third_party/WebKit/LayoutTests/css3/motion-path/offset-anchor.html
@@ -22,8 +22,8 @@ test(function() { var element = document.createElement('div'); document.body.appendChild(element); - assert_equals(getComputedStyle(element, null).offsetAnchor, '50% 50%'); -}, 'offset-anchor default is 50% 50%'); + assert_equals(getComputedStyle(element, null).offsetAnchor, 'auto'); +}, 'offset-anchor default is auto'); test(function() { assert_equals(getComputedStyle(container, null).offsetAnchor, '30% 40%'); @@ -34,7 +34,7 @@ }, 'offset-anchor can explicitly inherited'); test(function() { - assert_equals(getComputedStyle(child2, null).offsetAnchor, '50% 50%'); + assert_equals(getComputedStyle(child2, null).offsetAnchor, 'auto'); }, 'offset-anchor is not inherited by default'); function computed(specified) {
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt index 3302e00..daca47b 100644 --- a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-listing-expected.txt
@@ -206,7 +206,7 @@ mix-blend-mode: normal object-fit: fill object-position: 50% 50% -offset-anchor: 50% 50% +offset-anchor: auto offset-distance: 0px offset-path: none offset-position: auto
diff --git a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt index a952d94f..0e0601b 100644 --- a/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-listing-expected.txt
@@ -206,7 +206,7 @@ mix-blend-mode: normal object-fit: fill object-position: 50% 50% -offset-anchor: 50% 50% +offset-anchor: auto offset-distance: 0px offset-path: none offset-position: auto
diff --git a/third_party/WebKit/LayoutTests/fast/dom/private_script_unittest-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/private_script_unittest-expected.txt deleted file mode 100644 index 7f85614..0000000 --- a/third_party/WebKit/LayoutTests/fast/dom/private_script_unittest-expected.txt +++ /dev/null
@@ -1,65 +0,0 @@ -Unittests for private scripts. - -On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". - - -PASS privateScriptTest.return123() is 123 -PASS privateScriptTest.echoInteger(111) is 111 -PASS privateScriptTest.echoString("foo") is "foo" -PASS privateScriptTest.addInteger(111, 222) is 333 -PASS privateScriptTest.addString("foo", "bar") is "foobar" -PASS privateScriptTest.getIntegerFromPrototype() is 0 -PASS privateScriptTest.getIntegerFromPrototype() is 123 -PASS privateScriptTest.getIntegerFromDocument(document) is 0 -PASS privateScriptTest.getIntegerFromDocument(document) is 123 -PASS privateScriptTest.firstChild(node1) is node2 -PASS privateScriptTest.nextSibling(node2) is node3 -PASS privateScriptTest.nextSibling(node3) is node4 -PASS privateScriptTest.nextSibling(node4) is null -PASS privateScriptTest.innerHTML(node5) is "" -PASS privateScriptTest.innerHTML(node5) is "<div>foo</div>" -PASS privateScriptTest.innerHTML(node6) is "foo" -PASS privateScriptTest.innerHTML(node7) is "" -PASS privateScriptTest.innerHTML(node7) is "clicked" -PASS privateScriptTest.readonlyShortAttribute is 123 -PASS privateScriptTest.shortAttribute is -1 -PASS privateScriptTest.shortAttribute is 111 -PASS privateScriptTest.stringAttribute is "xxx" -PASS privateScriptTest.stringAttribute is "foo" -PASS privateScriptTest.nodeAttribute is null -PASS privateScriptTest.nodeAttribute is node8 -PASS privateScriptTest.nodeAttributeThrowsIndexSizeError threw exception IndexSizeError: Failed to read the 'nodeAttributeThrowsIndexSizeError' property from 'PrivateScriptTest': getter threw error. -PASS privateScriptTest.nodeAttributeThrowsIndexSizeError = null threw exception IndexSizeError: Failed to set the 'nodeAttributeThrowsIndexSizeError' property on 'PrivateScriptTest': setter threw error. -PASS privateScriptTest.voidMethodThrowsDOMSyntaxError() threw exception SyntaxError: Failed to execute 'voidMethodThrowsDOMSyntaxError' on 'PrivateScriptTest': method threw error. -PASS privateScriptTest.voidMethodThrowsError() threw exception Error: Failed to execute 'voidMethodThrowsError' on 'PrivateScriptTest': method threw Error. -PASS privateScriptTest.voidMethodThrowsTypeError() threw exception TypeError: Failed to execute 'voidMethodThrowsTypeError' on 'PrivateScriptTest': method threw TypeError. -PASS privateScriptTest.voidMethodThrowsRangeError() threw exception RangeError: Failed to execute 'voidMethodThrowsRangeError' on 'PrivateScriptTest': method threw RangeError. -PASS privateScriptTest.voidMethodThrowsSyntaxError() threw exception SyntaxError: Failed to execute 'voidMethodThrowsSyntaxError' on 'PrivateScriptTest': method threw SyntaxError. -PASS privateScriptTest.voidMethodThrowsReferenceError() threw exception ReferenceError: Failed to execute 'voidMethodThrowsReferenceError' on 'PrivateScriptTest': method threw ReferenceError. -PASS privateScriptTest.voidMethodThrowsStackOverflowError() threw exception RangeError: Failed to execute 'voidMethodThrowsStackOverflowError' on 'PrivateScriptTest': Maximum call stack size exceeded. -PASS privateScriptTest.addIntegerImplementedInCPP(111, 222) is 333 -PASS privateScriptTest.stringAttributeImplementedInCPP is "undefined" -PASS privateScriptTest.stringAttributeImplementedInCPP is "foo" -PASS privateScriptTest.addIntegerImplementedInCPPForPrivateScriptOnly is undefined. -PASS privateScriptTest.stringAttributeImplementedInCPPForPrivateScriptOnly is undefined. -PASS privateScriptTest.addIntegerInPartial(111, 222) is 333 -PASS privateScriptTest.addInteger2InPartial(111, 222) is 333 -PASS privateScriptTest.stringAttributeInPartial is "foo" -PASS event.bubbles is true -PASS event.cancelable is true -PASS event.valueInPrivateScript is undefined. -PASS exception is an instance of function DOMException() { [native code] } -PASS exception.code is 1 -PASS exception is an instance of function DOMException() { [native code] } -PASS exception.code is 1 -PASS exception is an instance of function DOMException() { [native code] } -PASS exception.code is 12 -PASS exception is an instance of function Error() { [native code] } -PASS exception is an instance of function TypeError() { [native code] } -PASS exception is an instance of function RangeError() { [native code] } -PASS exception is an instance of function SyntaxError() { [native code] } -PASS exception is an instance of function ReferenceError() { [native code] } -PASS successfullyParsed is true - -TEST COMPLETE -
diff --git a/third_party/WebKit/LayoutTests/fast/dom/private_script_unittest.html b/third_party/WebKit/LayoutTests/fast/dom/private_script_unittest.html deleted file mode 100644 index 8d0527a..0000000 --- a/third_party/WebKit/LayoutTests/fast/dom/private_script_unittest.html +++ /dev/null
@@ -1,132 +0,0 @@ -<!DOCTYPE html> -<html> -<head> -<script src="../../resources/js-test.js"></script> -</head> -<body> -<script> -description('Unittests for private scripts.'); -if (!internals || !internals.privateScriptTest()) - debug('This test needs window.internals.privateScriptTest().'); - -var privateScriptTest = internals.privateScriptTest(); -privateScriptTest.doNothing(); -shouldBe('privateScriptTest.return123()', '123'); -shouldBe('privateScriptTest.echoInteger(111)', '111'); -shouldBeEqualToString('privateScriptTest.echoString("foo")', 'foo') -shouldBe('privateScriptTest.addInteger(111, 222)', '333'); -shouldBeEqualToString('privateScriptTest.addString("foo", "bar")', 'foobar') - -shouldBe('privateScriptTest.getIntegerFromPrototype()', '0'); -privateScriptTest.setIntegerToPrototype(123); -shouldBe('privateScriptTest.getIntegerFromPrototype()', '123'); - -shouldBe('privateScriptTest.getIntegerFromDocument(document)', '0'); -privateScriptTest.setIntegerToDocument(document, 123); -shouldBe('privateScriptTest.getIntegerFromDocument(document)', '123'); - -var node1 = privateScriptTest.createElement(document); -var node2 = privateScriptTest.createElement(document); -var node3 = privateScriptTest.createElement(document); -var node4 = privateScriptTest.createElement(document); -privateScriptTest.appendChild(node1, node2); -privateScriptTest.appendChild(node1, node3); -privateScriptTest.appendChild(node1, node4); -shouldBe('privateScriptTest.firstChild(node1)', 'node2'); -shouldBe('privateScriptTest.nextSibling(node2)', 'node3'); -shouldBe('privateScriptTest.nextSibling(node3)', 'node4'); -shouldBe('privateScriptTest.nextSibling(node4)', 'null'); - -var node5 = privateScriptTest.createElement(document); -shouldBeEqualToString('privateScriptTest.innerHTML(node5)', '') -privateScriptTest.setInnerHTML(node5, '<div>foo</div>'); -shouldBeEqualToString('privateScriptTest.innerHTML(node5)', '<div>foo</div>') -var node6 = privateScriptTest.firstChild(node5); -shouldBeEqualToString('privateScriptTest.innerHTML(node6)', 'foo'); - -var node7 = privateScriptTest.createElement(document); -shouldBeEqualToString('privateScriptTest.innerHTML(node7)', '') -privateScriptTest.addClickListener(node7); -privateScriptTest.clickNode(document, node7); -shouldBeEqualToString('privateScriptTest.innerHTML(node7)', 'clicked') - -shouldBe('privateScriptTest.readonlyShortAttribute', '123'); -shouldBe('privateScriptTest.shortAttribute', '-1'); -privateScriptTest.shortAttribute = 111; -shouldBe('privateScriptTest.shortAttribute', '111'); -shouldBeEqualToString('privateScriptTest.stringAttribute', 'xxx'); -privateScriptTest.stringAttribute = "foo"; -shouldBeEqualToString('privateScriptTest.stringAttribute', 'foo'); -shouldBe('privateScriptTest.nodeAttribute', 'null'); -var node8 = privateScriptTest.createElement(document); -privateScriptTest.nodeAttribute = node8; -shouldBe('privateScriptTest.nodeAttribute', 'node8'); - -shouldThrow('privateScriptTest.nodeAttributeThrowsIndexSizeError'); -shouldThrow('privateScriptTest.nodeAttributeThrowsIndexSizeError = null'); -shouldThrow('privateScriptTest.voidMethodThrowsDOMSyntaxError()'); -shouldThrow('privateScriptTest.voidMethodThrowsError()'); -shouldThrow('privateScriptTest.voidMethodThrowsTypeError()'); -shouldThrow('privateScriptTest.voidMethodThrowsRangeError()'); -shouldThrow('privateScriptTest.voidMethodThrowsSyntaxError()'); -shouldThrow('privateScriptTest.voidMethodThrowsReferenceError()'); -shouldThrow('privateScriptTest.voidMethodThrowsStackOverflowError()'); - -shouldBe('privateScriptTest.addIntegerImplementedInCPP(111, 222)', '333'); -shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'undefined'); -privateScriptTest.stringAttributeImplementedInCPP = "foo"; -shouldBeEqualToString('privateScriptTest.stringAttributeImplementedInCPP', 'foo'); - -// These tests are important. [OnlyExposedToPrivateScript] APIs should not be visible to user's script. -shouldBeUndefined('privateScriptTest.addIntegerImplementedInCPPForPrivateScriptOnly'); -shouldBeUndefined('privateScriptTest.stringAttributeImplementedInCPPForPrivateScriptOnly'); - -shouldBe('privateScriptTest.addIntegerInPartial(111, 222)', '333'); -shouldBe('privateScriptTest.addInteger2InPartial(111, 222)', '333'); -privateScriptTest.stringAttributeInPartial = "foo"; -shouldBeEqualToString('privateScriptTest.stringAttributeInPartial', 'foo'); - -document.onload = function (event) { - shouldBeTrue('event.bubbles'); - shouldBeTrue('event.cancelable'); - // Object properties set in private scripts should not be visible in user's script. - shouldBeUndefined('event.valueInPrivateScript'); -} -privateScriptTest.dispatchDocumentOnload(document); - -var exception; -function testThrows(expression, type, code) -{ - exception = undefined; - // Test that `expression` throws a userscript visible exception of `type`, optionally with - // exception code `code` - try { - eval(expression); - } catch (e) { - exception = e; - } - - if (type === DOMException && typeof code === "string" && code in DOMException) - code = DOMException[code]; - - if (exception === undefined) { - testFailed("`" + expression + "` should throw"); - } else { - shouldBeType("exception", type); - if (code !== undefined) - shouldBeEqualToNumber("exception.code", code); - } -} - -testThrows("privateScriptTest.nodeAttributeThrowsIndexSizeError", DOMException, "INDEX_SIZE_ERR"); -testThrows("privateScriptTest.nodeAttributeThrowsIndexSizeError = null", DOMException, "INDEX_SIZE_ERR"); -testThrows("privateScriptTest.voidMethodThrowsDOMSyntaxError()", DOMException, "SYNTAX_ERR"); -testThrows("privateScriptTest.voidMethodThrowsError()", Error); -testThrows("privateScriptTest.voidMethodThrowsTypeError()", TypeError); -testThrows("privateScriptTest.voidMethodThrowsRangeError()", RangeError); -testThrows("privateScriptTest.voidMethodThrowsSyntaxError()", SyntaxError); -testThrows("privateScriptTest.voidMethodThrowsReferenceError()", ReferenceError); - -</script> -</body> -</html>
diff --git a/third_party/WebKit/LayoutTests/http/tests/inspector/network/image-as-text-loading-data-url-expected.txt b/third_party/WebKit/LayoutTests/http/tests/inspector/network/image-as-text-loading-data-url-expected.txt deleted file mode 100644 index f202e67..0000000 --- a/third_party/WebKit/LayoutTests/http/tests/inspector/network/image-as-text-loading-data-url-expected.txt +++ /dev/null
@@ -1,5 +0,0 @@ -Tests that long data: URLs are correctly trimmed in MIME type console warnings. - -Bug 100083 -Resource interpreted as Image but transferred with MIME type text/plain: "data:text/plain;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAMCAgMCAgMDAwMEAwME…DcdDWnwrOxQAR8I6emHKTSbNFCOyo0Vvg1kVtpCe6dIXZI8TsRC1HbzUoEk/UnDWSXvOdwif/Z". image-as-text-loading-data-url.html:9 -
diff --git a/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt b/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt index fbc161f..24ad52a 100644 --- a/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt +++ b/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-listing-expected.txt
@@ -206,7 +206,7 @@ mix-blend-mode: normal object-fit: fill object-position: 50% 50% -offset-anchor: 50% 50% +offset-anchor: auto offset-distance: 0px offset-path: none offset-position: auto
diff --git a/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md b/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md index 8283c6f..c8679498 100644 --- a/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md +++ b/third_party/WebKit/Source/bindings/IDLExtendedAttributes.md
@@ -1539,22 +1539,6 @@ Only used in some HTML*ELement.idl files and one other place. -### [NoImplHeader] _(i)_ - -Summary: `[NoImplHeader]` indicates that a given interface does not have a corresponding header file in the impl side. - -Usage: `[NoImplHeader]` can be specified on any interface: - -```webidl -[ - NoImplHeader, -] interface XXX { - ...; -}; -``` - -Without `[NoImplHeader]`, the IDL compiler assumes that there is XXX.h in the impl side. With `[NoImplHeader]`, you can tell the IDL compiler that there is no XXX.h. You can use `[NoImplHeader]` when all of the DOM attributes and methods of the interface are implemented in Blink-in-JS and thus don't have any C++ header file. - ## Temporary Blink-specific IDL Extended Attributes These extended attributes are _temporary_ and are only in use while some change is in progress. Unless you are involved with the change, you can generally ignore them, and should not use them. @@ -1658,7 +1642,6 @@ * `[PerWorldBindings]` :: interacts with `[LogActivity]` * `[OverrideBuiltins]` :: used on named accessors -* `[ImplementedInPrivateScript]`, `[OnlyExposedToPrivateScript]` -------------
diff --git a/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt b/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt index 76f32184..faae80f 100644 --- a/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt +++ b/third_party/WebKit/Source/bindings/IDLExtendedAttributes.txt
@@ -60,7 +60,6 @@ HTMLConstructor ImmutablePrototype ImplementedAs=* -ImplementedInPrivateScript Iterable LegacyInterfaceTypeChecking LegacyTreatAsPartialInterface @@ -71,10 +70,8 @@ Measure MeasureAs=* NamedConstructor=* -NoImplHeader NoInterfaceObject NotEnumerable -OnlyExposedToPrivateScript OriginTrialEnabled=* OverrideBuiltins PartialInterfaceImplementedAs=* @@ -103,4 +100,4 @@ URL Unforgeable Unscopable -WebModuleAPI \ No newline at end of file +WebModuleAPI
diff --git a/third_party/WebKit/Source/bindings/bindings.gni b/third_party/WebKit/Source/bindings/bindings.gni index c64d677..bca6a68 100644 --- a/third_party/WebKit/Source/bindings/bindings.gni +++ b/third_party/WebKit/Source/bindings/bindings.gni
@@ -73,8 +73,6 @@ "core/v8/Microtask.h", "core/v8/NativeValueTraits.h", "core/v8/Nullable.h", - "core/v8/PrivateScriptRunner.cpp", - "core/v8/PrivateScriptRunner.h", "core/v8/RejectedPromises.cpp", "core/v8/RejectedPromises.h", "core/v8/RetainedDOMInfo.cpp",
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp index a07cbae3..8a50f5e 100644 --- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -106,23 +106,6 @@ return *cachedMainWorld; } -DOMWrapperWorld& DOMWrapperWorld::privateScriptIsolatedWorld() { - ASSERT(isMainThread()); - DEFINE_STATIC_LOCAL(RefPtr<DOMWrapperWorld>, cachedPrivateScriptIsolatedWorld, - ()); - if (!cachedPrivateScriptIsolatedWorld) { - cachedPrivateScriptIsolatedWorld = DOMWrapperWorld::create( - v8::Isolate::GetCurrent(), PrivateScriptIsolatedWorldId, - privateScriptIsolatedWorldExtensionGroup); - // This name must match the string in DevTools used to guard the - // privateScriptInspection experiment. - DOMWrapperWorld::setIsolatedWorldHumanReadableName( - PrivateScriptIsolatedWorldId, "private script"); - isolatedWorldCount++; - } - return *cachedPrivateScriptIsolatedWorld; -} - PassRefPtr<DOMWrapperWorld> DOMWrapperWorld::fromWorldId(v8::Isolate* isolate, int worldId, int extensionGroup) {
diff --git a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h index e3f00cb..fce2a83 100644 --- a/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h +++ b/third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.h
@@ -48,7 +48,6 @@ MainWorldId = 0, // Embedder isolated worlds can use IDs in [1, 1<<29). EmbedderWorldIdLimit = (1 << 29), - PrivateScriptIsolatedWorldId, DocumentXMLTreeViewerWorldId, IsolatedWorldIdLimit, WorkerWorldId, @@ -65,7 +64,6 @@ int extensionGroup = -1); static const int mainWorldExtensionGroup = 0; - static const int privateScriptIsolatedWorldExtensionGroup = 1; static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(v8::Isolate*, int worldId, int extensionGroup); @@ -90,7 +88,6 @@ } static DOMWrapperWorld& mainWorld(); - static DOMWrapperWorld& privateScriptIsolatedWorld(); static PassRefPtr<DOMWrapperWorld> fromWorldId(v8::Isolate*, int worldId, int extensionGroup); @@ -118,9 +115,6 @@ bool isolatedWorldHasContentSecurityPolicy(); bool isMainWorld() const { return m_worldId == MainWorldId; } - bool isPrivateScriptIsolatedWorld() const { - return m_worldId == PrivateScriptIsolatedWorldId; - } bool isWorkerWorld() const { return m_worldId == WorkerWorldId; } bool isIsolatedWorld() const { return MainWorldId < m_worldId && m_worldId < IsolatedWorldIdLimit;
diff --git a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp deleted file mode 100644 index 5b75d8d..0000000 --- a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.cpp +++ /dev/null
@@ -1,490 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "bindings/core/v8/PrivateScriptRunner.h" - -#include "bindings/core/v8/DOMWrapperWorld.h" -#include "bindings/core/v8/ExceptionState.h" -#include "bindings/core/v8/V8Binding.h" -#include "bindings/core/v8/V8PerContextData.h" -#include "bindings/core/v8/V8PrivateProperty.h" -#include "bindings/core/v8/V8ScriptRunner.h" -#include "core/PrivateScriptSources.h" -#ifndef NDEBUG -#include "core/PrivateScriptSourcesForTesting.h" -#endif -#include "core/dom/Document.h" -#include "core/dom/ExceptionCode.h" -#include "platform/PlatformResourceLoader.h" - -namespace blink { - -static void dumpV8Message(v8::Local<v8::Context> context, - v8::Local<v8::Message> message) { - if (message.IsEmpty()) - return; - - // FIXME: GetScriptOrigin() and GetLineNumber() return empty handles - // when they are called at the first time if V8 has a pending exception. - // So we need to call twice to get a correct ScriptOrigin and line number. - // This is a bug of V8. - message->GetScriptOrigin(); - v8::Maybe<int> unused = message->GetLineNumber(context); - ALLOW_UNUSED_LOCAL(unused); - - v8::Local<v8::Value> resourceName = message->GetScriptOrigin().ResourceName(); - String fileName = "Unknown JavaScript file"; - if (!resourceName.IsEmpty() && resourceName->IsString()) - fileName = toCoreString(v8::Local<v8::String>::Cast(resourceName)); - int lineNumber = 0; - v8Call(message->GetLineNumber(context), lineNumber); - v8::Local<v8::String> errorMessage = message->Get(); - fprintf(stderr, "%s (line %d): %s\n", fileName.utf8().data(), lineNumber, - toCoreString(errorMessage).utf8().data()); -} - -static void importFunction(const v8::FunctionCallbackInfo<v8::Value>& args); - -static v8::Local<v8::Value> compileAndRunPrivateScript(ScriptState* scriptState, - String scriptClassName, - const char* source, - size_t size) { - v8::Isolate* isolate = scriptState->isolate(); - v8::TryCatch block(isolate); - String sourceString(source, size); - String fileName = scriptClassName + ".js"; - - v8::Local<v8::Context> context = scriptState->context(); - v8::Local<v8::Object> global = context->Global(); - v8::Local<v8::String> key = v8String(isolate, "privateScriptController"); - - if (global->HasOwnProperty(context, key).ToChecked()) { - v8::Local<v8::Value> privateScriptController = - global->Get(context, key).ToLocalChecked(); - CHECK(privateScriptController->IsObject()); - v8::Local<v8::Object> privateScriptControllerObject = - privateScriptController.As<v8::Object>(); - v8::Local<v8::Value> importFunctionValue = - privateScriptControllerObject->Get(context, v8String(isolate, "import")) - .ToLocalChecked(); - if (importFunctionValue->IsUndefined()) { - v8::Local<v8::Function> function; - // This is a memory leak, FunctionTemplates are eternal. - if (!v8::FunctionTemplate::New(isolate, importFunction) - ->GetFunction(context) - .ToLocal(&function) || - !v8CallBoolean(privateScriptControllerObject->Set( - context, v8String(isolate, "import"), function))) { - dumpV8Message(context, block.Message()); - LOG(FATAL) - << "Private script error: Setting import function failed. (Class " - "name = " - << scriptClassName.utf8().data() << ")"; - } - } - } - - v8::Local<v8::Script> script; - if (!v8Call(V8ScriptRunner::compileScript( - v8String(isolate, sourceString), fileName, String(), - TextPosition::minimumPosition(), isolate, nullptr, nullptr, - nullptr, NotSharableCrossOrigin), - script, block)) { - dumpV8Message(context, block.Message()); - LOG(FATAL) << "Private script error: Compile failed. (Class name = " - << scriptClassName.utf8().data() << ")"; - } - - v8::Local<v8::Value> result; - if (!v8Call(V8ScriptRunner::runCompiledInternalScript(isolate, script), - result, block)) { - dumpV8Message(context, block.Message()); - LOG(FATAL) << "Private script error: installClass() failed. (Class name = " - << scriptClassName.utf8().data() << ")"; - } - return result; -} - -// Private scripts can use privateScriptController.import(bundledResource, -// compileAndRunScript) to import dependent resources. -// |bundledResource| is a string resource name. -// |compileAndRunScript| optional boolean representing if the javascript should -// be executed. Default: true. -void importFunction(const v8::FunctionCallbackInfo<v8::Value>& args) { - v8::Isolate* isolate = args.GetIsolate(); - RELEASE_ASSERT(isolate && (args.Length() >= 1)); - String resourceFileName = toCoreString( - args[0]->ToString(isolate->GetCurrentContext()).ToLocalChecked()); - String resourceData = - loadResourceAsASCIIString(resourceFileName.utf8().data()); - RELEASE_ASSERT(resourceData.length()); - bool compileAndRunScript = true; - if (args.Length() == 2) { - RELEASE_ASSERT(args[1]->IsBoolean()); - compileAndRunScript = args[1].As<v8::Boolean>()->Value(); - } - - if (resourceFileName.endsWith(".js") && compileAndRunScript) - compileAndRunPrivateScript( - ScriptState::current(isolate), resourceFileName.replace(".js", ""), - resourceData.utf8().data(), resourceData.length()); - args.GetReturnValue().Set(v8String(isolate, resourceData)); -} - -// FIXME: If we have X.js, XPartial-1.js and XPartial-2.js, currently all of the -// JS files are compiled when any of the JS files is requested. Ideally we -// should avoid compiling unrelated JS files. For example, if a method in -// XPartial-1.js is requested, we just need to compile X.js and XPartial-1.js, -// and don't need to compile XPartial-2.js. -static void installPrivateScript(v8::Isolate* isolate, String className) { - ScriptState* scriptState = ScriptState::current(isolate); - int compiledScriptCount = 0; -// |kPrivateScriptSourcesForTesting| is defined in V8PrivateScriptSources.h, -// which is auto-generated by make_private_script_source.py. -#ifndef NDEBUG - for (size_t index = 0; - index < WTF_ARRAY_LENGTH(kPrivateScriptSourcesForTesting); index++) { - if (className == kPrivateScriptSourcesForTesting[index].className) { - compileAndRunPrivateScript( - scriptState, kPrivateScriptSourcesForTesting[index].scriptClassName, - kPrivateScriptSourcesForTesting[index].source, - kPrivateScriptSourcesForTesting[index].size); - compiledScriptCount++; - } - } -#endif - - // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is - // auto-generated by make_private_script_source.py. - for (size_t index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources); - index++) { - if (className == kPrivateScriptSources[index].className) { - String resourceData = - loadResourceAsASCIIString(kPrivateScriptSources[index].resourceFile); - compileAndRunPrivateScript( - scriptState, kPrivateScriptSources[index].scriptClassName, - resourceData.utf8().data(), resourceData.length()); - compiledScriptCount++; - } - } - - if (!compiledScriptCount) { - LOG(FATAL) - << "Private script error: Target source code was not found. (Class " - "name = " - << className.utf8().data() << ")"; - } -} - -static v8::Local<v8::Value> installPrivateScriptRunner(v8::Isolate* isolate) { - const String className = "PrivateScriptRunner"; - size_t index; - // |kPrivateScriptSources| is defined in V8PrivateScriptSources.h, which is - // auto-generated by make_private_script_source.py. - for (index = 0; index < WTF_ARRAY_LENGTH(kPrivateScriptSources); index++) { - if (className == kPrivateScriptSources[index].className) - break; - } - if (index == WTF_ARRAY_LENGTH(kPrivateScriptSources)) { - LOG(FATAL) - << "Private script error: Target source code was not found. (Class " - "name = " - << className.utf8().data() << ")"; - } - String resourceData = - loadResourceAsASCIIString(kPrivateScriptSources[index].resourceFile); - return compileAndRunPrivateScript(ScriptState::current(isolate), className, - resourceData.utf8().data(), - resourceData.length()); -} - -static v8::Local<v8::Object> classObjectOfPrivateScript( - ScriptState* scriptState, - String className) { - ASSERT(scriptState->perContextData()); - ASSERT(scriptState->getExecutionContext()); - v8::Isolate* isolate = scriptState->isolate(); - v8::Local<v8::Value> compiledClass = - scriptState->perContextData()->compiledPrivateScript(className); - if (compiledClass.IsEmpty()) { - v8::Local<v8::Value> installedClasses = - scriptState->perContextData()->compiledPrivateScript( - "PrivateScriptRunner"); - if (installedClasses.IsEmpty()) { - installedClasses = installPrivateScriptRunner(isolate); - scriptState->perContextData()->setCompiledPrivateScript( - "PrivateScriptRunner", installedClasses); - } - RELEASE_ASSERT(!installedClasses.IsEmpty()); - RELEASE_ASSERT(installedClasses->IsObject()); - - installPrivateScript(isolate, className); - compiledClass = - v8::Local<v8::Object>::Cast(installedClasses) - ->Get(scriptState->context(), v8String(isolate, className)) - .ToLocalChecked(); - RELEASE_ASSERT(compiledClass->IsObject()); - scriptState->perContextData()->setCompiledPrivateScript(className, - compiledClass); - } - return v8::Local<v8::Object>::Cast(compiledClass); -} - -static void initializeHolderIfNeeded(ScriptState* scriptState, - v8::Local<v8::Object> classObject, - v8::Local<v8::Value> holder) { - RELEASE_ASSERT(!holder.IsEmpty()); - RELEASE_ASSERT(holder->IsObject()); - v8::Local<v8::Object> holderObject = v8::Local<v8::Object>::Cast(holder); - v8::Isolate* isolate = scriptState->isolate(); - v8::Local<v8::Context> context = scriptState->context(); - auto privateIsInitialized = - V8PrivateProperty::getPrivateScriptRunnerIsInitialized(isolate); - if (privateIsInitialized.hasValue(context, holderObject)) - return; // Already initialized. - - v8::TryCatch block(isolate); - v8::Local<v8::Value> initializeFunction; - if (classObject->Get(scriptState->context(), v8String(isolate, "initialize")) - .ToLocal(&initializeFunction) && - initializeFunction->IsFunction()) { - v8::TryCatch block(isolate); - v8::Local<v8::Value> result; - if (!V8ScriptRunner::callInternalFunction( - v8::Local<v8::Function>::Cast(initializeFunction), holder, 0, 0, - isolate) - .ToLocal(&result)) { - dumpV8Message(context, block.Message()); - LOG(FATAL) - << "Private script error: Object constructor threw an exception."; - } - } - - // Inject the prototype object of the private script into the prototype chain - // of the holder object. This is necessary to let the holder object use - // properties defined on the prototype object of the private script. (e.g., if - // the prototype object has |foo|, the holder object should be able to use it - // with |this.foo|.) - if (classObject->GetPrototype() != holderObject->GetPrototype()) { - if (!v8CallBoolean( - classObject->SetPrototype(context, holderObject->GetPrototype()))) { - dumpV8Message(context, block.Message()); - LOG(FATAL) << "Private script error: SetPrototype failed."; - } - } - if (!v8CallBoolean(holderObject->SetPrototype(context, classObject))) { - dumpV8Message(context, block.Message()); - LOG(FATAL) << "Private script error: SetPrototype failed."; - } - - privateIsInitialized.set(context, holderObject, v8Boolean(true, isolate)); -} - -v8::Local<v8::Value> PrivateScriptRunner::installClassIfNeeded( - Document* document, - String className) { - if (!document->contextDocument()->frame()) - return v8::Local<v8::Value>(); - - v8::HandleScope handleScope(toIsolate(document)); - ScriptState* scriptState = - ScriptState::forWorld(document->contextDocument()->frame(), - DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return v8::Local<v8::Value>(); - - ScriptState::Scope scope(scriptState); - return classObjectOfPrivateScript(scriptState, className); -} - -namespace { - -void rethrowExceptionInPrivateScript(v8::Isolate* isolate, - v8::TryCatch& block, - ScriptState* scriptStateInUserScript, - ExceptionState::ContextType errorContext, - const char* propertyName, - const char* interfaceName) { - v8::Local<v8::Context> context = scriptStateInUserScript->context(); - v8::Local<v8::Value> exception = block.Exception(); - RELEASE_ASSERT(!exception.IsEmpty() && exception->IsObject()); - - v8::Local<v8::Object> exceptionObject = - v8::Local<v8::Object>::Cast(exception); - v8::Local<v8::Value> name = - exceptionObject->Get(context, v8String(isolate, "name")).ToLocalChecked(); - RELEASE_ASSERT(name->IsString()); - - v8::Local<v8::Message> tryCatchMessage = block.Message(); - v8::Local<v8::Value> message; - String messageString; - if (exceptionObject->Get(context, v8String(isolate, "message")) - .ToLocal(&message) && - message->IsString()) - messageString = toCoreString(v8::Local<v8::String>::Cast(message)); - - String exceptionName = toCoreString(v8::Local<v8::String>::Cast(name)); - if (exceptionName == "PrivateScriptException") { - v8::Local<v8::Value> code = - exceptionObject->Get(context, v8String(isolate, "code")) - .ToLocalChecked(); - RELEASE_ASSERT(code->IsInt32()); - int exceptionCode = code.As<v8::Int32>()->Value(); - ScriptState::Scope scope(scriptStateInUserScript); - ExceptionState exceptionState(scriptStateInUserScript->isolate(), - errorContext, interfaceName, propertyName); - exceptionState.throwDOMException(exceptionCode, messageString); - return; - } - - // Standard JS errors thrown by a private script are treated as real errors - // of the private script and crash the renderer, except for a stack overflow - // error. A stack overflow error can happen in a valid private script - // if user's script can create a recursion that involves the private script. - if (exceptionName == "RangeError" && - messageString.contains("Maximum call stack size exceeded")) { - ScriptState::Scope scope(scriptStateInUserScript); - ExceptionState exceptionState(scriptStateInUserScript->isolate(), - errorContext, interfaceName, propertyName); - exceptionState.throwDOMException(V8RangeError, messageString); - return; - } - - dumpV8Message(context, tryCatchMessage); - LOG(FATAL) << "Private script error: " << exceptionName.utf8().data() - << " was thrown."; -} - -} // namespace - -v8::Local<v8::Value> PrivateScriptRunner::runDOMAttributeGetter( - ScriptState* scriptState, - ScriptState* scriptStateInUserScript, - const char* className, - const char* attributeName, - v8::Local<v8::Value> holder) { - v8::Isolate* isolate = scriptState->isolate(); - v8::Local<v8::Object> classObject = - classObjectOfPrivateScript(scriptState, className); - v8::Local<v8::Value> descriptor; - if (!classObject - ->GetOwnPropertyDescriptor(scriptState->context(), - v8String(isolate, attributeName)) - .ToLocal(&descriptor) || - !descriptor->IsObject()) { - LOG(FATAL) - << "Private script error: Target DOM attribute getter was not found. " - "(Class name = " - << className << ", Attribute name = " << attributeName << ")"; - } - v8::Local<v8::Value> getter; - if (!v8::Local<v8::Object>::Cast(descriptor) - ->Get(scriptState->context(), v8String(isolate, "get")) - .ToLocal(&getter) || - !getter->IsFunction()) { - LOG(FATAL) - << "Private script error: Target DOM attribute getter was not found. " - "(Class name = " - << className << ", Attribute name = " << attributeName << ")"; - } - initializeHolderIfNeeded(scriptState, classObject, holder); - v8::TryCatch block(isolate); - v8::Local<v8::Value> result; - if (!V8ScriptRunner::callInternalFunction( - v8::Local<v8::Function>::Cast(getter), holder, 0, 0, isolate) - .ToLocal(&result)) { - rethrowExceptionInPrivateScript(isolate, block, scriptStateInUserScript, - ExceptionState::GetterContext, - attributeName, className); - block.ReThrow(); - return v8::Local<v8::Value>(); - } - return result; -} - -bool PrivateScriptRunner::runDOMAttributeSetter( - ScriptState* scriptState, - ScriptState* scriptStateInUserScript, - const char* className, - const char* attributeName, - v8::Local<v8::Value> holder, - v8::Local<v8::Value> v8Value) { - v8::Isolate* isolate = scriptState->isolate(); - v8::Local<v8::Object> classObject = - classObjectOfPrivateScript(scriptState, className); - v8::Local<v8::Value> descriptor; - if (!classObject - ->GetOwnPropertyDescriptor(scriptState->context(), - v8String(isolate, attributeName)) - .ToLocal(&descriptor) || - !descriptor->IsObject()) { - LOG(FATAL) - << "Private script error: Target DOM attribute setter was not found. " - "(Class name = " - << className << ", Attribute name = " << attributeName << ")"; - } - v8::Local<v8::Value> setter; - if (!v8::Local<v8::Object>::Cast(descriptor) - ->Get(scriptState->context(), v8String(isolate, "set")) - .ToLocal(&setter) || - !setter->IsFunction()) { - LOG(FATAL) << "Private script error: Target DOM attribute setter was not " - "found. (Class name = " - << className << ", Attribute name = " << attributeName << ")"; - } - initializeHolderIfNeeded(scriptState, classObject, holder); - v8::Local<v8::Value> argv[] = {v8Value}; - v8::TryCatch block(isolate); - v8::Local<v8::Value> result; - if (!V8ScriptRunner::callInternalFunction( - v8::Local<v8::Function>::Cast(setter), holder, - WTF_ARRAY_LENGTH(argv), argv, isolate) - .ToLocal(&result)) { - rethrowExceptionInPrivateScript(isolate, block, scriptStateInUserScript, - ExceptionState::SetterContext, - attributeName, className); - block.ReThrow(); - return false; - } - return true; -} - -v8::Local<v8::Value> PrivateScriptRunner::runDOMMethod( - ScriptState* scriptState, - ScriptState* scriptStateInUserScript, - const char* className, - const char* methodName, - v8::Local<v8::Value> holder, - int argc, - v8::Local<v8::Value> argv[]) { - v8::Local<v8::Object> classObject = - classObjectOfPrivateScript(scriptState, className); - v8::Local<v8::Value> method; - if (!classObject - ->Get(scriptState->context(), - v8String(scriptState->isolate(), methodName)) - .ToLocal(&method) || - !method->IsFunction()) { - LOG(FATAL) - << "Private script error: Target DOM method was not found. (Class " - "name = " - << className << ", Method name = " << methodName << ")"; - } - initializeHolderIfNeeded(scriptState, classObject, holder); - v8::TryCatch block(scriptState->isolate()); - v8::Local<v8::Value> result; - if (!V8ScriptRunner::callInternalFunction( - v8::Local<v8::Function>::Cast(method), holder, argc, argv, - scriptState->isolate()) - .ToLocal(&result)) { - rethrowExceptionInPrivateScript( - scriptState->isolate(), block, scriptStateInUserScript, - ExceptionState::ExecutionContext, methodName, className); - block.ReThrow(); - return v8::Local<v8::Value>(); - } - return result; -} - -} // namespace blink
diff --git a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.h b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.h deleted file mode 100644 index a93a873..0000000 --- a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.h +++ /dev/null
@@ -1,46 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef PrivateScriptRunner_h -#define PrivateScriptRunner_h - -#include "bindings/core/v8/ExceptionState.h" -#include "core/CoreExport.h" -#include "wtf/text/WTFString.h" -#include <v8.h> - -namespace blink { - -class Document; -class ScriptState; - -class CORE_EXPORT PrivateScriptRunner { - STATIC_ONLY(PrivateScriptRunner); - - public: - static v8::Local<v8::Value> installClassIfNeeded(Document*, String className); - static v8::Local<v8::Value> runDOMAttributeGetter( - ScriptState*, - ScriptState* scriptStateInUserScript, - const char* className, - const char* attributeName, - v8::Local<v8::Value> holder); - static bool runDOMAttributeSetter(ScriptState*, - ScriptState* scriptStateInUserScript, - const char* className, - const char* attributeName, - v8::Local<v8::Value> holder, - v8::Local<v8::Value> v8Value); - static v8::Local<v8::Value> runDOMMethod(ScriptState*, - ScriptState* scriptStateInUserScript, - const char* className, - const char* methodName, - v8::Local<v8::Value> holder, - int argc, - v8::Local<v8::Value> argv[]); -}; - -} // namespace blink - -#endif // V8PrivateScriptRunner_h
diff --git a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.js b/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.js deleted file mode 100644 index e2571f4..0000000 --- a/third_party/WebKit/Source/bindings/core/v8/PrivateScriptRunner.js +++ /dev/null
@@ -1,148 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -"use strict"; - -function PrivateScriptController() -{ - this._installedClasses = {}; - this._DOMException = {}; - this._JSError = {}; - // This list must be in sync with the enum in ExceptionCode.h. The order matters. - var domExceptions = [ - "IndexSizeError", - "HierarchyRequestError", - "WrongDocumentError", - "InvalidCharacterError", - "NoModificationAllowedError", - "NotFoundError", - "NotSupportedError", - "InUseAttributeError", // Historical. Only used in setAttributeNode etc which have been removed from the DOM specs. - - // Introduced in DOM Level 2: - "InvalidStateError", - "SyntaxError", - "InvalidModificationError", - "NamespaceError", - "InvalidAccessError", - - // Introduced in DOM Level 3: - "TypeMismatchError", // Historical; use TypeError instead - - // XMLHttpRequest extension: - "SecurityError", - - // Others introduced in HTML5: - "NetworkError", - "AbortError", - "URLMismatchError", - "QuotaExceededError", - "TimeoutError", - "InvalidNodeTypeError", - "DataCloneError", - - // These are IDB-specific. - "UnknownError", - "ConstraintError", - "DataError", - "TransactionInactiveError", - "ReadOnlyError", - "VersionError", - - // File system - "NotReadableError", - "EncodingError", - "PathExistsError", - - // SQL - "SQLDatabaseError", // Naming conflict with DatabaseError class. - - // Web Crypto - "OperationError", - - // Push API - "PermissionDeniedError", - - // Pointer Events - "InvalidPointerId", - ]; - - // This list must be in sync with the enum in ExceptionCode.h. The order matters. - var jsErrors = [ - "Error", - "TypeError", - "RangeError", - "SyntaxError", - "ReferenceError", - ]; - - var code = 1; - domExceptions.forEach(function (exception) { - this._DOMException[exception] = code; - ++code; - }.bind(this)); - - var code = 1000; - jsErrors.forEach(function (exception) { - this._JSError[exception] = code; - ++code; - }.bind(this)); -} - -PrivateScriptController.prototype = { - get installedClasses() - { - return this._installedClasses; - }, - - get DOMException() - { - return this._DOMException; - }, - - get JSError() - { - return this._JSError; - }, - - installClass: function(className, implementation) - { - function PrivateScriptClass() - { - } - - if (!(className in this._installedClasses)) - this._installedClasses[className] = new PrivateScriptClass(); - implementation(this._installedClasses[className]); - }, - - // Private scripts can throw JS errors and DOM exceptions as follows: - // throwException(privateScriptController.DOMException.IndexSizeError, "..."); - // throwException(privateScriptController.JSError.TypeError, "..."); - // - // Note that normal JS errors thrown by private scripts are treated - // as real JS errors caused by programming mistake and the execution crashes. - // If you want to intentially throw JS errors from private scripts, - // you need to use throwException(privateScriptController.JSError.TypeError, "..."). - throwException: function(code, message) - { - function PrivateScriptException() - { - } - - var exception = new PrivateScriptException(); - exception.code = code; - exception.message = message; - exception.name = "PrivateScriptException"; - throw exception; - }, -} - -if (!window.hasOwnProperty("privateScriptController")) - window.privateScriptController = new PrivateScriptController(); - -// This line must be the last statement of this JS file. -// A parenthesis is needed, because the caller of this script (PrivateScriptRunner.cpp) -// is depending on the completion value of this script. -(privateScriptController.installedClasses);
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp index d6d58c05..f6d5d75 100644 --- a/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptController.cpp
@@ -267,20 +267,10 @@ windowProxy(DOMWrapperWorld::mainWorld())->namedItemRemoved(doc, name); } -static bool isInPrivateScriptIsolateWorld(v8::Isolate* isolate) { - v8::Local<v8::Context> context = isolate->GetCurrentContext(); - return !context.IsEmpty() && toDOMWindow(context) && - DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld(); -} - bool ScriptController::canExecuteScripts( ReasonForCallingCanExecuteScripts reason) { - // For performance reasons, we check isInPrivateScriptIsolateWorld() only if - // canExecuteScripts is going to return false. if (frame()->document() && frame()->document()->isSandboxed(SandboxScripts)) { - if (isInPrivateScriptIsolateWorld(isolate())) - return true; // FIXME: This message should be moved off the console once a solution to // https://bugs.webkit.org/show_bug.cgi?id=103274 exists. if (reason == AboutToExecuteScript) @@ -303,8 +293,7 @@ return false; Settings* settings = frame()->settings(); const bool allowed = - client->allowScript(settings && settings->scriptEnabled()) || - isInPrivateScriptIsolateWorld(isolate()); + client->allowScript(settings && settings->scriptEnabled()); if (!allowed && reason == AboutToExecuteScript) client->didNotAllowScript(); return allowed;
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp index 31b5698..f99a1d1 100644 --- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -91,17 +91,14 @@ Persistent<PendingScript> m_pendingScript; }; -class TestScriptResourceClient - : public GarbageCollectedFinalized<TestScriptResourceClient>, - public ScriptResourceClient { - USING_GARBAGE_COLLECTED_MIXIN(TestScriptResourceClient); +class TestPendingScriptClient + : public GarbageCollectedFinalized<TestPendingScriptClient>, + public PendingScriptClient { + USING_GARBAGE_COLLECTED_MIXIN(TestPendingScriptClient); public: - TestScriptResourceClient() : m_finished(false) {} - - void notifyFinished(Resource*) override { m_finished = true; } - String debugName() const override { return "TestScriptResourceClient"; } - + TestPendingScriptClient() : m_finished(false) {} + void pendingScriptFinished(PendingScript*) override { m_finished = true; } bool finished() const { return m_finished; } private: @@ -114,7 +111,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); appendData("function foo() {"); @@ -149,7 +146,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); appendData("function foo() {"); appendData("this is the part which will be a parse error"); @@ -185,7 +182,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); appendData("function foo() {"); @@ -215,7 +212,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); appendData("function foo() {"); appendPadding(); @@ -248,7 +245,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); // Finish the script without sending any data. @@ -272,7 +269,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); appendData("function foo() { }"); @@ -299,7 +296,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); // This is the first data chunk which is small. @@ -333,7 +330,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); m_resource->setEncoding("UTF-8"); @@ -368,7 +365,7 @@ ScriptStreamer::startStreaming( getPendingScript(), ScriptStreamer::ParsingBlocking, m_settings.get(), scope.getScriptState(), m_loadingTaskRunner); - TestScriptResourceClient* client = new TestScriptResourceClient; + TestPendingScriptClient* client = new TestPendingScriptClient; getPendingScript()->watchForLoad(client); // \xef\xbb\xbf is the UTF-8 byte order mark. \xec\x92\x81 are the raw bytes
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp index 8a3df77..c0abc74 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp
@@ -43,11 +43,6 @@ v8::Local<v8::ObjectTemplate> prototypeTemplate, const V8DOMConfiguration::AttributeConfiguration& attribute, const DOMWrapperWorld& world) { - if (attribute.exposeConfiguration == - V8DOMConfiguration::OnlyExposedToPrivateScript && - !world.isPrivateScriptIsolatedWorld()) - return; - v8::Local<v8::Name> name = v8AtomicString(isolate, attribute.name); v8::AccessorNameGetterCallback getter = attribute.getter; v8::AccessorNameSetterCallback setter = attribute.setter; @@ -83,11 +78,6 @@ v8::Local<v8::Object> prototype, const V8DOMConfiguration::AttributeConfiguration& attribute, const DOMWrapperWorld& world) { - if (attribute.exposeConfiguration == - V8DOMConfiguration::OnlyExposedToPrivateScript && - !world.isPrivateScriptIsolatedWorld()) - return; - v8::Local<v8::Name> name = v8AtomicString(isolate, attribute.name); // This method is only being used for installing interfaces which are @@ -125,11 +115,6 @@ v8::Local<v8::ObjectTemplate> prototypeTemplate, const V8DOMConfiguration::AttributeConfiguration& attribute, const DOMWrapperWorld& world) { - if (attribute.exposeConfiguration == - V8DOMConfiguration::OnlyExposedToPrivateScript && - !world.isPrivateScriptIsolatedWorld()) - return; - v8::Local<v8::Name> name = v8AtomicString(isolate, attribute.name); v8::AccessorNameGetterCallback getter = attribute.getter; DCHECK(!attribute.setter); @@ -226,11 +211,6 @@ v8::Local<v8::Signature> signature, const V8DOMConfiguration::AccessorConfiguration& accessor, const DOMWrapperWorld& world) { - if (accessor.exposeConfiguration == - V8DOMConfiguration::OnlyExposedToPrivateScript && - !world.isPrivateScriptIsolatedWorld()) - return; - v8::Local<v8::Name> name = v8AtomicString(isolate, accessor.name); v8::FunctionCallback getterCallback = accessor.getter; v8::FunctionCallback setterCallback = accessor.setter; @@ -351,11 +331,6 @@ v8::Local<v8::Signature> signature, const Configuration& method, const DOMWrapperWorld& world) { - if (method.exposeConfiguration == - V8DOMConfiguration::OnlyExposedToPrivateScript && - !world.isPrivateScriptIsolatedWorld()) - return; - v8::Local<v8::Name> name = method.methodName(isolate); v8::FunctionCallback callback = method.callbackForWorld(world); // Promise-returning functions need to return a reject promise when @@ -404,11 +379,6 @@ v8::Local<v8::Signature> signature, const V8DOMConfiguration::MethodConfiguration& method, const DOMWrapperWorld& world) { - if (method.exposeConfiguration == - V8DOMConfiguration::OnlyExposedToPrivateScript && - !world.isPrivateScriptIsolatedWorld()) - return; - v8::Local<v8::Name> name = method.methodName(isolate); v8::FunctionCallback callback = method.callbackForWorld(world); // Promise-returning functions need to return a reject promise when
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h index fa25d78..8b118e9 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h +++ b/third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.h
@@ -46,11 +46,6 @@ // This greatly reduces the binary size by moving from code driven setup to // data table driven setup. - enum ExposeConfiguration { - ExposedToAllScripts, - OnlyExposedToPrivateScript, - }; - // Bitflags to show where the member will be defined. enum PropertyLocationConfiguration { OnInstance = 1 << 0, @@ -81,9 +76,8 @@ // The accessor's 'result' is stored in a private property. CachedAccessorCallback cachedAccessorCallback; const WrapperTypeInfo* data; - unsigned settings : 8; // v8::AccessControl - unsigned attribute : 8; // v8::PropertyAttribute - unsigned exposeConfiguration : 1; // ExposeConfiguration + unsigned settings : 8; // v8::AccessControl + unsigned attribute : 8; // v8::PropertyAttribute unsigned propertyLocationConfiguration : 3; // PropertyLocationConfiguration unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration @@ -135,9 +129,8 @@ // The accessor's 'result' is stored in a private property. CachedAccessorCallback cachedAccessorCallback; const WrapperTypeInfo* data; - unsigned settings : 8; // v8::AccessControl - unsigned attribute : 8; // v8::PropertyAttribute - unsigned exposeConfiguration : 1; // ExposeConfiguration + unsigned settings : 8; // v8::AccessControl + unsigned attribute : 8; // v8::PropertyAttribute unsigned propertyLocationConfiguration : 3; // PropertyLocationConfiguration unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration @@ -240,8 +233,7 @@ v8::FunctionCallback callback; v8::FunctionCallback callbackForMainWorld; int length; - unsigned attribute : 8; // v8::PropertyAttribute - unsigned exposeConfiguration : 1; // ExposeConfiguration + unsigned attribute : 8; // v8::PropertyAttribute unsigned propertyLocationConfiguration : 3; // PropertyLocationConfiguration unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration @@ -262,8 +254,7 @@ v8::FunctionCallback callback; // SymbolKeyedMethodConfiguration doesn't support per-world bindings. int length; - unsigned attribute : 8; // v8::PropertyAttribute - unsigned exposeConfiguration : 1; // ExposeConfiguration + unsigned attribute : 8; // v8::PropertyAttribute unsigned propertyLocationConfiguration : 3; // PropertyLocationConfiguration unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp index 936efad..20f8c10 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/V8Initializer.cpp
@@ -162,19 +162,7 @@ } } - if (scriptState->world().isPrivateScriptIsolatedWorld()) { - // We allow a private script to dispatch error events even in a - // EventDispatchForbiddenScope scope. Without having this ability, it's - // hard to debug the private script because syntax errors in the private - // script are not reported to console (the private script just crashes - // silently). Allowing error events in private scripts is safe because - // error events don't propagate to other isolated worlds (which means that - // the error events won't fire any event listeners in user's scripts). - EventDispatchForbiddenScope::AllowUserAgentEvents allowUserAgentEvents; - context->dispatchErrorEvent(event, accessControlStatus); - } else { - context->dispatchErrorEvent(event, accessControlStatus); - } + context->dispatchErrorEvent(event, accessControlStatus); } namespace {
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp b/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp index f2441953..d7b57d5 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/V8NodeFilterCondition.cpp
@@ -74,9 +74,8 @@ v8::Local<v8::Function> callback; v8::Local<v8::Value> receiver; if (filter->IsFunction()) { - UseCounter::countIfNotPrivateScript(isolate, - currentExecutionContext(isolate), - UseCounter::NodeFilterIsFunction); + UseCounter::count(currentExecutionContext(isolate), + UseCounter::NodeFilterIsFunction); callback = v8::Local<v8::Function>::Cast(filter); receiver = v8::Undefined(isolate); } else { @@ -95,9 +94,8 @@ "NodeFilter object does not have an acceptNode function"); return NodeFilter::kFilterReject; } - UseCounter::countIfNotPrivateScript(isolate, - currentExecutionContext(isolate), - UseCounter::NodeFilterIsObject); + UseCounter::count(currentExecutionContext(isolate), + UseCounter::NodeFilterIsObject); callback = v8::Local<v8::Function>::Cast(value); receiver = filter; }
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp index b7d0e5a..8b8b7f8c 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.cpp
@@ -48,8 +48,7 @@ m_constructorMap(m_isolate), m_contextHolder(WTF::makeUnique<gin::ContextHolder>(m_isolate)), m_context(m_isolate, context), - m_activityLogger(0), - m_compiledPrivateScript(m_isolate) { + m_activityLogger(0) { m_contextHolder->SetContext(context); v8::Context::Scope contextScope(context); @@ -175,14 +174,4 @@ m_customElementBindings.push_back(std::move(binding)); } -v8::Local<v8::Value> V8PerContextData::compiledPrivateScript(String className) { - return m_compiledPrivateScript.Get(className); -} - -void V8PerContextData::setCompiledPrivateScript( - String className, - v8::Local<v8::Value> compiledObject) { - m_compiledPrivateScript.Set(className, compiledObject); -} - } // namespace blink
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h index 4a01795..86e43650 100644 --- a/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h +++ b/third_party/WebKit/Source/bindings/core/v8/V8PerContextData.h
@@ -93,9 +93,6 @@ m_activityLogger = activityLogger; } - v8::Local<v8::Value> compiledPrivateScript(String); - void setCompiledPrivateScript(String, v8::Local<v8::Value>); - private: V8PerContextData(v8::Local<v8::Context>); @@ -125,8 +122,6 @@ // This is owned by a static hash map in V8DOMActivityLogger. V8DOMActivityLogger* m_activityLogger; - - V8GlobalValueMap<String, v8::Value, v8::kNotWeak> m_compiledPrivateScript; }; } // namespace blink
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp index 2f0c099..ea3eb2be 100644 --- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -471,9 +471,7 @@ return; } - if (m_world->isPrivateScriptIsolatedWorld()) { - token = "private-script://" + token; - } else if (m_world->isIsolatedWorld()) { + if (m_world->isIsolatedWorld()) { SecurityOrigin* frameSecurityOrigin = m_frame->securityContext()->getSecurityOrigin(); String frameSecurityToken = frameSecurityOrigin->toString();
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8DocumentCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8DocumentCustom.cpp index 3598aa2..bc29e6c2 100644 --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8DocumentCustom.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8DocumentCustom.cpp
@@ -106,30 +106,25 @@ Document*) { v8::Local<v8::Value> v8Window = info[0]; if (isUndefinedOrNull(v8Window)) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentCreateTouchWindowNull); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentCreateTouchWindowNull); } else if (!toDOMWindow(info.GetIsolate(), v8Window)) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentCreateTouchWindowWrongType); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentCreateTouchWindowWrongType); } v8::Local<v8::Value> v8Target = info[1]; if (isUndefinedOrNull(v8Target)) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentCreateTouchTargetNull); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentCreateTouchTargetNull); } else if (!toEventTarget(info.GetIsolate(), v8Target)) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentCreateTouchTargetWrongType); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentCreateTouchTargetWrongType); } if (info.Length() < 7) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentCreateTouchLessThanSevenArguments); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentCreateTouchLessThanSevenArguments); } }
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp index 8b928945..0f230afa 100644 --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
@@ -40,14 +40,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info, EventTarget*) { if (info.Length() >= 3 && info[2]->IsObject()) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::AddEventListenerThirdArgumentIsObject); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::AddEventListenerThirdArgumentIsObject); } if (info.Length() >= 4) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::AddEventListenerFourArguments); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::AddEventListenerFourArguments); } } @@ -63,14 +61,12 @@ const v8::FunctionCallbackInfo<v8::Value>& info, EventTarget*) { if (info.Length() >= 3 && info[2]->IsObject()) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::RemoveEventListenerThirdArgumentIsObject); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::RemoveEventListenerThirdArgumentIsObject); } if (info.Length() >= 4) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::RemoveEventListenerFourArguments); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::RemoveEventListenerFourArguments); } }
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLAllCollectionCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLAllCollectionCustom.cpp index e63777e..df3a8af 100644 --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLAllCollectionCustom.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLAllCollectionCustom.cpp
@@ -69,9 +69,7 @@ v8::Local<v8::Uint32> index; if (!argument->ToArrayIndex(info.GetIsolate()->GetCurrentContext()) .ToLocal(&index)) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - namedFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), namedFeature); TOSTRING_DEFAULT(V8StringResource<>, name, argument, v8::Undefined(info.GetIsolate())); v8::Local<v8::Value> result = getNamedItems(collection, name, info); @@ -82,14 +80,11 @@ return result; } - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - indexedFeature); - if (!argument->IsNumber()) - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - indexedWithNonNumberFeature); - + UseCounter::count(currentExecutionContext(info.GetIsolate()), indexedFeature); + if (!argument->IsNumber()) { + UseCounter::count(currentExecutionContext(info.GetIsolate()), + indexedWithNonNumberFeature); + } Element* result = collection->item(index->Value()); return toV8(result, info.Holder(), info.GetIsolate()); } @@ -97,9 +92,8 @@ void V8HTMLAllCollection::itemMethodCustom( const v8::FunctionCallbackInfo<v8::Value>& info) { if (info.Length() < 1) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentAllItemNoArguments); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentAllItemNoArguments); return; } @@ -113,15 +107,13 @@ void V8HTMLAllCollection::legacyCallCustom( const v8::FunctionCallbackInfo<v8::Value>& info) { if (info.Length() < 1) { - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentAllLegacyCallNoArguments); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentAllLegacyCallNoArguments); return; } - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentAllLegacyCall); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentAllLegacyCall); HTMLAllCollection* impl = V8HTMLAllCollection::toImpl(info.Holder()); @@ -134,9 +126,8 @@ return; } - UseCounter::countIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::DocumentAllLegacyCallTwoArguments); + UseCounter::count(currentExecutionContext(info.GetIsolate()), + UseCounter::DocumentAllLegacyCallTwoArguments); // If there is a second argument it is the index of the item we want. TOSTRING_VOID(V8StringResource<>, name, info[0]);
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp index 1ecd977..4c034950 100644 --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8HTMLPlugInElementCustom.cpp
@@ -163,17 +163,15 @@ void V8HTMLEmbedElement::legacyCallCustom( const v8::FunctionCallbackInfo<v8::Value>& info) { invokeOnScriptableObject<V8HTMLEmbedElement>(info); - Deprecation::countDeprecationIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::HTMLEmbedElementLegacyCall); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), + UseCounter::HTMLEmbedElementLegacyCall); } void V8HTMLObjectElement::legacyCallCustom( const v8::FunctionCallbackInfo<v8::Value>& info) { invokeOnScriptableObject<V8HTMLObjectElement>(info); - Deprecation::countDeprecationIfNotPrivateScript( - info.GetIsolate(), currentExecutionContext(info.GetIsolate()), - UseCounter::HTMLObjectElementLegacyCall); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), + UseCounter::HTMLObjectElementLegacyCall); } } // namespace blink
diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp index af2fa31..acb26e7 100644 --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8WindowCustom.cpp
@@ -196,8 +196,7 @@ LocalDOMWindow* source = currentDOMWindow(info.GetIsolate()); ASSERT(window); - UseCounter::countIfNotPrivateScript(info.GetIsolate(), window->frame(), - UseCounter::WindowPostMessage); + UseCounter::count(window->frame(), UseCounter::WindowPostMessage); // If called directly by WebCore we don't have a calling context. if (!source) {
diff --git a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py index 93ef605..844adf9ca 100644 --- a/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py +++ b/third_party/WebKit/Source/bindings/scripts/code_generator_v8.py
@@ -202,7 +202,7 @@ # Add the include for interface itself if IdlType(interface_name).is_typed_array: template_context['header_includes'].add('core/dom/DOMTypedArray.h') - elif interface_info['include_path']: + else: template_context['header_includes'].add(interface_info['include_path']) template_context['header_includes'].update( interface_info.get('additional_header_includes', [])) @@ -228,8 +228,7 @@ dictionary, interfaces_info) include_paths = interface_info.get('dependencies_include_paths') # Add the include for interface itself - if interface_info['include_path']: - template_context['header_includes'].add(interface_info['include_path']) + template_context['header_includes'].add(interface_info['include_path']) if not is_testing_target(interface_info.get('full_path')): template_context['header_includes'].add(self.info_provider.include_path_for_export) template_context['exported'] = self.info_provider.specifier_for_export
diff --git a/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py b/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py index 95074208..3947ff1 100755 --- a/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py +++ b/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_individual.py
@@ -269,7 +269,7 @@ extended_attributes = definition.extended_attributes implemented_as = extended_attributes.get('ImplementedAs') full_path = os.path.realpath(idl_filename) - this_include_path = None if 'NoImplHeader' in extended_attributes else include_path(idl_filename, implemented_as) + this_include_path = include_path(idl_filename, implemented_as) if definition.is_partial: # We don't create interface_info for partial interfaces, but # adds paths to another dict.
diff --git a/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_overall.py b/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_overall.py index 55ebf80..eb412e7 100755 --- a/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_overall.py +++ b/third_party/WebKit/Source/bindings/scripts/compute_interfaces_info_overall.py
@@ -260,12 +260,10 @@ # However, they are needed for legacy implemented interfaces that # are being treated as partial interfaces, until we remove these. # http://crbug.com/360435 - implemented_interfaces_include_paths = [] - for implemented_interface_info in implemented_interfaces_info: - if (implemented_interface_info['is_legacy_treat_as_partial_interface'] and - implemented_interface_info['include_path']): - implemented_interfaces_include_paths.append( - implemented_interface_info['include_path']) + implemented_interfaces_include_paths = [ + implemented_interface_info['include_path'] + for implemented_interface_info in implemented_interfaces_info + if implemented_interface_info['is_legacy_treat_as_partial_interface']] dependencies_full_paths = implemented_interfaces_full_paths dependencies_include_paths = implemented_interfaces_include_paths
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py index 715be5d8..ee98822f 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_attributes.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_attributes.py
@@ -93,14 +93,6 @@ is_reflect = 'Reflect' in extended_attributes if is_custom_element_callbacks or is_reflect: includes.add('core/dom/custom/V0CustomElementProcessingStack.h') - # [ImplementedInPrivateScript] - is_implemented_in_private_script = 'ImplementedInPrivateScript' in extended_attributes - if is_implemented_in_private_script: - includes.add('bindings/core/v8/PrivateScriptRunner.h') - includes.add('core/frame/LocalFrame.h') - includes.add('platform/ScriptForbiddenScope.h') - # [OnlyExposedToPrivateScript] - is_only_exposed_to_private_script = 'OnlyExposedToPrivateScript' in extended_attributes # [PerWorldBindings] if 'PerWorldBindings' in extended_attributes: assert idl_type.is_wrapper_type or 'LogActivity' in extended_attributes, '[PerWorldBindings] should only be used with wrapper types: %s.%s' % (interface.name, attribute.name) @@ -131,7 +123,6 @@ 'activity_logging_world_list_for_getter': v8_utilities.activity_logging_world_list(attribute, 'Getter'), # [ActivityLogging] 'activity_logging_world_list_for_setter': v8_utilities.activity_logging_world_list(attribute, 'Setter'), # [ActivityLogging] 'activity_logging_world_check': v8_utilities.activity_logging_world_check(attribute), # [ActivityLogging] - 'argument_cpp_type': idl_type.cpp_type_args(used_as_rvalue_type=True), 'cached_attribute_validation_method': cached_attribute_validation_method, 'constructor_type': constructor_type, 'cpp_name': cpp_name(attribute), @@ -161,7 +152,6 @@ 'is_getter_raises_exception': # [RaisesException] 'RaisesException' in extended_attributes and extended_attributes['RaisesException'] in (None, 'Getter'), - 'is_implemented_in_private_script': is_implemented_in_private_script, 'is_keep_alive_for_gc': keep_alive_for_gc, 'is_lenient_this': 'LenientThis' in extended_attributes, 'is_nullable': idl_type.is_nullable, @@ -185,9 +175,6 @@ 'use_output_parameter_for_result': idl_type.use_output_parameter_for_result, 'measure_as': v8_utilities.measure_as(attribute, interface), # [MeasureAs] 'name': attribute.name, - 'only_exposed_to_private_script': is_only_exposed_to_private_script, - 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( - extended_attributes, 'v8Value', 'cppValue', bailout_return_value='false', isolate='scriptState->isolate()'), 'property_attributes': property_attributes(interface, attribute), 'reflect_empty': extended_attributes.get('ReflectEmpty'), 'reflect_invalid': extended_attributes.get('ReflectInvalid', ''), @@ -196,7 +183,6 @@ 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(attribute), # [RuntimeEnabled] 'runtime_feature_name': v8_utilities.runtime_feature_name(attribute), # [RuntimeEnabled] 'secure_context_test': v8_utilities.secure_context(attribute, interface), # [SecureContext] - 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script), 'cached_accessor_name': '%s%sCachedAccessor' % (interface.name, attribute.name.capitalize()), 'world_suffixes': ( ['', 'ForMainWorld'] @@ -222,8 +208,6 @@ raise Exception('[CrossOrigin] and [PerWorldBindings] are incompatible: %s.%s', interface.name, attribute.name) if context['constructor_type']: raise Exception('[CrossOrigin] cannot be used for constructors: %s.%s', interface.name, attribute.name) - if not context['should_be_exposed_to_script']: - raise Exception('[CrossOrigin] attributes must be exposed to script: %s.%s', interface.name, attribute.name) return context @@ -234,8 +218,7 @@ attribute['secure_context_test'] or attribute['origin_trial_enabled_function'] or attribute['runtime_enabled_function']) and - not attribute['is_data_type_property'] and - attribute['should_be_exposed_to_script']] + not attribute['is_data_type_property']] def is_data_attribute(attribute): @@ -243,8 +226,7 @@ attribute['secure_context_test'] or attribute['origin_trial_enabled_function'] or attribute['runtime_enabled_function']) and - attribute['is_data_type_property'] and - attribute['should_be_exposed_to_script']) + attribute['is_data_type_property']) def is_lazy_data_attribute(attribute): @@ -288,15 +270,7 @@ # exceptions), we need to use a local variable. # FIXME: check if compilers are smart enough to inline this, and if so, # always use a local variable (for readability and CG simplicity). - if 'ImplementedInPrivateScript' in extended_attributes: - if (not idl_type.is_wrapper_type and - not idl_type.is_basic_type and - not idl_type.is_enum): - raise Exception('Private scripts supports only primitive types and DOM wrappers.') - - context['cpp_value_original'] = cpp_value - cpp_value = 'result' - elif (idl_type.is_explicit_nullable or + if (idl_type.is_explicit_nullable or base_idl_type == 'EventHandler' or 'CachedAttribute' in extended_attributes or 'ReflectOnly' in extended_attributes or @@ -326,17 +300,12 @@ this_getter_base_name = getter_base_name(interface, attribute, arguments) getter_name = scoped_name(interface, attribute, this_getter_base_name) - if 'ImplementedInPrivateScript' in attribute.extended_attributes: - arguments.append('toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()))') - arguments.append('impl') - arguments.append('&result') arguments.extend(v8_utilities.call_with_arguments( attribute.extended_attributes.get('CallWith'))) # Members of IDL partial interface definitions are implemented in C++ as # static member functions, which for instance members (non-static members) # take *impl as their first argument if ('PartialInterfaceImplementedAs' in attribute.extended_attributes and - 'ImplementedInPrivateScript' not in attribute.extended_attributes and not attribute.is_static): arguments.append('*impl') if attribute.idl_type.is_explicit_nullable: @@ -364,9 +333,6 @@ def getter_base_name(interface, attribute, arguments): extended_attributes = attribute.extended_attributes - if 'ImplementedInPrivateScript' in extended_attributes: - return '%sAttributeGetter' % uncapitalize(cpp_name(attribute)) - if 'Reflect' not in extended_attributes: return uncapitalize(cpp_name(attribute)) @@ -451,9 +417,6 @@ 'is_setter_call_with_execution_context': has_extended_attribute_value( attribute, 'SetterCallWith', 'ExecutionContext'), 'is_setter_raises_exception': is_setter_raises_exception, - 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( - 'cppValue', isolate='scriptState->isolate()', - creation_context='scriptState->context()->Global()'), 'v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( extended_attributes, 'v8Value', 'cppValue'), }) @@ -475,15 +438,10 @@ # static member functions, which for instance members (non-static members) # take *impl as their first argument if ('PartialInterfaceImplementedAs' in extended_attributes and - 'ImplementedInPrivateScript' not in extended_attributes and not attribute.is_static): arguments.append('*impl') idl_type = attribute.idl_type - if 'ImplementedInPrivateScript' in extended_attributes: - arguments.append('toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()))') - arguments.append('impl') - arguments.append('cppValue') - elif idl_type.base_type == 'EventHandler': + if idl_type.base_type == 'EventHandler': getter_name = scoped_name(interface, attribute, cpp_name(attribute)) context['event_handler_getter_expression'] = '%s(%s)' % ( getter_name, ', '.join(arguments)) @@ -514,9 +472,6 @@ def setter_base_name(interface, attribute, arguments): - if 'ImplementedInPrivateScript' in attribute.extended_attributes: - return '%sAttributeSetter' % uncapitalize(cpp_name(attribute)) - if 'Reflect' not in attribute.extended_attributes: return 'set%s' % capitalize(cpp_name(attribute)) arguments.append(scoped_content_attribute_name(interface, attribute))
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_interface.py b/third_party/WebKit/Source/bindings/scripts/v8_interface.py index 1f7ab537..68e699f 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_interface.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_interface.py
@@ -384,8 +384,6 @@ context.update({ 'has_origin_safe_method_setter': any(method['is_cross_origin'] and not method['is_unforgeable'] for method in methods), - 'has_private_script': (any(attribute['is_implemented_in_private_script'] for attribute in attributes) or - any(method['is_implemented_in_private_script'] for method in methods)), 'iterator_method': iterator_method, 'methods': methods, })
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_methods.py b/third_party/WebKit/Source/bindings/scripts/v8_methods.py index e4f1abf..bb5d2f0f 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_methods.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_methods.py
@@ -80,7 +80,6 @@ def filter_method_configuration(methods, interface_is_partial): return [method for method in methods if method_is_visible(method, interface_is_partial) and - method['should_be_exposed_to_script'] and not method['origin_trial_feature_name'] and not conditionally_exposed(method) and not custom_registration(method)] @@ -90,7 +89,6 @@ """Filters the list of methods, and returns those defined for the named origin trial feature.""" return [method for method in methods if method_is_visible(method, interface_is_partial) and - method['should_be_exposed_to_script'] and method['origin_trial_feature_name'] == feature_name and not conditionally_exposed(method) and not custom_registration(method)] @@ -107,7 +105,6 @@ extended_attributes = method.extended_attributes idl_type = method.idl_type return (has_extended_attribute_value(method, 'CallWith', 'ScriptState') or - 'ImplementedInPrivateScript' in extended_attributes or 'NewObject' in extended_attributes or 'RaisesException' in extended_attributes or idl_type.is_union_type or @@ -126,15 +123,6 @@ this_cpp_value = cpp_value(interface, method, len(arguments)) - is_implemented_in_private_script = 'ImplementedInPrivateScript' in extended_attributes - if is_implemented_in_private_script: - includes.add('bindings/core/v8/PrivateScriptRunner.h') - includes.add('core/frame/LocalFrame.h') - includes.add('platform/ScriptForbiddenScope.h') - - # [OnlyExposedToPrivateScript] - is_only_exposed_to_private_script = 'OnlyExposedToPrivateScript' in extended_attributes - is_call_with_script_arguments = has_extended_attribute_value(method, 'CallWith', 'ScriptArguments') if is_call_with_script_arguments: includes.update(['bindings/core/v8/ScriptCallStack.h', @@ -181,8 +169,6 @@ return { 'activity_logging_world_list': v8_utilities.activity_logging_world_list(method), # [ActivityLogging] 'arguments': argument_contexts, - 'argument_declarations_for_private_script': - argument_declarations_for_private_script(interface, method), 'cpp_type': (v8_types.cpp_template_type('Nullable', idl_type.cpp_type) if idl_type.is_explicit_nullable else idl_type.cpp_type), 'cpp_value': this_cpp_value, @@ -214,7 +200,6 @@ 'is_custom_call_epilogue': is_custom_call_epilogue, 'is_custom_element_callbacks': is_custom_element_callbacks, 'is_explicit_nullable': idl_type.is_explicit_nullable, - 'is_implemented_in_private_script': is_implemented_in_private_script, 'is_new_object': 'NewObject' in extended_attributes, 'is_partial_interface_member': 'PartialInterfaceImplementedAs' in extended_attributes, @@ -236,16 +221,12 @@ 'on_instance': v8_utilities.on_instance(interface, method), 'on_interface': v8_utilities.on_interface(interface, method), 'on_prototype': v8_utilities.on_prototype(interface, method), - 'only_exposed_to_private_script': is_only_exposed_to_private_script, 'origin_trial_enabled_function': v8_utilities.origin_trial_enabled_function_name(method), # [OriginTrialEnabled] 'origin_trial_feature_name': v8_utilities.origin_trial_feature_name(method), # [OriginTrialEnabled] - 'private_script_v8_value_to_local_cpp_value': idl_type.v8_value_to_local_cpp_value( - extended_attributes, 'v8Value', 'cppValue', isolate='scriptState->isolate()', bailout_return_value='false'), 'property_attributes': property_attributes(interface, method), 'returns_promise': method.returns_promise, 'runtime_enabled_function': v8_utilities.runtime_enabled_function_name(method), # [RuntimeEnabled] 'secure_context_test': v8_utilities.secure_context(method, interface), # [SecureContext] - 'should_be_exposed_to_script': not (is_implemented_in_private_script and is_only_exposed_to_private_script), 'use_output_parameter_for_result': idl_type.use_output_parameter_for_result, 'use_local_result': use_local_result(method), 'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value), @@ -268,11 +249,6 @@ not is_legacy_interface_type_checking(interface, method) and idl_type.is_wrapper_type) - if ('ImplementedInPrivateScript' in extended_attributes and - not idl_type.is_wrapper_type and - not idl_type.is_basic_type): - raise Exception('Private scripts supports only primitive types and DOM wrappers.') - set_default_value = argument.set_default_value this_cpp_type = idl_type.cpp_type_args(extended_attributes=extended_attributes, raw_type=True, @@ -306,9 +282,6 @@ 'is_variadic_wrapper_type': is_variadic_wrapper_type, 'is_wrapper_type': idl_type.is_wrapper_type, 'name': argument.name, - 'private_script_cpp_value_to_v8_value': idl_type.cpp_value_to_v8_value( - argument.name, isolate='scriptState->isolate()', - creation_context='scriptState->context()->Global()'), 'use_permissive_dictionary_conversion': 'PermissiveDictionaryConversion' in extended_attributes, 'v8_set_return_value': v8_set_return_value(interface.name, method, this_cpp_value), 'v8_set_return_value_for_main_world': v8_set_return_value(interface.name, method, this_cpp_value, for_main_world=True), @@ -324,16 +297,6 @@ return context -def argument_declarations_for_private_script(interface, method): - argument_declarations = ['LocalFrame* frame'] - argument_declarations.append('%s* holderImpl' % interface.name) - argument_declarations.extend(['%s %s' % (argument.idl_type.cpp_type_args( - used_as_rvalue_type=True), argument.name) for argument in method.arguments]) - if method.idl_type.name != 'void': - argument_declarations.append('%s* %s' % (method.idl_type.cpp_type, 'result')) - return argument_declarations - - ################################################################################ # Value handling ################################################################################ @@ -342,9 +305,6 @@ # Truncate omitted optional arguments arguments = method.arguments[:number_of_arguments] cpp_arguments = [] - if 'ImplementedInPrivateScript' in method.extended_attributes: - cpp_arguments.append('toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext()))') - cpp_arguments.append('impl') if method.is_constructor: call_with_values = interface.extended_attributes.get('ConstructorCallWith') @@ -356,15 +316,11 @@ # static member functions, which for instance members (non-static members) # take *impl as their first argument if ('PartialInterfaceImplementedAs' in method.extended_attributes and - 'ImplementedInPrivateScript' not in method.extended_attributes and not method.is_static): cpp_arguments.append('*impl') cpp_arguments.extend(argument.name for argument in arguments) - if 'ImplementedInPrivateScript' in method.extended_attributes: - if method.idl_type.name != 'void': - cpp_arguments.append('&result') - elif ('RaisesException' in method.extended_attributes or + if ('RaisesException' in method.extended_attributes or (method.is_constructor and has_extended_attribute_value(interface, 'RaisesException', 'Constructor'))): cpp_arguments.append('exceptionState') @@ -379,8 +335,6 @@ base_name = 'create' elif method.name == 'NamedConstructor': base_name = 'createForJSConstructor' - elif 'ImplementedInPrivateScript' in method.extended_attributes: - base_name = '%sMethod' % method.name else: base_name = v8_utilities.cpp_name(method) @@ -395,11 +349,6 @@ # Constructors and void methods don't have a return type return None - if ('ImplementedInPrivateScript' in extended_attributes and - not idl_type.is_wrapper_type and - not idl_type.is_basic_type): - raise Exception('Private scripts supports only primitive types and DOM wrappers.') - # [CallWith=ScriptState], [RaisesException] if use_local_result(method): if idl_type.is_explicit_nullable:
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py index a126e547..f9a85c73 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_types.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -437,8 +437,7 @@ includes_for_type.add('wtf/text/WTFString.h') if base_idl_type in interfaces_info: interface_info = interfaces_info[base_idl_type] - if interface_info['include_path']: - includes_for_type.add(interface_info['include_path']) + includes_for_type.add(interface_info['include_path']) if base_idl_type in INCLUDES_FOR_TYPE: includes_for_type.update(INCLUDES_FOR_TYPE[base_idl_type]) if idl_type.is_typed_array:
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py index a0fe9ae..69e9789 100644 --- a/third_party/WebKit/Source/bindings/scripts/v8_utilities.py +++ b/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
@@ -135,8 +135,6 @@ ################################################################################ def scoped_name(interface, definition, base_name): - if 'ImplementedInPrivateScript' in definition.extended_attributes: - return '%s::PrivateScript::%s' % (v8_class_name(interface), base_name) # partial interfaces are implemented as separate classes, with their members # implemented as static member functions partial_interface_implemented_as = definition.extended_attributes.get('PartialInterfaceImplementedAs')
diff --git a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl index 516f41c..a15b108 100644 --- a/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/attributes.cpp.tmpl
@@ -93,11 +93,7 @@ bool isNull = false; {% endif %} - {% if attribute.is_implemented_in_private_script %} - {{attribute.cpp_type}} result{{attribute.cpp_type_initializer}}; - if (!{{attribute.cpp_value_original}}) - return; - {% elif attribute.cpp_value_original %} + {% if attribute.cpp_value_original %} {{attribute.cpp_type}} {{attribute.cpp_value}}({{attribute.cpp_value_original}}); {% endif %} @@ -199,11 +195,11 @@ const v8::FunctionCallbackInfo<v8::Value>& info {%- endif %}) { {% if attribute.deprecate_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); {% endif %} {% if attribute.measure_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeGetter')}}); {% endif %} {% if world_suffix in attribute.activity_logging_world_list_for_getter %} @@ -244,11 +240,11 @@ {% macro constructor_getter_callback(attribute, world_suffix) %} void {{attribute.name}}ConstructorGetterCallback{{world_suffix}}(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) { {% if attribute.deprecate_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); {% endif %} {% if attribute.measure_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('ConstructorGetter')}}); {% endif %} v8ConstructorAttributeGetter(property, info); @@ -381,11 +377,11 @@ {% endif %} {% if attribute.deprecate_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.deprecate_as}}); {% endif %} {% if attribute.measure_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{attribute.measure_as('AttributeSetter')}}); {% endif %} {% if world_suffix in attribute.activity_logging_world_list_for_setter %} @@ -424,55 +420,6 @@ {##############################################################################} -{% macro attribute_getter_implemented_in_private_script(attribute) %} -bool {{v8_class}}::PrivateScript::{{attribute.name}}AttributeGetter(LocalFrame* frame, {{cpp_class}}* holderImpl, {{attribute.cpp_type}}* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "{{cpp_class}}", "{{attribute.name}}"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "{{cpp_class}}", "{{attribute.name}}", holder); - if (v8Value.IsEmpty()) - return false; - {{v8_value_to_local_cpp_value(attribute.private_script_v8_value_to_local_cpp_value) | indent(2)}} - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} -{% endmacro %} - - -{% macro attribute_setter_implemented_in_private_script(attribute) %} -bool {{v8_class}}::PrivateScript::{{attribute.name}}AttributeSetter(LocalFrame* frame, {{cpp_class}}* holderImpl, {{attribute.argument_cpp_type}} cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "{{cpp_class}}", "{{attribute.name}}"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "{{cpp_class}}", "{{attribute.name}}", holder, {{attribute.private_script_cpp_value_to_v8_value}}); -} -{% endmacro %} - - -{##############################################################################} {% macro attribute_configuration(attribute) %} {% from 'utilities.cpp.tmpl' import property_location %} {% if attribute.constructor_type %} @@ -506,10 +453,6 @@ {% endif %} {% set property_attribute = 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(attribute.property_attributes) %} -{% set only_exposed_to_private_script = - 'V8DOMConfiguration::OnlyExposedToPrivateScript' - if attribute.only_exposed_to_private_script else - 'V8DOMConfiguration::ExposedToAllScripts' %} {% set cached_accessor_callback = '%sV8Internal::%sCachedAccessorCallback' % (cpp_class_or_partial, attribute.name) if attribute.is_cached_accessor else @@ -526,7 +469,6 @@ wrapper_type_info, access_control, property_attribute, - only_exposed_to_private_script, property_location(attribute), holder_check, ] %}
diff --git a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl index d96078d8..3921a26 100644 --- a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
@@ -2,10 +2,10 @@ {% macro constant_getter_callback(constant) %} void {{constant.name}}ConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) { {% if constant.deprecate_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.deprecate_as}}); {% endif %} {% if constant.measure_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{constant.measure_as('ConstantGetter')}}); {% endif %} {% if constant.idl_type in ('Double', 'Float') %} v8SetReturnValue(info, {{constant.value}});
diff --git a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl index 9686ba6..05dfe6b 100644 --- a/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/dictionary_v8.cpp.tmpl
@@ -63,7 +63,7 @@ {% endif %} } else { {% if member.deprecate_as %} - Deprecation::countDeprecationIfNotPrivateScript(isolate, currentExecutionContext(isolate), UseCounter::{{member.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(isolate), UseCounter::{{member.deprecate_as}}); {% endif %} {{v8_value_to_local_cpp_value(member) | indent}} {% if member.is_interface_type %}
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl index 7e5b196..65454be 100644 --- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
@@ -633,7 +633,7 @@ {% if constructors or has_custom_constructor or has_event_constructor or has_html_constructor %} void {{v8_class}}::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { {% if measure_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{measure_as('Constructor')}}); {% endif %} if (!info.IsConstructCall()) { V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::constructorNotCallableAsFunction("{{interface_name}}")); @@ -681,10 +681,9 @@ {% set property_attribute = 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_attributes or ['v8::None']) %} -{% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivateScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::ExposedToAllScripts' %} {% set holder_check = 'V8DOMConfiguration::CheckHolder' %} const V8DOMConfiguration::AttributeConfiguration {{method.name}}OriginSafeAttributeConfiguration = { - "{{method.name}}", {{getter_callback}}, {{setter_callback}}, {{getter_callback_for_main_world}}, {{setter_callback_for_main_world}}, nullptr, &{{v8_class}}::wrapperTypeInfo, v8::DEFAULT, {{property_attribute}}, {{only_exposed_to_private_script}}, {{property_location(method)}}, {{holder_check}}, + "{{method.name}}", {{getter_callback}}, {{setter_callback}}, {{getter_callback_for_main_world}}, {{setter_callback_for_main_world}}, nullptr, &{{v8_class}}::wrapperTypeInfo, v8::DEFAULT, {{property_attribute}}, {{property_location(method)}}, {{holder_check}} }; V8DOMConfiguration::installAttribute(isolate, world, {{instance_template}}, {{prototype_template}}, {{method.name}}OriginSafeAttributeConfiguration); {%- endmacro %}
diff --git a/third_party/WebKit/Source/bindings/templates/interface.h.tmpl b/third_party/WebKit/Source/bindings/templates/interface.h.tmpl index e852554..29acbc3 100644 --- a/third_party/WebKit/Source/bindings/templates/interface.h.tmpl +++ b/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
@@ -28,22 +28,6 @@ class {{v8_class}} { STATIC_ONLY({{v8_class}}); public: - {% if has_private_script %} - class PrivateScript { - STATIC_ONLY(PrivateScript); - public: - {% for method in methods if method.is_implemented_in_private_script %} - static bool {{method.name}}Method({{method.argument_declarations_for_private_script | join(', ')}}); - {% endfor %} - {% for attribute in attributes if attribute.is_implemented_in_private_script %} - static bool {{attribute.name}}AttributeGetter(LocalFrame* frame, {{cpp_class}}* holderImpl, {{attribute.cpp_type}}* result); - {% if not attribute.is_read_only %} - static bool {{attribute.name}}AttributeSetter(LocalFrame* frame, {{cpp_class}}* holderImpl, {{attribute.argument_cpp_type}} cppValue); - {% endif %} - {% endfor %} - }; - - {% endif %} {% if is_array_buffer_or_view %} {{exported}}static {{cpp_class}}* toImpl(v8::Local<v8::Object> object); {% else %}
diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl index ce55c9f..e86617df 100644 --- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
@@ -96,10 +96,8 @@ attribute_getter, attribute_getter_callback, attribute_setter, attribute_setter_callback, attribute_cache_property_callback, - attribute_getter_implemented_in_private_script, - attribute_setter_implemented_in_private_script with context %} -{% for attribute in attributes if attribute.should_be_exposed_to_script %} +{% for attribute in attributes %} {% if attribute.is_cached_accessor %} {{attribute_cache_property_callback(attribute)}} {% endif %} @@ -124,10 +122,10 @@ {# Methods #} {% from 'methods.cpp.tmpl' import generate_method, overload_resolution_method, method_callback, origin_safe_method_getter, generate_constructor, - method_implemented_in_private_script, generate_post_message_impl, - runtime_determined_length_method, runtime_determined_maxarg_method + generate_post_message_impl, runtime_determined_length_method, + runtime_determined_maxarg_method with context %} -{% for method in methods if method.should_be_exposed_to_script %} +{% for method in methods %} {% for world_suffix in method.world_suffixes %} {% if not method.is_custom and not method.is_post_message and method.visible %} {{generate_method(method, world_suffix)}} @@ -488,7 +486,7 @@ {% filter exposed(iterator_method.exposed_test) %} {% filter runtime_enabled(iterator_method.runtime_enabled_function) %} // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, {{cpp_class_or_partial}}V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); {% endfilter %} {% endfilter %} @@ -590,15 +588,6 @@ {##############################################################################} {% block prepare_prototype_and_interface_object %}{% endblock %} {##############################################################################} -{% for method in methods if method.is_implemented_in_private_script and method.visible %} -{{method_implemented_in_private_script(method)}} -{% endfor %} -{% for attribute in attributes if attribute.is_implemented_in_private_script %} -{{attribute_getter_implemented_in_private_script(attribute)}} -{% if attribute.has_setter %} -{{attribute_setter_implemented_in_private_script(attribute)}} -{% endif %} -{% endfor %} {% block partial_interface %}{% endblock %} } // namespace blink
diff --git a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl index 31b83ab1..d930496a 100644 --- a/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl +++ b/third_party/WebKit/Source/bindings/templates/methods.cpp.tmpl
@@ -258,10 +258,6 @@ {# Call #} {% if method.idl_type == 'void' %} {{cpp_value}}; -{% elif method.is_implemented_in_private_script %} -{{method.cpp_type}} result{{method.cpp_type_initializer}}; -if (!{{method.cpp_value}}) - return; {% elif method.use_output_parameter_for_result %} {{method.cpp_type}} result; {{cpp_value}}; @@ -353,10 +349,10 @@ {% set fall_through_to_partial_overloads = not is_partial and overloads.has_partial_overloads %} {% if overloads.measure_all_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.measure_all_as}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.measure_all_as}}); {% endif %} {% if overloads.deprecate_all_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.deprecate_all_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{overloads.deprecate_all_as}}); {% endif %} {# First resolve by length #} @@ -376,10 +372,10 @@ method.runtime_enabled_function) %} if ({{test}}) { {% if method.measure_as and not overloads.measure_all_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); {% endif %} {% if method.deprecate_as and not overloads.deprecate_all_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); {% endif %} {{method.name}}{{method.overload_index}}Method{{world_suffix}}(info); return; @@ -491,10 +487,10 @@ void {{method.name}}MethodCallback{{world_suffix}}(const v8::FunctionCallbackInfo<v8::Value>& info) { {% if not method.overloads %}{# Overloaded methods are measured in overload_resolution_method() #} {% if method.measure_as %} - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.measure_as('Method')}}); {% endif %} {% if method.deprecate_as %} - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::{{method.deprecate_as}}); {% endif %} {% endif %}{# not method.overloads #} {% if world_suffix in method.activity_logging_world_list %} @@ -558,45 +554,6 @@ {##############################################################################} -{% macro method_implemented_in_private_script(method) %} -bool {{v8_class}}::PrivateScript::{{method.name}}Method({{method.argument_declarations_for_private_script | join(', ')}}) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - {% for argument in method.arguments %} - v8::Local<v8::Value> {{argument.handle}} = {{argument.private_script_cpp_value_to_v8_value}}; - {% endfor %} - {% if method.arguments %} - v8::Local<v8::Value> argv[] = { {{method.arguments | join(', ', 'handle')}} }; - {% else %} - {# Empty array initializers are illegal, and don\t compile in MSVC. #} - v8::Local<v8::Value> *argv = 0; - {% endif %} - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "{{cpp_class}}", "{{method.name}}"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "{{cpp_class}}", "{{method.name}}", holder, {{method.arguments | length}}, argv); - if (v8Value.IsEmpty()) - return false; - {% if method.idl_type != 'void' %} - {{v8_value_to_local_cpp_value(method.private_script_v8_value_to_local_cpp_value) | indent(2)}} - *result = cppValue; - {% endif %} - CHECK(!exceptionState.hadException()); - return true; -} -{% endmacro %} - - -{##############################################################################} {% macro generate_constructor(constructor) %} {% set name = '%sConstructorCallback' % v8_class if constructor.is_named_constructor else @@ -650,10 +607,9 @@ {% set property_attribute = 'static_cast<v8::PropertyAttribute>(%s)' % ' | '.join(method.property_attributes) if method.property_attributes else 'v8::None' %} -{% set only_exposed_to_private_script = 'V8DOMConfiguration::OnlyExposedToPrivateScript' if method.only_exposed_to_private_script else 'V8DOMConfiguration::ExposedToAllScripts' %} {% set holder_check = 'V8DOMConfiguration::DoNotCheckHolder' if method.returns_promise else 'V8DOMConfiguration::CheckHolder' %} -{"{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{method.length}}, {{property_attribute}}, {{only_exposed_to_private_script}}, {{property_location(method)}}, {{holder_check}}} +{"{{method.name}}", {{method_callback}}, {{method_callback_for_main_world}}, {{method.length}}, {{property_attribute}}, {{property_location(method)}}, {{holder_check}}} {%- endmacro %}
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl index e9a8981..2852638 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterface3.idl
@@ -35,7 +35,6 @@ [ Custom=VisitDOMWrapper, // Conflict with [SetWrapperReferenceTo] and [SetWrapperReferenceFrom] - NoImplHeader, WebModuleAPI, ] interface TestInterface3 { [Custom] getter boolean (unsigned long index);
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl index b54bd4d..6ed38cd 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestInterfacePartial.idl
@@ -53,7 +53,4 @@ attribute PartialEnumType partialPartialEnumTypeAttribute; void partialVoidMethodPartialCallbackTypeArg(PartialCallbackType partialCallbackTypeArg); - - [ImplementedInPrivateScript] short shortMethodWithShortArgumentImplementedInPrivateScript(short value); - [ImplementedInPrivateScript] attribute DOMString stringAttribute; };
diff --git a/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl b/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl index ec6610b..1449a229 100644 --- a/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl +++ b/third_party/WebKit/Source/bindings/tests/idls/core/TestObject.idl
@@ -544,22 +544,5 @@ attribute TestInterfaceGarbageCollected testInterfaceGarbageCollectedAttribute; // [GarbageCollected] attribute TestInterfaceGarbageCollected? testInterfaceGarbageCollectedOrNullAttribute; // [GarbageCollected] - // Private scripts - [ImplementedInPrivateScript] void voidMethodImplementedInPrivateScript(); - [ImplementedInPrivateScript] short shortMethodImplementedInPrivateScript(); - [ImplementedInPrivateScript] short shortMethodWithShortArgumentImplementedInPrivateScript(short value); - [ImplementedInPrivateScript] DOMString stringMethodWithStringArgumentImplementedInPrivateScript(DOMString value); - [ImplementedInPrivateScript] Node nodeMethodWithNodeArgumentImplementedInPrivateScript(Node value); - [ImplementedInPrivateScript] Node nodeMethodWithVariousArgumentsImplementedInPrivateScript(Document document, Node node, short value1, double value2, DOMString string); - [ImplementedInPrivateScript] readonly attribute short readonlyShortAttribute; - [ImplementedInPrivateScript] attribute short shortAttribute; - [ImplementedInPrivateScript] attribute DOMString stringAttribute; - [ImplementedInPrivateScript] attribute Node nodeAttribute; - [OnlyExposedToPrivateScript] short methodImplementedInCPPForPrivateScriptOnly(short value1, short value2); - [OnlyExposedToPrivateScript] attribute DOMString attributeImplementedInCPPForPrivateScriptOnly; - [ImplementedInPrivateScript, OnlyExposedToPrivateScript] short methodForPrivateScriptOnly(short value1, short value2); - [ImplementedInPrivateScript, OnlyExposedToPrivateScript] attribute DOMString attributeForPrivateScriptOnly; - [ImplementedInPrivateScript] attribute TestEnum enumForPrivateScript; - maplike<long, DOMStringOrDouble>; };
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp index 11ad062..527f843 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
@@ -89,7 +89,7 @@ } // namespace SVGTestInterfaceV8Internal const V8DOMConfiguration::AccessorConfiguration V8SVGTestInterfaceAccessors[] = { - {"type", SVGTestInterfaceV8Internal::typeAttributeGetterCallback, SVGTestInterfaceV8Internal::typeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"type", SVGTestInterfaceV8Internal::typeAttributeGetterCallback, SVGTestInterfaceV8Internal::typeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8SVGTestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp index 7843e05b..a73c799b 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
@@ -276,20 +276,20 @@ } // namespace TestCallbackFunctionsV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestCallbackFunctionsAccessors[] = { - {"voidCallbackFunctionAttribute", TestCallbackFunctionsV8Internal::voidCallbackFunctionAttributeAttributeGetterCallback, TestCallbackFunctionsV8Internal::voidCallbackFunctionAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"anyCallbackFunctionOptionalAnyArgAttribute", TestCallbackFunctionsV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestCallbackFunctionsV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customElementsCallbacksReadonlyAttribute", TestCallbackFunctionsV8Internal::customElementsCallbacksReadonlyAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidCallbackFunctionAttribute", TestCallbackFunctionsV8Internal::voidCallbackFunctionAttributeAttributeGetterCallback, TestCallbackFunctionsV8Internal::voidCallbackFunctionAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"anyCallbackFunctionOptionalAnyArgAttribute", TestCallbackFunctionsV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeGetterCallback, TestCallbackFunctionsV8Internal::anyCallbackFunctionOptionalAnyArgAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customElementsCallbacksReadonlyAttribute", TestCallbackFunctionsV8Internal::customElementsCallbacksReadonlyAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestCallbackFunctionsMethods[] = { - {"returnCallbackFunctionMethod", TestCallbackFunctionsV8Internal::returnCallbackFunctionMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"returnCallbackFunctionMethod2", TestCallbackFunctionsV8Internal::returnCallbackFunctionMethod2MethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodCallbackFunctionInArg", TestCallbackFunctionsV8Internal::voidMethodCallbackFunctionInArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodCallbackFunctionInArg2", TestCallbackFunctionsV8Internal::voidMethodCallbackFunctionInArg2MethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodCallbackFunctionWithReturnValueInArg", TestCallbackFunctionsV8Internal::voidMethodCallbackFunctionWithReturnValueInArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOptionalCallbackFunctionInArg", TestCallbackFunctionsV8Internal::voidMethodOptionalCallbackFunctionInArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodNullableCallbackFunctionInArg", TestCallbackFunctionsV8Internal::voidMethodNullableCallbackFunctionInArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customElementCallbacksMethod", TestCallbackFunctionsV8Internal::customElementCallbacksMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"returnCallbackFunctionMethod", TestCallbackFunctionsV8Internal::returnCallbackFunctionMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"returnCallbackFunctionMethod2", TestCallbackFunctionsV8Internal::returnCallbackFunctionMethod2MethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodCallbackFunctionInArg", TestCallbackFunctionsV8Internal::voidMethodCallbackFunctionInArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodCallbackFunctionInArg2", TestCallbackFunctionsV8Internal::voidMethodCallbackFunctionInArg2MethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodCallbackFunctionWithReturnValueInArg", TestCallbackFunctionsV8Internal::voidMethodCallbackFunctionWithReturnValueInArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOptionalCallbackFunctionInArg", TestCallbackFunctionsV8Internal::voidMethodOptionalCallbackFunctionInArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodNullableCallbackFunctionInArg", TestCallbackFunctionsV8Internal::voidMethodNullableCallbackFunctionInArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customElementCallbacksMethod", TestCallbackFunctionsV8Internal::customElementCallbacksMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestCallbackFunctionsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp index eb7dded..4fe897d 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
@@ -55,12 +55,12 @@ namespace TestConstantsV8Internal { void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::Constant); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::Constant); v8SetReturnValueInt(info, 1); } void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::Constant); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::Constant); v8SetReturnValueInt(info, 1); }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp index 9150267b..769593e 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestDictionary.cpp
@@ -91,7 +91,7 @@ if (deprecatedCreateMemberValue.IsEmpty() || deprecatedCreateMemberValue->IsUndefined()) { // Do nothing. } else { - Deprecation::countDeprecationIfNotPrivateScript(isolate, currentExecutionContext(isolate), UseCounter::CreateMember); + Deprecation::countDeprecation(currentExecutionContext(isolate), UseCounter::CreateMember); bool deprecatedCreateMember = toBoolean(isolate, deprecatedCreateMemberValue, exceptionState); if (exceptionState.hadException()) return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp index 0a5a846..a0d6bee9 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
@@ -106,12 +106,12 @@ } // namespace TestExceptionV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestExceptionAccessors[] = { - {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsignedShortAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyStringAttribute", TestExceptionV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyUnsignedShortAttribute", TestExceptionV8Internal::readonlyUnsignedShortAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyStringAttribute", TestExceptionV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestExceptionMethods[] = { - {"toString", TestExceptionV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toString", TestExceptionV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestException::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp index 45397c8..858cc956 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
@@ -157,11 +157,11 @@ } // namespace TestIntegerIndexedV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedAccessors[] = { - {"length", TestIntegerIndexedV8Internal::lengthAttributeGetterCallback, TestIntegerIndexedV8Internal::lengthAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"length", TestIntegerIndexedV8Internal::lengthAttributeGetterCallback, TestIntegerIndexedV8Internal::lengthAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestIntegerIndexedMethods[] = { - {"voidMethodDocument", TestIntegerIndexedV8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDocument", TestIntegerIndexedV8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestIntegerIndexedTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp index 6e96774..66b21ca 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
@@ -157,11 +157,11 @@ } // namespace TestIntegerIndexedGlobalV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedGlobalAccessors[] = { - {"length", TestIntegerIndexedGlobalV8Internal::lengthAttributeGetterCallback, TestIntegerIndexedGlobalV8Internal::lengthAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"length", TestIntegerIndexedGlobalV8Internal::lengthAttributeGetterCallback, TestIntegerIndexedGlobalV8Internal::lengthAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestIntegerIndexedGlobalMethods[] = { - {"voidMethodDocument", TestIntegerIndexedGlobalV8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"voidMethodDocument", TestIntegerIndexedGlobalV8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; static void installV8TestIntegerIndexedGlobalTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp index 7a304dfe..b5061959 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
@@ -157,11 +157,11 @@ } // namespace TestIntegerIndexedPrimaryGlobalV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestIntegerIndexedPrimaryGlobalAccessors[] = { - {"length", TestIntegerIndexedPrimaryGlobalV8Internal::lengthAttributeGetterCallback, TestIntegerIndexedPrimaryGlobalV8Internal::lengthAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"length", TestIntegerIndexedPrimaryGlobalV8Internal::lengthAttributeGetterCallback, TestIntegerIndexedPrimaryGlobalV8Internal::lengthAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestIntegerIndexedPrimaryGlobalMethods[] = { - {"voidMethodDocument", TestIntegerIndexedPrimaryGlobalV8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"voidMethodDocument", TestIntegerIndexedPrimaryGlobalV8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; static void installV8TestIntegerIndexedPrimaryGlobalTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp index 470ab64f..3681f32 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -10,7 +10,6 @@ #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/GeneratedCodeHelper.h" -#include "bindings/core/v8/PrivateScriptRunner.h" #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/ScriptValue.h" @@ -31,11 +30,9 @@ #include "bindings/tests/idls/core/TestInterfacePartial2Implementation.h" #include "bindings/tests/idls/core/TestInterfacePartialSecureContext.h" #include "core/dom/Document.h" -#include "core/frame/LocalFrame.h" #include "core/frame/UseCounter.h" #include "core/inspector/ConsoleMessage.h" #include "platform/RuntimeEnabledFeatures.h" -#include "platform/ScriptForbiddenScope.h" #include "wtf/GetPtr.h" #include "wtf/RefPtr.h" @@ -87,7 +84,7 @@ } void testInterfaceAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeGetter); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeGetter); TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetter(info); } @@ -113,7 +110,7 @@ void testInterfaceAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeSetter); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestInterface_TestInterfaceAttribute_AttributeSetter); TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetter(v8Value, info); } @@ -1254,40 +1251,6 @@ TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetter(v8Value, info); } -static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); - - String result; - if (!V8TestInterface::PrivateScript::stringAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - - v8SetReturnValueString(info, result, info.GetIsolate()); -} - -void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestInterfaceImplementationV8Internal::stringAttributeAttributeGetter(info); -} - -static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - TestInterfaceImplementation* impl = V8TestInterface::toImpl(holder); - - // Prepare the value to be set. - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return; - - V8TestInterface::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); -} - -void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Value> v8Value = info[0]; - - TestInterfaceImplementationV8Internal::stringAttributeAttributeSetter(v8Value, info); -} - static void partial2LongAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Object> holder = info.Holder(); @@ -2206,31 +2169,6 @@ TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethod(info); } -static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestInterface", "shortMethodWithShortArgumentImplementedInPrivateScript"); - - TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); - - if (UNLIKELY(info.Length() < 1)) { - exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); - return; - } - - int value; - value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); - if (exceptionState.hadException()) - return; - - int result = 0; - if (!V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) - return; - v8SetReturnValueInt(info, result); -} - -void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(info); -} - static void partial2VoidMethod1Method(const v8::FunctionCallbackInfo<v8::Value>& info) { TestInterfaceImplementation* impl = V8TestInterface::toImpl(info.Holder()); @@ -2642,65 +2580,65 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceLazyDataAttributes[] = { - {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"TestInterface", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"TestInterface2", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface2::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"TestInterface", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"TestInterface2", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface2::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop #endif const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceAccessors[] = { - {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testEnumAttribute", TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringOrDoubleAttribute", TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"staticStringAttribute", TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"staticReturnDOMWrapperAttribute", TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"staticReadOnlyStringAttribute", TestInterfaceImplementationV8Internal::staticReadOnlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"staticReadOnlyReturnDOMWrapperAttribute", TestInterfaceImplementationV8Internal::staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingAttribute", TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"lenientThisAttribute", TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, - {"implementsStaticReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"implementsStaticStringAttribute", TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsStringAttribute", TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implements3StaticStringAttribute", TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"testInterfaceAttribute", TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleAttribute", TestInterfaceImplementationV8Internal::doubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"floatAttribute", TestInterfaceImplementationV8Internal::floatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::floatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedDoubleAttribute", TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedFloatAttribute", TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testEnumAttribute", TestInterfaceImplementationV8Internal::testEnumAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringOrDoubleAttribute", TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringOrDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"staticStringAttribute", TestInterfaceImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"staticReturnDOMWrapperAttribute", TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::staticReturnDOMWrapperAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"staticReadOnlyStringAttribute", TestInterfaceImplementationV8Internal::staticReadOnlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"staticReadOnlyReturnDOMWrapperAttribute", TestInterfaceImplementationV8Internal::staticReadOnlyReturnDOMWrapperAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingAttribute", TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"alwaysExposedAttribute", TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::alwaysExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"lenientThisAttribute", TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::lenientThisAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, + {"implementsStaticReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::implementsStaticReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"implementsStaticStringAttribute", TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStaticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"implementsReadonlyStringAttribute", TestInterfaceImplementationV8Internal::implementsReadonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsStringAttribute", TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsNodeAttribute", TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsNodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsEventHandlerAttribute", TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsEventHandlerAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implements3StringAttribute", TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements3StringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implements3StaticStringAttribute", TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements3StaticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"partial2LongAttribute", TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2LongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"partial2StaticLongAttribute", TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2StaticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { - {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestEnumArg", TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallback, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"staticReturnDOMWrapperMethod", TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingMethod", TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implementsComplexMethodMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implementsCustomVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implements3StaticVoidMethod", TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"voidMethodPartialOverload", TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"staticVoidMethodPartialOverload", TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"promiseMethodPartialOverload", TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, - {"staticPromiseMethodPartialOverload", TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::DoNotCheckHolder}, - {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"toJSON", TestInterfaceImplementationV8Internal::toJSONMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"toString", TestInterfaceImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyArg", TestInterfaceImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleArgFloatArg", TestInterfaceImplementationV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterfaceImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestEnumArg", TestInterfaceImplementationV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethod", TestInterfaceImplementationV8Internal::voidMethodMethodCallback, TestInterfaceImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"alwaysExposedMethod", TestInterfaceImplementationV8Internal::alwaysExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"alwaysExposedStaticMethod", TestInterfaceImplementationV8Internal::alwaysExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"staticReturnDOMWrapperMethod", TestInterfaceImplementationV8Internal::staticReturnDOMWrapperMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingMethod", TestInterfaceImplementationV8Internal::legacyInterfaceTypeCheckingMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsVoidMethod", TestInterfaceImplementationV8Internal::implementsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsComplexMethod", TestInterfaceImplementationV8Internal::implementsComplexMethodMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsCustomVoidMethod", TestInterfaceImplementationV8Internal::implementsCustomVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementsStaticVoidMethod", TestInterfaceImplementationV8Internal::implementsStaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"implements3VoidMethod", TestInterfaceImplementationV8Internal::implements3VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implements3StaticVoidMethod", TestInterfaceImplementationV8Internal::implements3StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"voidMethodPartialOverload", TestInterfaceImplementationV8Internal::voidMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"staticVoidMethodPartialOverload", TestInterfaceImplementationV8Internal::staticVoidMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"promiseMethodPartialOverload", TestInterfaceImplementationV8Internal::promiseMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, + {"staticPromiseMethodPartialOverload", TestInterfaceImplementationV8Internal::staticPromiseMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::DoNotCheckHolder}, + {"partial2VoidMethod", TestInterfaceImplementationV8Internal::partial2VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"partial2StaticVoidMethod", TestInterfaceImplementationV8Internal::partial2StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"toJSON", TestInterfaceImplementationV8Internal::toJSONMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toString", TestInterfaceImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -2735,34 +2673,32 @@ } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyLongAttributeConfiguration = {"conditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyLongAttributeConfiguration = {"conditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalReadOnlyLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalReadOnlyLongAttributeConfiguration = {"staticConditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalReadOnlyLongAttributeConfiguration = {"staticConditionalReadOnlyLongAttribute", TestInterfaceImplementationV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstaticConditionalReadOnlyLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttributeConfiguration = {"conditionalLongAttribute", TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttributeConfiguration = {"conditionalLongAttribute", TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalLongAttributeConfiguration); } if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorimplements2StaticStringAttributeConfiguration = {"implements2StaticStringAttribute", TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorimplements2StaticStringAttributeConfiguration = {"implements2StaticStringAttribute", TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StaticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplements2StaticStringAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorimplements2StringAttributeConfiguration = {"implements2StringAttribute", TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorimplements2StringAttributeConfiguration = {"implements2StringAttribute", TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implements2StringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplements2StringAttributeConfiguration); } if (RuntimeEnabledFeatures::implementsFeatureNameEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorimplementsRuntimeEnabledNodeAttributeConfiguration = {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorimplementsRuntimeEnabledNodeAttributeConfiguration = {"implementsRuntimeEnabledNodeAttribute", TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorimplementsRuntimeEnabledNodeAttributeConfiguration); } if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorpartialPartialEnumTypeAttributeConfiguration = {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; - V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialPartialEnumTypeAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorpartialCallWithExecutionContextLongAttributeConfiguration = {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorpartialCallWithExecutionContextLongAttributeConfiguration = {"partialCallWithExecutionContextLongAttribute", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialCallWithExecutionContextLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialCallWithExecutionContextLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorpartialLongAttributeConfiguration = {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorpartialLongAttributeConfiguration = {"partialLongAttribute", TestInterfaceImplementationV8Internal::partialLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorpartialStaticLongAttributeConfiguration = {"partialStaticLongAttribute", TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorpartialPartialEnumTypeAttributeConfiguration = {"partialPartialEnumTypeAttribute", TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialPartialEnumTypeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialPartialEnumTypeAttributeConfiguration); + const V8DOMConfiguration::AccessorConfiguration accessorpartialStaticLongAttributeConfiguration = {"partialStaticLongAttribute", TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialStaticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorpartialStaticLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorstringAttributeConfiguration = {"stringAttribute", TestInterfaceImplementationV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::stringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; - V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstringAttributeConfiguration); } // Indexed properties @@ -2773,39 +2709,35 @@ instanceTemplate->SetHandler(namedPropertyHandlerConfig); // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom); if (RuntimeEnabledFeatures::implements2FeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodConfiguration = {"implements2VoidMethod", TestInterfaceImplementationV8Internal::implements2VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodConfiguration = {"implements2VoidMethod", TestInterfaceImplementationV8Internal::implements2VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, implements2VoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialVoidMethodMethodConfiguration = {"partialVoidMethod", TestInterfaceImplementationV8Internal::partialVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialVoidMethodMethodConfiguration = {"partialVoidMethod", TestInterfaceImplementationV8Internal::partialVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialStaticVoidMethodMethodConfiguration = {"partialStaticVoidMethod", TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialStaticVoidMethodMethodConfiguration = {"partialStaticVoidMethod", TestInterfaceImplementationV8Internal::partialStaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialStaticVoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialVoidMethodLongArgMethodConfiguration = {"partialVoidMethodLongArg", TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialVoidMethodLongArgMethodConfiguration = {"partialVoidMethodLongArg", TestInterfaceImplementationV8Internal::partialVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodLongArgMethodConfiguration); } if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration = {"partialCallWithExecutionContextRaisesExceptionVoidMethod", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration = {"partialCallWithExecutionContextRaisesExceptionVoidMethod", TestInterfaceImplementationV8Internal::partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialVoidMethodPartialCallbackTypeArgMethodConfiguration = {"partialVoidMethodPartialCallbackTypeArg", TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialVoidMethodPartialCallbackTypeArgMethodConfiguration = {"partialVoidMethodPartialCallbackTypeArg", TestInterfaceImplementationV8Internal::partialVoidMethodPartialCallbackTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partialVoidMethodPartialCallbackTypeArgMethodConfiguration); } - if (RuntimeEnabledFeatures::partialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration = {"shortMethodWithShortArgumentImplementedInPrivateScript", TestInterfaceImplementationV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; - V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, shortMethodWithShortArgumentImplementedInPrivateScriptMethodConfiguration); - } } v8::Local<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) { @@ -2829,39 +2761,39 @@ ExecutionContext* executionContext = toExecutionContext(context); v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceImplementationV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceImplementationV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isDocument())) { if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isWorkerGlobalScope())) { if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isDocument())) { if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } @@ -2869,41 +2801,41 @@ if (executionContext && (executionContext->isWorkerGlobalScope())) { if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } } if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partial2SecureContextAttribute", TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partial2SecureContextAttribute", TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partial2SecureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextAttribute", TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextAttribute", TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isDocument())) { if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isWorkerGlobalScope())) { if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isDocument())) { if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } @@ -2911,7 +2843,7 @@ if (executionContext && (executionContext->isWorkerGlobalScope())) { if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } @@ -2920,65 +2852,65 @@ ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext()); DCHECK(executionContext); if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration = {"workerExposedMethod", TestInterfaceImplementationV8Internal::workerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration = {"workerExposedMethod", TestInterfaceImplementationV8Internal::workerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfiguration); } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfiguration = {"windowExposedMethod", TestInterfaceImplementationV8Internal::windowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfiguration = {"windowExposedMethod", TestInterfaceImplementationV8Internal::windowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfiguration); } if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = {"workerExposedStaticMethod", TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = {"workerExposedStaticMethod", TestInterfaceImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodConfiguration); } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = {"windowExposedStaticMethod", TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = {"windowExposedStaticMethod", TestInterfaceImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfiguration); } if (executionContext && (executionContext->isDocument())) { if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration methodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"methodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration methodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"methodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::methodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodWithExposedAndRuntimeEnabledFlagMethodConfiguration); } } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"overloadMethodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration = {"overloadMethodWithExposedAndRuntimeEnabledFlag", TestInterfaceImplementationV8Internal::overloadMethodWithExposedAndRuntimeEnabledFlagMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, overloadMethodWithExposedAndRuntimeEnabledFlagMethodConfiguration); } if (executionContext && ((executionContext->isDocument() && RuntimeEnabledFeatures::featureNameEnabled()) || (executionContext->isWorkerGlobalScope() && RuntimeEnabledFeatures::featureName2Enabled()))) { - const V8DOMConfiguration::MethodConfiguration methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration = {"methodWithExposedHavingRuntimeEnabldFlag", TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration = {"methodWithExposedHavingRuntimeEnabldFlag", TestInterfaceImplementationV8Internal::methodWithExposedHavingRuntimeEnabldFlagMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, methodWithExposedHavingRuntimeEnabldFlagMethodConfiguration); } if (executionContext && (executionContext->isDocument() || executionContext->isServiceWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterfaceImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMethodConfiguration); } if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceImplementationV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceImplementationV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextMethodMethodConfiguration); } if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isDocument())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration); } } @@ -2986,41 +2918,41 @@ if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isWorkerGlobalScope())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration); } } } if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::MethodConfiguration partial2SecureContextMethodMethodConfiguration = {"partial2SecureContextMethod", TestInterfaceImplementationV8Internal::partial2SecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partial2SecureContextMethodMethodConfiguration = {"partial2SecureContextMethod", TestInterfaceImplementationV8Internal::partial2SecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partial2SecureContextMethodMethodConfiguration); } if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::MethodConfiguration partialSecureContextMethodMethodConfiguration = {"partialSecureContextMethod", TestInterfaceImplementationV8Internal::partialSecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialSecureContextMethodMethodConfiguration = {"partialSecureContextMethod", TestInterfaceImplementationV8Internal::partialSecureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextMethodMethodConfiguration); } if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialSecureContextRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialSecureContextRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextRuntimeEnabledMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedMethodMethodConfiguration = {"partialSecureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedMethodMethodConfiguration = {"partialSecureContextWindowExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWindowExposedMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedMethodMethodConfiguration = {"partialSecureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedMethodMethodConfiguration = {"partialSecureContextWorkerExposedMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWorkerExposedMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isDocument())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWindowExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWindowExposedRuntimeEnabledMethodMethodConfiguration); } } @@ -3028,85 +2960,13 @@ if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isWorkerGlobalScope())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"partialSecureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceImplementationV8Internal::partialSecureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, partialSecureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration); } } } } -bool V8TestInterface::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); - v8::Local<v8::Value> argv[] = { valueHandle }; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, argv); - if (v8Value.IsEmpty()) - return false; - int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return false; - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestInterface::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestInterfaceImplementation", "stringAttribute"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttribute", holder); - if (v8Value.IsEmpty()) - return false; - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return false; - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestInterface::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "TestInterfaceImplementation", "stringAttribute"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestInterfaceImplementation", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue)); -} - InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction = (InstallTemplateFunction)&V8TestInterface::installV8TestInterfaceTemplate; void V8TestInterface::updateWrapperTypeInfo(InstallTemplateFunction installTemplateFunction, PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h index 4c17f1a5..32216296 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h
@@ -25,14 +25,6 @@ class V8TestInterface { STATIC_ONLY(V8TestInterface); public: - class PrivateScript { - STATIC_ONLY(PrivateScript); - public: - static bool shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestInterface* holderImpl, int value, int* result); - static bool stringAttributeAttributeGetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String* result); - static bool stringAttributeAttributeSetter(LocalFrame* frame, TestInterfaceImplementation* holderImpl, String cppValue); - }; - CORE_EXPORT static bool hasInstance(v8::Local<v8::Value>, v8::Isolate*); static v8::Local<v8::Object> findInstanceInPrototypeChain(v8::Local<v8::Value>, v8::Isolate*); CORE_EXPORT static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWrapperWorld&);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp index 190b4da1..6ad434f 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -590,20 +590,20 @@ } const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { - {"legacyCaller", TestInterface2V8Internal::legacyCallerMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"has", TestInterface2V8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"legacyCaller", TestInterface2V8Internal::legacyCallerMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"item", TestInterface2V8Internal::itemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"setItem", TestInterface2V8Internal::setItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deleteItem", TestInterface2V8Internal::deleteItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"namedItem", TestInterface2V8Internal::namedItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"setNamedItem", TestInterface2V8Internal::setNamedItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deleteNamedItem", TestInterface2V8Internal::deleteNamedItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringifierMethod", TestInterface2V8Internal::stringifierMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"keys", TestInterface2V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"values", TestInterface2V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"entries", TestInterface2V8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"forEach", TestInterface2V8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"has", TestInterface2V8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toString", TestInterface2V8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestInterface2::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { @@ -648,7 +648,7 @@ instanceTemplate->SetHandler(namedPropertyHandlerConfig); // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface2V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface2V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); instanceTemplate->SetCallAsFunctionHandler(TestInterface2V8Internal::legacyCallerMethodCallback);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp index 97e71ad..493a476 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
@@ -260,12 +260,12 @@ } const V8DOMConfiguration::AccessorConfiguration V8TestInterface3Accessors[] = { - {"readonlyStringifierAttribute", TestInterface3V8Internal::readonlyStringifierAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyStringifierAttribute", TestInterface3V8Internal::readonlyStringifierAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterface3Methods[] = { - {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"toString", TestInterface3V8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDocument", TestInterface3V8Internal::voidMethodDocumentMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toString", TestInterface3V8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestInterface3Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -291,24 +291,24 @@ if (RuntimeEnabledFeatures::featureNameEnabled()) { // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface3V8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration = {"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration keysMethodConfiguration = {"keys", TestInterface3V8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, keysMethodConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration = {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration valuesMethodConfiguration = {"values", TestInterface3V8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, valuesMethodConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration = {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration entriesMethodConfiguration = {"entries", TestInterface3V8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, entriesMethodConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration = {"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration forEachMethodConfiguration = {"forEach", TestInterface3V8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, forEachMethodConfiguration); } }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h index 39d39a28..01da6f29 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h
@@ -14,6 +14,7 @@ #include "bindings/core/v8/V8Binding.h" #include "bindings/core/v8/V8DOMWrapper.h" #include "bindings/core/v8/WrapperTypeInfo.h" +#include "bindings/tests/idls/core/TestInterface3.h" #include "core/CoreExport.h" #include "platform/heap/Handle.h"
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp index c69c5fa..a0937545 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
@@ -450,22 +450,22 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceCheckSecurityAttributes[] = { - {"doNotCheckSecurityLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"doNotCheckSecurityOnSetterLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"doNotCheckSecurityLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"doNotCheckSecurityReadonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"doNotCheckSecurityOnSetterLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeGetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityOnSetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"doNotCheckSecurityReplaceableReadonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityReplaceableReadonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop #endif const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceCheckSecurityAccessors[] = { - {"readonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttributeGetterCallback, TestInterfaceCheckSecurityV8Internal::longAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"readonlyLongAttribute", TestInterfaceCheckSecurityV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"longAttribute", TestInterfaceCheckSecurityV8Internal::longAttributeAttributeGetterCallback, TestInterfaceCheckSecurityV8Internal::longAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterfaceCheckSecurityMethods[] = { - {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"voidMethod", TestInterfaceCheckSecurityV8Internal::voidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; static void installV8TestInterfaceCheckSecurityTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -493,15 +493,15 @@ instanceTemplate->SetAccessCheckCallbackAndHandler(TestInterfaceCheckSecurityV8Internal::securityCheck, v8::NamedPropertyHandlerConfiguration(TestInterfaceCheckSecurityV8Internal::crossOriginNamedGetter, TestInterfaceCheckSecurityV8Internal::crossOriginNamedSetter, nullptr, nullptr, TestInterfaceCheckSecurityV8Internal::crossOriginNamedEnumerator), v8::IndexedPropertyHandlerConfiguration(nullptr), v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceCheckSecurity::wrapperTypeInfo))); const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration = { - "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder, + "doNotCheckSecurityVoidMethod", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, 0, 0, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder }; V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototypeTemplate, doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration); const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeAttributeConfiguration = { - "doNotCheckSecurityPerWorldBindingsVoidMethod", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallbackForMainWorld, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder, + "doNotCheckSecurityPerWorldBindingsVoidMethod", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallback, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeMethodGetterCallbackForMainWorld, TestInterfaceCheckSecurityV8Internal::TestInterfaceCheckSecurityOriginSafeMethodSetterCallbackForMainWorld, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder }; V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototypeTemplate, doNotCheckSecurityPerWorldBindingsVoidMethodOriginSafeAttributeConfiguration); const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfiguration = { - "doNotCheckSecurityUnforgeableVoidMethod", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallback, 0, 0, 0, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder, + "doNotCheckSecurityUnforgeableVoidMethod", TestInterfaceCheckSecurityV8Internal::doNotCheckSecurityUnforgeableVoidMethodOriginSafeMethodGetterCallback, 0, 0, 0, nullptr, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder }; V8DOMConfiguration::installAttribute(isolate, world, instanceTemplate, prototypeTemplate, doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfiguration); }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp index fa6e059..073cb97b 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
@@ -363,7 +363,7 @@ } void V8TestInterfaceConstructor::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); if (!info.IsConstructCall()) { V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::constructorNotCallableAsFunction("TestInterfaceConstructor")); return;
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp index b1ac114..d4a9b58 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
@@ -93,7 +93,7 @@ } // namespace TestInterfaceDocumentV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceDocumentAccessors[] = { - {"location", TestInterfaceDocumentV8Internal::locationAttributeGetterCallback, TestInterfaceDocumentV8Internal::locationAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"location", TestInterfaceDocumentV8Internal::locationAttributeGetterCallback, TestInterfaceDocumentV8Internal::locationAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; static void installV8TestInterfaceDocumentTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp index d5d3d9f..cfd4c44 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
@@ -107,8 +107,8 @@ } // namespace TestInterfaceEventInitConstructorV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceEventInitConstructorAccessors[] = { - {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"isTrusted", TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"readonlyStringAttribute", TestInterfaceEventInitConstructorV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"isTrusted", TestInterfaceEventInitConstructorV8Internal::isTrustedAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete | v8::ReadOnly), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; void V8TestInterfaceEventInitConstructor::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp index bafbbcd..7052d2a 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
@@ -339,19 +339,19 @@ } // namespace TestInterfaceGarbageCollectedV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceGarbageCollectedAccessors[] = { - {"attr1", TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetterCallback, TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"attr1", TestInterfaceGarbageCollectedV8Internal::attr1AttributeGetterCallback, TestInterfaceGarbageCollectedV8Internal::attr1AttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterfaceGarbageCollectedMethods[] = { - {"func", TestInterfaceGarbageCollectedV8Internal::funcMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"keys", TestInterfaceGarbageCollectedV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"values", TestInterfaceGarbageCollectedV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"entries", TestInterfaceGarbageCollectedV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"forEach", TestInterfaceGarbageCollectedV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"has", TestInterfaceGarbageCollectedV8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"add", TestInterfaceGarbageCollectedV8Internal::addMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"clear", TestInterfaceGarbageCollectedV8Internal::clearMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"delete", TestInterfaceGarbageCollectedV8Internal::deleteMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"func", TestInterfaceGarbageCollectedV8Internal::funcMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"keys", TestInterfaceGarbageCollectedV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"values", TestInterfaceGarbageCollectedV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"entries", TestInterfaceGarbageCollectedV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"forEach", TestInterfaceGarbageCollectedV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"has", TestInterfaceGarbageCollectedV8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"add", TestInterfaceGarbageCollectedV8Internal::addMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"clear", TestInterfaceGarbageCollectedV8Internal::clearMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"delete", TestInterfaceGarbageCollectedV8Internal::deleteMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestInterfaceGarbageCollected::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { @@ -385,7 +385,7 @@ V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods)); // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceGarbageCollectedV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterfaceGarbageCollectedV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp index 02d8741..30c33d7 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
@@ -59,7 +59,7 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestInterfaceNamedConstructorLazyDataAttributes[] = { - {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"testNamedConstructorConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestNamedConstructor::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp index 1fa9115..5b7a1e1 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
@@ -330,19 +330,19 @@ } // namespace TestInterfaceNodeV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceNodeAccessors[] = { - {"nodeName", TestInterfaceNodeV8Internal::nodeNameAttributeGetterCallback, TestInterfaceNodeV8Internal::nodeNameAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nodeName", TestInterfaceNodeV8Internal::nodeNameAttributeGetterCallback, TestInterfaceNodeV8Internal::nodeNameAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringAttribute", TestInterfaceNodeV8Internal::stringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::stringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"eventHandlerAttribute", TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestInterfaceNodeV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectStringAttribute", TestInterfaceNodeV8Internal::reflectStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectUrlStringAttribute", TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeGetterCallback, TestInterfaceNodeV8Internal::reflectUrlStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterfaceNodeMethods[] = { - {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"perWorldBindingsTestInterfaceEmptyMethod", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyMethod", TestInterfaceNodeV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"perWorldBindingsTestInterfaceEmptyMethod", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback, TestInterfaceNodeV8Internal::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestInterfaceNodeTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp index 986555d..ad0327e 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
@@ -236,13 +236,13 @@ } // namespace TestInterfaceOriginTrialEnabledV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestInterfaceOriginTrialEnabledAccessors[] = { - {"doubleAttribute", TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeGetterCallback, TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"staticStringAttribute", TestInterfaceOriginTrialEnabledV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceOriginTrialEnabledV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"doubleAttribute", TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeGetterCallback, TestInterfaceOriginTrialEnabledV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"staticStringAttribute", TestInterfaceOriginTrialEnabledV8Internal::staticStringAttributeAttributeGetterCallback, TestInterfaceOriginTrialEnabledV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterfaceOriginTrialEnabledMethods[] = { - {"voidMethodDoubleArgFloatArg", TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodPartialOverload", TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleArgFloatArg", TestInterfaceOriginTrialEnabledV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodPartialOverload", TestInterfaceOriginTrialEnabledV8Internal::voidMethodPartialOverloadMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestInterfaceOriginTrialEnabledTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -267,11 +267,11 @@ V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledMethods, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledMethods)); if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyLongAttributeConfiguration = {"conditionalReadOnlyLongAttribute", TestInterfaceOriginTrialEnabledV8Internal::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorconditionalReadOnlyLongAttributeConfiguration = {"conditionalReadOnlyLongAttribute", TestInterfaceOriginTrialEnabledV8Internal::conditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalReadOnlyLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalReadOnlyLongAttributeConfiguration = {"staticConditionalReadOnlyLongAttribute", TestInterfaceOriginTrialEnabledV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorstaticConditionalReadOnlyLongAttributeConfiguration = {"staticConditionalReadOnlyLongAttribute", TestInterfaceOriginTrialEnabledV8Internal::staticConditionalReadOnlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorstaticConditionalReadOnlyLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttributeConfiguration = {"conditionalLongAttribute", TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttributeGetterCallback, TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorconditionalLongAttributeConfiguration = {"conditionalLongAttribute", TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttributeGetterCallback, TestInterfaceOriginTrialEnabledV8Internal::conditionalLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorconditionalLongAttributeConfiguration); } }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp index dfbaef16..9d4767e 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
@@ -362,31 +362,31 @@ ExecutionContext* executionContext = toExecutionContext(context); v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextAttribute", TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isDocument())) { if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isWorkerGlobalScope())) { if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } if (executionContext && (executionContext->isDocument())) { if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWindowExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } @@ -394,7 +394,7 @@ if (executionContext && (executionContext->isWorkerGlobalScope())) { if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"secureContextWorkerExposedRuntimeEnabledAttribute", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeGetterCallback, TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } } @@ -403,31 +403,31 @@ ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext()); DCHECK(executionContext); if (executionContext && (executionContext->isSecureContext())) { - const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceSecureContextV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextMethodMethodConfiguration = {"secureContextMethod", TestInterfaceSecureContextV8Internal::secureContextMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextMethodMethodConfiguration); } if (executionContext && (executionContext->isSecureContext())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextRuntimeEnabledMethodMethodConfiguration = {"secureContextRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextRuntimeEnabledMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedMethodMethodConfiguration = {"secureContextWindowExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedMethodMethodConfiguration = {"secureContextWorkerExposedMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedMethodMethodConfiguration); } } if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isDocument())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWindowExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWindowExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWindowExposedRuntimeEnabledMethodMethodConfiguration); } } @@ -435,7 +435,7 @@ if (executionContext && (executionContext->isSecureContext())) { if (executionContext && (executionContext->isWorkerGlobalScope())) { if (RuntimeEnabledFeatures::secureFeatureEnabled()) { - const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration = {"secureContextWorkerExposedRuntimeEnabledMethod", TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, secureContextWorkerExposedRuntimeEnabledMethodMethodConfiguration); } }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp index 0509fa7..7908670 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
@@ -186,10 +186,10 @@ } // namespace TestNodeV8Internal const V8DOMConfiguration::AccessorConfiguration V8TestNodeAccessors[] = { - {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal::hrefAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"hrefThrows", TestNodeV8Internal::hrefThrowsAttributeGetterCallback, TestNodeV8Internal::hrefThrowsAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"hrefCallWith", TestNodeV8Internal::hrefCallWithAttributeGetterCallback, TestNodeV8Internal::hrefCallWithAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"hrefByteString", TestNodeV8Internal::hrefByteStringAttributeGetterCallback, TestNodeV8Internal::hrefByteStringAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"href", TestNodeV8Internal::hrefAttributeGetterCallback, TestNodeV8Internal::hrefAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"hrefThrows", TestNodeV8Internal::hrefThrowsAttributeGetterCallback, TestNodeV8Internal::hrefThrowsAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"hrefCallWith", TestNodeV8Internal::hrefCallWithAttributeGetterCallback, TestNodeV8Internal::hrefCallWithAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"hrefByteString", TestNodeV8Internal::hrefByteStringAttributeGetterCallback, TestNodeV8Internal::hrefByteStringAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestNode::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp index cd62c6c1..557061c 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -15,7 +15,6 @@ #include "bindings/core/v8/DoubleOrString.h" #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/GeneratedCodeHelper.h" -#include "bindings/core/v8/PrivateScriptRunner.h" #include "bindings/core/v8/ScriptCallStack.h" #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptState.h" @@ -72,7 +71,6 @@ #include "core/dom/custom/V0CustomElementProcessingStack.h" #include "core/frame/Deprecation.h" #include "core/frame/ImageBitmap.h" -#include "core/frame/LocalFrame.h" #include "core/frame/UseCounter.h" #include "core/html/HTMLCollection.h" #include "core/html/HTMLDataListOptionsCollection.h" @@ -82,7 +80,6 @@ #include "core/inspector/ScriptArguments.h" #include "core/origin_trials/OriginTrials.h" #include "platform/RuntimeEnabledFeatures.h" -#include "platform/ScriptForbiddenScope.h" #include "wtf/GetPtr.h" #include "wtf/RefPtr.h" @@ -2559,13 +2556,13 @@ } void testInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstructorAttribute); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::deprecatedTestInterfaceEmptyConstructorAttribute); v8ConstructorAttributeGetter(property, info); } void measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::FeatureName); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::FeatureName); v8ConstructorAttributeGetter(property, info); } @@ -2635,7 +2632,7 @@ } void deprecatedLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::LongAttribute); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::LongAttribute); TestObjectV8Internal::deprecatedLongAttributeAttributeGetter(info); } @@ -2657,7 +2654,7 @@ void deprecatedLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::LongAttribute); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::LongAttribute); TestObjectV8Internal::deprecatedLongAttributeAttributeSetter(v8Value, info); } @@ -2787,7 +2784,7 @@ } void measureAsLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); TestObjectV8Internal::measureAsLongAttributeAttributeGetter(info); } @@ -2809,7 +2806,7 @@ void measureAsLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); TestObjectV8Internal::measureAsLongAttributeAttributeSetter(v8Value, info); } @@ -4870,7 +4867,7 @@ } void measuredLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeGetter); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeGetter); TestObjectV8Internal::measuredLongAttributeAttributeGetter(info); } @@ -4892,7 +4889,7 @@ void measuredLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { v8::Local<v8::Value> v8Value = info[0]; - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeSetter); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasuredLongAttribute_AttributeSetter); TestObjectV8Internal::measuredLongAttributeAttributeSetter(v8Value, info); } @@ -5163,212 +5160,6 @@ TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetter(v8Value, info); } -static void readonlyShortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestObject* impl = V8TestObject::toImpl(holder); - - int result = 0; - if (!V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - - v8SetReturnValueInt(info, result); -} - -void readonlyShortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::readonlyShortAttributeAttributeGetter(info); -} - -static void shortAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestObject* impl = V8TestObject::toImpl(holder); - - int result = 0; - if (!V8TestObject::PrivateScript::shortAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - - v8SetReturnValueInt(info, result); -} - -void shortAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::shortAttributeAttributeGetter(info); -} - -static void shortAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - TestObject* impl = V8TestObject::toImpl(holder); - - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestObject", "shortAttribute"); - - // Prepare the value to be set. - int cppValue = toInt16(info.GetIsolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return; - - V8TestObject::PrivateScript::shortAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); -} - -void shortAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Value> v8Value = info[0]; - - TestObjectV8Internal::shortAttributeAttributeSetter(v8Value, info); -} - -static void stringAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestObject* impl = V8TestObject::toImpl(holder); - - String result; - if (!V8TestObject::PrivateScript::stringAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - - v8SetReturnValueString(info, result, info.GetIsolate()); -} - -void stringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::stringAttributeAttributeGetter(info); -} - -static void stringAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - TestObject* impl = V8TestObject::toImpl(holder); - - // Prepare the value to be set. - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return; - - V8TestObject::PrivateScript::stringAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); -} - -void stringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Value> v8Value = info[0]; - - TestObjectV8Internal::stringAttributeAttributeSetter(v8Value, info); -} - -static void nodeAttributeAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestObject* impl = V8TestObject::toImpl(holder); - - Node* result = nullptr; - if (!V8TestObject::PrivateScript::nodeAttributeAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - - v8SetReturnValueFast(info, result, impl); -} - -void nodeAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::nodeAttributeAttributeGetter(info); -} - -static void nodeAttributeAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - TestObject* impl = V8TestObject::toImpl(holder); - - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestObject", "nodeAttribute"); - - // Prepare the value to be set. - Node* cppValue = V8Node::toImplWithTypeCheck(info.GetIsolate(), v8Value); - - // Type check per: http://heycam.github.io/webidl/#es-interface - if (!cppValue) { - exceptionState.throwTypeError("The provided value is not of type 'Node'."); - return; - } - - V8TestObject::PrivateScript::nodeAttributeAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); -} - -void nodeAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Value> v8Value = info[0]; - - TestObjectV8Internal::nodeAttributeAttributeSetter(v8Value, info); -} - -static void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestObject* impl = V8TestObject::toImpl(holder); - - v8SetReturnValueString(info, impl->attributeImplementedInCPPForPrivateScriptOnly(), info.GetIsolate()); -} - -void attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeGetter(info); -} - -static void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - TestObject* impl = V8TestObject::toImpl(holder); - - // Prepare the value to be set. - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return; - - impl->setAttributeImplementedInCPPForPrivateScriptOnly(cppValue); -} - -void attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Value> v8Value = info[0]; - - TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetter(v8Value, info); -} - -static void enumForPrivateScriptAttributeGetter(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - - TestObject* impl = V8TestObject::toImpl(holder); - - String result; - if (!V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - - v8SetReturnValueString(info, result, info.GetIsolate()); -} - -void enumForPrivateScriptAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::enumForPrivateScriptAttributeGetter(info); -} - -static void enumForPrivateScriptAttributeSetter(v8::Local<v8::Value> v8Value, const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Object> holder = info.Holder(); - TestObject* impl = V8TestObject::toImpl(holder); - - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestObject", "enumForPrivateScript"); - - // Prepare the value to be set. - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return; - - // Type check per: http://heycam.github.io/webidl/#dfn-attribute-setter - // Returns undefined without setting the value if the value is invalid. - DummyExceptionStateForTesting dummyExceptionState; - const char* validValues[] = { - "", - "EnumValue1", - "EnumValue2", - "EnumValue3", - }; - if (!isValidEnum(cppValue, validValues, WTF_ARRAY_LENGTH(validValues), "TestEnum", dummyExceptionState)) { - currentExecutionContext(info.GetIsolate())->addConsoleMessage(ConsoleMessage::create(JSMessageSource, WarningMessageLevel, dummyExceptionState.message())); - return; - } - - V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, cppValue); -} - -void enumForPrivateScriptAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - v8::Local<v8::Value> v8Value = info[0]; - - TestObjectV8Internal::enumForPrivateScriptAttributeSetter(v8Value, info); -} - static void unscopableVoidMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { TestObject* impl = V8TestObject::toImpl(info.Holder()); @@ -9674,7 +9465,7 @@ } void deprecatedVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::voidMethod); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::voidMethod); TestObjectV8Internal::deprecatedVoidMethodMethod(info); } @@ -9695,7 +9486,7 @@ } void measureAsVoidMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); TestObjectV8Internal::measureAsVoidMethodMethod(info); } @@ -9706,7 +9497,7 @@ } void measureMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureMethod_Method); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureMethod_Method); TestObjectV8Internal::measureMethodMethod(info); } @@ -9734,14 +9525,14 @@ switch (std::min(1, info.Length())) { case 0: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_Method); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_Method); measureOverloadedMethod1Method(info); return; } break; case 1: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_Method); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::V8TestObject_MeasureOverloadedMethod_Method); measureOverloadedMethod2Method(info); return; } @@ -9785,14 +9576,14 @@ switch (std::min(1, info.Length())) { case 0: if (true) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); DeprecateAsOverloadedMethod1Method(info); return; } break; case 1: if (true) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); DeprecateAsOverloadedMethod2Method(info); return; } @@ -9832,7 +9623,7 @@ } static void DeprecateAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); bool isArityError = false; switch (std::min(1, info.Length())) { @@ -9887,14 +9678,14 @@ switch (std::min(1, info.Length())) { case 0: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); measureAsOverloadedMethod1Method(info); return; } break; case 1: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); measureAsOverloadedMethod2Method(info); return; } @@ -9938,14 +9729,14 @@ switch (std::min(1, info.Length())) { case 0: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); measureAsSameValueOverloadedMethod1Method(info); return; } break; case 1: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); measureAsSameValueOverloadedMethod2Method(info); return; } @@ -9989,16 +9780,16 @@ switch (std::min(1, info.Length())) { case 0: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); deprecateAsMeasureAsSameValueOverloadedMethod1Method(info); return; } break; case 1: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); deprecateAsMeasureAsSameValueOverloadedMethod2Method(info); return; } @@ -10038,20 +9829,20 @@ } static void deprecateAsSameValueMeasureAsOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeature); bool isArityError = false; switch (std::min(1, info.Length())) { case 0: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); deprecateAsSameValueMeasureAsOverloadedMethod1Method(info); return; } break; case 1: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); deprecateAsSameValueMeasureAsOverloadedMethod2Method(info); return; } @@ -10091,20 +9882,20 @@ } static void deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - Deprecation::countDeprecationIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); + Deprecation::countDeprecation(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureA); bool isArityError = false; switch (std::min(1, info.Length())) { case 0: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); deprecateAsSameValueMeasureAsSameValueOverloadedMethod1Method(info); return; } break; case 1: if (true) { - UseCounter::countIfNotPrivateScript(info.GetIsolate(), currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); + UseCounter::count(currentExecutionContext(info.GetIsolate()), UseCounter::TestFeatureB); deprecateAsSameValueMeasureAsSameValueOverloadedMethod2Method(info); return; } @@ -10972,181 +10763,6 @@ TestObjectV8Internal::serializerMethodMethod(info); } -static void voidMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl); -} - -void voidMethodImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethod(info); -} - -static void shortMethodImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - int result = 0; - if (!V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, &result)) - return; - v8SetReturnValueInt(info, result); -} - -void shortMethodImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethod(info); -} - -static void shortMethodWithShortArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript"); - - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - if (UNLIKELY(info.Length() < 1)) { - exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(1, info.Length())); - return; - } - - int value; - value = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); - if (exceptionState.hadException()) - return; - - int result = 0; - if (!V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) - return; - v8SetReturnValueInt(info, result); -} - -void shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(info); -} - -static void stringMethodWithStringArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - if (UNLIKELY(info.Length() < 1)) { - V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("stringMethodWithStringArgumentImplementedInPrivateScript", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()))); - return; - } - - V8StringResource<> value; - value = info[0]; - if (!value.prepare()) - return; - - String result; - if (!V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) - return; - v8SetReturnValueString(info, result, info.GetIsolate()); -} - -void stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(info); -} - -static void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - if (UNLIKELY(info.Length() < 1)) { - V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", ExceptionMessages::notEnoughArguments(1, info.Length()))); - return; - } - - Node* value; - value = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[0]); - if (!value) { - V8ThrowException::throwTypeError(info.GetIsolate(), ExceptionMessages::failedToExecute("nodeMethodWithNodeArgumentImplementedInPrivateScript", "TestObject", "parameter 1 is not of type 'Node'.")); - - return; - } - - Node* result = nullptr; - if (!V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, value, &result)) - return; - v8SetReturnValue(info, result); -} - -void nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(info); -} - -static void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript"); - - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - if (UNLIKELY(info.Length() < 5)) { - exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(5, info.Length())); - return; - } - - Document* document; - Node* node; - int value1; - double value2; - V8StringResource<> string; - document = V8Document::toImplWithTypeCheck(info.GetIsolate(), info[0]); - if (!document) { - exceptionState.throwTypeError("parameter 1 is not of type 'Document'."); - - return; - } - - node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]); - if (!node) { - exceptionState.throwTypeError("parameter 2 is not of type 'Node'."); - - return; - } - - value1 = toInt16(info.GetIsolate(), info[2], NormalConversion, exceptionState); - if (exceptionState.hadException()) - return; - - value2 = toRestrictedDouble(info.GetIsolate(), info[3], exceptionState); - if (exceptionState.hadException()) - return; - - string = info[4]; - if (!string.prepare()) - return; - - Node* result = nullptr; - if (!V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(toLocalFrame(toFrameIfNotDetached(info.GetIsolate()->GetCurrentContext())), impl, document, node, value1, value2, string, &result)) - return; - v8SetReturnValue(info, result); -} - -void nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(info); -} - -static void methodImplementedInCPPForPrivateScriptOnlyMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { - ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestObject", "methodImplementedInCPPForPrivateScriptOnly"); - - TestObject* impl = V8TestObject::toImpl(info.Holder()); - - if (UNLIKELY(info.Length() < 2)) { - exceptionState.throwTypeError(ExceptionMessages::notEnoughArguments(2, info.Length())); - return; - } - - int value1; - int value2; - value1 = toInt16(info.GetIsolate(), info[0], NormalConversion, exceptionState); - if (exceptionState.hadException()) - return; - - value2 = toInt16(info.GetIsolate(), info[1], NormalConversion, exceptionState); - if (exceptionState.hadException()) - return; - - v8SetReturnValueInt(info, impl->methodImplementedInCPPForPrivateScriptOnly(value1, value2)); -} - -void methodImplementedInCPPForPrivateScriptOnlyMethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { - TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethod(info); -} - static void keysMethod(const v8::FunctionCallbackInfo<v8::Value>& info) { ExceptionState exceptionState(info.GetIsolate(), ExceptionState::ExecutionContext, "TestObject", "keys"); @@ -11565,8 +11181,8 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestObjectAttributes[] = { - {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", TestObjectV8Internal::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyConstructorAttribute", TestObjectV8Internal::testInterfaceEmptyConstructorAttributeConstructorGetterCallback, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"measureAsFeatureNameTestInterfaceEmptyConstructorAttribute", TestObjectV8Internal::measureAsFeatureNameTestInterfaceEmptyConstructorAttributeConstructorGetterCallback, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop @@ -11579,400 +11195,387 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestObjectLazyDataAttributes[] = { - {"testInterfaceEmptyConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterfaceEmpty::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop #endif const V8DOMConfiguration::AccessorConfiguration V8TestObjectAccessors[] = { - {"stringifierAttribute", TestObjectV8Internal::stringifierAttributeAttributeGetterCallback, TestObjectV8Internal::stringifierAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback, TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCallback, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"byteStringAttribute", TestObjectV8Internal::byteStringAttributeAttributeGetterCallback, TestObjectV8Internal::byteStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"usvStringAttribute", TestObjectV8Internal::usvStringAttributeAttributeGetterCallback, TestObjectV8Internal::usvStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttributeGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCallback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback, TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleAttribute", TestObjectV8Internal::doubleAttributeAttributeGetterCallback, TestObjectV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"floatAttribute", TestObjectV8Internal::floatAttributeAttributeGetterCallback, TestObjectV8Internal::floatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longAttribute", TestObjectV8Internal::longAttributeAttributeGetterCallback, TestObjectV8Internal::longAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longLongAttribute", TestObjectV8Internal::longLongAttributeAttributeGetterCallback, TestObjectV8Internal::longLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"octetAttribute", TestObjectV8Internal::octetAttributeAttributeGetterCallback, TestObjectV8Internal::octetAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallback, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedDoubleAttribute", TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedFloatAttribute", TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unsignedLongAttribute", TestObjectV8Internal::unsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unsignedLongLongAttribute", TestObjectV8Internal::unsignedLongLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unsignedShortAttribute", TestObjectV8Internal::unsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedShortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptyAttribute", TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testObjectAttribute", TestObjectV8Internal::testObjectAttributeAttributeGetterCallback, TestObjectV8Internal::testObjectAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"cssAttribute", TestObjectV8Internal::cssAttributeAttributeGetterCallback, TestObjectV8Internal::cssAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"imeAttribute", TestObjectV8Internal::imeAttributeAttributeGetterCallback, TestObjectV8Internal::imeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"svgAttribute", TestObjectV8Internal::svgAttributeAttributeGetterCallback, TestObjectV8Internal::svgAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"xmlAttribute", TestObjectV8Internal::xmlAttributeAttributeGetterCallback, TestObjectV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nodeFilterAttribute", TestObjectV8Internal::nodeFilterAttributeAttributeGetterCallback, TestObjectV8Internal::nodeFilterAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"serializedScriptValueAttribute", TestObjectV8Internal::serializedScriptValueAttributeAttributeGetterCallback, TestObjectV8Internal::serializedScriptValueAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback, TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"promiseAttribute", TestObjectV8Internal::promiseAttributeAttributeGetterCallback, TestObjectV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"windowAttribute", TestObjectV8Internal::windowAttributeAttributeGetterCallback, TestObjectV8Internal::windowAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"documentAttribute", TestObjectV8Internal::documentAttributeAttributeGetterCallback, TestObjectV8Internal::documentAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"documentFragmentAttribute", TestObjectV8Internal::documentFragmentAttributeAttributeGetterCallback, TestObjectV8Internal::documentFragmentAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"documentTypeAttribute", TestObjectV8Internal::documentTypeAttributeAttributeGetterCallback, TestObjectV8Internal::documentTypeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"elementAttribute", TestObjectV8Internal::elementAttributeAttributeGetterCallback, TestObjectV8Internal::elementAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"shadowRootAttribute", TestObjectV8Internal::shadowRootAttributeAttributeGetterCallback, TestObjectV8Internal::shadowRootAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"arrayBufferAttribute", TestObjectV8Internal::arrayBufferAttributeAttributeGetterCallback, TestObjectV8Internal::arrayBufferAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"float32ArrayAttribute", TestObjectV8Internal::float32ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::float32ArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"uint8ArrayAttribute", TestObjectV8Internal::uint8ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::uint8ArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"self", TestObjectV8Internal::selfAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyEventTargetAttribute", TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyEventTargetOrNullAttribute", TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyWindowAttribute", TestObjectV8Internal::readonlyWindowAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"htmlCollectionAttribute", TestObjectV8Internal::htmlCollectionAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"htmlElementAttribute", TestObjectV8Internal::htmlElementAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGetterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringFrozenArrayAttribute", TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptyFrozenArrayAttribute", TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testEnumAttribute", TestObjectV8Internal::testEnumAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testEnumOrNullAttribute", TestObjectV8Internal::testEnumOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"staticStringAttribute", TestObjectV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"staticLongAttribute", TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectV8Internal::staticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"eventHandlerAttribute", TestObjectV8Internal::eventHandlerAttributeAttributeGetterCallback, TestObjectV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleOrStringAttribute", TestObjectV8Internal::doubleOrStringAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleOrStringOrNullAttribute", TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleOrNullStringAttribute", TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringOrStringSequenceAttribute", TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testEnumOrDoubleAttribute", TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedDoubleOrStringAttribute", TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"cachedArrayAttribute", TestObjectV8Internal::cachedArrayAttributeAttributeGetterCallback, TestObjectV8Internal::cachedArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"cachedStringOrNoneAttribute", TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetterCallback, TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithScriptStateAnyAttribute", TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithExecutionContextAndScriptStateAnyAttribute", TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customObjectAttribute", TestObjectV8Internal::customObjectAttributeAttributeGetterCallback, TestObjectV8Internal::customObjectAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customGetterLongAttribute", TestObjectV8Internal::customGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customGetterReadonlyObjectAttribute", TestObjectV8Internal::customGetterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customSetterLongAttribute", TestObjectV8Internal::customSetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deprecatedLongAttribute", TestObjectV8Internal::deprecatedLongAttributeAttributeGetterCallback, TestObjectV8Internal::deprecatedLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"enforceRangeLongAttribute", TestObjectV8Internal::enforceRangeLongAttributeAttributeGetterCallback, TestObjectV8Internal::enforceRangeLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementedAsLongAttribute", TestObjectV8Internal::implementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::implementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customImplementedAsLongAttribute", TestObjectV8Internal::customImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customImplementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customGetterImplementedAsLongAttribute", TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObjectV8Internal::locationAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationWithException", TestObjectV8Internal::locationWithExceptionAttributeGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationWithCallWith", TestObjectV8Internal::locationWithCallWithAttributeGetterCallback, TestObjectV8Internal::locationWithCallWithAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationByteString", TestObjectV8Internal::locationByteStringAttributeGetterCallback, TestObjectV8Internal::locationByteStringAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationWithPerWorldBindings", TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationLegacyInterfaceTypeChecking", TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeGetterCallback, TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationGarbageCollected", TestObjectV8Internal::locationGarbageCollectedAttributeGetterCallback, TestObjectV8Internal::locationGarbageCollectedAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionLongAttribute", TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionGetterLongAttribute", TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"setterRaisesExceptionLongAttribute", TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectTestInterfaceAttribute", TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectReflectedNameAttributeTestAttribute", TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectBooleanAttribute", TestObjectV8Internal::reflectBooleanAttributeAttributeGetterCallback, TestObjectV8Internal::reflectBooleanAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectLongAttribute", TestObjectV8Internal::reflectLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectUnsignedShortAttribute", TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectUnsignedLongAttribute", TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"id", TestObjectV8Internal::idAttributeGetterCallback, TestObjectV8Internal::idAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"name", TestObjectV8Internal::nameAttributeGetterCallback, TestObjectV8Internal::nameAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"class", TestObjectV8Internal::classAttributeGetterCallback, TestObjectV8Internal::classAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectedId", TestObjectV8Internal::reflectedIdAttributeGetterCallback, TestObjectV8Internal::reflectedIdAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectedName", TestObjectV8Internal::reflectedNameAttributeGetterCallback, TestObjectV8Internal::reflectedNameAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"reflectedClass", TestObjectV8Internal::reflectedClassAttributeGetterCallback, TestObjectV8Internal::reflectedClassAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"locationPutForwards", TestObjectV8Internal::locationPutForwardsAttributeGetterCallback, TestObjectV8Internal::locationPutForwardsAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"setterCallWithCurrentWindowAndEnteredWindowStringAttribute", TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"treatNullAsEmptyStringStringAttribute", TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingFloatAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingTestInterfaceAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingTestInterfaceOrNullAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"measuredLongAttribute", TestObjectV8Internal::measuredLongAttributeAttributeGetterCallback, TestObjectV8Internal::measuredLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"sameObjectAttribute", TestObjectV8Internal::sameObjectAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"saveSameObjectAttribute", TestObjectV8Internal::saveSameObjectAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unscopableLongAttribute", TestObjectV8Internal::unscopableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopableLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyShortAttribute", TestObjectV8Internal::readonlyShortAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallback, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCallback, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"attributeImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeGetterCallback, TestObjectV8Internal::attributeImplementedInCPPForPrivateScriptOnlyAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"enumForPrivateScript", TestObjectV8Internal::enumForPrivateScriptAttributeGetterCallback, TestObjectV8Internal::enumForPrivateScriptAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringifierAttribute", TestObjectV8Internal::stringifierAttributeAttributeGetterCallback, TestObjectV8Internal::stringifierAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyStringAttribute", TestObjectV8Internal::readonlyStringAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::readonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyLongAttribute", TestObjectV8Internal::readonlyLongAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"dateAttribute", TestObjectV8Internal::dateAttributeAttributeGetterCallback, TestObjectV8Internal::dateAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringAttribute", TestObjectV8Internal::stringAttributeAttributeGetterCallback, TestObjectV8Internal::stringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"byteStringAttribute", TestObjectV8Internal::byteStringAttributeAttributeGetterCallback, TestObjectV8Internal::byteStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"usvStringAttribute", TestObjectV8Internal::usvStringAttributeAttributeGetterCallback, TestObjectV8Internal::usvStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"domTimeStampAttribute", TestObjectV8Internal::domTimeStampAttributeAttributeGetterCallback, TestObjectV8Internal::domTimeStampAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"booleanAttribute", TestObjectV8Internal::booleanAttributeAttributeGetterCallback, TestObjectV8Internal::booleanAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"byteAttribute", TestObjectV8Internal::byteAttributeAttributeGetterCallback, TestObjectV8Internal::byteAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleAttribute", TestObjectV8Internal::doubleAttributeAttributeGetterCallback, TestObjectV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"floatAttribute", TestObjectV8Internal::floatAttributeAttributeGetterCallback, TestObjectV8Internal::floatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longAttribute", TestObjectV8Internal::longAttributeAttributeGetterCallback, TestObjectV8Internal::longAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longLongAttribute", TestObjectV8Internal::longLongAttributeAttributeGetterCallback, TestObjectV8Internal::longLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"octetAttribute", TestObjectV8Internal::octetAttributeAttributeGetterCallback, TestObjectV8Internal::octetAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"shortAttribute", TestObjectV8Internal::shortAttributeAttributeGetterCallback, TestObjectV8Internal::shortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedDoubleAttribute", TestObjectV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedFloatAttribute", TestObjectV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unsignedLongAttribute", TestObjectV8Internal::unsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unsignedLongLongAttribute", TestObjectV8Internal::unsignedLongLongAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedLongLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unsignedShortAttribute", TestObjectV8Internal::unsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::unsignedShortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyAttribute", TestObjectV8Internal::testInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testObjectAttribute", TestObjectV8Internal::testObjectAttributeAttributeGetterCallback, TestObjectV8Internal::testObjectAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"cssAttribute", TestObjectV8Internal::cssAttributeAttributeGetterCallback, TestObjectV8Internal::cssAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"imeAttribute", TestObjectV8Internal::imeAttributeAttributeGetterCallback, TestObjectV8Internal::imeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"svgAttribute", TestObjectV8Internal::svgAttributeAttributeGetterCallback, TestObjectV8Internal::svgAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"xmlAttribute", TestObjectV8Internal::xmlAttributeAttributeGetterCallback, TestObjectV8Internal::xmlAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nodeFilterAttribute", TestObjectV8Internal::nodeFilterAttributeAttributeGetterCallback, TestObjectV8Internal::nodeFilterAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"serializedScriptValueAttribute", TestObjectV8Internal::serializedScriptValueAttributeAttributeGetterCallback, TestObjectV8Internal::serializedScriptValueAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"anyAttribute", TestObjectV8Internal::anyAttributeAttributeGetterCallback, TestObjectV8Internal::anyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"promiseAttribute", TestObjectV8Internal::promiseAttributeAttributeGetterCallback, TestObjectV8Internal::promiseAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"windowAttribute", TestObjectV8Internal::windowAttributeAttributeGetterCallback, TestObjectV8Internal::windowAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"documentAttribute", TestObjectV8Internal::documentAttributeAttributeGetterCallback, TestObjectV8Internal::documentAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"documentFragmentAttribute", TestObjectV8Internal::documentFragmentAttributeAttributeGetterCallback, TestObjectV8Internal::documentFragmentAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"documentTypeAttribute", TestObjectV8Internal::documentTypeAttributeAttributeGetterCallback, TestObjectV8Internal::documentTypeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"elementAttribute", TestObjectV8Internal::elementAttributeAttributeGetterCallback, TestObjectV8Internal::elementAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nodeAttribute", TestObjectV8Internal::nodeAttributeAttributeGetterCallback, TestObjectV8Internal::nodeAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"shadowRootAttribute", TestObjectV8Internal::shadowRootAttributeAttributeGetterCallback, TestObjectV8Internal::shadowRootAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"arrayBufferAttribute", TestObjectV8Internal::arrayBufferAttributeAttributeGetterCallback, TestObjectV8Internal::arrayBufferAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"float32ArrayAttribute", TestObjectV8Internal::float32ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::float32ArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"uint8ArrayAttribute", TestObjectV8Internal::uint8ArrayAttributeAttributeGetterCallback, TestObjectV8Internal::uint8ArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"self", TestObjectV8Internal::selfAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyEventTargetAttribute", TestObjectV8Internal::readonlyEventTargetAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyEventTargetOrNullAttribute", TestObjectV8Internal::readonlyEventTargetOrNullAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyWindowAttribute", TestObjectV8Internal::readonlyWindowAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"htmlCollectionAttribute", TestObjectV8Internal::htmlCollectionAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"htmlElementAttribute", TestObjectV8Internal::htmlElementAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringArrayAttribute", TestObjectV8Internal::stringArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyArrayAttribute", TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"floatArrayAttribute", TestObjectV8Internal::floatArrayAttributeAttributeGetterCallback, TestObjectV8Internal::floatArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringFrozenArrayAttribute", TestObjectV8Internal::stringFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::stringFrozenArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyFrozenArrayAttribute", TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceEmptyFrozenArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringOrNullAttribute", TestObjectV8Internal::stringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longOrNullAttribute", TestObjectV8Internal::longOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::longOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceOrNullAttribute", TestObjectV8Internal::testInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testEnumAttribute", TestObjectV8Internal::testEnumAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testEnumOrNullAttribute", TestObjectV8Internal::testEnumOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"staticStringAttribute", TestObjectV8Internal::staticStringAttributeAttributeGetterCallback, TestObjectV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"staticLongAttribute", TestObjectV8Internal::staticLongAttributeAttributeGetterCallback, TestObjectV8Internal::staticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"eventHandlerAttribute", TestObjectV8Internal::eventHandlerAttributeAttributeGetterCallback, TestObjectV8Internal::eventHandlerAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleOrStringAttribute", TestObjectV8Internal::doubleOrStringAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleOrStringOrNullAttribute", TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrStringOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleOrNullStringAttribute", TestObjectV8Internal::doubleOrNullStringAttributeAttributeGetterCallback, TestObjectV8Internal::doubleOrNullStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringOrStringSequenceAttribute", TestObjectV8Internal::stringOrStringSequenceAttributeAttributeGetterCallback, TestObjectV8Internal::stringOrStringSequenceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testEnumOrDoubleAttribute", TestObjectV8Internal::testEnumOrDoubleAttributeAttributeGetterCallback, TestObjectV8Internal::testEnumOrDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedDoubleOrStringAttribute", TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeGetterCallback, TestObjectV8Internal::unrestrictedDoubleOrStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingAccessForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingGetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingSetterForAllWorldsLongAttribute", TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingSetterForAllWorldsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"cachedAttributeAnyAttribute", TestObjectV8Internal::cachedAttributeAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"cachedArrayAttribute", TestObjectV8Internal::cachedArrayAttributeAttributeGetterCallback, TestObjectV8Internal::cachedArrayAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"cachedStringOrNoneAttribute", TestObjectV8Internal::cachedStringOrNoneAttributeAttributeGetterCallback, TestObjectV8Internal::cachedStringOrNoneAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithExecutionContextAnyAttribute", TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithScriptStateAnyAttribute", TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithScriptStateAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithExecutionContextAndScriptStateAnyAttribute", TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeGetterCallback, TestObjectV8Internal::callWithExecutionContextAndScriptStateAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"checkSecurityForNodeReadonlyDocumentAttribute", TestObjectV8Internal::checkSecurityForNodeReadonlyDocumentAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customObjectAttribute", TestObjectV8Internal::customObjectAttributeAttributeGetterCallback, TestObjectV8Internal::customObjectAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customGetterLongAttribute", TestObjectV8Internal::customGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customGetterReadonlyObjectAttribute", TestObjectV8Internal::customGetterReadonlyObjectAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customSetterLongAttribute", TestObjectV8Internal::customSetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deprecatedLongAttribute", TestObjectV8Internal::deprecatedLongAttributeAttributeGetterCallback, TestObjectV8Internal::deprecatedLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"enforceRangeLongAttribute", TestObjectV8Internal::enforceRangeLongAttributeAttributeGetterCallback, TestObjectV8Internal::enforceRangeLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementedAsLongAttribute", TestObjectV8Internal::implementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::implementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customImplementedAsLongAttribute", TestObjectV8Internal::customImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customImplementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customGetterImplementedAsLongAttribute", TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customGetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customSetterImplementedAsLongAttribute", TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::customSetterImplementedAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"measureAsLongAttribute", TestObjectV8Internal::measureAsLongAttributeAttributeGetterCallback, TestObjectV8Internal::measureAsLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"notEnumerableLongAttribute", TestObjectV8Internal::notEnumerableLongAttributeAttributeGetterCallback, TestObjectV8Internal::notEnumerableLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"perWorldBindingsReadonlyTestInterfaceEmptyAttribute", TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallback, 0, TestObjectV8Internal::perWorldBindingsReadonlyTestInterfaceEmptyAttributeAttributeGetterCallbackForMainWorld, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingAccessPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingAccessForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingGetterPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttribute", TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallback, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeGetterCallbackForMainWorld, TestObjectV8Internal::activityLoggingGetterForIsolatedWorldsPerWorldBindingsLongAttributeAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"location", TestObjectV8Internal::locationAttributeGetterCallback, TestObjectV8Internal::locationAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationWithException", TestObjectV8Internal::locationWithExceptionAttributeGetterCallback, TestObjectV8Internal::locationWithExceptionAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationWithCallWith", TestObjectV8Internal::locationWithCallWithAttributeGetterCallback, TestObjectV8Internal::locationWithCallWithAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationByteString", TestObjectV8Internal::locationByteStringAttributeGetterCallback, TestObjectV8Internal::locationByteStringAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationWithPerWorldBindings", TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallback, TestObjectV8Internal::locationWithPerWorldBindingsAttributeGetterCallbackForMainWorld, TestObjectV8Internal::locationWithPerWorldBindingsAttributeSetterCallbackForMainWorld, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationLegacyInterfaceTypeChecking", TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeGetterCallback, TestObjectV8Internal::locationLegacyInterfaceTypeCheckingAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationGarbageCollected", TestObjectV8Internal::locationGarbageCollectedAttributeGetterCallback, TestObjectV8Internal::locationGarbageCollectedAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionLongAttribute", TestObjectV8Internal::raisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionGetterLongAttribute", TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionGetterLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"setterRaisesExceptionLongAttribute", TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeGetterCallback, TestObjectV8Internal::setterRaisesExceptionLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionTestInterfaceEmptyAttribute", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeGetterCallback, TestObjectV8Internal::raisesExceptionTestInterfaceEmptyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"cachedAttributeRaisesExceptionGetterAnyAttribute", TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeGetterCallback, TestObjectV8Internal::cachedAttributeRaisesExceptionGetterAnyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectTestInterfaceAttribute", TestObjectV8Internal::reflectTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::reflectTestInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectReflectedNameAttributeTestAttribute", TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeGetterCallback, TestObjectV8Internal::reflectReflectedNameAttributeTestAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectBooleanAttribute", TestObjectV8Internal::reflectBooleanAttributeAttributeGetterCallback, TestObjectV8Internal::reflectBooleanAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectLongAttribute", TestObjectV8Internal::reflectLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectUnsignedShortAttribute", TestObjectV8Internal::reflectUnsignedShortAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedShortAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectUnsignedLongAttribute", TestObjectV8Internal::reflectUnsignedLongAttributeAttributeGetterCallback, TestObjectV8Internal::reflectUnsignedLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"id", TestObjectV8Internal::idAttributeGetterCallback, TestObjectV8Internal::idAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"name", TestObjectV8Internal::nameAttributeGetterCallback, TestObjectV8Internal::nameAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"class", TestObjectV8Internal::classAttributeGetterCallback, TestObjectV8Internal::classAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectedId", TestObjectV8Internal::reflectedIdAttributeGetterCallback, TestObjectV8Internal::reflectedIdAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectedName", TestObjectV8Internal::reflectedNameAttributeGetterCallback, TestObjectV8Internal::reflectedNameAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"reflectedClass", TestObjectV8Internal::reflectedClassAttributeGetterCallback, TestObjectV8Internal::reflectedClassAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"limitedToOnlyOneAttribute", TestObjectV8Internal::limitedToOnlyOneAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOneAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"limitedToOnlyAttribute", TestObjectV8Internal::limitedToOnlyAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"limitedToOnlyOtherAttribute", TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeGetterCallback, TestObjectV8Internal::limitedToOnlyOtherAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"limitedWithMissingDefaultAttribute", TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithMissingDefaultAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"limitedWithInvalidMissingDefaultAttribute", TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeGetterCallback, TestObjectV8Internal::limitedWithInvalidMissingDefaultAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"corsSettingAttribute", TestObjectV8Internal::corsSettingAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"limitedWithEmptyMissingInvalidAttribute", TestObjectV8Internal::limitedWithEmptyMissingInvalidAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"replaceableReadonlyLongAttribute", TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeGetterCallback, TestObjectV8Internal::replaceableReadonlyLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"locationPutForwards", TestObjectV8Internal::locationPutForwardsAttributeGetterCallback, TestObjectV8Internal::locationPutForwardsAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"setterCallWithCurrentWindowAndEnteredWindowStringAttribute", TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithCurrentWindowAndEnteredWindowStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"setterCallWithExecutionContextStringAttribute", TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeGetterCallback, TestObjectV8Internal::setterCallWithExecutionContextStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"treatNullAsEmptyStringStringAttribute", TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsEmptyStringStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"treatNullAsNullStringStringAttribute", TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeGetterCallback, TestObjectV8Internal::treatNullAsNullStringStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingFloatAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingTestInterfaceAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingTestInterfaceOrNullAttribute", TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::legacyInterfaceTypeCheckingTestInterfaceOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"urlStringAttribute", TestObjectV8Internal::urlStringAttributeAttributeGetterCallback, TestObjectV8Internal::urlStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unforgeableLongAttribute", TestObjectV8Internal::unforgeableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unforgeableLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"measuredLongAttribute", TestObjectV8Internal::measuredLongAttributeAttributeGetterCallback, TestObjectV8Internal::measuredLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"sameObjectAttribute", TestObjectV8Internal::sameObjectAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"saveSameObjectAttribute", TestObjectV8Internal::saveSameObjectAttributeAttributeGetterCallback, 0, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::ReadOnly), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unscopableLongAttribute", TestObjectV8Internal::unscopableLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopableLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceAttribute", TestObjectV8Internal::testInterfaceAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceGarbageCollectedAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceGarbageCollectedOrNullAttribute", TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeGetterCallback, TestObjectV8Internal::testInterfaceGarbageCollectedOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestObjectMethods[] = { - {"unscopableVoidMethod", TestObjectV8Internal::unscopableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"usvStringMethod", TestObjectV8Internal::usvStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longLongMethod", TestObjectV8Internal::longLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"octetMethod", TestObjectV8Internal::octetMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"shortMethod", TestObjectV8Internal::shortMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unsignedLongMethod", TestObjectV8Internal::unsignedLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unsignedLongLongMethod", TestObjectV8Internal::unsignedLongLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unsignedShortMethod", TestObjectV8Internal::unsignedShortMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDateArg", TestObjectV8Internal::voidMethodDateArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodStringArg", TestObjectV8Internal::voidMethodStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodByteStringArg", TestObjectV8Internal::voidMethodByteStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUSVStringArg", TestObjectV8Internal::voidMethodUSVStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDOMTimeStampArg", TestObjectV8Internal::voidMethodDOMTimeStampArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodBooleanArg", TestObjectV8Internal::voidMethodBooleanArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodByteArg", TestObjectV8Internal::voidMethodByteArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleArg", TestObjectV8Internal::voidMethodDoubleArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodFloatArg", TestObjectV8Internal::voidMethodFloatArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodLongArg", TestObjectV8Internal::voidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodLongLongArg", TestObjectV8Internal::voidMethodLongLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOctetArg", TestObjectV8Internal::voidMethodOctetArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodShortArg", TestObjectV8Internal::voidMethodShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUnsignedLongArg", TestObjectV8Internal::voidMethodUnsignedLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUnsignedLongLongArg", TestObjectV8Internal::voidMethodUnsignedLongLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUnsignedShortArg", TestObjectV8Internal::voidMethodUnsignedShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptyMethod", TestObjectV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"anyMethod", TestObjectV8Internal::anyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodEventTargetArg", TestObjectV8Internal::voidMethodEventTargetArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodAnyArg", TestObjectV8Internal::voidMethodAnyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodAttrArg", TestObjectV8Internal::voidMethodAttrArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDocumentArg", TestObjectV8Internal::voidMethodDocumentArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDocumentTypeArg", TestObjectV8Internal::voidMethodDocumentTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodElementArg", TestObjectV8Internal::voidMethodElementArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodNodeArg", TestObjectV8Internal::voidMethodNodeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"arrayBufferMethod", TestObjectV8Internal::arrayBufferMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"arrayBufferViewMethod", TestObjectV8Internal::arrayBufferViewMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"float32ArrayMethod", TestObjectV8Internal::float32ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"int32ArrayMethod", TestObjectV8Internal::int32ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"uint8ArrayMethod", TestObjectV8Internal::uint8ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodFlexibleArrayBufferViewArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodFlexibleArrayBufferViewTypedArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewTypedArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longArrayMethod", TestObjectV8Internal::longArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringArrayMethod", TestObjectV8Internal::stringArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptyArrayMethod", TestObjectV8Internal::testInterfaceEmptyArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayLongArg", TestObjectV8Internal::voidMethodArrayLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayStringArg", TestObjectV8Internal::voidMethodArrayStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodNullableArrayLongArg", TestObjectV8Internal::voidMethodNullableArrayLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longSequenceMethod", TestObjectV8Internal::longSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringSequenceMethod", TestObjectV8Internal::stringSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptySequenceMethod", TestObjectV8Internal::testInterfaceEmptySequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodSequenceSequenceDOMStringArg", TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodNullableSequenceLongArg", TestObjectV8Internal::voidMethodNullableSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longFrozenArrayMethod", TestObjectV8Internal::longFrozenArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodStringFrozenArrayMethod", TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceEmptyFrozenArrayMethod", TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nullableLongSequenceMethod", TestObjectV8Internal::nullableLongSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceGarbageCollectedOrDOMStringMethod", TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"booleanOrDOMStringOrUnrestrictedDoubleMethod", TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceOrLongMethod", TestObjectV8Internal::testInterfaceOrLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleOrDOMStringOrNullArg", TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleOrNullOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg", TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg", TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodArrayOfDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestMultipleEnumArg", TestObjectV8Internal::voidMethodTestMultipleEnumArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testDictionaryMethod", TestObjectV8Internal::testDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nullableTestDictionaryMethod", TestObjectV8Internal::nullableTestDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"passPermissiveDictionaryMethod", TestObjectV8Internal::passPermissiveDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, - {"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWithoutExceptionStateMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, - {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSResolverArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictionarySequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLongArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOptionalStringArg", TestObjectV8Internal::voidMethodOptionalStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOptionalLongArg", TestObjectV8Internal::voidMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringMethodOptionalLongArg", TestObjectV8Internal::stringMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceEmptyMethodOptionalLongArg", TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"longMethodOptionalLongArg", TestObjectV8Internal::longMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptionalDictionaryArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultByteStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultIntegerArgsMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDoubleArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefaultNullableStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultDoubleOrStringArgs", TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultStringSequenceArg", TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodK", TestObjectV8Internal::overloadedMethodKMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodL", TestObjectV8Internal::overloadedMethodLMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedMethodN", TestObjectV8Internal::overloadedMethodNMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, - {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"item", TestObjectV8Internal::itemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"setItem", TestObjectV8Internal::setItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRangeLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecutionContextVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithCurrentWindow", TestObjectV8Internal::callWithCurrentWindowMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithCurrentWindowScriptWindow", TestObjectV8Internal::callWithCurrentWindowScriptWindowMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithThisValue", TestObjectV8Internal::callWithThisValueMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNodeVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customVoidMethod", TestObjectV8Internal::customVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customCallPrologueVoidMethod", TestObjectV8Internal::customCallPrologueVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"customCallEpilogueVoidMethod", TestObjectV8Internal::customCallEpilogueVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"measureMethod", TestObjectV8Internal::measureMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"measureOverloadedMethod", TestObjectV8Internal::measureOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"DeprecateAsOverloadedMethod", TestObjectV8Internal::DeprecateAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"DeprecateAsSameValueOverloadedMethod", TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"measureAsOverloadedMethod", TestObjectV8Internal::measureAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"measureAsSameValueOverloadedMethod", TestObjectV8Internal::measureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deprecateAsMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deprecateAsSameValueMeasureAsOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"deprecateAsSameValueMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"notEnumerableVoidMethod", TestObjectV8Internal::notEnumerableVoidMethodMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"perWorldBindingsVoidMethod", TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"postMessage", TestObjectV8Internal::postMessageMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"raisesExceptionXPathNSResolverVoidMethod", TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unforgeableVoidMethod", TestObjectV8Internal::unforgeableVoidMethodMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"newObjectTestInterfaceMethod", TestObjectV8Internal::newObjectTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"serializerMethod", TestObjectV8Internal::serializerMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodImplementedInPrivateScript", TestObjectV8Internal::voidMethodImplementedInPrivateScriptMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"shortMethodImplementedInPrivateScript", TestObjectV8Internal::shortMethodImplementedInPrivateScriptMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"shortMethodWithShortArgumentImplementedInPrivateScript", TestObjectV8Internal::shortMethodWithShortArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringMethodWithStringArgumentImplementedInPrivateScript", TestObjectV8Internal::stringMethodWithStringArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nodeMethodWithNodeArgumentImplementedInPrivateScript", TestObjectV8Internal::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"nodeMethodWithVariousArgumentsImplementedInPrivateScript", TestObjectV8Internal::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethodCallback, 0, 5, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"methodImplementedInCPPForPrivateScriptOnly", TestObjectV8Internal::methodImplementedInCPPForPrivateScriptOnlyMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnlyExposedToPrivateScript, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"has", TestObjectV8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"get", TestObjectV8Internal::getMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"clear", TestObjectV8Internal::clearMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"delete", TestObjectV8Internal::deleteMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"set", TestObjectV8Internal::setMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"toJSON", TestObjectV8Internal::toJSONMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unscopableVoidMethod", TestObjectV8Internal::unscopableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethod", TestObjectV8Internal::voidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"staticVoidMethod", TestObjectV8Internal::staticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"dateMethod", TestObjectV8Internal::dateMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringMethod", TestObjectV8Internal::stringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"byteStringMethod", TestObjectV8Internal::byteStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"usvStringMethod", TestObjectV8Internal::usvStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"readonlyDOMTimeStampMethod", TestObjectV8Internal::readonlyDOMTimeStampMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"booleanMethod", TestObjectV8Internal::booleanMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"byteMethod", TestObjectV8Internal::byteMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleMethod", TestObjectV8Internal::doubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"floatMethod", TestObjectV8Internal::floatMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longMethod", TestObjectV8Internal::longMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longLongMethod", TestObjectV8Internal::longLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"octetMethod", TestObjectV8Internal::octetMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"shortMethod", TestObjectV8Internal::shortMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unsignedLongMethod", TestObjectV8Internal::unsignedLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unsignedLongLongMethod", TestObjectV8Internal::unsignedLongLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unsignedShortMethod", TestObjectV8Internal::unsignedShortMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDateArg", TestObjectV8Internal::voidMethodDateArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodStringArg", TestObjectV8Internal::voidMethodStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodByteStringArg", TestObjectV8Internal::voidMethodByteStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUSVStringArg", TestObjectV8Internal::voidMethodUSVStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDOMTimeStampArg", TestObjectV8Internal::voidMethodDOMTimeStampArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodBooleanArg", TestObjectV8Internal::voidMethodBooleanArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodByteArg", TestObjectV8Internal::voidMethodByteArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleArg", TestObjectV8Internal::voidMethodDoubleArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodFloatArg", TestObjectV8Internal::voidMethodFloatArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodLongArg", TestObjectV8Internal::voidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodLongLongArg", TestObjectV8Internal::voidMethodLongLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOctetArg", TestObjectV8Internal::voidMethodOctetArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodShortArg", TestObjectV8Internal::voidMethodShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUnsignedLongArg", TestObjectV8Internal::voidMethodUnsignedLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUnsignedLongLongArg", TestObjectV8Internal::voidMethodUnsignedLongLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUnsignedShortArg", TestObjectV8Internal::voidMethodUnsignedShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyMethod", TestObjectV8Internal::testInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodLongArgTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgTestInterfaceEmptyArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"anyMethod", TestObjectV8Internal::anyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodEventTargetArg", TestObjectV8Internal::voidMethodEventTargetArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodAnyArg", TestObjectV8Internal::voidMethodAnyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodAttrArg", TestObjectV8Internal::voidMethodAttrArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDocumentArg", TestObjectV8Internal::voidMethodDocumentArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDocumentTypeArg", TestObjectV8Internal::voidMethodDocumentTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodElementArg", TestObjectV8Internal::voidMethodElementArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodNodeArg", TestObjectV8Internal::voidMethodNodeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"arrayBufferMethod", TestObjectV8Internal::arrayBufferMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"arrayBufferViewMethod", TestObjectV8Internal::arrayBufferViewMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"float32ArrayMethod", TestObjectV8Internal::float32ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"int32ArrayMethod", TestObjectV8Internal::int32ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"uint8ArrayMethod", TestObjectV8Internal::uint8ArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayBufferArg", TestObjectV8Internal::voidMethodArrayBufferArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayBufferOrNullArg", TestObjectV8Internal::voidMethodArrayBufferOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayBufferViewArg", TestObjectV8Internal::voidMethodArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodFlexibleArrayBufferViewArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodFlexibleArrayBufferViewTypedArg", TestObjectV8Internal::voidMethodFlexibleArrayBufferViewTypedArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodFloat32ArrayArg", TestObjectV8Internal::voidMethodFloat32ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodInt32ArrayArg", TestObjectV8Internal::voidMethodInt32ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUint8ArrayArg", TestObjectV8Internal::voidMethodUint8ArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longArrayMethod", TestObjectV8Internal::longArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringArrayMethod", TestObjectV8Internal::stringArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyArrayMethod", TestObjectV8Internal::testInterfaceEmptyArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayLongArg", TestObjectV8Internal::voidMethodArrayLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayStringArg", TestObjectV8Internal::voidMethodArrayStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodArrayTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodNullableArrayLongArg", TestObjectV8Internal::voidMethodNullableArrayLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longSequenceMethod", TestObjectV8Internal::longSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringSequenceMethod", TestObjectV8Internal::stringSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptySequenceMethod", TestObjectV8Internal::testInterfaceEmptySequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodSequenceLongArg", TestObjectV8Internal::voidMethodSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodSequenceStringArg", TestObjectV8Internal::voidMethodSequenceStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodSequenceTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodSequenceTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodSequenceSequenceDOMStringArg", TestObjectV8Internal::voidMethodSequenceSequenceDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodNullableSequenceLongArg", TestObjectV8Internal::voidMethodNullableSequenceLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longFrozenArrayMethod", TestObjectV8Internal::longFrozenArrayMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodStringFrozenArrayMethod", TestObjectV8Internal::voidMethodStringFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyFrozenArrayMethod", TestObjectV8Internal::voidMethodTestInterfaceEmptyFrozenArrayMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nullableLongMethod", TestObjectV8Internal::nullableLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nullableStringMethod", TestObjectV8Internal::nullableStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nullableTestInterfaceMethod", TestObjectV8Internal::nullableTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nullableLongSequenceMethod", TestObjectV8Internal::nullableLongSequenceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceGarbageCollectedOrDOMStringMethod", TestObjectV8Internal::testInterfaceGarbageCollectedOrDOMStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"booleanOrDOMStringOrUnrestrictedDoubleMethod", TestObjectV8Internal::booleanOrDOMStringOrUnrestrictedDoubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceOrLongMethod", TestObjectV8Internal::testInterfaceOrLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleOrDOMStringOrNullArg", TestObjectV8Internal::voidMethodDoubleOrDOMStringOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleOrNullOrDOMStringArg", TestObjectV8Internal::voidMethodDoubleOrNullOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDOMStringOrArrayBufferOrArrayBufferViewArg", TestObjectV8Internal::voidMethodDOMStringOrArrayBufferOrArrayBufferViewArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayBufferOrArrayBufferViewOrDictionaryArg", TestObjectV8Internal::voidMethodArrayBufferOrArrayBufferViewOrDictionaryArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayOfDoubleOrDOMStringArg", TestObjectV8Internal::voidMethodArrayOfDoubleOrDOMStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyOrNullArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::voidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestCallbackInterfaceOrNullArg", TestObjectV8Internal::voidMethodTestCallbackInterfaceOrNullArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testEnumMethod", TestObjectV8Internal::testEnumMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestEnumArg", TestObjectV8Internal::voidMethodTestEnumArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestMultipleEnumArg", TestObjectV8Internal::voidMethodTestMultipleEnumArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"dictionaryMethod", TestObjectV8Internal::dictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testDictionaryMethod", TestObjectV8Internal::testDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nullableTestDictionaryMethod", TestObjectV8Internal::nullableTestDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"passPermissiveDictionaryMethod", TestObjectV8Internal::passPermissiveDictionaryMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"nodeFilterMethod", TestObjectV8Internal::nodeFilterMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"promiseMethod", TestObjectV8Internal::promiseMethodMethodCallback, 0, 3, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, + {"promiseMethodWithoutExceptionState", TestObjectV8Internal::promiseMethodWithoutExceptionStateMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, + {"serializedScriptValueMethod", TestObjectV8Internal::serializedScriptValueMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"xPathNSResolverMethod", TestObjectV8Internal::xPathNSResolverMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDictionaryArg", TestObjectV8Internal::voidMethodDictionaryArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodNodeFilterArg", TestObjectV8Internal::voidMethodNodeFilterArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodPromiseArg", TestObjectV8Internal::voidMethodPromiseArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodSerializedScriptValueArg", TestObjectV8Internal::voidMethodSerializedScriptValueArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodXPathNSResolverArg", TestObjectV8Internal::voidMethodXPathNSResolverArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDictionarySequenceArg", TestObjectV8Internal::voidMethodDictionarySequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodStringArgLongArg", TestObjectV8Internal::voidMethodStringArgLongArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOptionalStringArg", TestObjectV8Internal::voidMethodOptionalStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodOptionalTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOptionalLongArg", TestObjectV8Internal::voidMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringMethodOptionalLongArg", TestObjectV8Internal::stringMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceEmptyMethodOptionalLongArg", TestObjectV8Internal::testInterfaceEmptyMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"longMethodOptionalLongArg", TestObjectV8Internal::longMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodLongArgOptionalLongArgOptionalLongArg", TestObjectV8Internal::voidMethodLongArgOptionalLongArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodLongArgOptionalTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodLongArgOptionalTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyArgOptionalLongArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgOptionalLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodOptionalDictionaryArg", TestObjectV8Internal::voidMethodOptionalDictionaryArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultByteStringArg", TestObjectV8Internal::voidMethodDefaultByteStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultStringArg", TestObjectV8Internal::voidMethodDefaultStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultIntegerArgs", TestObjectV8Internal::voidMethodDefaultIntegerArgsMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultDoubleArg", TestObjectV8Internal::voidMethodDefaultDoubleArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultTrueBooleanArg", TestObjectV8Internal::voidMethodDefaultTrueBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultFalseBooleanArg", TestObjectV8Internal::voidMethodDefaultFalseBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultNullableByteStringArg", TestObjectV8Internal::voidMethodDefaultNullableByteStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultNullableStringArg", TestObjectV8Internal::voidMethodDefaultNullableStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultNullableTestInterfaceArg", TestObjectV8Internal::voidMethodDefaultNullableTestInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultDoubleOrStringArgs", TestObjectV8Internal::voidMethodDefaultDoubleOrStringArgsMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultStringSequenceArg", TestObjectV8Internal::voidMethodDefaultStringSequenceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodVariadicStringArg", TestObjectV8Internal::voidMethodVariadicStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodStringArgVariadicStringArg", TestObjectV8Internal::voidMethodStringArgVariadicStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodTestInterfaceEmptyArgVariadicTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodVariadicTestInterfaceGarbageCollectedArg", TestObjectV8Internal::voidMethodVariadicTestInterfaceGarbageCollectedArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodA", TestObjectV8Internal::overloadedMethodAMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodB", TestObjectV8Internal::overloadedMethodBMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodC", TestObjectV8Internal::overloadedMethodCMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodD", TestObjectV8Internal::overloadedMethodDMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodE", TestObjectV8Internal::overloadedMethodEMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodF", TestObjectV8Internal::overloadedMethodFMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodG", TestObjectV8Internal::overloadedMethodGMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodH", TestObjectV8Internal::overloadedMethodHMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodI", TestObjectV8Internal::overloadedMethodIMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodJ", TestObjectV8Internal::overloadedMethodJMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodK", TestObjectV8Internal::overloadedMethodKMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodL", TestObjectV8Internal::overloadedMethodLMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedMethodN", TestObjectV8Internal::overloadedMethodNMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"promiseOverloadMethod", TestObjectV8Internal::promiseOverloadMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::DoNotCheckHolder}, + {"overloadedPerWorldBindingsMethod", TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallback, TestObjectV8Internal::overloadedPerWorldBindingsMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"overloadedStaticMethod", TestObjectV8Internal::overloadedStaticMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"item", TestObjectV8Internal::itemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"setItem", TestObjectV8Internal::setItemMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodClampUnsignedShortArg", TestObjectV8Internal::voidMethodClampUnsignedShortArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodClampUnsignedLongArg", TestObjectV8Internal::voidMethodClampUnsignedLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultUndefinedTestInterfaceEmptyArg", TestObjectV8Internal::voidMethodDefaultUndefinedTestInterfaceEmptyArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultUndefinedLongArg", TestObjectV8Internal::voidMethodDefaultUndefinedLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDefaultUndefinedStringArg", TestObjectV8Internal::voidMethodDefaultUndefinedStringArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodEnforceRangeLongArg", TestObjectV8Internal::voidMethodEnforceRangeLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTreatNullAsEmptyStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsEmptyStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTreatNullAsNullStringStringArg", TestObjectV8Internal::voidMethodTreatNullAsNullStringStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingAccessForAllWorldsMethod", TestObjectV8Internal::activityLoggingAccessForAllWorldsMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithExecutionContextVoidMethod", TestObjectV8Internal::callWithExecutionContextVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithScriptStateVoidMethod", TestObjectV8Internal::callWithScriptStateVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithScriptStateLongMethod", TestObjectV8Internal::callWithScriptStateLongMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithScriptStateExecutionContextVoidMethod", TestObjectV8Internal::callWithScriptStateExecutionContextVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithScriptStateScriptArgumentsVoidMethod", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArg", TestObjectV8Internal::callWithScriptStateScriptArgumentsVoidMethodOptionalBooleanArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithCurrentWindow", TestObjectV8Internal::callWithCurrentWindowMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithCurrentWindowScriptWindow", TestObjectV8Internal::callWithCurrentWindowScriptWindowMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithThisValue", TestObjectV8Internal::callWithThisValueMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"checkSecurityForNodeVoidMethod", TestObjectV8Internal::checkSecurityForNodeVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customVoidMethod", TestObjectV8Internal::customVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customCallPrologueVoidMethod", TestObjectV8Internal::customCallPrologueVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"customCallEpilogueVoidMethod", TestObjectV8Internal::customCallEpilogueVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deprecatedVoidMethod", TestObjectV8Internal::deprecatedVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"implementedAsVoidMethod", TestObjectV8Internal::implementedAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"measureAsVoidMethod", TestObjectV8Internal::measureAsVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"measureMethod", TestObjectV8Internal::measureMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"measureOverloadedMethod", TestObjectV8Internal::measureOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"DeprecateAsOverloadedMethod", TestObjectV8Internal::DeprecateAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"DeprecateAsSameValueOverloadedMethod", TestObjectV8Internal::DeprecateAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"measureAsOverloadedMethod", TestObjectV8Internal::measureAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"measureAsSameValueOverloadedMethod", TestObjectV8Internal::measureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deprecateAsMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deprecateAsSameValueMeasureAsOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"deprecateAsSameValueMeasureAsSameValueOverloadedMethod", TestObjectV8Internal::deprecateAsSameValueMeasureAsSameValueOverloadedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"notEnumerableVoidMethod", TestObjectV8Internal::notEnumerableVoidMethodMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"perWorldBindingsVoidMethod", TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"perWorldBindingsVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallback, TestObjectV8Internal::perWorldBindingsVoidMethodTestInterfaceEmptyArgMethodCallbackForMainWorld, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"postMessage", TestObjectV8Internal::postMessageMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingForAllWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForAllWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethod", TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallback, TestObjectV8Internal::activityLoggingForIsolatedWorldsPerWorldBindingsVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionVoidMethod", TestObjectV8Internal::raisesExceptionVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionStringMethod", TestObjectV8Internal::raisesExceptionStringMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionVoidMethodOptionalLongArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalLongArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionVoidMethodTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodTestCallbackInterfaceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionVoidMethodOptionalTestCallbackInterfaceArg", TestObjectV8Internal::raisesExceptionVoidMethodOptionalTestCallbackInterfaceArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionTestInterfaceEmptyVoidMethod", TestObjectV8Internal::raisesExceptionTestInterfaceEmptyVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"raisesExceptionXPathNSResolverVoidMethod", TestObjectV8Internal::raisesExceptionXPathNSResolverVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"callWithExecutionContextRaisesExceptionVoidMethodLongArg", TestObjectV8Internal::callWithExecutionContextRaisesExceptionVoidMethodLongArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArg", TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArg", TestObjectV8Internal::legacyInterfaceTypeCheckingVoidMethodTestInterfaceEmptyVariadicArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"useToImpl4ArgumentsCheckingIfPossibleWithOptionalArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithOptionalArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"useToImpl4ArgumentsCheckingIfPossibleWithNullableArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithNullableArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArg", TestObjectV8Internal::useToImpl4ArgumentsCheckingIfPossibleWithUndefinedArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unforgeableVoidMethod", TestObjectV8Internal::unforgeableVoidMethodMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceGarbageCollectedSequenceArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedSequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceGarbageCollectedArrayArg", TestObjectV8Internal::voidMethodTestInterfaceGarbageCollectedArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"newObjectTestInterfaceMethod", TestObjectV8Internal::newObjectTestInterfaceMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"serializerMethod", TestObjectV8Internal::serializerMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"keys", TestObjectV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"values", TestObjectV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"entries", TestObjectV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"forEach", TestObjectV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"has", TestObjectV8Internal::hasMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"get", TestObjectV8Internal::getMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"clear", TestObjectV8Internal::clearMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"delete", TestObjectV8Internal::deleteMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"set", TestObjectV8Internal::setMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toJSON", TestObjectV8Internal::toJSONMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toString", TestObjectV8Internal::toStringMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestObjectTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -11992,9 +11595,9 @@ V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods)); if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::AccessorConfiguration accessorruntimeEnabledLongAttributeConfiguration = {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorruntimeEnabledLongAttributeConfiguration = {"runtimeEnabledLongAttribute", TestObjectV8Internal::runtimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::runtimeEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorruntimeEnabledLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorunscopableRuntimeEnabledLongAttributeConfiguration = {"unscopableRuntimeEnabledLongAttribute", TestObjectV8Internal::unscopableRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopableRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorunscopableRuntimeEnabledLongAttributeConfiguration = {"unscopableRuntimeEnabledLongAttribute", TestObjectV8Internal::unscopableRuntimeEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopableRuntimeEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessorunscopableRuntimeEnabledLongAttributeConfiguration); } @@ -12006,26 +11609,26 @@ instanceTemplate->SetHandler(namedPropertyHandlerConfig); // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestObjectV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestObjectV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration unscopableRuntimeEnabledVoidMethodMethodConfiguration = {"unscopableRuntimeEnabledVoidMethod", TestObjectV8Internal::unscopableRuntimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration unscopableRuntimeEnabledVoidMethodMethodConfiguration = {"unscopableRuntimeEnabledVoidMethod", TestObjectV8Internal::unscopableRuntimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, unscopableRuntimeEnabledVoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMethodConfiguration = {"runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMethodConfiguration = {"runtimeEnabledVoidMethod", TestObjectV8Internal::runtimeEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, runtimeEnabledVoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration = {"perWorldBindingsRuntimeEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration = {"perWorldBindingsRuntimeEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsRuntimeEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration); } if (RuntimeEnabledFeatures::featureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverloadedVoidMethodMethodConfiguration = {"runtimeEnabledOverloadedVoidMethod", TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverloadedVoidMethodMethodConfiguration = {"runtimeEnabledOverloadedVoidMethod", TestObjectV8Internal::runtimeEnabledOverloadedVoidMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, runtimeEnabledOverloadedVoidMethodMethodConfiguration); } - const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration = {"partiallyRuntimeEnabledOverloadedVoidMethod", TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, 0, TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration = {"partiallyRuntimeEnabledOverloadedVoidMethod", TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, 0, TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration); } @@ -12033,13 +11636,13 @@ v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestObject::wrapperTypeInfo.domTemplate(isolate, world); v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); ALLOW_UNUSED_LOCAL(signature); - const V8DOMConfiguration::AccessorConfiguration accessororiginTrialEnabledLongAttributeConfiguration = {"originTrialEnabledLongAttribute", TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessororiginTrialEnabledLongAttributeConfiguration = {"originTrialEnabledLongAttribute", TestObjectV8Internal::originTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::originTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessororiginTrialEnabledLongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorunscopableOriginTrialEnabledLongAttributeConfiguration = {"unscopableOriginTrialEnabledLongAttribute", TestObjectV8Internal::unscopableOriginTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopableOriginTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorunscopableOriginTrialEnabledLongAttributeConfiguration = {"unscopableOriginTrialEnabledLongAttribute", TestObjectV8Internal::unscopableOriginTrialEnabledLongAttributeAttributeGetterCallback, TestObjectV8Internal::unscopableOriginTrialEnabledLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessorunscopableOriginTrialEnabledLongAttributeConfiguration); - const V8DOMConfiguration::MethodConfiguration methodOrigintrialenabledvoidmethodConfiguration = {"originTrialEnabledVoidMethod", TestObjectV8Internal::originTrialEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration methodOrigintrialenabledvoidmethodConfiguration = {"originTrialEnabledVoidMethod", TestObjectV8Internal::originTrialEnabledVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interface, signature, methodOrigintrialenabledvoidmethodConfiguration); - const V8DOMConfiguration::MethodConfiguration methodPerworldbindingsorigintrialenabledvoidmethodConfiguration = {"perWorldBindingsOriginTrialEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration methodPerworldbindingsorigintrialenabledvoidmethodConfiguration = {"perWorldBindingsOriginTrialEnabledVoidMethod", TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallback, TestObjectV8Internal::perWorldBindingsOriginTrialEnabledVoidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interface, signature, methodPerworldbindingsorigintrialenabledvoidmethodConfiguration); } @@ -12091,439 +11694,4 @@ prototypeObject->CreateDataProperty(context, unscopablesSymbol, unscopables).FromJust(); } -bool V8TestObject::PrivateScript::voidMethodImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> *argv = 0; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "voidMethodImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "voidMethodImplementedInPrivateScript", holder, 0, argv); - if (v8Value.IsEmpty()) - return false; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::shortMethodImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, int* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> *argv = 0; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "shortMethodImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "shortMethodImplementedInPrivateScript", holder, 0, argv); - if (v8Value.IsEmpty()) - return false; - int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return false; - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> valueHandle = v8::Integer::New(scriptState->isolate(), value); - v8::Local<v8::Value> argv[] = { valueHandle }; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "shortMethodWithShortArgumentImplementedInPrivateScript", holder, 1, argv); - if (v8Value.IsEmpty()) - return false; - int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return false; - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::stringMethodWithStringArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> valueHandle = v8String(scriptState->isolate(), value); - v8::Local<v8::Value> argv[] = { valueHandle }; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "stringMethodWithStringArgumentImplementedInPrivateScript", holder, 1, argv); - if (v8Value.IsEmpty()) - return false; - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return false; - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, Node** result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> valueHandle = toV8(value, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> argv[] = { valueHandle }; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "nodeMethodWithNodeArgumentImplementedInPrivateScript", holder, 1, argv); - if (v8Value.IsEmpty()) - return false; - Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value); - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document, Node* node, int value1, double value2, String string, Node** result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> documentHandle = toV8(document, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> nodeHandle = toV8(node, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1); - v8::Local<v8::Value> value2Handle = v8::Number::New(scriptState->isolate(), value2); - v8::Local<v8::Value> stringHandle = v8String(scriptState->isolate(), string); - v8::Local<v8::Value> argv[] = { documentHandle, nodeHandle, value1Handle, value2Handle, stringHandle }; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "nodeMethodWithVariousArgumentsImplementedInPrivateScript", holder, 5, argv); - if (v8Value.IsEmpty()) - return false; - Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value); - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::methodForPrivateScriptOnlyMethod(LocalFrame* frame, TestObject* holderImpl, int value1, int value2, int* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - v8::Local<v8::Value> value1Handle = v8::Integer::New(scriptState->isolate(), value1); - v8::Local<v8::Value> value2Handle = v8::Integer::New(scriptState->isolate(), value2); - v8::Local<v8::Value> argv[] = { value1Handle, value2Handle }; - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::ExecutionContext, "TestObject", "methodForPrivateScriptOnly"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMMethod(scriptState, scriptStateInUserScript, "TestObject", "methodForPrivateScriptOnly", holder, 2, argv); - if (v8Value.IsEmpty()) - return false; - int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return false; - *result = cppValue; - CHECK(!exceptionState.hadException()); - return true; -} - -bool V8TestObject::PrivateScript::readonlyShortAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, int* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestObject", "readonlyShortAttribute"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "readonlyShortAttribute", holder); - if (v8Value.IsEmpty()) - return false; - int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return false; - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestObject::PrivateScript::shortAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, int* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestObject", "shortAttribute"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "shortAttribute", holder); - if (v8Value.IsEmpty()) - return false; - int cppValue = toInt16(scriptState->isolate(), v8Value, NormalConversion, exceptionState); - if (exceptionState.hadException()) - return false; - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestObject::PrivateScript::shortAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, int cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "TestObject", "shortAttribute"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "shortAttribute", holder, v8::Integer::New(scriptState->isolate(), cppValue)); -} - -bool V8TestObject::PrivateScript::stringAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestObject", "stringAttribute"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "stringAttribute", holder); - if (v8Value.IsEmpty()) - return false; - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return false; - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestObject::PrivateScript::stringAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "TestObject", "stringAttribute"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "stringAttribute", holder, v8String(scriptState->isolate(), cppValue)); -} - -bool V8TestObject::PrivateScript::nodeAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, Node** result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestObject", "nodeAttribute"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "nodeAttribute", holder); - if (v8Value.IsEmpty()) - return false; - Node* cppValue = V8Node::toImplWithTypeCheck(scriptState->isolate(), v8Value); - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestObject::PrivateScript::nodeAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, Node* cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "TestObject", "nodeAttribute"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "nodeAttribute", holder, toV8(cppValue, scriptState->context()->Global(), scriptState->isolate())); -} - -bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestObject", "attributeForPrivateScriptOnly"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "attributeForPrivateScriptOnly", holder); - if (v8Value.IsEmpty()) - return false; - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return false; - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestObject::PrivateScript::attributeForPrivateScriptOnlyAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "TestObject", "attributeForPrivateScriptOnly"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "attributeForPrivateScriptOnly", holder, v8String(scriptState->isolate(), cppValue)); -} - -bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::GetterContext, "TestObject", "enumForPrivateScript"); - v8::Local<v8::Value> v8Value = PrivateScriptRunner::runDOMAttributeGetter(scriptState, scriptStateInUserScript, "TestObject", "enumForPrivateScript", holder); - if (v8Value.IsEmpty()) - return false; - V8StringResource<> cppValue = v8Value; - if (!cppValue.prepare()) - return false; - CHECK(!exceptionState.hadException()); - *result = cppValue; - return true; -} - -bool V8TestObject::PrivateScript::enumForPrivateScriptAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue) { - if (!frame) - return false; - v8::HandleScope handleScope(toIsolate(frame)); - ScriptForbiddenScope::AllowUserAgentScript script; - ScriptState* scriptState = ScriptState::forWorld(frame, DOMWrapperWorld::privateScriptIsolatedWorld()); - if (!scriptState) - return false; - ScriptState* scriptStateInUserScript = ScriptState::forMainWorld(frame); - if (!scriptStateInUserScript) - return false; - - ScriptState::Scope scope(scriptState); - v8::Local<v8::Value> holder = toV8(holderImpl, scriptState->context()->Global(), scriptState->isolate()); - ExceptionState exceptionState(scriptState->isolate(), ExceptionState::SetterContext, "TestObject", "enumForPrivateScript"); - return PrivateScriptRunner::runDOMAttributeSetter(scriptState, scriptStateInUserScript, "TestObject", "enumForPrivateScript", holder, v8String(scriptState->isolate(), cppValue)); -} - } // namespace blink
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h index 45fc527..01c3adb 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
@@ -34,29 +34,6 @@ class V8TestObject { STATIC_ONLY(V8TestObject); public: - class PrivateScript { - STATIC_ONLY(PrivateScript); - public: - static bool voidMethodImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl); - static bool shortMethodImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, int* result); - static bool shortMethodWithShortArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, int value, int* result); - static bool stringMethodWithStringArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, String value, String* result); - static bool nodeMethodWithNodeArgumentImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Node* value, Node** result); - static bool nodeMethodWithVariousArgumentsImplementedInPrivateScriptMethod(LocalFrame* frame, TestObject* holderImpl, Document* document, Node* node, int value1, double value2, String string, Node** result); - static bool methodForPrivateScriptOnlyMethod(LocalFrame* frame, TestObject* holderImpl, int value1, int value2, int* result); - static bool readonlyShortAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, int* result); - static bool shortAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, int* result); - static bool shortAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, int cppValue); - static bool stringAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result); - static bool stringAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue); - static bool nodeAttributeAttributeGetter(LocalFrame* frame, TestObject* holderImpl, Node** result); - static bool nodeAttributeAttributeSetter(LocalFrame* frame, TestObject* holderImpl, Node* cppValue); - static bool attributeForPrivateScriptOnlyAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result); - static bool attributeForPrivateScriptOnlyAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue); - static bool enumForPrivateScriptAttributeGetter(LocalFrame* frame, TestObject* holderImpl, String* result); - static bool enumForPrivateScriptAttributeSetter(LocalFrame* frame, TestObject* holderImpl, String cppValue); - }; - CORE_EXPORT static bool hasInstance(v8::Local<v8::Value>, v8::Isolate*); static v8::Local<v8::Object> findInstanceInPrototypeChain(v8::Local<v8::Value>, v8::Isolate*); CORE_EXPORT static v8::Local<v8::FunctionTemplate> domTemplate(v8::Isolate*, const DOMWrapperWorld&);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp index 5307db2..a74efeaa 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
@@ -168,7 +168,7 @@ } // namespace TestSpecialOperationsV8Internal const V8DOMConfiguration::MethodConfiguration V8TestSpecialOperationsMethods[] = { - {"namedItem", TestSpecialOperationsV8Internal::namedItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"namedItem", TestSpecialOperationsV8Internal::namedItemMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestSpecialOperationsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp index 44554f33..4d63eb8 100644 --- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
@@ -316,26 +316,26 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestTypedefsLazyDataAttributes[] = { - {"tAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"tAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop #endif const V8DOMConfiguration::AccessorConfiguration V8TestTypedefsAccessors[] = { - {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGetterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"domStringOrDoubleOrNullAttribute", TestTypedefsV8Internal::domStringOrDoubleOrNullAttributeAttributeGetterCallback, TestTypedefsV8Internal::domStringOrDoubleOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"uLongLongAttribute", TestTypedefsV8Internal::uLongLongAttributeAttributeGetterCallback, TestTypedefsV8Internal::uLongLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"domStringOrDoubleOrNullAttribute", TestTypedefsV8Internal::domStringOrDoubleOrNullAttributeAttributeGetterCallback, TestTypedefsV8Internal::domStringOrDoubleOrNullAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestTypedefsMethods[] = { - {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgStringArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodArrayOfLongsArg", TestTypedefsV8Internal::voidMethodArrayOfLongsArgMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodFloatArgStringArg", TestTypedefsV8Internal::voidMethodFloatArgStringArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestCallbackInterfaceTypeArg", TestTypedefsV8Internal::voidMethodTestCallbackInterfaceTypeArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"uLongLongMethodTestInterfaceEmptyTypeSequenceArg", TestTypedefsV8Internal::uLongLongMethodTestInterfaceEmptyTypeSequenceArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceOrTestInterfaceEmptyMethod", TestTypedefsV8Internal::testInterfaceOrTestInterfaceEmptyMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"domStringOrDoubleMethod", TestTypedefsV8Internal::domStringOrDoubleMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"arrayOfStringsMethodArrayOfStringsArg", TestTypedefsV8Internal::arrayOfStringsMethodArrayOfStringsArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"stringArrayMethodStringArrayArg", TestTypedefsV8Internal::stringArrayMethodStringArrayArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestTypedefs::constructorCallback(const v8::FunctionCallbackInfo<v8::Value>& info) {
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp index d65246b..f8a3cab 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
@@ -69,7 +69,7 @@ } // namespace TestInterface2PartialV8Internal const V8DOMConfiguration::MethodConfiguration V8TestInterface2Methods[] = { - {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2MethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodPartial2", TestInterface2PartialV8Internal::voidMethodPartial2MethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -86,7 +86,7 @@ V8DOMConfiguration::installMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods)); if (RuntimeEnabledFeatures::interface2PartialFeatureNameEnabled()) { - const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodConfiguration = {"voidMethodPartial1", TestInterface2PartialV8Internal::voidMethodPartial1MethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodConfiguration = {"voidMethodPartial1", TestInterface2PartialV8Internal::voidMethodPartial1MethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, voidMethodPartial1MethodConfiguration); } }
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp index e5215e0..b52d932 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
@@ -860,38 +860,38 @@ #pragma clang diagnostic ignored "-Wglobal-constructors" #endif const V8DOMConfiguration::AttributeConfiguration V8TestInterface5LazyDataAttributes[] = { - {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, + {"testInterfaceConstructorAttribute", v8ConstructorAttributeGetter, 0, 0, 0, nullptr, const_cast<WrapperTypeInfo*>(&V8TestInterface5::wrapperTypeInfo), static_cast<v8::AccessControl>(v8::DEFAULT), static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnInstance, V8DOMConfiguration::CheckHolder}, }; #if defined(COMPONENT_BUILD) && defined(WIN32) && COMPILER(CLANG) #pragma clang diagnostic pop #endif const V8DOMConfiguration::AccessorConfiguration V8TestInterface5Accessors[] = { - {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"testInterfaceAttribute", TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::testInterfaceAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"doubleAttribute", TestInterface5ImplementationV8Internal::doubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::doubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"floatAttribute", TestInterface5ImplementationV8Internal::floatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::floatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedDoubleAttribute", TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::unrestrictedDoubleAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unrestrictedFloatAttribute", TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::unrestrictedFloatAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"staticStringAttribute", TestInterface5ImplementationV8Internal::staticStringAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::staticStringAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"alwaysExposedAttribute", TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::alwaysExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; const V8DOMConfiguration::MethodConfiguration V8TestInterface5Methods[] = { - {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallback, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, - {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodVoidExperimentalCallbackFunction", TestInterface5ImplementationV8Internal::voidMethodVoidExperimentalCallbackFunctionMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"voidMethodVoidCallbackFunctionModulesArg", TestInterface5ImplementationV8Internal::voidMethodVoidCallbackFunctionModulesArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodTestInterfaceEmptyArg", TestInterface5ImplementationV8Internal::voidMethodTestInterfaceEmptyArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleArgFloatArg", TestInterface5ImplementationV8Internal::voidMethodDoubleArgFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodUnrestrictedDoubleArgUnrestrictedFloatArg", TestInterface5ImplementationV8Internal::voidMethodUnrestrictedDoubleArgUnrestrictedFloatArgMethodCallback, 0, 2, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethod", TestInterface5ImplementationV8Internal::voidMethodMethodCallback, TestInterface5ImplementationV8Internal::voidMethodMethodCallbackForMainWorld, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"alwaysExposedMethod", TestInterface5ImplementationV8Internal::alwaysExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"alwaysExposedStaticMethod", TestInterface5ImplementationV8Internal::alwaysExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}, + {"voidMethodBooleanOrDOMStringArg", TestInterface5ImplementationV8Internal::voidMethodBooleanOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodDoubleOrDOMStringArg", TestInterface5ImplementationV8Internal::voidMethodDoubleOrDOMStringArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodVoidExperimentalCallbackFunction", TestInterface5ImplementationV8Internal::voidMethodVoidExperimentalCallbackFunctionMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"voidMethodVoidCallbackFunctionModulesArg", TestInterface5ImplementationV8Internal::voidMethodVoidCallbackFunctionModulesArgMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"keys", TestInterface5ImplementationV8Internal::keysMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"values", TestInterface5ImplementationV8Internal::valuesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"entries", TestInterface5ImplementationV8Internal::entriesMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"forEach", TestInterface5ImplementationV8Internal::forEachMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"toString", TestInterface5ImplementationV8Internal::toStringMethodCallback, 0, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -924,7 +924,7 @@ instanceTemplate->SetHandler(namedPropertyHandlerConfig); // Iterator (@@iterator) - const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype }; + const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, TestInterface5ImplementationV8Internal::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::OnPrototype }; V8DOMConfiguration::installMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration); instanceTemplate->SetCallAsFunctionHandler(V8TestInterface5::legacyCallCustom); @@ -951,34 +951,34 @@ ExecutionContext* executionContext = toExecutionContext(context); v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"workerExposedAttribute", TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::workerExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorConfiguration = {"windowExposedAttribute", TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeGetterCallback, TestInterface5ImplementationV8Internal::windowExposedAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, accessorConfiguration); } v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); ExecutionContext* executionContext = toExecutionContext(prototypeObject->CreationContext()); DCHECK(executionContext); if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::workerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration workerExposedMethodMethodConfiguration = {"workerExposedMethod", TestInterface5ImplementationV8Internal::workerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedMethodMethodConfiguration); } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfiguration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::windowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration windowExposedMethodMethodConfiguration = {"windowExposedMethod", TestInterface5ImplementationV8Internal::windowExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedMethodMethodConfiguration); } if (executionContext && (executionContext->isWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration workerExposedStaticMethodMethodConfiguration = {"workerExposedStaticMethod", TestInterface5ImplementationV8Internal::workerExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, workerExposedStaticMethodMethodConfiguration); } if (executionContext && (executionContext->isDocument())) { - const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration windowExposedStaticMethodMethodConfiguration = {"windowExposedStaticMethod", TestInterface5ImplementationV8Internal::windowExposedStaticMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowExposedStaticMethodMethodConfiguration); } if (executionContext && (executionContext->isDocument() || executionContext->isServiceWorkerGlobalScope())) { - const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration windowAndServiceWorkerExposedMethodMethodConfiguration = {"windowAndServiceWorkerExposedMethod", TestInterface5ImplementationV8Internal::windowAndServiceWorkerExposedMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, v8::Local<v8::Object>(), prototypeObject, interfaceObject, signature, windowAndServiceWorkerExposedMethodMethodConfiguration); } }
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp index dc0555b..6c2be92c 100644 --- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp +++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -10,7 +10,6 @@ #include "bindings/core/v8/ExceptionState.h" #include "bindings/core/v8/GeneratedCodeHelper.h" -#include "bindings/core/v8/PrivateScriptRunner.h" #include "bindings/core/v8/ScriptPromise.h" #include "bindings/core/v8/ScriptState.h" #include "bindings/core/v8/V8DOMConfiguration.h" @@ -21,10 +20,8 @@ #include "bindings/tests/idls/modules/TestInterfacePartial3Implementation.h" #include "bindings/tests/idls/modules/TestInterfacePartial4.h" #include "core/dom/Document.h" -#include "core/frame/LocalFrame.h" #include "core/origin_trials/OriginTrials.h" #include "platform/RuntimeEnabledFeatures.h" -#include "platform/ScriptForbiddenScope.h" #include "wtf/GetPtr.h" #include "wtf/RefPtr.h" @@ -376,8 +373,8 @@ } // namespace TestInterfaceImplementationPartialV8Internal const V8DOMConfiguration::MethodConfiguration V8TestInterfaceMethods[] = { - {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, - {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unscopableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"partialVoidTestEnumModulesArgMethod", TestInterfaceImplementationPartialV8Internal::partialVoidTestEnumModulesArgMethodMethodCallback, 0, 1, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, + {"unscopableVoidMethod", TestInterfaceImplementationPartialV8Internal::unscopableVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}, }; void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) { @@ -404,15 +401,15 @@ v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTypeInfo.domTemplate(isolate, world); v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate); ALLOW_UNUSED_LOCAL(signature); - const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeConfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorpartial4LongAttributeConfiguration = {"partial4LongAttribute", TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4LongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessorpartial4LongAttributeConfiguration); - const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttributeConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::AccessorConfiguration accessorpartial4StaticLongAttributeConfiguration = {"partial4StaticLongAttribute", TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeGetterCallback, TestInterfaceImplementationPartialV8Internal::partial4StaticLongAttributeAttributeSetterCallback, 0, 0, nullptr, 0, v8::DEFAULT, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installAccessor(isolate, world, instance, prototype, interface, signature, accessorpartial4StaticLongAttributeConfiguration); const V8DOMConfiguration::ConstantConfiguration constantPartial4UnsignedShortConfiguration = {"PARTIAL4_UNSIGNED_SHORT", 4, 0, V8DOMConfiguration::ConstantTypeUnsignedShort}; V8DOMConfiguration::installConstant(isolate, interface, prototype, constantPartial4UnsignedShortConfiguration); - const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodConfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration methodPartial4StaticvoidmethodConfiguration = {"partial4StaticVoidMethod", TestInterfaceImplementationPartialV8Internal::partial4StaticVoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnInterface, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interface, signature, methodPartial4StaticvoidmethodConfiguration); - const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfiguration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::ExposedToAllScripts, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; + const V8DOMConfiguration::MethodConfiguration methodPartial4VoidmethodConfiguration = {"partial4VoidMethod", TestInterfaceImplementationPartialV8Internal::partial4VoidMethodMethodCallback, 0, 0, v8::None, V8DOMConfiguration::OnPrototype, V8DOMConfiguration::CheckHolder}; V8DOMConfiguration::installMethod(isolate, world, instance, prototype, interface, signature, methodPartial4VoidmethodConfiguration); }
diff --git a/third_party/WebKit/Source/build/scripts/make_private_script_source.py b/third_party/WebKit/Source/build/scripts/make_private_script_source.py deleted file mode 100644 index 19078b2ea..0000000 --- a/third_party/WebKit/Source/build/scripts/make_private_script_source.py +++ /dev/null
@@ -1,86 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Convert PrivateScript's sources to C++ constant strings. -FIXME: We don't want to add more build scripts. Rewrite this script in grit. crbug.com/388121 - -Usage: -python make_private_script_source.py DESTINATION_FILE SOURCE_FILES -""" - -import optparse -import os -import re -import sys - - -# We assume that X.js has a corresponding X.idl in the same directory. -# If X is a partial interface, this method extracts the base name of the partial interface from X.idl. -# Otherwise, this method returns None. -def extract_partial_interface_name(filename): - basename, ext = os.path.splitext(filename) - assert ext == '.js' - # PrivateScriptRunner.js is a special JS script to control private scripts, - # and doesn't have a corresponding IDL file. - if os.path.basename(basename) == 'PrivateScriptRunner': - return None - idl_filename = basename + '.idl' - with open(idl_filename) as f: - contents = f.read() - match = re.search(r'partial\s+interface\s+(\w+)\s*{', contents) - return match and match.group(1) - - -def main(): - parser = optparse.OptionParser() - parser.add_option('--for-testing', action="store_true", default=False) - - options, args = parser.parse_args() - output_filename = args[0] - input_filenames = args[1:] - source_name, ext = os.path.splitext(os.path.basename(output_filename)) - - contents = [] - contents.append('#ifndef %s_h\n' % source_name) - contents.append('#define %s_h\n' % source_name) - if options.for_testing: - for input_filename in input_filenames: - class_name, ext = os.path.splitext(os.path.basename(input_filename)) - with open(input_filename) as input_file: - input_text = input_file.read() - hex_values = ['0x{0:02x}'.format(ord(char)) for char in input_text] - contents.append('const char kSourceOf%s[] = {\n %s\n};\n\n' % ( - class_name, ', '.join(hex_values))) - contents.append('struct %s {' % source_name) - contents.append(""" - const char* scriptClassName; - const char* className; - """) - if options.for_testing: - contents.append(""" - const char* source; - size_t size;""") - else: - contents.append('const char* resourceFile;') - contents.append(""" -}; - -""") - - contents.append('struct %s k%s[] = {\n' % (source_name, source_name)) - for input_filename in input_filenames: - script_class_name, ext = os.path.splitext(os.path.basename(input_filename)) - class_name = extract_partial_interface_name(input_filename) or script_class_name - if options.for_testing: - contents.append(' { "%s", "%s", kSourceOf%s, sizeof(kSourceOf%s) },\n' % (script_class_name, class_name, script_class_name, script_class_name)) - else: - contents.append(' { "%s", "%s", "%s.js" },\n' % (script_class_name, class_name, script_class_name)) - contents.append('};\n') - contents.append('#endif // %s_h\n' % source_name) - with open(output_filename, 'w') as output_file: - output_file.write("".join(contents)) - - -if __name__ == '__main__': - sys.exit(main())
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn index 36d8794..3537f1a6 100644 --- a/third_party/WebKit/Source/core/BUILD.gn +++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -276,8 +276,6 @@ "testing/OriginTrialsTest.cpp", "testing/OriginTrialsTest.h", "testing/OriginTrialsTestPartial.h", - "testing/PrivateScriptTest.cpp", - "testing/PrivateScriptTest.h", "testing/TypeConversions.h", "testing/UnionTypesTest.cpp", "testing/UnionTypesTest.h", @@ -698,47 +696,6 @@ # One-off scripts -------------------------------------------------------------- -# FIXME: The implementation of Blink-in-JS is not yet mature. -# You can use Blink-in-JS in your local experiment, but don't ship it. -# crbug.com/341031 -action("make_core_generated_private_script") { - visibility = [] # Allow re-assignment of list. - visibility = [ ":*" ] - script = "../build/scripts/make_private_script_source.py" - - inputs = [ - "../bindings/core/v8/PrivateScriptRunner.js", - ] - outputs = [ - "$blink_core_output_dir/PrivateScriptSources.h", - ] - - args = rebase_path(outputs, root_build_dir) - args += rebase_path(inputs, root_build_dir) - - deps = make_core_generated_deps -} - -action("make_core_generated_private_script_for_testing") { - visibility = [] # Allow re-assignment of list. - visibility = [ ":*" ] - script = "../build/scripts/make_private_script_source.py" - - inputs = [ - "testing/PartialPrivateScriptTest.js", - "testing/PrivateScriptTest.js", - ] - outputs = [ - "$blink_core_output_dir/PrivateScriptSourcesForTesting.h", - ] - - args = [ "--for-testing" ] - args += rebase_path(outputs, root_build_dir) - args += rebase_path(inputs, root_build_dir) - - deps = make_core_generated_deps -} - action("make_minimized_css") { script = "../build/scripts/minimize_css.py" @@ -940,12 +897,10 @@ ":make_core_generated_xlink_names", ":make_core_generated_xml_names", ":make_core_generated_xml_ns_names", - ":make_core_generated_private_script", ":make_core_generated_html_element_type_helpers", ":make_core_generated_css_value_keywords", ":make_core_generated_media_features", ":make_core_generated_svg_element_type_helpers", - ":make_core_generated_private_script_for_testing", ] group("all_generators") { @@ -1319,7 +1274,6 @@ "svg/SVGPathParserTest.cpp", "svg/UnsafeSVGAttributeSanitizationTest.cpp", "svg/graphics/SVGImageTest.cpp", - "testing/PrivateScriptTestTest.cpp", "timing/MemoryInfoTest.cpp", "timing/PerformanceBaseTest.cpp", "timing/PerformanceObserverTest.cpp",
diff --git a/third_party/WebKit/Source/core/core_idl_files.gni b/third_party/WebKit/Source/core/core_idl_files.gni index 72e976b..f55f132 100644 --- a/third_party/WebKit/Source/core/core_idl_files.gni +++ b/third_party/WebKit/Source/core/core_idl_files.gni
@@ -582,7 +582,6 @@ "testing/LayerRect.idl", "testing/LayerRectList.idl", "testing/OriginTrialsTest.idl", - "testing/PrivateScriptTest.idl", "testing/TypeConversions.idl", "testing/UnionTypesTest.idl", ], @@ -597,11 +596,7 @@ "abspath") webcore_testing_dependency_idl_files = - get_path_info([ - "testing/OriginTrialsTestPartial.idl", - "testing/PartialPrivateScriptTest.idl", - ], - "abspath") + get_path_info([ "testing/OriginTrialsTestPartial.idl" ], "abspath") generated_webcore_testing_idl_files = get_path_info(
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h index 25189860..699f06b 100644 --- a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h +++ b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
@@ -182,9 +182,12 @@ if (m_style->setEffectiveZoom(f)) m_fontBuilder.didChangeEffectiveZoom(); } - void setWritingMode(WritingMode writingMode) { - if (m_style->setWritingMode(writingMode)) - m_fontBuilder.didChangeWritingMode(); + void setWritingMode(WritingMode newWritingMode) { + if (m_style->getWritingMode() == newWritingMode) { + return; + } + m_style->setWritingMode(newWritingMode); + m_fontBuilder.didChangeWritingMode(); } void setTextOrientation(TextOrientation textOrientation) { if (m_style->setTextOrientation(textOrientation))
diff --git a/third_party/WebKit/Source/core/dom/ExceptionCode.h b/third_party/WebKit/Source/core/dom/ExceptionCode.h index 61fa294..5edb042 100644 --- a/third_party/WebKit/Source/core/dom/ExceptionCode.h +++ b/third_party/WebKit/Source/core/dom/ExceptionCode.h
@@ -28,8 +28,7 @@ // an exception of any type can be expressed with a single integer. typedef int ExceptionCode; -// This list must be in sync with the |domExceptions| in PrivateScriptRunner.js -// and |coreExceptions| in DOMExceptions.cpp. +// This list must be in sync with |coreExceptions| in DOMExceptions.cpp. // Some of these are considered historical since they have been // changed or removed from the specifications. enum {
diff --git a/third_party/WebKit/Source/core/dom/PendingScript.cpp b/third_party/WebKit/Source/core/dom/PendingScript.cpp index 162bb81..f3eb537 100644 --- a/third_party/WebKit/Source/core/dom/PendingScript.cpp +++ b/third_party/WebKit/Source/core/dom/PendingScript.cpp
@@ -65,7 +65,7 @@ m_element = nullptr; } -void PendingScript::watchForLoad(ScriptResourceClient* client) { +void PendingScript::watchForLoad(PendingScriptClient* client) { DCHECK(!m_watchingForLoad); // addClient() will call streamingFinished() if the load is complete. Callers // who do not expect to be re-entered from this call should not call @@ -74,16 +74,14 @@ // notifyFinished and further stopWatchingForLoad(). m_watchingForLoad = true; m_client = client; - if (!m_streamer) - resource()->addClient(client); + if (isReady()) + m_client->pendingScriptFinished(this); } void PendingScript::stopWatchingForLoad() { if (!m_watchingForLoad) return; DCHECK(resource()); - if (!m_streamer) - resource()->removeClient(m_client); m_client = nullptr; m_watchingForLoad = false; } @@ -91,7 +89,7 @@ void PendingScript::streamingFinished() { DCHECK(resource()); if (m_client) - m_client->notifyFinished(resource()); + m_client->pendingScriptFinished(this); } void PendingScript::setElement(Element* element) { @@ -163,8 +161,12 @@ } } + // If script streaming is in use, the client will be notified in + // streamingFinished. if (m_streamer) m_streamer->notifyFinished(resource); + else if (m_client) + m_client->pendingScriptFinished(this); } void PendingScript::notifyAppendData(ScriptResource* resource) {
diff --git a/third_party/WebKit/Source/core/dom/PendingScript.h b/third_party/WebKit/Source/core/dom/PendingScript.h index b29c0fa6..fa93534 100644 --- a/third_party/WebKit/Source/core/dom/PendingScript.h +++ b/third_party/WebKit/Source/core/dom/PendingScript.h
@@ -38,8 +38,22 @@ namespace blink { class Element; +class PendingScript; class ScriptSourceCode; +class CORE_EXPORT PendingScriptClient : public GarbageCollectedMixin { + public: + virtual ~PendingScriptClient() {} + + // Invoked when the pending script has finished loading. This could be during + // |watchForLoad| (if the pending script was already ready), or when the + // resource loads (if script streaming is not occurring), or when script + // streaming finishes. + virtual void pendingScriptFinished(PendingScript*) = 0; + + DEFINE_INLINE_VIRTUAL_TRACE() {} +}; + // A container for an external script which may be loaded and executed. // // TODO(kochi): The comment below is from pre-oilpan age and may not be correct @@ -71,7 +85,7 @@ return m_parserBlockingLoadStartTime; } - void watchForLoad(ScriptResourceClient*); + void watchForLoad(PendingScriptClient*); void stopWatchingForLoad(); Element* element() const { return m_element.get(); } @@ -79,10 +93,6 @@ void setScriptResource(ScriptResource*); - void notifyFinished(Resource*) override; - String debugName() const override { return "PendingScript"; } - void notifyAppendData(ScriptResource*) override; - DECLARE_TRACE(); ScriptSourceCode getSource(const KURL& documentURL, @@ -100,6 +110,12 @@ PendingScript(Element*, ScriptResource*); PendingScript() = delete; + // ScriptResourceClient + void notifyFinished(Resource*) override; + String debugName() const override { return "PendingScript"; } + void notifyAppendData(ScriptResource*) override; + + // MemoryCoordinatorClient void onMemoryStateChange(MemoryState) override; bool m_watchingForLoad; @@ -109,7 +125,7 @@ double m_parserBlockingLoadStartTime; Member<ScriptStreamer> m_streamer; - Member<ScriptResourceClient> m_client; + Member<PendingScriptClient> m_client; }; } // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp index a02e2ca20..7b3915a 100644 --- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -91,7 +91,7 @@ visitor->trace(m_element); visitor->trace(m_resource); visitor->trace(m_pendingScript); - ScriptResourceClient::trace(visitor); + PendingScriptClient::trace(visitor); } void ScriptLoader::setFetchDocWrittenScriptDeferIdle() { @@ -291,7 +291,7 @@ m_asyncExecType = ScriptRunner::InOrder; contextDocument->scriptRunner()->queueScriptForExecution(this, m_asyncExecType); - // Note that watchForLoad can immediately call notifyFinished. + // Note that watchForLoad can immediately call pendingScriptFinished. m_pendingScript->watchForLoad(this); } else if (client->hasSourceAttribute()) { m_pendingScript = PendingScript::create(m_element, m_resource.get()); @@ -306,7 +306,7 @@ } contextDocument->scriptRunner()->queueScriptForExecution(this, m_asyncExecType); - // Note that watchForLoad can immediately call notifyFinished. + // Note that watchForLoad can immediately call pendingScriptFinished. m_pendingScript->watchForLoad(this); } else { // Reset line numbering for nested writes. @@ -573,8 +573,9 @@ m_resource = nullptr; } -void ScriptLoader::notifyFinished(Resource* resource) { +void ScriptLoader::pendingScriptFinished(PendingScript* pendingScript) { DCHECK(!m_willBeParserExecuted); + DCHECK_EQ(m_pendingScript, pendingScript); // We do not need this script in the memory cache. The primary goals of // sending this fetch request are to let the third party server know @@ -582,7 +583,7 @@ // cache for subsequent uses. if (m_documentWriteIntervention == DocumentWriteIntervention::FetchDocWrittenScriptDeferIdle) { - memoryCache()->remove(resource); + memoryCache()->remove(m_pendingScript->resource()); m_pendingScript->stopWatchingForLoad(); return; } @@ -595,7 +596,7 @@ return; } - DCHECK_EQ(resource, m_resource); + DCHECK_EQ(pendingScript->resource(), m_resource); if (m_resource->errorOccurred()) { contextDocument->scriptRunner()->notifyScriptLoadError(this,
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h index abad9d2..e92c9e5 100644 --- a/third_party/WebKit/Source/core/dom/ScriptLoader.h +++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -38,7 +38,7 @@ class LocalFrame; class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>, - public ScriptResourceClient { + public PendingScriptClient { USING_GARBAGE_COLLECTED_MIXIN(ScriptLoader); public: @@ -134,9 +134,8 @@ ScriptLoaderClient* client() const; - // ResourceClient - void notifyFinished(Resource*) override; - String debugName() const override { return "ScriptLoader"; } + // PendingScriptClient + void pendingScriptFinished(PendingScript*) override; Member<Element> m_element; Member<ScriptResource> m_resource;
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.cpp b/third_party/WebKit/Source/core/frame/Deprecation.cpp index 1f0bd83..acd4a1e 100644 --- a/third_party/WebKit/Source/core/frame/Deprecation.cpp +++ b/third_party/WebKit/Source/core/frame/Deprecation.cpp
@@ -169,15 +169,6 @@ Deprecation::countDeprecation(document.frame(), feature); } -void Deprecation::countDeprecationIfNotPrivateScript( - v8::Isolate* isolate, - ExecutionContext* context, - UseCounter::Feature feature) { - if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) - return; - Deprecation::countDeprecation(context, feature); -} - void Deprecation::countDeprecationCrossOriginIframe( const LocalFrame* frame, UseCounter::Feature feature) {
diff --git a/third_party/WebKit/Source/core/frame/Deprecation.h b/third_party/WebKit/Source/core/frame/Deprecation.h index 080a590..1e7e2a3 100644 --- a/third_party/WebKit/Source/core/frame/Deprecation.h +++ b/third_party/WebKit/Source/core/frame/Deprecation.h
@@ -42,12 +42,7 @@ static void countDeprecation(const LocalFrame*, UseCounter::Feature); static void countDeprecation(ExecutionContext*, UseCounter::Feature); static void countDeprecation(const Document&, UseCounter::Feature); - // Use countDeprecationIfNotPrivateScript() instead of countDeprecation() - // if you don't want to count metrics in private scripts. You should use - // countDeprecationIfNotPrivateScript() in a binding layer. - static void countDeprecationIfNotPrivateScript(v8::Isolate*, - ExecutionContext*, - UseCounter::Feature); + // Count only features if they're being used in an iframe which does not // have script access into the top level document. static void countDeprecationCrossOriginIframe(const LocalFrame*,
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.cpp b/third_party/WebKit/Source/core/frame/UseCounter.cpp index 2433c7c..8bded68 100644 --- a/third_party/WebKit/Source/core/frame/UseCounter.cpp +++ b/third_party/WebKit/Source/core/frame/UseCounter.cpp
@@ -1190,30 +1190,6 @@ toWorkerOrWorkletGlobalScope(context)->countFeature(feature); } -void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, - const Frame* frame, - Feature feature) { - if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) - return; - UseCounter::count(frame, feature); -} - -void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, - const Document& document, - Feature feature) { - if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) - return; - UseCounter::count(document, feature); -} - -void UseCounter::countIfNotPrivateScript(v8::Isolate* isolate, - ExecutionContext* context, - Feature feature) { - if (DOMWrapperWorld::current(isolate).isPrivateScriptIsolatedWorld()) - return; - UseCounter::count(context, feature); -} - void UseCounter::countCrossOriginIframe(const Document& document, Feature feature) { LocalFrame* frame = document.frame();
diff --git a/third_party/WebKit/Source/core/frame/UseCounter.h b/third_party/WebKit/Source/core/frame/UseCounter.h index f6b6b45..62bd4f0 100644 --- a/third_party/WebKit/Source/core/frame/UseCounter.h +++ b/third_party/WebKit/Source/core/frame/UseCounter.h
@@ -1397,12 +1397,6 @@ static void count(const Frame*, Feature); static void count(const Document&, Feature); static void count(ExecutionContext*, Feature); - // Use countIfNotPrivateScript() instead of count() if you don't want - // to count metrics in private scripts. You should use - // countIfNotPrivateScript() in a binding layer. - static void countIfNotPrivateScript(v8::Isolate*, const Frame*, Feature); - static void countIfNotPrivateScript(v8::Isolate*, const Document&, Feature); - static void countIfNotPrivateScript(v8::Isolate*, ExecutionContext*, Feature); void count(CSSParserMode, CSSPropertyID); void count(Feature);
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp index 7c3ce71a..6f29385a 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp +++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp
@@ -1083,7 +1083,7 @@ scanAndPreload(m_preloadScanner.get()); } -void HTMLDocumentParser::notifyScriptLoaded(Resource* cachedResource) { +void HTMLDocumentParser::notifyScriptLoaded(PendingScript* pendingScript) { ASSERT(m_scriptRunner); ASSERT(!isExecutingScript()); @@ -1096,7 +1096,7 @@ return; } - m_scriptRunner->executeScriptsWaitingForLoad(cachedResource); + m_scriptRunner->executeScriptsWaitingForLoad(pendingScript); if (!isWaitingForScripts()) resumeParsingAfterScriptExecution(); }
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h index 1662fbad..108fdac 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h +++ b/third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.h
@@ -175,7 +175,7 @@ void documentElementAvailable() override; // HTMLParserScriptRunnerHost - void notifyScriptLoaded(Resource*) final; + void notifyScriptLoaded(PendingScript*) final; HTMLInputStream& inputStream() final { return m_input; } bool hasPreloadScanner() const final { return m_preloadScanner.get() && !shouldUseThreading();
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp index 803d900..cded6c1 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp +++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.cpp
@@ -248,19 +248,6 @@ DCHECK(!isExecutingScript()); } -void HTMLParserScriptRunner::stopWatchingResourceForLoad(Resource* resource) { - if (m_parserBlockingScript->resource() == resource) { - m_parserBlockingScript->dispose(); - return; - } - for (auto& script : m_scriptsToExecuteAfterParsing) { - if (script->resource() == resource) { - script->dispose(); - return; - } - } -} - void fetchBlockedDocWriteScript(Element* script, bool isParserInserted, const TextPosition& scriptStartPosition) { @@ -274,15 +261,15 @@ } void HTMLParserScriptRunner::possiblyFetchBlockedDocWriteScript( - Resource* resource) { + PendingScript* pendingScript) { // If the script was blocked as part of document.write intervention, // then send an asynchronous GET request with an interventions header. Element* element = nullptr; TextPosition startingPosition; bool isParserInserted = false; - if (!resource->errorOccurred() || !m_parserBlockingScript || - !(m_parserBlockingScript->resource() == resource)) + if (!pendingScript->errorOccurred() || + m_parserBlockingScript != pendingScript) return; // Due to dependency violation, not able to check the exact error to be @@ -297,28 +284,29 @@ isParserInserted = scriptLoader->isParserInserted(); // remove this resource entry from memory cache as the new request // should not join onto this existing entry. - memoryCache()->remove(resource); + memoryCache()->remove(pendingScript->resource()); fetchBlockedDocWriteScript(element, isParserInserted, startingPosition); } } -void HTMLParserScriptRunner::notifyFinished(Resource* cachedResource) { +void HTMLParserScriptRunner::pendingScriptFinished( + PendingScript* pendingScript) { // Handle cancellations of parser-blocking script loads without // notifying the host (i.e., parser) if these were initiated by nested // document.write()s. The cancellation may have been triggered by // script execution to signal an abrupt stop (e.g., window.close().) // // The parser is unprepared to be told, and doesn't need to be. - if (isExecutingScript() && cachedResource->wasCanceled()) { - stopWatchingResourceForLoad(cachedResource); + if (isExecutingScript() && pendingScript->resource()->wasCanceled()) { + pendingScript->dispose(); return; } // If the script was blocked as part of document.write intervention, // then send an asynchronous GET request with an interventions header. - possiblyFetchBlockedDocWriteScript(cachedResource); + possiblyFetchBlockedDocWriteScript(pendingScript); - m_host->notifyScriptLoaded(cachedResource); + m_host->notifyScriptLoaded(pendingScript); } // Implements the steps for 'An end tag whose tag name is "script"' @@ -373,11 +361,12 @@ } } -void HTMLParserScriptRunner::executeScriptsWaitingForLoad(Resource* resource) { +void HTMLParserScriptRunner::executeScriptsWaitingForLoad( + PendingScript* pendingScript) { TRACE_EVENT0("blink", "HTMLParserScriptRunner::executeScriptsWaitingForLoad"); DCHECK(!isExecutingScript()); DCHECK(hasParserBlockingScript()); - DCHECK_EQ(resource, m_parserBlockingScript->resource()); + DCHECK_EQ(pendingScript, m_parserBlockingScript); DCHECK(m_parserBlockingScript->isReady()); executeParsingBlockingScripts(); } @@ -529,7 +518,7 @@ visitor->trace(m_host); visitor->trace(m_parserBlockingScript); visitor->trace(m_scriptsToExecuteAfterParsing); - ScriptResourceClient::trace(visitor); + PendingScriptClient::trace(visitor); } } // namespace blink
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h index 013605c..9d4946a1 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h +++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
@@ -37,7 +37,6 @@ namespace blink { -class Resource; class Document; class Element; class HTMLParserScriptRunnerHost; @@ -53,7 +52,7 @@ // An HTMLParserScriptRunner is owned by its host, an HTMLDocumentParser. class HTMLParserScriptRunner final : public GarbageCollectedFinalized<HTMLParserScriptRunner>, - private ScriptResourceClient { + private PendingScriptClient { WTF_MAKE_NONCOPYABLE(HTMLParserScriptRunner); USING_GARBAGE_COLLECTED_MIXIN(HTMLParserScriptRunner); USING_PRE_FINALIZER(HTMLParserScriptRunner, detach); @@ -78,7 +77,7 @@ // Invoked when the parsing-blocking script resource has loaded, to execute // parsing-blocking scripts. - void executeScriptsWaitingForLoad(Resource*); + void executeScriptsWaitingForLoad(PendingScript*); // Invoked when all script-blocking resources (e.g., stylesheets) have loaded, // to execute parsing-blocking scripts. @@ -92,10 +91,6 @@ return !!m_reentryPermit->scriptNestingLevel(); } - // ResourceClient - void notifyFinished(Resource*) override; - String debugName() const override { return "HTMLParserScriptRunner"; } - DECLARE_TRACE(); private: @@ -103,6 +98,9 @@ Document*, HTMLParserScriptRunnerHost*); + // PendingScriptClient + void pendingScriptFinished(PendingScript*) override; + void executePendingScriptAndDispatchEvent(PendingScript*, ScriptStreamer::Type); void executeParsingBlockingScripts(); @@ -118,9 +116,7 @@ bool isParserBlockingScriptReady(); - void stopWatchingResourceForLoad(Resource*); - - void possiblyFetchBlockedDocWriteScript(Resource*); + void possiblyFetchBlockedDocWriteScript(PendingScript*); RefPtr<HTMLParserReentryPermit> m_reentryPermit; Member<Document> m_document;
diff --git a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunnerHost.h b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunnerHost.h index 4c9864d..dc5e456 100644 --- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunnerHost.h +++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunnerHost.h
@@ -32,14 +32,14 @@ namespace blink { class HTMLInputStream; -class Resource; +class PendingScript; class CORE_EXPORT HTMLParserScriptRunnerHost : public GarbageCollectedMixin { public: virtual ~HTMLParserScriptRunnerHost() {} DEFINE_INLINE_VIRTUAL_TRACE() {} - virtual void notifyScriptLoaded(Resource*) = 0; + virtual void notifyScriptLoaded(PendingScript*) = 0; virtual HTMLInputStream& inputStream() = 0; virtual bool hasPreloadScanner() const = 0;
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp index ae74933..899f61f 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
@@ -323,13 +323,14 @@ flowThread->flowThreadDescendantStyleDidChange(this, diff, *oldStyle); updateScrollSnapMappingAfterStyleChange(&newStyle, oldStyle); - } - if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { - if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip()) { + if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && + shouldClipOverflow()) { // The overflow clip paint property depends on border sizes through - // overflowClipRect() so we update properties on border size changes. - if (oldStyle && !oldStyle->border().sizeEquals(newStyle.border())) + // overflowClipRect(), and border radii, so we update properties on + // border size or radii change. + if (!oldStyle->border().sizeEquals(newStyle.border()) || + !oldStyle->border().radiiEqual(newStyle.border())) setNeedsPaintPropertyUpdate(); } } @@ -1702,13 +1703,12 @@ if (!needsLayout()) setMayNeedPaintInvalidation(); - if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) { - // The overflow clip paint property depends on the border box rect through - // overflowClipRect(). The border box rect's size equals the frame rect's - // size, so we trigger a paint property update when the framerect changes. - if (hasOverflowClip() || styleRef().containsPaint() || hasControlClip()) - setNeedsPaintPropertyUpdate(); - } + // The overflow clip paint property depends on the border box rect through + // overflowClipRect(). The border box rect's size equals the frame rect's + // size, so we trigger a paint property update when the framerect changes. + if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled() && + shouldClipOverflow()) + setNeedsPaintPropertyUpdate(); } bool LayoutBox::intersectsVisibleViewport() const { @@ -5662,4 +5662,8 @@ return rect; } +bool LayoutBox::shouldClipOverflow() const { + return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.h b/third_party/WebKit/Source/core/layout/LayoutBox.h index b80f4420..ca58d047 100644 --- a/third_party/WebKit/Source/core/layout/LayoutBox.h +++ b/third_party/WebKit/Source/core/layout/LayoutBox.h
@@ -1306,6 +1306,8 @@ void ensureIsReadyForPaintInvalidation() override; + virtual bool shouldClipOverflow() const; + protected: void willBeDestroyed() override;
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp index 88ed08c..700adf8 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1953,8 +1953,11 @@ void LayoutObject::addChildWithWritingModeOfParent(LayoutObject* newChild, LayoutObject* beforeChild) { - if (newChild->mutableStyleRef().setWritingMode(styleRef().getWritingMode()) && - newChild->isBoxModelObject()) { + const WritingMode oldWritingMode = + newChild->mutableStyleRef().getWritingMode(); + const WritingMode newWritingMode = styleRef().getWritingMode(); + if (oldWritingMode != newWritingMode && newChild->isBoxModelObject()) { + newChild->mutableStyleRef().setWritingMode(newWritingMode); newChild->setHorizontalWritingMode(isHorizontalWritingMode()); } addChild(newChild, beforeChild);
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h index 467bf0a4..db0b83e5 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObject.h +++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -196,6 +196,7 @@ class CORE_EXPORT LayoutObject : public ImageResourceObserver, public DisplayItemClient { friend class LayoutObjectChildList; + FRIEND_TEST_ALL_PREFIXES(LayoutObjectTest, MutableForPaintingClearPaintFlags); friend class VisualRectMappingTest; WTF_MAKE_NONCOPYABLE(LayoutObject); @@ -1653,8 +1654,12 @@ // methods. class MutableForPainting { public: - void clearPaintInvalidationFlags() { + // Convenience mutator that clears paint invalidation flags and this object + // and its descendants' needs-paint-property-update flags. + void clearPaintFlags() { m_layoutObject.clearPaintInvalidationFlags(); + m_layoutObject.clearNeedsPaintPropertyUpdate(); + m_layoutObject.clearDescendantNeedsPaintPropertyUpdate(); } void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { m_layoutObject.setShouldDoFullPaintInvalidation(reason); @@ -1691,12 +1696,6 @@ void setNeedsPaintPropertyUpdate() { m_layoutObject.setNeedsPaintPropertyUpdate(); } - void clearNeedsPaintPropertyUpdate() { - m_layoutObject.clearNeedsPaintPropertyUpdate(); - } - void clearDescendantNeedsPaintPropertyUpdate() { - m_layoutObject.clearDescendantNeedsPaintPropertyUpdate(); - } protected: friend class PaintPropertyTreeBuilder;
diff --git a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp index a48afde..3682716 100644 --- a/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp +++ b/third_party/WebKit/Source/core/layout/LayoutObjectTest.cpp
@@ -93,7 +93,7 @@ TEST_F( LayoutObjectTest, - ContainingBlockAbsoluteLayoutObjectShouldNotBeNonStaticlyPositionedInlineAncestor) { + ContainingBlockAbsoluteLayoutObjectShouldNotBeNonStaticallyPositionedInlineAncestor) { setBodyInnerHTML( "<span style='position:relative'><bar " "style='position:absolute'></bar></span>"); @@ -124,4 +124,53 @@ EXPECT_EQ(columns->layer(), overflowClipObject->paintingLayer()); } +namespace { + +class ScopedSPv2 { + public: + ScopedSPv2() { RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true); } + ~ScopedSPv2() { m_featuresBackup.restore(); } + + private: + RuntimeEnabledFeatures::Backup m_featuresBackup; +}; + +} // namespace + +TEST_F(LayoutObjectTest, MutableForPaintingClearPaintFlags) { + LayoutObject* object = document().body()->layoutObject(); + object->setShouldDoFullPaintInvalidation(); + EXPECT_TRUE(object->shouldDoFullPaintInvalidation()); + object->m_bitfields.setChildShouldCheckForPaintInvalidation(true); + EXPECT_TRUE(object->m_bitfields.childShouldCheckForPaintInvalidation()); + object->setMayNeedPaintInvalidation(); + EXPECT_TRUE(object->mayNeedPaintInvalidation()); + object->setMayNeedPaintInvalidationSubtree(); + EXPECT_TRUE(object->mayNeedPaintInvalidationSubtree()); + object->setMayNeedPaintInvalidationAnimatedBackgroundImage(); + EXPECT_TRUE(object->mayNeedPaintInvalidationAnimatedBackgroundImage()); + object->setShouldInvalidateSelection(); + EXPECT_TRUE(object->shouldInvalidateSelection()); + object->setBackgroundChangedSinceLastPaintInvalidation(); + EXPECT_TRUE(object->backgroundChangedSinceLastPaintInvalidation()); + object->setNeedsPaintPropertyUpdate(); + EXPECT_TRUE(object->needsPaintPropertyUpdate()); + object->m_bitfields.setDescendantNeedsPaintPropertyUpdate(true); + EXPECT_TRUE(object->descendantNeedsPaintPropertyUpdate()); + + ScopedSPv2 enableSPv2; + document().lifecycle().advanceTo(DocumentLifecycle::InPrePaint); + object->getMutableForPainting().clearPaintFlags(); + + EXPECT_FALSE(object->shouldDoFullPaintInvalidation()); + EXPECT_FALSE(object->m_bitfields.childShouldCheckForPaintInvalidation()); + EXPECT_FALSE(object->mayNeedPaintInvalidation()); + EXPECT_FALSE(object->mayNeedPaintInvalidationSubtree()); + EXPECT_FALSE(object->mayNeedPaintInvalidationAnimatedBackgroundImage()); + EXPECT_FALSE(object->shouldInvalidateSelection()); + EXPECT_FALSE(object->backgroundChangedSinceLastPaintInvalidation()); + EXPECT_FALSE(object->needsPaintPropertyUpdate()); + EXPECT_FALSE(object->descendantNeedsPaintPropertyUpdate()); +} + } // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h index d20594f..d9bc63b 100644 --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h
@@ -81,7 +81,11 @@ const AffineTransform& localToBorderBoxTransform() const { return m_localToBorderBoxTransform; } + bool shouldApplyViewportClip() const; + bool shouldClipOverflow() const override { + return LayoutBox::shouldClipOverflow() || shouldApplyViewportClip(); + } LayoutRect visualOverflowRect() const override; LayoutRect overflowClipRect(
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.h b/third_party/WebKit/Source/core/loader/EmptyClients.h index 25c26a7..a668772d6 100644 --- a/third_party/WebKit/Source/core/loader/EmptyClients.h +++ b/third_party/WebKit/Source/core/loader/EmptyClients.h
@@ -30,7 +30,6 @@ #define EmptyClients_h #include "core/CoreExport.h" -#include "core/editing/commands/UndoStep.h" #include "core/loader/FrameLoaderClient.h" #include "core/page/ChromeClient.h" #include "core/page/ContextMenuClient.h"
diff --git a/third_party/WebKit/Source/core/paint/BlockPainter.cpp b/third_party/WebKit/Source/core/paint/BlockPainter.cpp index 18a0c33..f4c99ed 100644 --- a/third_party/WebKit/Source/core/paint/BlockPainter.cpp +++ b/third_party/WebKit/Source/core/paint/BlockPainter.cpp
@@ -208,8 +208,8 @@ .currentPaintChunkProperties()); auto* scrollTranslation = objectProperties->scrollTranslation(); DCHECK(scrollTranslation); - properties.transform = scrollTranslation; - properties.scroll = scroll; + properties.propertyTreeState.setTransform(scrollTranslation); + properties.propertyTreeState.setScroll(scroll); m_scopedScrollProperty.emplace( paintInfo.context.getPaintController(), m_layoutBlock, DisplayItem::paintPhaseToDrawingType(paintPhase), properties);
diff --git a/third_party/WebKit/Source/core/paint/BoxClipper.cpp b/third_party/WebKit/Source/core/paint/BoxClipper.cpp index 07bbf7d..5d533caa0 100644 --- a/third_party/WebKit/Source/core/paint/BoxClipper.cpp +++ b/third_party/WebKit/Source/core/paint/BoxClipper.cpp
@@ -45,7 +45,7 @@ if (objectProperties && objectProperties->overflowClip()) { PaintChunkProperties properties( paintInfo.context.getPaintController().currentPaintChunkProperties()); - properties.clip = objectProperties->overflowClip(); + properties.propertyTreeState.setClip(objectProperties->overflowClip()); m_scopedClipProperty.emplace(paintInfo.context.getPaintController(), box, paintInfo.displayItemTypeForClipping(), properties);
diff --git a/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h b/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h index cf648c6..a6dbeef 100644 --- a/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h +++ b/third_party/WebKit/Source/core/paint/FindPropertiesNeedingUpdate.h
@@ -9,26 +9,37 @@ namespace blink { // This file contains two scope classes for catching cases where paint -// properties need an update but where not marked as such. If paint properties +// properties needed an update but were not marked as such. If paint properties // will change, the object must be marked as needing a paint property update // using {FrameView, LayoutObject}::setNeedsPaintPropertyUpdate() or by forcing -// a subtree update (see: PaintPropertyTreeBuilderContext::forceSubtreeupdate). +// a subtree update (see: PaintPropertyTreeBuilderContext::forceSubtreeUpdate). // // Both scope classes work by recording the paint property state of an object // before rebuilding properties, forcing the properties to get updated, then // checking that the updated properties match the original properties. -#define DCHECK_FRAMEVIEW_PROPERTY_EQ(original, updated) \ - do { \ - DCHECK(!!original == !!updated) << "Property was created or deleted " \ - "without the FrameView needing a " \ - "paint property update."; \ - if (!!original && !!updated) { \ - DCHECK(*original == *updated) << "Property was updated without the " \ - "FrameView needing a paint property " \ - "update."; \ - } \ - } while (0); +#define DUMP_PROPERTIES(original, updated) \ + "\nOriginal:\n" \ + << (original ? (original)->toString().ascii().data() : "null") \ + << "\nUpdated:\n" \ + << (updated ? (updated)->toString().ascii().data() : "null") + +#define CHECK_PROPERTY_EQ(thing, original, updated) \ + do { \ + DCHECK(!!original == !!updated) << "Property was created or deleted " \ + << "without " << thing \ + << " needing a paint property update." \ + << DUMP_PROPERTIES(original, updated); \ + if (!!original && !!updated) { \ + DCHECK(*original == *updated) << "Property was updated without " \ + << thing \ + << " needing a paint property update." \ + << DUMP_PROPERTIES(original, updated); \ + } \ + } while (0) + +#define DCHECK_FRAMEVIEW_PROPERTY_EQ(original, updated) \ + CHECK_PROPERTY_EQ("the FrameView", original, updated) class FindFrameViewPropertiesNeedingUpdateScope { public: @@ -60,12 +71,12 @@ if (m_neededPaintPropertyUpdate || m_neededForcedSubtreeUpdate) return; - // If these checks fail, the paint properties should not have changed but - // did. This is due to missing one of these paint property invalidations: + // If these checks fail, the paint properties changed unexpectedly. This is + // due to missing one of these paint property invalidations: // 1) The FrameView should have been marked as needing an update with // FrameView::setNeedsPaintPropertyUpdate(). // 2) The PrePaintTreeWalk should have had a forced subtree update (see: - // PaintPropertyTreeBuilderContext::forceSubtreeupdate). + // PaintPropertyTreeBuilderContext::forceSubtreeUpdate). DCHECK_FRAMEVIEW_PROPERTY_EQ(m_originalPreTranslation, m_frameView->preTranslation()); DCHECK_FRAMEVIEW_PROPERTY_EQ(m_originalContentClip, @@ -88,19 +99,9 @@ RefPtr<ScrollPaintPropertyNode> m_originalScroll; }; -#define DCHECK_OBJECT_PROPERTY_EQ(object, original, updated) \ - do { \ - DCHECK(!!original == !!updated) << "Property was created or deleted " \ - "without the layout object (" \ - << object.debugName() \ - << ") needing a paint property update."; \ - if (!!original && !!updated) { \ - DCHECK(*original == *updated) << "Property was updated without the " \ - "layout object (" \ - << object.debugName() \ - << ") needing a paint property update."; \ - } \ - } while (0); +#define DCHECK_OBJECT_PROPERTY_EQ(object, original, updated) \ + CHECK_PROPERTY_EQ("the layout object (" << object.debugName() << ")", \ + original, updated) class FindObjectPropertiesNeedingUpdateScope { public: @@ -127,12 +128,12 @@ if (m_neededPaintPropertyUpdate || m_neededForcedSubtreeUpdate) return; - // If these checks fail, the paint properties should not have changed but - // did. This is due to missing one of these paint property invalidations: + // If these checks fail, the paint properties changed unexpectedly. This is + // due to missing one of these paint property invalidations: // 1) The LayoutObject should have been marked as needing an update with // LayoutObject::setNeedsPaintPropertyUpdate(). // 2) The PrePaintTreeWalk should have had a forced subtree update (see: - // PaintPropertyTreeBuilderContext::forceSubtreeupdate). + // PaintPropertyTreeBuilderContext::forceSubtreeUpdate). const auto* objectProperties = m_object.paintProperties(); if (m_originalProperties && objectProperties) { DCHECK_OBJECT_PROPERTY_EQ(m_object, @@ -171,9 +172,8 @@ const auto* objectBorderBox = objectProperties->localBorderBoxProperties(); if (originalBorderBox && objectBorderBox) { - DCHECK(originalBorderBox->paintOffset == objectBorderBox->paintOffset) - << "Border box paint offset was updated without the layout object (" - << m_object.debugName() << ") needing a paint property update."; + DCHECK_OBJECT_PROPERTY_EQ(m_object, &originalBorderBox->paintOffset, + &objectBorderBox->paintOffset); DCHECK_OBJECT_PROPERTY_EQ( m_object, originalBorderBox->propertyTreeState.transform(), objectBorderBox->propertyTreeState.transform());
diff --git a/third_party/WebKit/Source/core/paint/FramePainter.cpp b/third_party/WebKit/Source/core/paint/FramePainter.cpp index dc25b19..d05be3f 100644 --- a/third_party/WebKit/Source/core/paint/FramePainter.cpp +++ b/third_party/WebKit/Source/core/paint/FramePainter.cpp
@@ -57,10 +57,7 @@ m_frameView->totalPropertyTreeStateForContents()) { PaintChunkProperties properties( context.getPaintController().currentPaintChunkProperties()); - properties.transform = contentsState->transform(); - properties.clip = contentsState->clip(); - properties.effect = contentsState->effect(); - properties.scroll = contentsState->scroll(); + properties.propertyTreeState = *contentsState; scopedPaintChunkProperties.emplace(context.getPaintController(), *frameView().layoutView(), properties); @@ -101,13 +98,15 @@ // properties. This prevents the scrollbars from scrolling, for example. PaintChunkProperties properties( context.getPaintController().currentPaintChunkProperties()); - properties.transform = m_frameView->preTranslation(); - properties.clip = m_frameView->contentClip()->parent(); - properties.effect = contentsState->effect(); + properties.propertyTreeState.setTransform( + m_frameView->preTranslation()); + properties.propertyTreeState.setClip( + m_frameView->contentClip()->parent()); + properties.propertyTreeState.setEffect(contentsState->effect()); auto* scrollBarScroll = contentsState->scroll(); if (m_frameView->scroll()) scrollBarScroll = m_frameView->scroll()->parent(); - properties.scroll = scrollBarScroll; + properties.propertyTreeState.setScroll(scrollBarScroll); scopedPaintChunkProperties.emplace(context.getPaintController(), *frameView().layoutView(), properties);
diff --git a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp index 256584c..e12eb52 100644 --- a/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp +++ b/third_party/WebKit/Source/core/paint/PaintControllerPaintTest.cpp
@@ -203,13 +203,13 @@ DisplayItem::kClipFrameToVisibleContentRect))); const PaintChunk& backgroundChunk = rootPaintController().paintChunks()[0]; - EXPECT_TRUE(backgroundChunk.properties.scroll->isRoot()); + EXPECT_TRUE(backgroundChunk.properties.propertyTreeState.scroll()->isRoot()); const EffectPaintPropertyNode* effectNode = div.paintProperties()->effect(); EXPECT_EQ(0.5f, effectNode->opacity()); const PaintChunk& chunk = rootPaintController().paintChunks()[1]; EXPECT_EQ(*div.layer(), chunk.id->client); - EXPECT_EQ(effectNode, chunk.properties.effect.get()); + EXPECT_EQ(effectNode, chunk.properties.propertyTreeState.effect()); EXPECT_FALSE(div.layer()->isJustCreated()); // Client used by only paint chunks and non-cachaeable display items but not
diff --git a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp index f17b74bd..d4f2803 100644 --- a/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp +++ b/third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
@@ -269,11 +269,7 @@ context.getPaintController().currentPaintChunkProperties()); auto& localBorderBoxProperties = *objectPaintProperties->localBorderBoxProperties(); - properties.transform = - localBorderBoxProperties.propertyTreeState.transform(); - properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); - properties.clip = localBorderBoxProperties.propertyTreeState.clip(); - properties.effect = localBorderBoxProperties.propertyTreeState.effect(); + properties.propertyTreeState = localBorderBoxProperties.propertyTreeState; properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBackface(); scopedPaintChunkProperties.emplace(context.getPaintController(), @@ -476,11 +472,7 @@ context.getPaintController().currentPaintChunkProperties()); auto& localBorderBoxProperties = *objectPaintProperties->localBorderBoxProperties(); - properties.transform = - localBorderBoxProperties.propertyTreeState.transform(); - properties.scroll = localBorderBoxProperties.propertyTreeState.scroll(); - properties.clip = localBorderBoxProperties.propertyTreeState.clip(); - properties.effect = localBorderBoxProperties.propertyTreeState.effect(); + properties.propertyTreeState = localBorderBoxProperties.propertyTreeState; properties.backfaceHidden = m_paintLayer.layoutObject()->hasHiddenBackface(); contentScopedPaintChunkProperties.emplace(context.getPaintController(),
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp index a0a17d3..e388aaff 100644 --- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp +++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -532,9 +532,7 @@ LayoutRect clipRect; if (box.hasControlClip()) { clipRect = box.controlClipRect(context.current.paintOffset); - } else if (box.hasOverflowClip() || box.styleRef().containsPaint() || - (box.isSVGRoot() && - toLayoutSVGRoot(box).shouldApplyViewportClip())) { + } else if (box.shouldClipOverflow()) { clipRect = LayoutRect(pixelSnappedIntRect( box.overflowClipRect(context.current.paintOffset))); } else {
diff --git a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp index 42f00c521..76bdf53 100644 --- a/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp +++ b/third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp
@@ -119,9 +119,7 @@ if (descendantsFullyUpdated) { // If descendants were not fully updated, do not clear flags. During the // next PrePaintTreeWalk, these flags will be used again. - object.getMutableForPainting().clearPaintInvalidationFlags(); - object.getMutableForPainting().clearNeedsPaintPropertyUpdate(); - object.getMutableForPainting().clearDescendantNeedsPaintPropertyUpdate(); + object.getMutableForPainting().clearPaintFlags(); } return descendantsFullyUpdated; } @@ -131,7 +129,7 @@ updateAuxiliaryObjectProperties(object, localContext); // Ensure the current context takes into account the box position. This can - // change the current context's paint offset so it must proceed the paint + // change the current context's paint offset so it must precede the paint // offset property update check. m_propertyTreeBuilder.updateContextForBoxPosition( object, localContext.treeBuilderContext); @@ -191,9 +189,7 @@ if (descendantsFullyUpdated) { // If descendants were not updated, do not clear flags. During the next // PrePaintTreeWalk, these flags will be used again. - object.getMutableForPainting().clearPaintInvalidationFlags(); - object.getMutableForPainting().clearNeedsPaintPropertyUpdate(); - object.getMutableForPainting().clearDescendantNeedsPaintPropertyUpdate(); + object.getMutableForPainting().clearPaintFlags(); } return descendantsFullyUpdated; }
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.h b/third_party/WebKit/Source/core/paint/SVGPaintContext.h index 6036e20..2c0167e7 100644 --- a/third_party/WebKit/Source/core/paint/SVGPaintContext.h +++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.h
@@ -68,8 +68,8 @@ auto& paintController = context.getPaintController(); PaintChunkProperties properties( paintController.currentPaintChunkProperties()); - properties.transform = - objectProperties->svgLocalToBorderBoxTransform(); + properties.propertyTreeState.setTransform( + objectProperties->svgLocalToBorderBoxTransform()); m_transformPropertyScope.emplace(paintController, object, properties); } } else { @@ -83,7 +83,8 @@ auto& paintController = context.getPaintController(); PaintChunkProperties properties( paintController.currentPaintChunkProperties()); - properties.transform = objectProperties->transform(); + properties.propertyTreeState.setTransform( + objectProperties->transform()); m_transformPropertyScope.emplace(paintController, object, properties); } }
diff --git a/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp b/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp index 6c27def..94dea2f 100644 --- a/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp +++ b/third_party/WebKit/Source/core/paint/ScrollableAreaPainter.cpp
@@ -166,7 +166,8 @@ if (objectProperties && objectProperties->scrollbarPaintOffset()) { PaintChunkProperties properties( context.getPaintController().currentPaintChunkProperties()); - properties.transform = objectProperties->scrollbarPaintOffset(); + properties.propertyTreeState.setTransform( + objectProperties->scrollbarPaintOffset()); scopedTransformProperty.emplace( context.getPaintController(), getScrollableArea().box(), DisplayItem::kScrollOverflowControls, properties);
diff --git a/third_party/WebKit/Source/core/style/BorderData.h b/third_party/WebKit/Source/core/style/BorderData.h index 8cfd587..fb7ada5 100644 --- a/third_party/WebKit/Source/core/style/BorderData.h +++ b/third_party/WebKit/Source/core/style/BorderData.h
@@ -92,17 +92,13 @@ bool operator==(const BorderData& o) const { return m_left == o.m_left && m_right == o.m_right && m_top == o.m_top && - m_bottom == o.m_bottom && m_image == o.m_image && - m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && - m_bottomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight; + m_bottom == o.m_bottom && m_image == o.m_image && radiiEqual(o); } bool visuallyEqual(const BorderData& o) const { return m_left.visuallyEqual(o.m_left) && m_right.visuallyEqual(o.m_right) && m_top.visuallyEqual(o.m_top) && m_bottom.visuallyEqual(o.m_bottom) && - m_image == o.m_image && m_topLeft == o.m_topLeft && - m_topRight == o.m_topRight && m_bottomLeft == o.m_bottomLeft && - m_bottomRight == o.m_bottomRight; + m_image == o.m_image && radiiEqual(o); } bool visualOverflowEqual(const BorderData& o) const { @@ -118,6 +114,11 @@ borderBottomWidth() == o.borderBottomWidth(); } + bool radiiEqual(const BorderData& o) const { + return m_topLeft == o.m_topLeft && m_topRight == o.m_topRight && + m_bottomLeft == o.m_bottomLeft && m_bottomRight == o.m_bottomRight; + } + const BorderValue& left() const { return m_left; } const BorderValue& right() const { return m_right; } const BorderValue& top() const { return m_top; }
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.cpp b/third_party/WebKit/Source/core/style/ComputedStyle.cpp index 095f2b4..6947b90 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.cpp +++ b/third_party/WebKit/Source/core/style/ComputedStyle.cpp
@@ -1393,6 +1393,8 @@ if (!motionData.m_path) { return; } + const LengthPoint& position = offsetPosition(); + const LengthPoint& anchor = offsetAnchor(); const StylePath& motionPath = *motionData.m_path; float pathLength = motionPath.length(); float distance = floatValueForLength(motionData.m_distance, pathLength); @@ -1414,9 +1416,10 @@ float originShiftX = 0; float originShiftY = 0; - if (RuntimeEnabledFeatures::cssOffsetPositionAnchorEnabled()) { - // TODO(ericwilligers): crbug.com/638055 Support offset-anchor: auto. - const LengthPoint& anchor = offsetAnchor(); + // If offset-Position and offset-anchor properties are not yet enabled, + // they will have the default value, auto. + if (position.x() != Length(Auto) || anchor.x() != Length(Auto)) { + // Shift the origin from transform-origin to offset-anchor. originShiftX = floatValueForLength(anchor.x(), boundingBox.width()) - floatValueForLength(transformOriginX(), boundingBox.width()); originShiftY = @@ -1428,9 +1431,9 @@ point.y() - originY + originShiftY); transform.rotate(angle + motionData.m_rotation.angle); - if (RuntimeEnabledFeatures::cssOffsetPositionAnchorEnabled()) { + if (position.x() != Length(Auto) || anchor.x() != Length(Auto)) + // Shift the origin back to transform-origin. transform.translate(-originShiftX, -originShiftY); - } } void ComputedStyle::setTextShadow(PassRefPtr<ShadowList> s) {
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h index fddd23c..514f63b 100644 --- a/third_party/WebKit/Source/core/style/ComputedStyle.h +++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1416,7 +1416,7 @@ // offset-anchor static LengthPoint initialOffsetAnchor() { - return LengthPoint(Length(50.0, Percent), Length(50.0, Percent)); + return LengthPoint(Length(Auto), Length(Auto)); } const LengthPoint& offsetAnchor() const { return m_rareNonInheritedData->m_transform->m_motion.m_anchor; @@ -2280,13 +2280,7 @@ WritingMode getWritingMode() const { return static_cast<WritingMode>(m_inheritedData.m_writingMode); } - bool setWritingMode(WritingMode v) { - if (v == getWritingMode()) - return false; - - m_inheritedData.m_writingMode = v; - return true; - } + void setWritingMode(WritingMode v) { m_inheritedData.m_writingMode = v; } // Text emphasis properties. static TextEmphasisFill initialTextEmphasisFill() {
diff --git a/third_party/WebKit/Source/core/testing/Internals.cpp b/third_party/WebKit/Source/core/testing/Internals.cpp index 4fc499f..fac050e 100644 --- a/third_party/WebKit/Source/core/testing/Internals.cpp +++ b/third_party/WebKit/Source/core/testing/Internals.cpp
@@ -121,7 +121,6 @@ #include "core/testing/LayerRectList.h" #include "core/testing/MockHyphenation.h" #include "core/testing/OriginTrialsTest.h" -#include "core/testing/PrivateScriptTest.h" #include "core/testing/TypeConversions.h" #include "core/testing/UnionTypesTest.h" #include "core/workers/WorkerThread.h" @@ -2287,13 +2286,6 @@ return TypeConversions::create(); } -PrivateScriptTest* Internals::privateScriptTest() const { - if (!frame()) - return nullptr; - - return PrivateScriptTest::create(frame()->document()); -} - DictionaryTest* Internals::dictionaryTest() const { return DictionaryTest::create(); }
diff --git a/third_party/WebKit/Source/core/testing/Internals.idl b/third_party/WebKit/Source/core/testing/Internals.idl index 2c4bf04..e42677a9c 100644 --- a/third_party/WebKit/Source/core/testing/Internals.idl +++ b/third_party/WebKit/Source/core/testing/Internals.idl
@@ -231,11 +231,6 @@ TypeConversions typeConversions(); - // This is enabled only in Debug builds. - // This is because we want to avoid putting the byte stream of testing private scripts - // into the binary of Release builds. - PrivateScriptTest privateScriptTest(); - sequence<DOMString> getReferencedFilePaths(); // These functions both reset the tracked repaint rects. They are intended to be used in the following order:
diff --git a/third_party/WebKit/Source/core/testing/PartialPrivateScriptTest.idl b/third_party/WebKit/Source/core/testing/PartialPrivateScriptTest.idl deleted file mode 100644 index 5175774..0000000 --- a/third_party/WebKit/Source/core/testing/PartialPrivateScriptTest.idl +++ /dev/null
@@ -1,11 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -[ - NoImplHeader -] partial interface PrivateScriptTest { - [ImplementedInPrivateScript] short addIntegerInPartial(short value1, short value2); - [ImplementedInPrivateScript] short addInteger2InPartial(short value1, short value2); - [ImplementedInPrivateScript] attribute DOMString stringAttributeInPartial; -};
diff --git a/third_party/WebKit/Source/core/testing/PartialPrivateScriptTest.js b/third_party/WebKit/Source/core/testing/PartialPrivateScriptTest.js deleted file mode 100644 index 9d15b5e..0000000 --- a/third_party/WebKit/Source/core/testing/PartialPrivateScriptTest.js +++ /dev/null
@@ -1,24 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -"use strict"; - -privateScriptController.installClass("PrivateScriptTest", function(PrivateScriptTestPrototype) { - - PrivateScriptTestPrototype.addIntegerInPartial = function(value1, value2) { - return value1 + value2; - } - - PrivateScriptTestPrototype.addInteger2InPartial = function(value1, value2) { - // addValue_ is a method defined in PrivateScriptTest.js. - // Partial interfaces should be able to use methods defined in the base interface. - return this.addValues_(value1, value2); - } - - Object.defineProperty(PrivateScriptTestPrototype, "stringAttributeInPartial", { - get: function() { return this.m_stringAttributeInPartial; }, - set: function(value) { this.m_stringAttributeInPartial = value; } - }); - -});
diff --git a/third_party/WebKit/Source/core/testing/PrivateScriptTest.cpp b/third_party/WebKit/Source/core/testing/PrivateScriptTest.cpp deleted file mode 100644 index ff38254..0000000 --- a/third_party/WebKit/Source/core/testing/PrivateScriptTest.cpp +++ /dev/null
@@ -1,35 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "core/testing/PrivateScriptTest.h" - -#include "bindings/core/v8/PrivateScriptRunner.h" -#include "core/dom/Document.h" -#include <v8.h> - -namespace blink { - -PrivateScriptTest::PrivateScriptTest(Document* document) { - v8::Local<v8::Value> classObject = - PrivateScriptRunner::installClassIfNeeded(document, "PrivateScriptTest"); - RELEASE_ASSERT(!classObject.IsEmpty()); -} - -int PrivateScriptTest::addIntegerImplementedInCPPForPrivateScriptOnly( - int value1, - int value2) { - return value1 + value2; -} - -String -PrivateScriptTest::stringAttributeImplementedInCPPForPrivateScriptOnly() { - return m_stringAttributeImplementedInCPPForPrivateSriptOnly; -} - -void PrivateScriptTest::setStringAttributeImplementedInCPPForPrivateScriptOnly( - String value) { - m_stringAttributeImplementedInCPPForPrivateSriptOnly = value; -} - -} // namespace blink
diff --git a/third_party/WebKit/Source/core/testing/PrivateScriptTest.h b/third_party/WebKit/Source/core/testing/PrivateScriptTest.h deleted file mode 100644 index 2f08474..0000000 --- a/third_party/WebKit/Source/core/testing/PrivateScriptTest.h +++ /dev/null
@@ -1,40 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef PrivateScriptTest_h -#define PrivateScriptTest_h - -#include "bindings/core/v8/ScriptWrappable.h" -#include "platform/heap/Handle.h" -#include "wtf/text/WTFString.h" - -namespace blink { - -class Document; - -class PrivateScriptTest final - : public GarbageCollectedFinalized<PrivateScriptTest>, - public ScriptWrappable { - DEFINE_WRAPPERTYPEINFO(); - - public: - static PrivateScriptTest* create(Document* document) { - return new PrivateScriptTest(document); - } - - int addIntegerImplementedInCPPForPrivateScriptOnly(int value1, int value2); - String stringAttributeImplementedInCPPForPrivateScriptOnly(); - void setStringAttributeImplementedInCPPForPrivateScriptOnly(String); - - DEFINE_INLINE_TRACE() {} - - private: - explicit PrivateScriptTest(Document*); - - String m_stringAttributeImplementedInCPPForPrivateSriptOnly; -}; - -} // namespace blink - -#endif // PrivateScriptTest_h
diff --git a/third_party/WebKit/Source/core/testing/PrivateScriptTest.idl b/third_party/WebKit/Source/core/testing/PrivateScriptTest.idl deleted file mode 100644 index 5f19c06..0000000 --- a/third_party/WebKit/Source/core/testing/PrivateScriptTest.idl +++ /dev/null
@@ -1,44 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -interface PrivateScriptTest { - [ImplementedInPrivateScript] void doNothing(); - [ImplementedInPrivateScript] short return123(); - [ImplementedInPrivateScript] short echoInteger(short value); - [ImplementedInPrivateScript] DOMString echoString(DOMString value); - [ImplementedInPrivateScript] Node echoNode(Node value); - [ImplementedInPrivateScript] short addInteger(short value1, short value2); - [ImplementedInPrivateScript] DOMString addString(DOMString value1, DOMString value2); - [ImplementedInPrivateScript] void setIntegerToPrototype(short value); - [ImplementedInPrivateScript] short getIntegerFromPrototype(); - [ImplementedInPrivateScript] void setIntegerToDocument(Document document, short value); - [ImplementedInPrivateScript] short getIntegerFromDocument(Document document); - [ImplementedInPrivateScript] Node createElement(Document document); - [ImplementedInPrivateScript] void appendChild(Node node1, Node node2); - [ImplementedInPrivateScript] Node firstChild(Node node); - [ImplementedInPrivateScript] Node nextSibling(Node node); - [ImplementedInPrivateScript] DOMString innerHTML(Node node); - [ImplementedInPrivateScript] void setInnerHTML(Node node, DOMString string); - [ImplementedInPrivateScript] void addClickListener(Node node); - [ImplementedInPrivateScript] void clickNode(Document document, Node node); - [ImplementedInPrivateScript] readonly attribute short readonlyShortAttribute; - [ImplementedInPrivateScript] attribute short shortAttribute; - [ImplementedInPrivateScript] attribute DOMString stringAttribute; - [ImplementedInPrivateScript] attribute Node nodeAttribute; - [ImplementedInPrivateScript] attribute Node? nodeAttributeThrowsIndexSizeError; - [ImplementedInPrivateScript] void voidMethodThrowsDOMSyntaxError(); - [ImplementedInPrivateScript] void voidMethodThrowsError(); - [ImplementedInPrivateScript] void voidMethodThrowsTypeError(); - [ImplementedInPrivateScript] void voidMethodThrowsRangeError(); - [ImplementedInPrivateScript] void voidMethodThrowsSyntaxError(); - [ImplementedInPrivateScript] void voidMethodThrowsReferenceError(); - [ImplementedInPrivateScript] void voidMethodThrowsStackOverflowError(); - [ImplementedInPrivateScript, OnlyExposedToPrivateScript] short addIntegerForPrivateScriptOnly(short value1, short value2); - [ImplementedInPrivateScript, OnlyExposedToPrivateScript] attribute DOMString stringAttributeForPrivateScriptOnly; - [ImplementedInPrivateScript] short addIntegerImplementedInCPP(short value1, short value2); - [OnlyExposedToPrivateScript] short addIntegerImplementedInCPPForPrivateScriptOnly(short value1, short value2); - [ImplementedInPrivateScript] attribute DOMString stringAttributeImplementedInCPP; - [OnlyExposedToPrivateScript] attribute DOMString stringAttributeImplementedInCPPForPrivateScriptOnly; - [ImplementedInPrivateScript] void dispatchDocumentOnload(Document document); -};
diff --git a/third_party/WebKit/Source/core/testing/PrivateScriptTest.js b/third_party/WebKit/Source/core/testing/PrivateScriptTest.js deleted file mode 100644 index e9ed14a..0000000 --- a/third_party/WebKit/Source/core/testing/PrivateScriptTest.js +++ /dev/null
@@ -1,175 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -"use strict"; - -privateScriptController.installClass("PrivateScriptTest", function(PrivateScriptTestPrototype) { - - PrivateScriptTestPrototype.initialize = function() { - this.m_shortAttribute = -1; - this.m_stringAttribute = "xxx"; - this.m_nodeAttribute = null; - this.m_stringAttributeForPrivateScriptOnly = "yyy"; - } - - PrivateScriptTestPrototype.doNothing = function() { - } - - PrivateScriptTestPrototype.return123 = function() { - return 123; - } - - PrivateScriptTestPrototype.echoInteger = function(value) { - return value; - } - - PrivateScriptTestPrototype.echoString = function(value) { - return value; - } - - PrivateScriptTestPrototype.echoNode = function(value) { - return value; - } - - PrivateScriptTestPrototype.addValues_ = function(value1, value2) { - return value1 + value2; - } - - PrivateScriptTestPrototype.addInteger = function(value1, value2) { - return this.addValues_(value1, value2); - } - - PrivateScriptTestPrototype.addString = function(value1, value2) { - return this.addValues_(value1, value2); - } - - PrivateScriptTestPrototype.setIntegerToDocument = function(document, value) { - document.integer = value; - } - - PrivateScriptTestPrototype.getIntegerFromDocument = function(document) { - return document.integer; - } - - PrivateScriptTestPrototype.setIntegerToPrototype = function(value) { - this.integer = value; - } - - PrivateScriptTestPrototype.getIntegerFromPrototype = function() { - return this.integer; - } - - PrivateScriptTestPrototype.createElement = function(document) { - return document.createElement("div"); - } - - PrivateScriptTestPrototype.appendChild = function(node1, node2) { - node1.appendChild(node2); - } - - PrivateScriptTestPrototype.firstChild = function(node) { - return node.firstChild; - } - - PrivateScriptTestPrototype.nextSibling = function(node) { - return node.nextSibling; - } - - PrivateScriptTestPrototype.innerHTML = function(node) { - return node.innerHTML; - } - - PrivateScriptTestPrototype.setInnerHTML = function(node, string) { - node.innerHTML = string; - } - - PrivateScriptTestPrototype.addClickListener = function(node) { - node.addEventListener("click", function () { - node.innerHTML = "clicked"; - }); - } - - PrivateScriptTestPrototype.clickNode = function(document, node) { - var event = new MouseEvent("click", { bubbles: true, cancelable: true, view: window }); - node.dispatchEvent(event); - } - - Object.defineProperty(PrivateScriptTestPrototype, "readonlyShortAttribute", { - get: function() { return 123; } - }); - - Object.defineProperty(PrivateScriptTestPrototype, "shortAttribute", { - get: function() { return this.m_shortAttribute; }, - set: function(value) { this.m_shortAttribute = value; } - }); - - Object.defineProperty(PrivateScriptTestPrototype, "stringAttribute", { - get: function() { return this.m_stringAttribute; }, - set: function(value) { this.m_stringAttribute = value; } - }); - - Object.defineProperty(PrivateScriptTestPrototype, "nodeAttribute", { - get: function() { return this.m_nodeAttribute; }, - set: function(value) { this.m_nodeAttribute = value; } - }); - - Object.defineProperty(PrivateScriptTestPrototype, "nodeAttributeThrowsIndexSizeError", { - get: function() { privateScriptController.throwException(privateScriptController.DOMException.IndexSizeError, "getter threw error"); }, - set: function(value) { privateScriptController.throwException(privateScriptController.DOMException.IndexSizeError, "setter threw error"); } - }); - - PrivateScriptTestPrototype.voidMethodThrowsDOMSyntaxError = function() { - privateScriptController.throwException(privateScriptController.DOMException.SyntaxError, "method threw error"); - } - - PrivateScriptTestPrototype.voidMethodThrowsError = function() { - privateScriptController.throwException(privateScriptController.JSError.Error, "method threw Error"); - } - - PrivateScriptTestPrototype.voidMethodThrowsTypeError = function() { - privateScriptController.throwException(privateScriptController.JSError.TypeError, "method threw TypeError"); - } - - PrivateScriptTestPrototype.voidMethodThrowsRangeError = function() { - privateScriptController.throwException(privateScriptController.JSError.RangeError, "method threw RangeError"); - } - - PrivateScriptTestPrototype.voidMethodThrowsSyntaxError = function() { - privateScriptController.throwException(privateScriptController.JSError.SyntaxError, "method threw SyntaxError"); - } - - PrivateScriptTestPrototype.voidMethodThrowsReferenceError = function() { - privateScriptController.throwException(privateScriptController.JSError.ReferenceError, "method threw ReferenceError"); - } - - PrivateScriptTestPrototype.voidMethodThrowsStackOverflowError = function() { - function f() { f(); } - f(); - } - - PrivateScriptTestPrototype.addIntegerForPrivateScriptOnly = function(value1, value2) { - return value1 + value2; - } - - Object.defineProperty(PrivateScriptTestPrototype, "stringAttributeForPrivateScriptOnly", { - get: function() { return this.m_stringAttributeForPrivateScriptOnly; }, - set: function(value) { this.m_stringAttributeForPrivateScriptOnly = value; } - }); - - PrivateScriptTestPrototype.addIntegerImplementedInCPP = function(value1, value2) { - return this.addIntegerImplementedInCPPForPrivateScriptOnly(value1, value2); - } - - Object.defineProperty(PrivateScriptTestPrototype, "stringAttributeImplementedInCPP", { - get: function() { return this.m_stringAttributeImplementedInCPPForPrivateScriptOnly; }, - set: function(value) { this.m_stringAttributeImplementedInCPPForPrivateScriptOnly = value; } - }); - - PrivateScriptTestPrototype.dispatchDocumentOnload = function(document) { - var event = new Event("load", { bubbles: true, cancelable: true }); - event.valueInPrivateScript = "this should not be visible in user's script"; - document.dispatchEvent(event); - } - -});
diff --git a/third_party/WebKit/Source/core/testing/PrivateScriptTestTest.cpp b/third_party/WebKit/Source/core/testing/PrivateScriptTestTest.cpp deleted file mode 100644 index 4bc9f69..0000000 --- a/third_party/WebKit/Source/core/testing/PrivateScriptTestTest.cpp +++ /dev/null
@@ -1,59 +0,0 @@ -// Copyright 2014 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "core/testing/PrivateScriptTest.h" - -#include "bindings/core/v8/PrivateScriptRunner.h" -#include "bindings/core/v8/V8Binding.h" -#include "bindings/core/v8/V8BindingForTesting.h" -#include "bindings/core/v8/V8PrivateScriptTest.h" -#include "core/testing/DummyPageHolder.h" -#include "testing/gtest/include/gtest/gtest.h" -#include <memory> - -// PrivateScriptTest.js is available only in debug builds. -#ifndef NDEBUG -namespace blink { - -namespace { - -TEST(PrivateScriptTestTest, invokePrivateScriptMethodFromCPP) { - V8TestingScope scope; - PrivateScriptTest* privateScriptTest = - PrivateScriptTest::create(&scope.document()); - bool success; - int result; - success = - V8PrivateScriptTest::PrivateScript::addIntegerForPrivateScriptOnlyMethod( - &scope.frame(), privateScriptTest, 100, 200, &result); - EXPECT_TRUE(success); - EXPECT_EQ(result, 300); -} - -TEST(PrivateScriptTestTest, invokePrivateScriptAttributeFromCPP) { - V8TestingScope scope; - PrivateScriptTest* privateScriptTest = - PrivateScriptTest::create(&scope.document()); - bool success; - String result; - success = V8PrivateScriptTest::PrivateScript:: - stringAttributeForPrivateScriptOnlyAttributeGetter( - &scope.frame(), privateScriptTest, &result); - EXPECT_TRUE(success); - EXPECT_EQ(result, "yyy"); - success = V8PrivateScriptTest::PrivateScript:: - stringAttributeForPrivateScriptOnlyAttributeSetter( - &scope.frame(), privateScriptTest, "foo"); - EXPECT_TRUE(success); - success = V8PrivateScriptTest::PrivateScript:: - stringAttributeForPrivateScriptOnlyAttributeGetter( - &scope.frame(), privateScriptTest, &result); - EXPECT_TRUE(success); - EXPECT_EQ(result, "foo"); -} - -} // namespace - -} // namespace blink -#endif
diff --git a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp index 63308e4c8..4bf4f6ec 100644 --- a/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp +++ b/third_party/WebKit/Source/modules/accessibility/AXLayoutObject.cpp
@@ -347,8 +347,10 @@ if (isWebArea()) { Document& document = getLayoutObject()->document(); HTMLElement* body = document.body(); - if (body && hasEditableStyle(*body)) - return true; + if (body && hasEditableStyle(*body)) { + AXObject* axBody = axObjectCache().getOrCreate(body); + return axBody && axBody != axBody->ariaHiddenRoot(); + } return hasEditableStyle(document); } @@ -365,8 +367,10 @@ if (isWebArea()) { Document& document = m_layoutObject->document(); HTMLElement* body = document.body(); - if (body && hasRichlyEditableStyle(*body)) - return true; + if (body && hasRichlyEditableStyle(*body)) { + AXObject* axBody = axObjectCache().getOrCreate(body); + return axBody && axBody != axBody->ariaHiddenRoot(); + } return hasRichlyEditableStyle(document); } @@ -405,8 +409,10 @@ if (isWebArea()) { Document& document = m_layoutObject->document(); HTMLElement* body = document.body(); - if (body && hasEditableStyle(*body)) - return false; + if (body && hasEditableStyle(*body)) { + AXObject* axBody = axObjectCache().getOrCreate(body); + return !axBody || axBody == axBody->ariaHiddenRoot(); + } return !hasEditableStyle(document); }
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp index e8ee612..6e429b0 100644 --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
@@ -786,13 +786,13 @@ : nullptr); int transformId = propertyTreeManager.compositorIdForTransformNode( - paintChunk.properties.transform.get()); + paintChunk.properties.propertyTreeState.transform()); int scrollId = propertyTreeManager.compositorIdForScrollNode( - paintChunk.properties.scroll.get()); + paintChunk.properties.propertyTreeState.scroll()); int clipId = propertyTreeManager.compositorIdForClipNode( - paintChunk.properties.clip.get()); + paintChunk.properties.propertyTreeState.clip()); int effectId = propertyTreeManager.switchToEffectNode( - *paintChunk.properties.effect.get()); + *paintChunk.properties.propertyTreeState.effect()); propertyTreeManager.updateScrollOffset(layer->id(), scrollId);
diff --git a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp index 65f83f6..9385eac8 100644 --- a/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp
@@ -34,12 +34,10 @@ using ::testing::Pointee; PaintChunkProperties defaultPaintChunkProperties() { - PaintChunkProperties properties; - properties.transform = TransformPaintPropertyNode::root(); - properties.clip = ClipPaintPropertyNode::root(); - properties.effect = EffectPaintPropertyNode::root(); - properties.scroll = ScrollPaintPropertyNode::root(); - return properties; + PropertyTreeState propertyTreeState( + TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), + EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root()); + return PaintChunkProperties(propertyTreeState); } gfx::Transform translation(SkMScalar x, SkMScalar y) {
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h index 2f095e4..77a80e6 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkProperties.h
@@ -5,10 +5,7 @@ #ifndef PaintChunkProperties_h #define PaintChunkProperties_h -#include "platform/graphics/paint/ClipPaintPropertyNode.h" -#include "platform/graphics/paint/EffectPaintPropertyNode.h" -#include "platform/graphics/paint/ScrollPaintPropertyNode.h" -#include "platform/graphics/paint/TransformPaintPropertyNode.h" +#include "platform/graphics/paint/PropertyTreeState.h" #include "wtf/Allocator.h" #include "wtf/Noncopyable.h" #include <iosfwd> @@ -27,13 +24,14 @@ struct PaintChunkProperties { DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); - PaintChunkProperties() : backfaceHidden(false) {} + PaintChunkProperties(const PropertyTreeState& state) + : propertyTreeState(state), backfaceHidden(false) {} - // TODO(pdr): Refactor these to use PropertyTreeState. - RefPtr<const TransformPaintPropertyNode> transform; - RefPtr<const ClipPaintPropertyNode> clip; - RefPtr<const EffectPaintPropertyNode> effect; - RefPtr<const ScrollPaintPropertyNode> scroll; + PaintChunkProperties() + : propertyTreeState(nullptr, nullptr, nullptr, nullptr), + backfaceHidden(false) {} + + PropertyTreeState propertyTreeState; bool backfaceHidden; }; @@ -41,9 +39,7 @@ // crawling the entire property tree to compute. inline bool operator==(const PaintChunkProperties& a, const PaintChunkProperties& b) { - return a.transform.get() == b.transform.get() && - a.clip.get() == b.clip.get() && a.effect.get() == b.effect.get() && - a.scroll.get() == b.scroll.get() && + return a.propertyTreeState == b.propertyTreeState && a.backfaceHidden == b.backfaceHidden; }
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp index c4f087a..145f931 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunker.cpp
@@ -38,10 +38,10 @@ // properties created by a LayoutObject/FrameView, or be set to a non-null // root node. If these DCHECKs are hit we are missing a call to update the // properties. See: ScopedPaintChunkProperties. - DCHECK(m_currentProperties.transform); - DCHECK(m_currentProperties.clip); - DCHECK(m_currentProperties.effect); - DCHECK(m_currentProperties.scroll); + DCHECK(m_currentProperties.propertyTreeState.transform()); + DCHECK(m_currentProperties.propertyTreeState.clip()); + DCHECK(m_currentProperties.propertyTreeState.effect()); + DCHECK(m_currentProperties.propertyTreeState.scroll()); } #endif
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp index d1fd8e48..67cf7b3 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunkerTest.cpp
@@ -113,15 +113,21 @@ chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransform = defaultPaintChunkProperties(); - simpleTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 1, 2, 3, 4, 5), FloatPoint3D(9, 8, 7)); + simpleTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 1, 2, 3, 4, 5), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(nullptr, simpleTransform); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties anotherTransform = defaultPaintChunkProperties(); - anotherTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 1, 2, 3, 4, 5), FloatPoint3D(9, 8, 7)); + anotherTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 1, 2, 3, 4, 5), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(nullptr, anotherTransform); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); @@ -140,29 +146,36 @@ chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransform = defaultPaintChunkProperties(); - simpleTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 0, 0, 0, 0, 0), FloatPoint3D(9, 8, 7)); + simpleTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 0, 0, 0, 0, 0), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(nullptr, simpleTransform); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransformAndEffect = defaultPaintChunkProperties(); - simpleTransformAndEffect.transform = simpleTransform.transform; - simpleTransformAndEffect.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5f); + simpleTransformAndEffect.propertyTreeState.setTransform( + simpleTransform.propertyTreeState.transform()); + simpleTransformAndEffect.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5f).get()); chunker.updateCurrentPaintChunkProperties(nullptr, simpleTransformAndEffect); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransformAndEffectWithUpdatedTransform = defaultPaintChunkProperties(); - simpleTransformAndEffectWithUpdatedTransform.transform = + simpleTransformAndEffectWithUpdatedTransform.propertyTreeState.setTransform( TransformPaintPropertyNode::create(nullptr, TransformationMatrix(1, 1, 0, 0, 0, 0), - FloatPoint3D(9, 8, 7)); - simpleTransformAndEffectWithUpdatedTransform.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), - simpleTransformAndEffect.effect->opacity()); + FloatPoint3D(9, 8, 7)) + .get()); + simpleTransformAndEffectWithUpdatedTransform.propertyTreeState.setEffect( + createOpacityOnlyEffect( + EffectPaintPropertyNode::root(), + simpleTransformAndEffect.propertyTreeState.effect()->opacity()) + .get()); chunker.updateCurrentPaintChunkProperties( nullptr, simpleTransformAndEffectWithUpdatedTransform); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); @@ -197,8 +210,11 @@ chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransform = defaultPaintChunkProperties(); - simpleTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 1, 2, 3, 4, 5), FloatPoint3D(9, 8, 7)); + simpleTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 1, 2, 3, 4, 5), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(nullptr, simpleTransform); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); @@ -224,13 +240,19 @@ chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties firstTransform = defaultPaintChunkProperties(); - firstTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 1, 2, 3, 4, 5), FloatPoint3D(9, 8, 7)); + firstTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 1, 2, 3, 4, 5), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(nullptr, firstTransform); PaintChunkProperties secondTransform = defaultPaintChunkProperties(); - secondTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(9, 8, 7, 6, 5, 4), FloatPoint3D(3, 2, 1)); + secondTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(9, 8, 7, 6, 5, 4), + FloatPoint3D(3, 2, 1)) + .get()); chunker.updateCurrentPaintChunkProperties(nullptr, secondTransform); chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); @@ -296,8 +318,11 @@ chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransform = defaultPaintChunkProperties(); - simpleTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 1, 2, 3, 4, 5), FloatPoint3D(9, 8, 7)); + simpleTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 1, 2, 3, 4, 5), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(&id1, simpleTransform); chunker.incrementDisplayItemIndex(i1); @@ -333,8 +358,11 @@ chunker.incrementDisplayItemIndex(NormalTestDisplayItem(m_client)); PaintChunkProperties simpleTransform = defaultPaintChunkProperties(); - simpleTransform.transform = TransformPaintPropertyNode::create( - nullptr, TransformationMatrix(0, 1, 2, 3, 4, 5), FloatPoint3D(9, 8, 7)); + simpleTransform.propertyTreeState.setTransform( + TransformPaintPropertyNode::create(nullptr, + TransformationMatrix(0, 1, 2, 3, 4, 5), + FloatPoint3D(9, 8, 7)) + .get()); chunker.updateCurrentPaintChunkProperties(&id1, simpleTransform); chunker.incrementDisplayItemIndex(i1);
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp index 90b33c04..faafd94 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp +++ b/third_party/WebKit/Source/platform/graphics/paint/PaintControllerTest.cpp
@@ -699,12 +699,14 @@ FakeDisplayItemClient second("second", LayoutRect(100, 100, 200, 200)); GraphicsContext context(getPaintController()); + RefPtr<ClipPaintPropertyNode> clip = ClipPaintPropertyNode::create( + nullptr, nullptr, FloatRoundedRect(1, 1, 2, 2)); + { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(first, clipType); PaintChunkProperties properties = defaultPaintChunkProperties(); - properties.clip = ClipPaintPropertyNode::create( - nullptr, nullptr, FloatRoundedRect(1, 1, 2, 2)); + properties.propertyTreeState.setClip(clip.get()); getPaintController().updateCurrentPaintChunkProperties(&id, properties); } ClipRecorder clipRecorder(context, first, clipType, IntRect(1, 1, 2, 2)); @@ -759,12 +761,16 @@ second.setDisplayItemsUncached(); drawRect(context, first, backgroundDrawingType, FloatRect(100, 100, 150, 150)); + + RefPtr<ClipPaintPropertyNode> clip2 = ClipPaintPropertyNode::create( + nullptr, nullptr, FloatRoundedRect(1, 1, 2, 2)); + { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(second, clipType); PaintChunkProperties properties = defaultPaintChunkProperties(); - properties.clip = ClipPaintPropertyNode::create( - nullptr, nullptr, FloatRoundedRect(1, 1, 2, 2)); + properties.propertyTreeState.setClip(clip2.get()); + getPaintController().updateCurrentPaintChunkProperties(&id, properties); } ClipRecorder clipRecorder(context, second, clipType, IntRect(1, 1, 2, 2)); @@ -1049,8 +1055,8 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container1, backgroundDrawingType); - container1Properties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5); + container1Properties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container1Properties); } @@ -1067,8 +1073,8 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container2, backgroundDrawingType); - container2Properties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5); + container2Properties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container2Properties); } @@ -1219,8 +1225,8 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container1, backgroundDrawingType); - container1Properties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5); + container1Properties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container1Properties); } @@ -1232,8 +1238,8 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container2, backgroundDrawingType); - container2Properties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5); + container2Properties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container2Properties); } @@ -1367,8 +1373,8 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container1, backgroundDrawingType); - container1BackgroundProperties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5); + container1BackgroundProperties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container1BackgroundProperties); } @@ -1378,8 +1384,9 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(content1, backgroundDrawingType); - content1Properties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.6); + content1Properties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.6) + .get()); getPaintController().updateCurrentPaintChunkProperties( &id, content1Properties); } @@ -1391,8 +1398,8 @@ } if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container1, foregroundDrawingType); - container1ForegroundProperties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5); + container1ForegroundProperties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.5).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container1ForegroundProperties); } @@ -1402,8 +1409,8 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(container2, backgroundDrawingType); - container2BackgroundProperties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.7); + container2BackgroundProperties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.7).get()); getPaintController().updateCurrentPaintChunkProperties( &id, container2BackgroundProperties); } @@ -1413,8 +1420,9 @@ { if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { PaintChunk::Id id(content2, backgroundDrawingType); - content2Properties.effect = - createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.8); + content2Properties.propertyTreeState.setEffect( + createOpacityOnlyEffect(EffectPaintPropertyNode::root(), 0.8) + .get()); getPaintController().updateCurrentPaintChunkProperties( &id, content2Properties); }
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h index 6a6f1e2..02048442 100644 --- a/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h +++ b/third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h
@@ -28,12 +28,14 @@ m_clip(clip), m_effect(effect), m_scroll(scroll) { - DCHECK(!m_transform->hasOneRef() && !m_clip->hasOneRef() && - !m_effect->hasOneRef() && !m_scroll->hasOneRef()); + DCHECK(!m_transform || !m_transform->hasOneRef()); + DCHECK(!m_clip || !m_clip->hasOneRef()); + DCHECK(!m_effect || !m_effect->hasOneRef()); + DCHECK(!m_scroll || !m_scroll->hasOneRef()); } const TransformPaintPropertyNode* transform() const { - DCHECK(!m_transform->hasOneRef()); + DCHECK(!m_transform || !m_transform->hasOneRef()); return m_transform.get(); } void setTransform(const TransformPaintPropertyNode* node) { @@ -42,7 +44,7 @@ } const ClipPaintPropertyNode* clip() const { - DCHECK(!m_clip->hasOneRef()); + DCHECK(!m_clip || !m_clip->hasOneRef()); return m_clip.get(); } void setClip(const ClipPaintPropertyNode* node) { @@ -51,7 +53,7 @@ } const EffectPaintPropertyNode* effect() const { - DCHECK(!m_effect->hasOneRef()); + DCHECK(!m_effect || !m_effect->hasOneRef()); return m_effect.get(); } void setEffect(const EffectPaintPropertyNode* node) { @@ -60,7 +62,7 @@ } const ScrollPaintPropertyNode* scroll() const { - DCHECK(!m_scroll->hasOneRef()); + DCHECK(!m_scroll || !m_scroll->hasOneRef()); return m_scroll.get(); } void setScroll(const ScrollPaintPropertyNode* node) { @@ -74,6 +76,12 @@ RefPtr<const EffectPaintPropertyNode> m_effect; RefPtr<const ScrollPaintPropertyNode> m_scroll; }; + +inline bool operator==(const PropertyTreeState& a, const PropertyTreeState& b) { + return a.transform() == b.transform() && a.clip() == b.clip() && + a.effect() == b.effect() && a.scroll() == b.scroll(); +} + } // namespace blink #endif // PropertyTreeState_h
diff --git a/third_party/WebKit/Source/platform/testing/PaintPrinters.cpp b/third_party/WebKit/Source/platform/testing/PaintPrinters.cpp index 7e3d73f4..e3ed0aa 100644 --- a/third_party/WebKit/Source/platform/testing/PaintPrinters.cpp +++ b/third_party/WebKit/Source/platform/testing/PaintPrinters.cpp
@@ -60,33 +60,33 @@ void PrintTo(const PaintChunkProperties& properties, std::ostream* os) { *os << "PaintChunkProperties("; bool printedProperty = false; - if (properties.transform) { + if (properties.propertyTreeState.transform()) { *os << "transform="; - PrintTo(*properties.transform, os); + PrintTo(*properties.propertyTreeState.transform(), os); printedProperty = true; } - if (properties.clip) { + if (properties.propertyTreeState.clip()) { if (printedProperty) *os << ", "; *os << "clip="; - PrintTo(*properties.clip, os); + PrintTo(*properties.propertyTreeState.clip(), os); printedProperty = true; } - if (properties.effect) { + if (properties.propertyTreeState.effect()) { if (printedProperty) *os << ", "; *os << "effect="; - PrintTo(*properties.effect, os); + PrintTo(*properties.propertyTreeState.effect(), os); printedProperty = true; } - if (properties.scroll) { + if (properties.propertyTreeState.scroll()) { if (printedProperty) *os << ", "; *os << "scroll="; - PrintTo(*properties.scroll, os); + PrintTo(*properties.propertyTreeState.scroll(), os); printedProperty = true; }
diff --git a/third_party/WebKit/Source/platform/testing/PaintPropertyTestHelpers.h b/third_party/WebKit/Source/platform/testing/PaintPropertyTestHelpers.h index 8a74c39..fcaa385 100644 --- a/third_party/WebKit/Source/platform/testing/PaintPropertyTestHelpers.h +++ b/third_party/WebKit/Source/platform/testing/PaintPropertyTestHelpers.h
@@ -24,11 +24,11 @@ } static inline PaintChunkProperties defaultPaintChunkProperties() { - PaintChunkProperties defaultProperties; - defaultProperties.transform = TransformPaintPropertyNode::root(); - defaultProperties.clip = ClipPaintPropertyNode::root(); - defaultProperties.effect = EffectPaintPropertyNode::root(); - defaultProperties.scroll = ScrollPaintPropertyNode::root(); + PropertyTreeState propertyTreeState( + TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), + EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root()); + PaintChunkProperties defaultProperties(propertyTreeState); + return defaultProperties; }
diff --git a/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp b/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp index 431cac8..b5159fe 100644 --- a/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp +++ b/third_party/WebKit/Source/platform/testing/TestPaintArtifact.cpp
@@ -52,11 +52,9 @@ PassRefPtr<ClipPaintPropertyNode> clip, PassRefPtr<EffectPaintPropertyNode> effect, PassRefPtr<ScrollPaintPropertyNode> scroll) { - PaintChunkProperties properties; - properties.transform = transform; - properties.clip = clip; - properties.effect = effect; - properties.scroll = scroll; + PropertyTreeState propertyTreeState(transform.get(), clip.get(), effect.get(), + scroll.get()); + PaintChunkProperties properties(propertyTreeState); return chunk(properties); }
diff --git a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp index 8528137..d1dcaee 100644 --- a/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp +++ b/third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp
@@ -734,11 +734,11 @@ static_cast<const CompositedPlugin*>(container->plugin()); std::unique_ptr<PaintController> paintController = PaintController::create(); - PaintChunkProperties properties; - properties.transform = TransformPaintPropertyNode::root(); - properties.clip = ClipPaintPropertyNode::root(); - properties.effect = EffectPaintPropertyNode::root(); - properties.scroll = ScrollPaintPropertyNode::root(); + PropertyTreeState propertyTreeState( + TransformPaintPropertyNode::root(), ClipPaintPropertyNode::root(), + EffectPaintPropertyNode::root(), ScrollPaintPropertyNode::root()); + PaintChunkProperties properties(propertyTreeState); + paintController->updateCurrentPaintChunkProperties(nullptr, properties); GraphicsContext graphicsContext(*paintController); container->paint(graphicsContext, CullRect(IntRect(10, 10, 400, 300)));
diff --git a/third_party/WebKit/public/blink_resources.grd b/third_party/WebKit/public/blink_resources.grd index 759f533..a6239a5 100644 --- a/third_party/WebKit/public/blink_resources.grd +++ b/third_party/WebKit/public/blink_resources.grd
@@ -34,7 +34,6 @@ <include name="IDR_PRIVATE_SCRIPT_DOCUMENTEXECCOMMAND_JS" file="../Source/core/editing/js/DocumentExecCommand.js" type="BINDATA"/> <include name="IDR_DOCUMENTXMLTREEVIEWER_CSS" file="../Source/core/xml/DocumentXMLTreeViewer.css" type="BINDATA"/> <include name="IDR_DOCUMENTXMLTREEVIEWER_JS" file="../Source/core/xml/DocumentXMLTreeViewer.js" type="BINDATA"/> - <include name="IDR_PRIVATE_SCRIPT_PRIVATESCRIPTRUNNER_JS" file="../Source/bindings/core/v8/PrivateScriptRunner.js" type="BINDATA"/> <if expr="not is_android"> <include name="IDR_PICKER_COMMON_JS" file="../Source/web/resources/pickerCommon.js" type="BINDATA"/> <include name="IDR_PICKER_COMMON_CSS" file="../Source/web/resources/pickerCommon.css" type="BINDATA"/>
diff --git a/tools/metrics/histograms/README.md b/tools/metrics/histograms/README.md index 926828a..9c48ad8 100644 --- a/tools/metrics/histograms/README.md +++ b/tools/metrics/histograms/README.md
@@ -2,10 +2,9 @@ This document gives the best practices on how to use histograms in code and how to document the histograms for the dashboards. There are three general types -of histograms: enumerated histograms (appropriate for enums), count histograms -(appropriate for arbitrary numbers), and sparse histogram (appropriate for -anything when the precision is important over a wide range is large and/or the -range is not possible to specify a priori). +of histograms: enumerated histograms, count histograms (for arbitrary numbers), +and sparse histograms (for anything when the precision is important over a wide +range and/or the range is not possible to specify a priori). [TOC] @@ -54,7 +53,8 @@ Also, please explicitly set enum values `= 0`, `= 1`, `= 2`, etc. This makes clearer that the actual values are important. In addition, it helps confirm -the values align between the enum definition and histograms.xml. +the values align between the enum definition and +[histograms.xml](./histograms.xml). ### Count Histograms @@ -73,7 +73,8 @@ will exceed the max. If many emissions hit the max, it can be difficult to compute statistics such as average. One rule of thumb is at most 1% of samples should be in the overflow bucket. This allows analysis of the 99th percentile. -Err on the side of too large a range versus too short a range. (Remember that if you choose poorly, you'll have to wait for another release cycle to fix it.) +Err on the side of too large a range versus too short a range. (Remember that +if you choose poorly, you'll have to wait for another release cycle to fix it.) For histogram min, if you care about all possible values (zero and above), choose a min of 1. (All histograms have an underflow bucket; emitted zeros @@ -115,7 +116,7 @@ ### Testing -Test your histograms using *chrome://histograms*. Make sure they're being +Test your histograms using `chrome://histograms`. Make sure they're being emitted to when you expect and not emitted to at other times. Also check that the values emitted to are correct. Finally, for count histograms, make sure that buckets capture enough precision for your needs over the range. @@ -137,13 +138,14 @@ ### Add Histogram and Documentation in the Same Changelist -If possible, please add the histograms.xml description in the same changelist -in which you add the histogram-emitting code. This has several benefits. One, -it sometimes happens that the histograms.xml reviewer has questions or concerns -about the histogram description that reveal problems with interpretation of the -data and call for a different recording strategy. Two, it allows the histogram -reviewer to easily review the emission code to see if it comports with these -best practices, and to look for other errors. +If possible, please add the [histograms.xml](./histograms.xml) description in +the same changelist in which you add the histogram-emitting code. This has +several benefits. One, it sometimes happens that the +[histograms.xml](./histograms.xml) reviewer has questions or concerns about the +histogram description that reveal problems with interpretation of the data and +call for a different recording strategy. Two, it allows the histogram reviewer +to easily review the emission code to see if it comports with these best +practices, and to look for other errors. ### Understandable to Everyone @@ -173,17 +175,17 @@ ### Deleting Histogram Entries -Do not delete histograms from histograms.xml. Instead, mark unused histograms -as obsolete, annotating them with the associated date or milestone in the -obsolete tag entry. If your histogram is being replaced by a new version, we -suggest noting that in the previous histogram's description. +Do not delete histograms from [histograms.xml](./histograms.xml). Instead, mark +unused histograms as obsolete, annotating them with the associated date or +milestone in the obsolete tag entry. If your histogram is being replaced by a +new version, we suggest noting that in the previous histogram's description. Deleting histogram entries would be bad if someone to accidentally reused your old histogram name and thereby corrupts new data with whatever old data is still coming in. It's also useful to keep obsolete histogram descriptions in -histograms.xml--that way, if someone is searching for a histogram to answer -a particular question, they can learn if there was a histogram at some point -that did so even if it isn't active now. +[histograms.xml](./histograms.xml) -- that way, if someone is searching for a +histogram to answer a particular question, they can learn if there was a +histogram at some point that did so even if it isn't active now. ## When To Use Sparse Histograms
diff --git a/tools/metrics/histograms/histograms.xml b/tools/metrics/histograms/histograms.xml index 686021c7..543fa7e 100644 --- a/tools/metrics/histograms/histograms.xml +++ b/tools/metrics/histograms/histograms.xml
@@ -22411,6 +22411,21 @@ <summary>The type of action that the SSL error handler takes.</summary> </histogram> +<histogram name="interstitial.ssl_error_handler.cert_date_error_delay" + units="ms"> + <owner>estark@chromium.org</owner> + <summary> + When handling a certificate date error, Chrome (under certain Variations + Service experiments) will delay displaying the warning interstitial for up + to 3 seconds while querying a network time service. This histogram records + the amount of time for which the interstitial was delayed on this check. The + histogram is recorded even when a time query is not sent (for example, + because Chrome already had an up-to-date network timestamp that it could + use, or because the client is not in the experimental group that enables + network time queries). + </summary> +</histogram> + <histogram name="interstitial.ssl_error_type" enum="SSLErrorTypes"> <owner>felt@chromium.org</owner> <summary> @@ -93203,6 +93218,7 @@ <int value="-907234795" label="NewAudioRenderingMixingStrategy:disabled"/> <int value="-899334103" label="disable-fast-text-autosizing"/> <int value="-898594349" label="ash-enable-stable-overview-order"/> + <int value="-898499262" label="ImprovedA2HS:enabled"/> <int value="-898005938" label="disable-pinch-virtual-viewport"/> <int value="-894214299" label="fill-on-account-select:enabled"/> <int value="-891856063" label="MidiManagerAndroid:enabled"/> @@ -93296,6 +93312,7 @@ <int value="-430360431" label="disable-password-generation"/> <int value="-428599163" label="NTPDownloadSuggestions:enabled"/> <int value="-418868128" label="enable-experimental-web-platform-features"/> + <int value="-410852857" label="ImprovedA2HS:disabled"/> <int value="-396994784" label="enable-vr-shell"/> <int value="-395606844" label="enable-site-settings"/> <int value="-387606010" label="ArcBootCompletedBroadcast:enabled"/>
diff --git a/ui/aura/env.cc b/ui/aura/env.cc index d4b5cdf..5e941133 100644 --- a/ui/aura/env.cc +++ b/ui/aura/env.cc
@@ -156,7 +156,8 @@ mouse_button_flags_(0), is_touch_down_(false), input_state_lookup_(InputStateLookup::Create()), - context_factory_(NULL) { + context_factory_(nullptr), + context_factory_private_(nullptr) { DCHECK(lazy_tls_ptr.Pointer()->Get() == NULL); lazy_tls_ptr.Pointer()->Set(this); }
diff --git a/ui/aura/env.h b/ui/aura/env.h index 19678ab..3d2bccc 100644 --- a/ui/aura/env.h +++ b/ui/aura/env.h
@@ -17,6 +17,7 @@ namespace ui { class ContextFactory; +class ContextFactoryPrivate; class PlatformEventSource; } namespace aura { @@ -87,6 +88,14 @@ } ui::ContextFactory* context_factory() { return context_factory_; } + void set_context_factory_private( + ui::ContextFactoryPrivate* context_factory_private) { + context_factory_private_ = context_factory_private; + } + ui::ContextFactoryPrivate* context_factory_private() { + return context_factory_private_; + } + // See CreateInstance() for description. void SetWindowTreeClient(WindowTreeClient* window_tree_client); bool HasWindowTreeClient() const { return window_tree_client_ != nullptr; } @@ -143,6 +152,7 @@ std::unique_ptr<ui::PlatformEventSource> event_source_; ui::ContextFactory* context_factory_; + ui::ContextFactoryPrivate* context_factory_private_; Window* active_focus_client_root_ = nullptr; client::FocusClient* active_focus_client_ = nullptr;
diff --git a/ui/aura/mus/mus_context_factory.cc b/ui/aura/mus/mus_context_factory.cc index ea173115..6188eb0 100644 --- a/ui/aura/mus/mus_context_factory.cc +++ b/ui/aura/mus/mus_context_factory.cc
@@ -9,25 +9,15 @@ #include "services/ui/public/cpp/gpu/gpu.h" #include "ui/aura/mus/window_port_mus.h" #include "ui/aura/window_tree_host.h" -#include "ui/compositor/reflector.h" #include "ui/gl/gl_bindings.h" namespace aura { namespace { -class FakeReflector : public ui::Reflector { - public: - FakeReflector() {} - ~FakeReflector() override {} - void OnMirroringCompositorResized() override {} - void AddMirroringLayer(ui::Layer* layer) override {} - void RemoveMirroringLayer(ui::Layer* layer) override {} -}; } // namespace -MusContextFactory::MusContextFactory(ui::Gpu* gpu) - : next_sink_id_(1u), gpu_(gpu) {} +MusContextFactory::MusContextFactory(ui::Gpu* gpu) : gpu_(gpu) {} MusContextFactory::~MusContextFactory() {} @@ -45,17 +35,6 @@ compositor->SetCompositorFrameSink(std::move(compositor_frame_sink)); } -std::unique_ptr<ui::Reflector> MusContextFactory::CreateReflector( - ui::Compositor* mirroed_compositor, - ui::Layer* mirroring_layer) { - // NOTIMPLEMENTED(); - return base::WrapUnique(new FakeReflector); -} - -void MusContextFactory::RemoveReflector(ui::Reflector* reflector) { - // NOTIMPLEMENTED(); -} - scoped_refptr<cc::ContextProvider> MusContextFactory::SharedMainThreadContextProvider() { // NOTIMPLEMENTED(); @@ -84,22 +63,4 @@ return raster_thread_helper_.task_graph_runner(); } -cc::FrameSinkId MusContextFactory::AllocateFrameSinkId() { - return cc::FrameSinkId(0, next_sink_id_++); -} - -cc::SurfaceManager* MusContextFactory::GetSurfaceManager() { - return &surface_manager_; -} - -void MusContextFactory::SetDisplayVisible(ui::Compositor* compositor, - bool visible) { - // TODO(fsamuel): display[compositor]->SetVisible(visible); -} - -void MusContextFactory::ResizeDisplay(ui::Compositor* compositor, - const gfx::Size& size) { - // TODO(fsamuel): display[compositor]->Resize(size); -} - } // namespace aura
diff --git a/ui/aura/mus/mus_context_factory.h b/ui/aura/mus/mus_context_factory.h index af8b5bdc..d71a51a 100644 --- a/ui/aura/mus/mus_context_factory.h +++ b/ui/aura/mus/mus_context_factory.h
@@ -30,10 +30,6 @@ // ContextFactory: void CreateCompositorFrameSink( base::WeakPtr<ui::Compositor> compositor) override; - std::unique_ptr<ui::Reflector> CreateReflector( - ui::Compositor* mirrored_compositor, - ui::Layer* mirroring_layer) override; - void RemoveReflector(ui::Reflector* reflector) override; scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; void RemoveCompositor(ui::Compositor* compositor) override; bool DoesCreateTestContexts() override; @@ -41,24 +37,9 @@ gfx::BufferUsage usage) override; gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; cc::TaskGraphRunner* GetTaskGraphRunner() override; - cc::FrameSinkId AllocateFrameSinkId() override; - cc::SurfaceManager* GetSurfaceManager() override; - void SetDisplayVisible(ui::Compositor* compositor, bool visible) override; - void ResizeDisplay(ui::Compositor* compositor, - const gfx::Size& size) override; - void SetDisplayColorSpace(ui::Compositor* compositor, - const gfx::ColorSpace& color_space) override {} - void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, - base::TimeDelta interval) override {} - void SetDisplayVSyncParameters(ui::Compositor* compositor, - base::TimeTicks timebase, - base::TimeDelta interval) override {} - void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {} void AddObserver(ui::ContextFactoryObserver* observer) override {} void RemoveObserver(ui::ContextFactoryObserver* observer) override {} - cc::SurfaceManager surface_manager_; - uint32_t next_sink_id_; ui::RasterThreadHelper raster_thread_helper_; ui::Gpu* gpu_;
diff --git a/ui/aura/test/aura_test_base.cc b/ui/aura/test/aura_test_base.cc index 672c3df..73254bd 100644 --- a/ui/aura/test/aura_test_base.cc +++ b/ui/aura/test/aura_test_base.cc
@@ -74,15 +74,17 @@ // The ContextFactory must exist before any Compositors are created. bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); helper_.reset(new AuraTestHelper(&message_loop_)); if (use_mus_) { helper_->EnableMusWithTestWindowTree(window_tree_client_delegate_, window_manager_delegate_); } - helper_->SetUp(context_factory); + helper_->SetUp(context_factory, context_factory_private); } void AuraTestBase::TearDown() {
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc index 2fdddc0..a232d81 100644 --- a/ui/aura/test/aura_test_helper.cc +++ b/ui/aura/test/aura_test_helper.cc
@@ -76,7 +76,8 @@ window_tree_client_ = window_tree_client; } -void AuraTestHelper::SetUp(ui::ContextFactory* context_factory) { +void AuraTestHelper::SetUp(ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { setup_called_ = true; if (mode_ != Mode::MUS) { @@ -100,6 +101,7 @@ env_helper.SetWindowTreeClient(window_tree_client_); Env::GetInstance()->SetActiveFocusClient(focus_client_.get(), nullptr); Env::GetInstance()->set_context_factory(context_factory); + Env::GetInstance()->set_context_factory_private(context_factory_private); // Unit tests generally don't want to query the system, rather use the state // from RootWindow. env_helper.SetInputStateLookup(nullptr);
diff --git a/ui/aura/test/aura_test_helper.h b/ui/aura/test/aura_test_helper.h index 5390b87..8fd4140 100644 --- a/ui/aura/test/aura_test_helper.h +++ b/ui/aura/test/aura_test_helper.h
@@ -62,7 +62,8 @@ void EnableMusWithWindowTreeClient(WindowTreeClient* window_tree_client); // Creates and initializes (shows and sizes) the RootWindow for use in tests. - void SetUp(ui::ContextFactory* context_factory); + void SetUp(ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); // Clean up objects that are created for tests. This also deletes the Env // object.
diff --git a/ui/aura/window_tree_host.cc b/ui/aura/window_tree_host.cc index e4053151..82616060 100644 --- a/ui/aura/window_tree_host.cc +++ b/ui/aura/window_tree_host.cc
@@ -249,8 +249,10 @@ DCHECK(Env::GetInstance()); ui::ContextFactory* context_factory = Env::GetInstance()->context_factory(); DCHECK(context_factory); - compositor_.reset( - new ui::Compositor(context_factory, base::ThreadTaskRunnerHandle::Get())); + ui::ContextFactoryPrivate* context_factory_private = + Env::GetInstance()->context_factory_private(); + compositor_.reset(new ui::Compositor(context_factory, context_factory_private, + base::ThreadTaskRunnerHandle::Get())); if (!dispatcher()) { window()->Init(ui::LAYER_NOT_DRAWN); window()->set_host(this);
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc index a30c2de..f2d08cde 100644 --- a/ui/compositor/compositor.cc +++ b/ui/compositor/compositor.cc
@@ -72,8 +72,10 @@ } Compositor::Compositor(ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private, scoped_refptr<base::SingleThreadTaskRunner> task_runner) : context_factory_(context_factory), + context_factory_private_(context_factory_private), root_layer_(NULL), widget_(gfx::kNullAcceleratedWidget), #if defined(USE_AURA) @@ -81,7 +83,9 @@ #endif widget_valid_(false), compositor_frame_sink_requested_(false), - frame_sink_id_(context_factory->AllocateFrameSinkId()), + frame_sink_id_(context_factory_private + ? context_factory_private->AllocateFrameSinkId() + : cc::FrameSinkId()), task_runner_(task_runner), vsync_manager_(new CompositorVSyncManager()), device_scale_factor_(0.0f), @@ -89,7 +93,10 @@ compositor_lock_(NULL), layer_animator_collection_(this), weak_ptr_factory_(this) { - context_factory->GetSurfaceManager()->RegisterFrameSinkId(frame_sink_id_); + if (context_factory_private) { + context_factory_private->GetSurfaceManager()->RegisterFrameSinkId( + frame_sink_id_); + } root_web_layer_ = cc::Layer::Create(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -230,25 +237,31 @@ host_.reset(); context_factory_->RemoveCompositor(this); - auto* manager = context_factory_->GetSurfaceManager(); - for (auto& client : child_frame_sinks_) { - DCHECK(client.is_valid()); - manager->UnregisterFrameSinkHierarchy(frame_sink_id_, client); + if (context_factory_private_) { + auto* manager = context_factory_private_->GetSurfaceManager(); + for (auto& client : child_frame_sinks_) { + DCHECK(client.is_valid()); + manager->UnregisterFrameSinkHierarchy(frame_sink_id_, client); + } + manager->InvalidateFrameSinkId(frame_sink_id_); } - manager->InvalidateFrameSinkId(frame_sink_id_); } void Compositor::AddFrameSink(const cc::FrameSinkId& frame_sink_id) { - context_factory_->GetSurfaceManager()->RegisterFrameSinkHierarchy( + if (!context_factory_private_) + return; + context_factory_private_->GetSurfaceManager()->RegisterFrameSinkHierarchy( frame_sink_id_, frame_sink_id); child_frame_sinks_.insert(frame_sink_id); } void Compositor::RemoveFrameSink(const cc::FrameSinkId& frame_sink_id) { + if (!context_factory_private_) + return; auto it = child_frame_sinks_.find(frame_sink_id); DCHECK(it != child_frame_sinks_.end()); DCHECK(it->is_valid()); - context_factory_->GetSurfaceManager()->UnregisterFrameSinkHierarchy( + context_factory_private_->GetSurfaceManager()->UnregisterFrameSinkHierarchy( frame_sink_id_, *it); child_frame_sinks_.erase(it); } @@ -259,8 +272,10 @@ host_->SetCompositorFrameSink(std::move(compositor_frame_sink)); // Display properties are reset when the output surface is lost, so update it // to match the Compositor's. - context_factory_->SetDisplayVisible(this, host_->IsVisible()); - context_factory_->SetDisplayColorSpace(this, color_space_); + if (context_factory_private_) { + context_factory_private_->SetDisplayVisible(this, host_->IsVisible()); + context_factory_private_->SetDisplayColorSpace(this, color_space_); + } } void Compositor::ScheduleDraw() { @@ -305,7 +320,7 @@ } void Compositor::DisableSwapUntilResize() { - context_factory_->ResizeDisplay(this, gfx::Size()); + context_factory_private_->ResizeDisplay(this, gfx::Size()); } void Compositor::SetLatencyInfo(const ui::LatencyInfo& latency_info) { @@ -320,7 +335,9 @@ size_ = size_in_pixel; host_->GetLayerTree()->SetViewportSize(size_in_pixel); root_web_layer_->SetBounds(size_in_pixel); - context_factory_->ResizeDisplay(this, size_in_pixel); + // TODO(fsamuel): Get rid of ContextFactoryPrivate. + if (context_factory_private_) + context_factory_private_->ResizeDisplay(this, size_in_pixel); } if (device_scale_factor_ != scale) { device_scale_factor_ = scale; @@ -335,7 +352,9 @@ color_space_ = color_space; // Color space is reset when the output surface is lost, so this must also be // updated then. - context_factory_->SetDisplayColorSpace(this, color_space_); + // TODO(fsamuel): Get rid of this. + if (context_factory_private_) + context_factory_private_->SetDisplayColorSpace(this, color_space_); } void Compositor::SetBackgroundColor(SkColor color) { @@ -347,7 +366,9 @@ host_->SetVisible(visible); // Visibility is reset when the output surface is lost, so this must also be // updated then. - context_factory_->SetDisplayVisible(this, visible); + // TODO(fsamuel): Eliminate this call. + if (context_factory_private_) + context_factory_private_->SetDisplayVisible(this, visible); } bool Compositor::IsVisible() { @@ -365,7 +386,8 @@ void Compositor::SetAuthoritativeVSyncInterval( const base::TimeDelta& interval) { - context_factory_->SetAuthoritativeVSyncInterval(this, interval); + if (context_factory_private_) + context_factory_private_->SetAuthoritativeVSyncInterval(this, interval); vsync_manager_->SetAuthoritativeVSyncInterval(interval); } @@ -376,7 +398,10 @@ interval = cc::BeginFrameArgs::DefaultInterval(); } - context_factory_->SetDisplayVSyncParameters(this, timebase, interval); + if (context_factory_private_) { + context_factory_private_->SetDisplayVSyncParameters(this, timebase, + interval); + } vsync_manager_->UpdateVSyncParameters(timebase, interval); } @@ -499,7 +524,8 @@ } void Compositor::SetOutputIsSecure(bool output_is_secure) { - context_factory_->SetOutputIsSecure(this, output_is_secure); + if (context_factory_private_) + context_factory_private_->SetOutputIsSecure(this, output_is_secure); } const cc::LayerTreeDebugState& Compositor::GetLayerTreeDebugState() const {
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h index 76f8f38..07472f3f 100644 --- a/ui/compositor/compositor.h +++ b/ui/compositor/compositor.h
@@ -86,48 +86,18 @@ virtual void OnLostResources() = 0; }; -// This class abstracts the creation of the 3D context for the compositor. It is -// a global object. -class COMPOSITOR_EXPORT ContextFactory { +// This is privileged interface to the compositor. It is a global object. +class COMPOSITOR_EXPORT ContextFactoryPrivate { public: - virtual ~ContextFactory() {} - - // Creates an output surface for the given compositor. The factory may keep - // per-compositor data (e.g. a shared context), that needs to be cleaned up - // by calling RemoveCompositor when the compositor gets destroyed. - virtual void CreateCompositorFrameSink( - base::WeakPtr<Compositor> compositor) = 0; - // Creates a reflector that copies the content of the |mirrored_compositor| // onto |mirroring_layer|. virtual std::unique_ptr<Reflector> CreateReflector( Compositor* mirrored_compositor, Layer* mirroring_layer) = 0; + // Removes the reflector, which stops the mirroring. virtual void RemoveReflector(Reflector* reflector) = 0; - // Return a reference to a shared offscreen context provider usable from the - // main thread. - virtual scoped_refptr<cc::ContextProvider> - SharedMainThreadContextProvider() = 0; - - // Destroys per-compositor data. - virtual void RemoveCompositor(Compositor* compositor) = 0; - - // When true, the factory uses test contexts that do not do real GL - // operations. - virtual bool DoesCreateTestContexts() = 0; - - // Returns the OpenGL target to use for image textures. - virtual uint32_t GetImageTextureTarget(gfx::BufferFormat format, - gfx::BufferUsage usage) = 0; - - // Gets the GPU memory buffer manager. - virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; - - // Gets the task graph runner. - virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; - // Allocate a new client ID for the display compositor. virtual cc::FrameSinkId AllocateFrameSinkId() = 0; @@ -156,6 +126,41 @@ base::TimeDelta interval) = 0; virtual void SetOutputIsSecure(Compositor* compositor, bool secure) = 0; +}; + +// This class abstracts the creation of the 3D context for the compositor. It is +// a global object. +class COMPOSITOR_EXPORT ContextFactory { + public: + virtual ~ContextFactory() {} + + // Creates an output surface for the given compositor. The factory may keep + // per-compositor data (e.g. a shared context), that needs to be cleaned up + // by calling RemoveCompositor when the compositor gets destroyed. + virtual void CreateCompositorFrameSink( + base::WeakPtr<Compositor> compositor) = 0; + + // Return a reference to a shared offscreen context provider usable from the + // main thread. + virtual scoped_refptr<cc::ContextProvider> + SharedMainThreadContextProvider() = 0; + + // Destroys per-compositor data. + virtual void RemoveCompositor(Compositor* compositor) = 0; + + // When true, the factory uses test contexts that do not do real GL + // operations. + virtual bool DoesCreateTestContexts() = 0; + + // Returns the OpenGL target to use for image textures. + virtual uint32_t GetImageTextureTarget(gfx::BufferFormat format, + gfx::BufferUsage usage) = 0; + + // Gets the GPU memory buffer manager. + virtual gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() = 0; + + // Gets the task graph runner. + virtual cc::TaskGraphRunner* GetTaskGraphRunner() = 0; virtual void AddObserver(ContextFactoryObserver* observer) = 0; @@ -198,11 +203,16 @@ NON_EXPORTED_BASE(public cc::LayerTreeHostSingleThreadClient) { public: Compositor(ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private, scoped_refptr<base::SingleThreadTaskRunner> task_runner); ~Compositor() override; ui::ContextFactory* context_factory() { return context_factory_; } + ui::ContextFactoryPrivate* context_factory_private() { + return context_factory_private_; + } + void AddFrameSink(const cc::FrameSinkId& frame_sink_id); void RemoveFrameSink(const cc::FrameSinkId& frame_sink_id); @@ -392,6 +402,7 @@ gfx::Size size_; ui::ContextFactory* context_factory_; + ui::ContextFactoryPrivate* context_factory_private_; // The root of the Layer tree drawn by this compositor. Layer* root_layer_;
diff --git a/ui/compositor/compositor_unittest.cc b/ui/compositor/compositor_unittest.cc index 753983e..ee5be85 100644 --- a/ui/compositor/compositor_unittest.cc +++ b/ui/compositor/compositor_unittest.cc
@@ -70,10 +70,13 @@ void SetUp() override { task_runner_ = base::ThreadTaskRunnerHandle::Get(); - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(false); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(false, &context_factory, + &context_factory_private); - compositor_.reset(new ui::Compositor(context_factory, task_runner_)); + compositor_.reset(new ui::Compositor( + context_factory, context_factory_private, task_runner_)); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); } void TearDown() override {
diff --git a/ui/compositor/layer_animator_unittest.cc b/ui/compositor/layer_animator_unittest.cc index 51f883b4..012eea4 100644 --- a/ui/compositor/layer_animator_unittest.cc +++ b/ui/compositor/layer_animator_unittest.cc
@@ -2607,13 +2607,15 @@ TEST(LayerAnimatorTest, LayerMovedBetweenCompositorsDuringAnimation) { bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); const gfx::Rect bounds(10, 10, 100, 100); - std::unique_ptr<TestCompositorHost> host_1( - TestCompositorHost::Create(bounds, context_factory)); - std::unique_ptr<TestCompositorHost> host_2( - TestCompositorHost::Create(bounds, context_factory)); + std::unique_ptr<TestCompositorHost> host_1(TestCompositorHost::Create( + bounds, context_factory, context_factory_private)); + std::unique_ptr<TestCompositorHost> host_2(TestCompositorHost::Create( + bounds, context_factory, context_factory_private)); host_1->Show(); host_2->Show(); @@ -2655,11 +2657,13 @@ TEST(LayerAnimatorTest, ThreadedAnimationSurvivesIfLayerRemovedAdded) { bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); const gfx::Rect bounds(10, 10, 100, 100); - std::unique_ptr<TestCompositorHost> host( - TestCompositorHost::Create(bounds, context_factory)); + std::unique_ptr<TestCompositorHost> host(TestCompositorHost::Create( + bounds, context_factory, context_factory_private)); host->Show(); Compositor* compositor = host->GetCompositor();
diff --git a/ui/compositor/layer_owner_unittest.cc b/ui/compositor/layer_owner_unittest.cc index 5e81fe9..7675806d 100644 --- a/ui/compositor/layer_owner_unittest.cc +++ b/ui/compositor/layer_owner_unittest.cc
@@ -71,10 +71,14 @@ scoped_refptr<base::SingleThreadTaskRunner> task_runner = new base::NullTaskRunner(); - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(false); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; - compositor_.reset(new ui::Compositor(context_factory, task_runner)); + ui::InitializeContextFactoryForTests(false, &context_factory, + &context_factory_private); + + compositor_.reset(new ui::Compositor(context_factory, context_factory_private, + task_runner)); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); }
diff --git a/ui/compositor/layer_unittest.cc b/ui/compositor/layer_unittest.cc index 75f29657..7638b3a0 100644 --- a/ui/compositor/layer_unittest.cc +++ b/ui/compositor/layer_unittest.cc
@@ -168,12 +168,14 @@ // Overridden from testing::Test: void SetUp() override { bool enable_pixel_output = true; - ui::ContextFactory* context_factory = - InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); const gfx::Rect host_bounds(10, 10, 500, 500); - compositor_host_.reset( - TestCompositorHost::Create(host_bounds, context_factory)); + compositor_host_.reset(TestCompositorHost::Create( + host_bounds, context_factory, context_factory_private)); compositor_host_->Show(); } @@ -502,12 +504,15 @@ // Overridden from testing::Test: void SetUp() override { bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + + InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); const gfx::Rect host_bounds(1000, 1000); - compositor_host_.reset(TestCompositorHost::Create(host_bounds, - context_factory)); + compositor_host_.reset(TestCompositorHost::Create( + host_bounds, context_factory, context_factory_private)); compositor_host_->Show(); }
diff --git a/ui/compositor/test/context_factories_for_test.cc b/ui/compositor/test/context_factories_for_test.cc index 174f341..c7b2b27 100644 --- a/ui/compositor/test/context_factories_for_test.cc +++ b/ui/compositor/test/context_factories_for_test.cc
@@ -23,7 +23,10 @@ namespace ui { // static -ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output) { +void InitializeContextFactoryForTests( + bool enable_pixel_output, + ui::ContextFactory** context_factory, + ui::ContextFactoryPrivate** context_factory_private) { DCHECK(!g_implicit_factory) << "ContextFactory for tests already initialized."; base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); @@ -35,7 +38,8 @@ g_surface_manager = new cc::SurfaceManager; g_implicit_factory = new InProcessContextFactory(context_factory_for_test, g_surface_manager); - return g_implicit_factory; + *context_factory = g_implicit_factory; + *context_factory_private = g_implicit_factory; } void TerminateContextFactoryForTests() {
diff --git a/ui/compositor/test/context_factories_for_test.h b/ui/compositor/test/context_factories_for_test.h index e54d2063..ca9d098 100644 --- a/ui/compositor/test/context_factories_for_test.h +++ b/ui/compositor/test/context_factories_for_test.h
@@ -5,6 +5,7 @@ namespace ui { class ContextFactory; +class ContextFactoryPrivate; // Set up the compositor ContextFactory for a test environment. Unit tests // that do not have a full content environment need to call this before @@ -14,7 +15,11 @@ // called, the caller must call TerminateContextFactoryForTests() to clean up. // TODO(sky): this should return a scoped_ptr and then nuke // TerminateContextFactoryForTests(). -ui::ContextFactory* InitializeContextFactoryForTests(bool enable_pixel_output); +void InitializeContextFactoryForTests( + bool enable_pixel_output, + ui::ContextFactory** context_factory, + ui::ContextFactoryPrivate** context_factory_private); + void TerminateContextFactoryForTests(); } // namespace ui
diff --git a/ui/compositor/test/in_process_context_factory.h b/ui/compositor/test/in_process_context_factory.h index 6891433..8d91dc2 100644 --- a/ui/compositor/test/in_process_context_factory.h +++ b/ui/compositor/test/in_process_context_factory.h
@@ -24,7 +24,8 @@ namespace ui { class InProcessContextProvider; -class InProcessContextFactory : public ContextFactory { +class InProcessContextFactory : public ContextFactory, + public ContextFactoryPrivate { public: // surface_manager is owned by the creator of this and must outlive the // context factory.
diff --git a/ui/compositor/test/test_compositor_host.h b/ui/compositor/test/test_compositor_host.h index 2fc1f16..a84925bb 100644 --- a/ui/compositor/test/test_compositor_host.h +++ b/ui/compositor/test/test_compositor_host.h
@@ -13,14 +13,17 @@ class Compositor; class ContextFactory; +class ContextFactoryPrivate; class TestCompositorHost { public: virtual ~TestCompositorHost() {} // Creates a new TestCompositorHost. The caller owns the returned value. - static TestCompositorHost* Create(const gfx::Rect& bounds, - ui::ContextFactory* context_factory); + static TestCompositorHost* Create( + const gfx::Rect& bounds, + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); // Shows the TestCompositorHost. Must only be called once. virtual void Show() = 0;
diff --git a/ui/compositor/test/test_compositor_host_android.cc b/ui/compositor/test/test_compositor_host_android.cc index 682672d..aef72e8 100644 --- a/ui/compositor/test/test_compositor_host_android.cc +++ b/ui/compositor/test/test_compositor_host_android.cc
@@ -16,9 +16,12 @@ class TestCompositorHostAndroid : public TestCompositorHost { public: - TestCompositorHostAndroid(const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { + TestCompositorHostAndroid( + const gfx::Rect& bounds, + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { compositor_.reset(new ui::Compositor(context_factory, + context_factory_private, base::ThreadTaskRunnerHandle::Get())); // TODO(sievers): Support onscreen here. compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); @@ -38,8 +41,10 @@ TestCompositorHost* TestCompositorHost::Create( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { - return new TestCompositorHostAndroid(bounds, context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new TestCompositorHostAndroid(bounds, context_factory, + context_factory_private); } } // namespace ui
diff --git a/ui/compositor/test/test_compositor_host_mac.mm b/ui/compositor/test/test_compositor_host_mac.mm index c114e5d2..e907b3b17 100644 --- a/ui/compositor/test/test_compositor_host_mac.mm +++ b/ui/compositor/test/test_compositor_host_mac.mm
@@ -84,7 +84,8 @@ public AppKitHost { public: TestCompositorHostMac(const gfx::Rect& bounds, - ui::ContextFactory* context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); ~TestCompositorHostMac() override; private: @@ -104,11 +105,13 @@ TestCompositorHostMac::TestCompositorHostMac( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) : bounds_(bounds), - compositor_(context_factory, base::ThreadTaskRunnerHandle::Get()), - window_(nil) { -} + compositor_(context_factory, + context_factory_private, + base::ThreadTaskRunnerHandle::Get()), + window_(nil) {} TestCompositorHostMac::~TestCompositorHostMac() { // Release reference to |compositor_|. Important because the |compositor_| @@ -150,8 +153,10 @@ // static TestCompositorHost* TestCompositorHost::Create( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { - return new TestCompositorHostMac(bounds, context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new TestCompositorHostMac(bounds, context_factory, + context_factory_private); } } // namespace ui
diff --git a/ui/compositor/test/test_compositor_host_ozone.cc b/ui/compositor/test/test_compositor_host_ozone.cc index 281c6fd..2acaa7b4c 100644 --- a/ui/compositor/test/test_compositor_host_ozone.cc +++ b/ui/compositor/test/test_compositor_host_ozone.cc
@@ -20,7 +20,8 @@ class TestCompositorHostOzone : public TestCompositorHost { public: TestCompositorHostOzone(const gfx::Rect& bounds, - ui::ContextFactory* context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); ~TestCompositorHostOzone() override; private: @@ -37,9 +38,12 @@ TestCompositorHostOzone::TestCompositorHostOzone( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) : bounds_(bounds), - compositor_(context_factory, base::ThreadTaskRunnerHandle::Get()) {} + compositor_(context_factory, + context_factory_private, + base::ThreadTaskRunnerHandle::Get()) {} TestCompositorHostOzone::~TestCompositorHostOzone() {} @@ -63,8 +67,10 @@ // static TestCompositorHost* TestCompositorHost::Create( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { - return new TestCompositorHostOzone(bounds, context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new TestCompositorHostOzone(bounds, context_factory, + context_factory_private); } } // namespace ui
diff --git a/ui/compositor/test/test_compositor_host_win.cc b/ui/compositor/test/test_compositor_host_win.cc index 4bc3cc5..aaf9d85 100644 --- a/ui/compositor/test/test_compositor_host_win.cc +++ b/ui/compositor/test/test_compositor_host_win.cc
@@ -18,9 +18,11 @@ public gfx::WindowImpl { public: TestCompositorHostWin(const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { Init(NULL, bounds); compositor_.reset(new ui::Compositor(context_factory, + context_factory_private, base::ThreadTaskRunnerHandle::Get())); compositor_->SetAcceleratedWidget(hwnd()); compositor_->SetScaleAndSize(1.0f, GetSize()); @@ -58,8 +60,10 @@ TestCompositorHost* TestCompositorHost::Create( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { - return new TestCompositorHostWin(bounds, context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new TestCompositorHostWin(bounds, context_factory, + context_factory_private); } } // namespace ui
diff --git a/ui/compositor/test/test_compositor_host_x11.cc b/ui/compositor/test/test_compositor_host_x11.cc index 82fc7ad..ddf41944 100644 --- a/ui/compositor/test/test_compositor_host_x11.cc +++ b/ui/compositor/test/test_compositor_host_x11.cc
@@ -24,7 +24,8 @@ class TestCompositorHostX11 : public TestCompositorHost { public: TestCompositorHostX11(const gfx::Rect& bounds, - ui::ContextFactory* context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); ~TestCompositorHostX11() override; private: @@ -35,6 +36,7 @@ gfx::Rect bounds_; ui::ContextFactory* context_factory_; + ui::ContextFactoryPrivate* context_factory_private_; ui::Compositor compositor_; @@ -47,10 +49,14 @@ TestCompositorHostX11::TestCompositorHostX11( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) : bounds_(bounds), context_factory_(context_factory), - compositor_(context_factory_, base::ThreadTaskRunnerHandle::Get()) {} + context_factory_private_(context_factory_private), + compositor_(context_factory_, + context_factory_private_, + base::ThreadTaskRunnerHandle::Get()) {} TestCompositorHostX11::~TestCompositorHostX11() {} @@ -89,8 +95,10 @@ // static TestCompositorHost* TestCompositorHost::Create( const gfx::Rect& bounds, - ui::ContextFactory* context_factory) { - return new TestCompositorHostX11(bounds, context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new TestCompositorHostX11(bounds, context_factory, + context_factory_private); } } // namespace ui
diff --git a/ui/keyboard/keyboard_controller_unittest.cc b/ui/keyboard/keyboard_controller_unittest.cc index 6280f1b..c2b47f3c 100644 --- a/ui/keyboard/keyboard_controller_unittest.cc +++ b/ui/keyboard/keyboard_controller_unittest.cc
@@ -191,12 +191,15 @@ void SetUp() override { // The ContextFactory must exist before any Compositors are created. bool enable_pixel_output = false; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); ui::SetUpInputMethodFactoryForTesting(); aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); - aura_test_helper_->SetUp(context_factory); + aura_test_helper_->SetUp(context_factory, context_factory_private); new wm::DefaultActivationClient(aura_test_helper_->root_window()); focus_controller_.reset(new TestFocusController(root_window())); ui_ = new TestKeyboardUI(aura_test_helper_->host()->GetInputMethod());
diff --git a/ui/snapshot/snapshot_aura_unittest.cc b/ui/snapshot/snapshot_aura_unittest.cc index 4dc985fc..7be0d70 100644 --- a/ui/snapshot/snapshot_aura_unittest.cc +++ b/ui/snapshot/snapshot_aura_unittest.cc
@@ -97,12 +97,15 @@ // The ContextFactory must exist before any Compositors are created. // Snapshot test tests real drawing and readback, so needs pixel output. bool enable_pixel_output = true; - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); helper_.reset( new aura::test::AuraTestHelper(base::MessageLoopForUI::current())); - helper_->SetUp(context_factory); + helper_->SetUp(context_factory, context_factory_private); new ::wm::DefaultActivationClient(helper_->root_window()); }
diff --git a/ui/views/cocoa/bridged_native_widget.mm b/ui/views/cocoa/bridged_native_widget.mm index b787dbc..28383b0 100644 --- a/ui/views/cocoa/bridged_native_widget.mm +++ b/ui/views/cocoa/bridged_native_widget.mm
@@ -1259,12 +1259,14 @@ ui::ContextFactory* context_factory = ViewsDelegate::GetInstance()->GetContextFactory(); DCHECK(context_factory); + ui::ContextFactoryPrivate* context_factory_private = + ViewsDelegate::GetInstance()->GetContextFactoryPrivate(); AddCompositorSuperview(); compositor_widget_.reset(new ui::AcceleratedWidgetMac()); - compositor_.reset( - new ui::Compositor(context_factory, GetCompositorTaskRunner())); + compositor_.reset(new ui::Compositor(context_factory, context_factory_private, + GetCompositorTaskRunner())); compositor_->SetAcceleratedWidget(compositor_widget_->accelerated_widget()); compositor_widget_->SetNSView(this); }
diff --git a/ui/views/mus/surface_context_factory.cc b/ui/views/mus/surface_context_factory.cc index 54b9f124..4b55ac1 100644 --- a/ui/views/mus/surface_context_factory.cc +++ b/ui/views/mus/surface_context_factory.cc
@@ -16,21 +16,8 @@ #include "ui/views/mus/native_widget_mus.h" namespace views { -namespace { -class FakeReflector : public ui::Reflector { - public: - FakeReflector() {} - ~FakeReflector() override {} - void OnMirroringCompositorResized() override {} - void AddMirroringLayer(ui::Layer* layer) override {} - void RemoveMirroringLayer(ui::Layer* layer) override {} -}; - -} // namespace - -SurfaceContextFactory::SurfaceContextFactory(ui::Gpu* gpu) - : next_sink_id_(1u), gpu_(gpu) {} +SurfaceContextFactory::SurfaceContextFactory(ui::Gpu* gpu) : gpu_(gpu) {} SurfaceContextFactory::~SurfaceContextFactory() {} @@ -47,17 +34,6 @@ compositor->SetCompositorFrameSink(std::move(compositor_frame_sink)); } -std::unique_ptr<ui::Reflector> SurfaceContextFactory::CreateReflector( - ui::Compositor* mirroed_compositor, - ui::Layer* mirroring_layer) { - // NOTIMPLEMENTED(); - return base::WrapUnique(new FakeReflector); -} - -void SurfaceContextFactory::RemoveReflector(ui::Reflector* reflector) { - // NOTIMPLEMENTED(); -} - scoped_refptr<cc::ContextProvider> SurfaceContextFactory::SharedMainThreadContextProvider() { // NOTIMPLEMENTED(); @@ -87,22 +63,4 @@ return raster_thread_helper_.task_graph_runner(); } -cc::FrameSinkId SurfaceContextFactory::AllocateFrameSinkId() { - return cc::FrameSinkId(0, next_sink_id_++); -} - -cc::SurfaceManager* SurfaceContextFactory::GetSurfaceManager() { - return &surface_manager_; -} - -void SurfaceContextFactory::SetDisplayVisible(ui::Compositor* compositor, - bool visible) { - // TODO(fsamuel): display[compositor]->SetVisible(visible); -} - -void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, - const gfx::Size& size) { - // TODO(fsamuel): display[compositor]->Resize(size); -} - } // namespace views
diff --git a/ui/views/mus/surface_context_factory.h b/ui/views/mus/surface_context_factory.h index c856195..3abc9c9f 100644 --- a/ui/views/mus/surface_context_factory.h +++ b/ui/views/mus/surface_context_factory.h
@@ -29,10 +29,6 @@ // ContextFactory: void CreateCompositorFrameSink( base::WeakPtr<ui::Compositor> compositor) override; - std::unique_ptr<ui::Reflector> CreateReflector( - ui::Compositor* mirrored_compositor, - ui::Layer* mirroring_layer) override; - void RemoveReflector(ui::Reflector* reflector) override; scoped_refptr<cc::ContextProvider> SharedMainThreadContextProvider() override; void RemoveCompositor(ui::Compositor* compositor) override; bool DoesCreateTestContexts() override; @@ -40,24 +36,9 @@ gfx::BufferUsage usage) override; gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; cc::TaskGraphRunner* GetTaskGraphRunner() override; - cc::FrameSinkId AllocateFrameSinkId() override; - cc::SurfaceManager* GetSurfaceManager() override; - void SetDisplayVisible(ui::Compositor* compositor, bool visible) override; - void ResizeDisplay(ui::Compositor* compositor, - const gfx::Size& size) override; - void SetDisplayColorSpace(ui::Compositor* compositor, - const gfx::ColorSpace& color_space) override {} - void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, - base::TimeDelta interval) override {} - void SetDisplayVSyncParameters(ui::Compositor* compositor, - base::TimeTicks timebase, - base::TimeDelta interval) override {} - void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {} void AddObserver(ui::ContextFactoryObserver* observer) override {} void RemoveObserver(ui::ContextFactoryObserver* observer) override {} - cc::SurfaceManager surface_manager_; - uint32_t next_sink_id_; ui::RasterThreadHelper raster_thread_helper_; ui::Gpu* gpu_;
diff --git a/ui/views/test/scoped_views_test_helper.cc b/ui/views/test/scoped_views_test_helper.cc index 1cfaabe..a67ca6e 100644 --- a/ui/views/test/scoped_views_test_helper.cc +++ b/ui/views/test/scoped_views_test_helper.cc
@@ -33,17 +33,25 @@ bool enable_pixel_output = false; #if defined(USE_AURA) ui::ContextFactory* old_context_factory = nullptr; + ui::ContextFactoryPrivate* old_context_factory_private = nullptr; if (PlatformTestHelper::IsMus()) { old_context_factory = aura::Env::GetInstance()->context_factory(); DCHECK(old_context_factory); + old_context_factory_private = + aura::Env::GetInstance()->context_factory_private(); } #endif - ui::ContextFactory* context_factory = - ui::InitializeContextFactoryForTests(enable_pixel_output); + ui::ContextFactory* context_factory = nullptr; + ui::ContextFactoryPrivate* context_factory_private = nullptr; + ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, + &context_factory_private); + views_delegate_->set_context_factory(context_factory); + views_delegate_->set_context_factory_private(context_factory_private); test_helper_.reset(ViewsTestHelper::Create(base::MessageLoopForUI::current(), - context_factory)); + context_factory, + context_factory_private)); platform_test_helper_->OnTestHelperCreated(test_helper_.get()); test_helper_->SetUp(); @@ -55,8 +63,11 @@ // the corresponding ui::Windows). So restore the context-factory (which // WindowManagerConnection would have set up), so that NativeWidgetMus // installs the correct context-factory that can talk to mus. - if (PlatformTestHelper::IsMus()) + if (PlatformTestHelper::IsMus()) { aura::Env::GetInstance()->set_context_factory(old_context_factory); + aura::Env::GetInstance()->set_context_factory_private( + old_context_factory_private); + } #endif ui::InitializeInputMethodForTesting();
diff --git a/ui/views/test/test_views_delegate.h b/ui/views/test/test_views_delegate.h index e1986ab..588b0d3 100644 --- a/ui/views/test/test_views_delegate.h +++ b/ui/views/test/test_views_delegate.h
@@ -34,6 +34,11 @@ context_factory_ = context_factory; } + void set_context_factory_private( + ui::ContextFactoryPrivate* context_factory_private) { + context_factory_private_ = context_factory_private; + } + // ViewsDelegate: #if defined(OS_WIN) HICON GetSmallWindowIcon() const override; @@ -41,9 +46,11 @@ void OnBeforeWidgetInit(Widget::InitParams* params, internal::NativeWidgetDelegate* delegate) override; ui::ContextFactory* GetContextFactory() override; + ui::ContextFactoryPrivate* GetContextFactoryPrivate() override; private: ui::ContextFactory* context_factory_; + ui::ContextFactoryPrivate* context_factory_private_; bool use_desktop_native_widgets_; bool use_transparent_windows_;
diff --git a/ui/views/test/test_views_delegate_aura.cc b/ui/views/test/test_views_delegate_aura.cc index 9cb1713..cf4588a 100644 --- a/ui/views/test/test_views_delegate_aura.cc +++ b/ui/views/test/test_views_delegate_aura.cc
@@ -16,9 +16,9 @@ TestViewsDelegate::TestViewsDelegate() : context_factory_(nullptr), + context_factory_private_(nullptr), use_desktop_native_widgets_(false), - use_transparent_windows_(false) { -} + use_transparent_windows_(false) {} TestViewsDelegate::~TestViewsDelegate() { } @@ -51,4 +51,12 @@ return nullptr; } +ui::ContextFactoryPrivate* TestViewsDelegate::GetContextFactoryPrivate() { + if (context_factory_private_) + return context_factory_private_; + if (aura::Env::GetInstance()) + return aura::Env::GetInstance()->context_factory_private(); + return nullptr; +} + } // namespace views
diff --git a/ui/views/test/test_views_delegate_mac.mm b/ui/views/test/test_views_delegate_mac.mm index 652c397..6c9a574 100644 --- a/ui/views/test/test_views_delegate_mac.mm +++ b/ui/views/test/test_views_delegate_mac.mm
@@ -10,9 +10,9 @@ TestViewsDelegate::TestViewsDelegate() : context_factory_(nullptr), + context_factory_private_(nullptr), use_desktop_native_widgets_(false), - use_transparent_windows_(false) { -} + use_transparent_windows_(false) {} TestViewsDelegate::~TestViewsDelegate() { } @@ -34,4 +34,8 @@ return context_factory_; } +ui::ContextFactoryPrivate* TestViewsDelegate::GetContextFactoryPrivate() { + return context_factory_private_; +} + } // namespace views
diff --git a/ui/views/test/views_test_helper.h b/ui/views/test/views_test_helper.h index d2796b3..787648d 100644 --- a/ui/views/test/views_test_helper.h +++ b/ui/views/test/views_test_helper.h
@@ -14,6 +14,7 @@ namespace ui { class ContextFactory; +class ContextFactoryPrivate; } namespace views { @@ -26,8 +27,10 @@ virtual ~ViewsTestHelper(); // Create a platform specific instance. - static ViewsTestHelper* Create(base::MessageLoopForUI* message_loop, - ui::ContextFactory* context_factory); + static ViewsTestHelper* Create( + base::MessageLoopForUI* message_loop, + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); // Creates objects that are needed for tests. virtual void SetUp();
diff --git a/ui/views/test/views_test_helper_aura.cc b/ui/views/test/views_test_helper_aura.cc index 1c8c99a..f9fe6f1 100644 --- a/ui/views/test/views_test_helper_aura.cc +++ b/ui/views/test/views_test_helper_aura.cc
@@ -14,14 +14,20 @@ namespace views { // static -ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop, - ui::ContextFactory* context_factory) { - return new ViewsTestHelperAura(message_loop, context_factory); +ViewsTestHelper* ViewsTestHelper::Create( + base::MessageLoopForUI* message_loop, + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { + return new ViewsTestHelperAura(message_loop, context_factory, + context_factory_private); } -ViewsTestHelperAura::ViewsTestHelperAura(base::MessageLoopForUI* message_loop, - ui::ContextFactory* context_factory) - : context_factory_(context_factory) { +ViewsTestHelperAura::ViewsTestHelperAura( + base::MessageLoopForUI* message_loop, + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) + : context_factory_(context_factory), + context_factory_private_(context_factory_private) { aura_test_helper_.reset(new aura::test::AuraTestHelper(message_loop)); } @@ -34,7 +40,7 @@ } void ViewsTestHelperAura::SetUp() { - aura_test_helper_->SetUp(context_factory_); + aura_test_helper_->SetUp(context_factory_, context_factory_private_); // GetContext() may return null. See comment in GetContext(). gfx::NativeWindow root_window = GetContext();
diff --git a/ui/views/test/views_test_helper_aura.h b/ui/views/test/views_test_helper_aura.h index 8ec540f..158c3ac 100644 --- a/ui/views/test/views_test_helper_aura.h +++ b/ui/views/test/views_test_helper_aura.h
@@ -31,7 +31,8 @@ class ViewsTestHelperAura : public ViewsTestHelper { public: ViewsTestHelperAura(base::MessageLoopForUI* message_loop, - ui::ContextFactory* context_factory); + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private); ~ViewsTestHelperAura() override; void EnableMusWithWindowTreeClient( @@ -44,6 +45,7 @@ private: ui::ContextFactory* context_factory_; + ui::ContextFactoryPrivate* context_factory_private_; std::unique_ptr<aura::test::AuraTestHelper> aura_test_helper_; std::unique_ptr<aura::client::ScreenPositionClient> screen_position_client_;
diff --git a/ui/views/test/views_test_helper_mac.mm b/ui/views/test/views_test_helper_mac.mm index 2e829a3f..b35280c 100644 --- a/ui/views/test/views_test_helper_mac.mm +++ b/ui/views/test/views_test_helper_mac.mm
@@ -18,8 +18,10 @@ namespace views { // static -ViewsTestHelper* ViewsTestHelper::Create(base::MessageLoopForUI* message_loop, - ui::ContextFactory* context_factory) { +ViewsTestHelper* ViewsTestHelper::Create( + base::MessageLoopForUI* message_loop, + ui::ContextFactory* context_factory, + ui::ContextFactoryPrivate* context_factory_private) { return new ViewsTestHelperMac; }
diff --git a/ui/views/views_delegate.cc b/ui/views/views_delegate.cc index 946c208..c00e1b2c 100644 --- a/ui/views/views_delegate.cc +++ b/ui/views/views_delegate.cc
@@ -106,6 +106,10 @@ return nullptr; } +ui::ContextFactoryPrivate* ViewsDelegate::GetContextFactoryPrivate() { + return nullptr; +} + std::string ViewsDelegate::GetApplicationName() { base::FilePath program = base::CommandLine::ForCurrentProcess()->GetProgram(); return program.BaseName().AsUTF8Unsafe();
diff --git a/ui/views/views_delegate.h b/ui/views/views_delegate.h index 0e0da34..a06b711 100644 --- a/ui/views/views_delegate.h +++ b/ui/views/views_delegate.h
@@ -176,6 +176,9 @@ // Returns the context factory for new windows. virtual ui::ContextFactory* GetContextFactory(); + // Returns the privileged context factory for new windows. + virtual ui::ContextFactoryPrivate* GetContextFactoryPrivate(); + // Returns the user-visible name of the application. virtual std::string GetApplicationName();
diff --git a/ui/views_content_client/views_content_client_main_parts.cc b/ui/views_content_client/views_content_client_main_parts.cc index d6e4626..3f789391 100644 --- a/ui/views_content_client/views_content_client_main_parts.cc +++ b/ui/views_content_client/views_content_client_main_parts.cc
@@ -32,6 +32,8 @@ std::unique_ptr<views::TestViewsDelegate> test_views_delegate( new views::DesktopTestViewsDelegate); test_views_delegate->set_context_factory(content::GetContextFactory()); + test_views_delegate->set_context_factory_private( + content::GetContextFactoryPrivate()); views_delegate_ = std::move(test_views_delegate); }
diff --git a/ui/webui/resources/cr_elements/cr_search_field/compiled_resources2.gyp b/ui/webui/resources/cr_elements/cr_search_field/compiled_resources2.gyp index 611febb..e7373917 100644 --- a/ui/webui/resources/cr_elements/cr_search_field/compiled_resources2.gyp +++ b/ui/webui/resources/cr_elements/cr_search_field/compiled_resources2.gyp
@@ -10,12 +10,5 @@ ], 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], }, - { - 'target_name': 'cr_search_field', - 'dependencies': [ - 'cr_search_field_behavior' - ], - 'includes': ['../../../../../third_party/closure_compiler/compile_js2.gypi'], - }, ], }
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.css b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.css deleted file mode 100644 index 6829d979..0000000 --- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.css +++ /dev/null
@@ -1,82 +0,0 @@ -/* Copyright 2015 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. */ - -:host { - -webkit-padding-end: 10px; - box-sizing: border-box; - display: flex; - justify-content: flex-end; -} - -[hidden] { - display: none !important; -} - -paper-input-container { - margin-top: 2px; - max-width: 200px; - padding: 2px 0; - width: 100%; -} - -#searchTerm { - --paper-input-container-color: rgb(192, 199, 205); - --paper-input-container-focus-color: rgb(192, 199, 205); - --paper-input-container-input: { - color: inherit; - font-size: inherit; - }; - --paper-input-container-input-color: rgb(192, 199, 205); - color: rgb(192, 199, 205); - z-index: 0; -} - -#searchTerm input[type='search']::-webkit-search-decoration, -#searchTerm input[type='search']::-webkit-search-cancel-button, -#searchTerm input[type='search']::-webkit-search-results-button { - -webkit-appearance: none; -} - -#searchTerm input[type='search']::-webkit-search-cancel-button { - display: none; -} - -#searchTerm input[type='search'] { - padding-right: 20px; -} - -paper-icon-button { - --iron-icon-height: 20px; - --iron-icon-width: 20px; - --paper-icon-button: { - height: 32px; - padding: 6px; - width: 32px; - }; -} - -#searchTerm paper-icon-button { - --iron-icon-height: 16px; - --iron-icon-width: 16px; - --paper-icon-button: { - -webkit-margin-end: -8px; - height: 32px; - padding: 8px; - width: 32px; - }; - position: absolute; - right: 0; - top: -4px; - z-index: 1; -} - -:host-context([dir='rtl']) #searchTerm paper-icon-button { - left: 0; - right: auto; -} - -:host-context([dir='rtl']) #searchTerm input[type='search'] { - padding-left: 20px; - padding-right: 0; -}
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html deleted file mode 100644 index 03cc42759..0000000 --- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.html +++ /dev/null
@@ -1,28 +0,0 @@ -<link rel="import" href="chrome://resources/cr_elements/cr_search_field/cr_search_field_behavior.html"> -<link rel="import" href="chrome://resources/cr_elements/icons.html"> -<link rel="import" href="chrome://resources/html/assert.html"> -<link rel="import" href="chrome://resources/html/polymer.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/iron-input/iron-input.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button.html"> -<link rel="import" href="chrome://resources/polymer/v1_0/paper-input/paper-input-container.html"> - -<dom-module id="cr-search-field"> - <template> - <paper-icon-button icon="cr:search" id="searchButton" - disabled$="[[showingSearch]]" title="[[label]]" - on-tap="toggleShowingSearch_"></paper-icon-button> - <paper-input-container id="searchTerm" on-search="onSearchTermSearch" - on-keydown="onSearchTermKeydown" hidden$="[[!showingSearch]]" - no-label-float> - <input is="iron-input" id="searchInput" type="search" - bind-value="{{value_}}" placeholder="[[label]]" incremental> - <template is="dom-if" if="[[value_]]"> - <paper-icon-button icon="cr:cancel" on-tap="clearSearch_" - title="[[clearLabel]]" hidden$="[[!showingSearch]]"> - </paper-icon-button> - </template> - </paper-input-container> - </template> - <link rel="import" type="css" href="cr_search_field.css"> - <script src="cr_search_field.js"></script> -</dom-module>
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js deleted file mode 100644 index e9a7e3e..0000000 --- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field.js +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright 2015 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -var SearchField = Polymer({ - is: 'cr-search-field', - - behaviors: [CrSearchFieldBehavior], - - properties: { - value_: String, - }, - - /** @return {!HTMLInputElement} */ - getSearchInput: function() { - return this.$.searchInput; - }, - - /** @private */ - clearSearch_: function() { - this.setValue(''); - this.getSearchInput().focus(); - }, - - /** @private */ - toggleShowingSearch_: function() { - this.showingSearch = !this.showingSearch; - }, -});
diff --git a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js index f494663..68c15d4f 100644 --- a/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js +++ b/ui/webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js
@@ -3,8 +3,8 @@ // found in the LICENSE file. /** - * Implements an incremental search field which can be shown and hidden. - * Canonical implementation is <cr-search-field>. + * Helper functions for implementing an incremental search field. See + * <settings-subpage-search> for a simple implementation. * @polymerBehavior */ var CrSearchFieldBehavior = { @@ -19,14 +19,6 @@ value: '', }, - showingSearch: { - type: Boolean, - value: false, - notify: true, - observer: 'showingSearchChanged_', - reflectToAttribute: true - }, - /** @private */ lastValue_: { type: String, @@ -57,23 +49,9 @@ setValue: function(value, opt_noEvent) { var searchInput = this.getSearchInput(); searchInput.value = value; - // If the input is an iron-input, ensure that the new value propagates as - // expected. - if (searchInput.bindValue != undefined) - searchInput.bindValue = value; this.onValueChanged_(value, !!opt_noEvent); }, - showAndFocus: function() { - this.showingSearch = true; - this.focus_(); - }, - - /** @private */ - focus_: function() { - this.getSearchInput().focus(); - }, - onSearchTermSearch: function() { this.onValueChanged_(this.getValue(), false); }, @@ -95,28 +73,4 @@ if (!noEvent) this.fire('search-changed', newValue); }, - - onSearchTermKeydown: function(e) { - if (e.key == 'Escape') - this.showingSearch = false; - }, - - /** - * @param {boolean} current - * @param {boolean|undefined} previous - * @private - */ - showingSearchChanged_: function(current, previous) { - // Prevent unnecessary 'search-changed' event from firing on startup. - if (previous == undefined) - return; - - if (this.showingSearch) { - this.focus_(); - return; - } - - this.setValue(''); - this.getSearchInput().blur(); - } };
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html index 5ae9a11..63ee45fb 100644 --- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html +++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.html
@@ -142,7 +142,7 @@ type="search" on-input="onSearchInput_" on-search="onSearchTermSearch" - on-keydown="onSearchTermKeydown" + on-keydown="onSearchTermKeydown_" on-focus="onInputFocus_" on-blur="onInputBlur_" incremental
diff --git a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js index 51603de..1931868 100644 --- a/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js +++ b/ui/webui/resources/cr_elements/cr_toolbar/cr_toolbar_search_field.js
@@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// TODO(tsergeant): Add tests for cr-toolbar-search-field. Polymer({ is: 'cr-toolbar-search-field', @@ -14,6 +13,14 @@ reflectToAttribute: true, }, + showingSearch: { + type: Boolean, + value: false, + notify: true, + observer: 'showingSearchChanged_', + reflectToAttribute: true + }, + // Prompt text to display in the search field. label: String, @@ -72,6 +79,16 @@ return this.searchFocused_; }, + showAndFocus: function() { + this.showingSearch = true; + this.focus_(); + }, + + /** @private */ + focus_: function() { + this.getSearchInput().focus(); + }, + /** * @param {boolean} narrow * @return {number} @@ -114,6 +131,12 @@ this.showingSearch = true; }, + /** @private */ + onSearchTermKeydown_: function(e) { + if (e.key == 'Escape') + this.showingSearch = false; + }, + /** * @param {Event} e * @private @@ -129,6 +152,25 @@ */ clearSearch_: function(e) { this.setValue(''); - this.getSearchInput().focus(); - } + this.focus_(); + }, + + /** + * @param {boolean} current + * @param {boolean|undefined} previous + * @private + */ + showingSearchChanged_: function(current, previous) { + // Prevent unnecessary 'search-changed' event from firing on startup. + if (previous == undefined) + return; + + if (this.showingSearch) { + this.focus_(); + return; + } + + this.setValue(''); + this.getSearchInput().blur(); + }, });
diff --git a/ui/webui/resources/cr_elements_resources.grdp b/ui/webui/resources/cr_elements_resources.grdp index 729af246..8cf90917 100644 --- a/ui/webui/resources/cr_elements_resources.grdp +++ b/ui/webui/resources/cr_elements_resources.grdp
@@ -129,15 +129,6 @@ <structure name="IDR_CR_ELEMENTS_CR_SEARCH_FIELD_BEHAVIOR_JS" file="../../webui/resources/cr_elements/cr_search_field/cr_search_field_behavior.js" type="chrome_html" /> - <structure name="IDR_CR_ELEMENTS_CR_SEARCH_FIELD_CSS" - file="../../webui/resources/cr_elements/cr_search_field/cr_search_field.css" - type="chrome_html" /> - <structure name="IDR_CR_ELEMENTS_CR_SEARCH_FIELD_HTML" - file="../../webui/resources/cr_elements/cr_search_field/cr_search_field.html" - type="chrome_html" /> - <structure name="IDR_CR_ELEMENTS_CR_SEARCH_FIELD_JS" - file="../../webui/resources/cr_elements/cr_search_field/cr_search_field.js" - type="chrome_html" /> <structure name="IDR_CR_ELEMENTS_CR_SHARED_MENU_HTML" file="../../webui/resources/cr_elements/cr_shared_menu/cr_shared_menu.html" type="chrome_html" />