diff --git a/cc/surfaces/display_scheduler.cc b/cc/surfaces/display_scheduler.cc
index cb66004..e6a5336 100644
--- a/cc/surfaces/display_scheduler.cc
+++ b/cc/surfaces/display_scheduler.cc
@@ -326,9 +326,7 @@
            current_begin_frame_args_.interval;
   }
 
-  bool all_surfaces_ready =
-      !has_pending_surfaces_ && root_surface_id_.is_valid();
-  if (!needs_draw_ && !all_surfaces_ready) {
+  if (!needs_draw_) {
     TRACE_EVENT_INSTANT0("cc", "No damage yet", TRACE_EVENT_SCOPE_THREAD);
     return current_begin_frame_args_.frame_time +
            current_begin_frame_args_.interval;
@@ -341,6 +339,8 @@
            current_begin_frame_args_.interval;
   }
 
+  bool all_surfaces_ready =
+      !has_pending_surfaces_ && root_surface_id_.is_valid();
   if (all_surfaces_ready && !expecting_root_surface_damage_because_of_resize_) {
     TRACE_EVENT_INSTANT0("cc", "All active surfaces ready",
                          TRACE_EVENT_SCOPE_THREAD);
diff --git a/cc/surfaces/display_scheduler_unittest.cc b/cc/surfaces/display_scheduler_unittest.cc
index 567e409..92f161dba 100644
--- a/cc/surfaces/display_scheduler_unittest.cc
+++ b/cc/surfaces/display_scheduler_unittest.cc
@@ -288,8 +288,12 @@
             scheduler_.DesiredBeginFrameDeadlineTimeForTest());
   scheduler_.BeginFrameDeadlineForTest();
 
-  // SurfaceDamage with |!has_damage| triggers early deadline.
-  AdvanceTimeAndBeginFrameForTest({sid1});
+  // SurfaceDamage with |!has_damage| triggers early deadline if other damage
+  // exists.
+  AdvanceTimeAndBeginFrameForTest({sid1, sid2});
+  EXPECT_LT(now_src().NowTicks(),
+            scheduler_.DesiredBeginFrameDeadlineTimeForTest());
+  SurfaceDamaged(sid2);
   EXPECT_LT(now_src().NowTicks(),
             scheduler_.DesiredBeginFrameDeadlineTimeForTest());
   BeginFrameAck ack = AckForCurrentBeginFrame();
@@ -299,6 +303,18 @@
             scheduler_.DesiredBeginFrameDeadlineTimeForTest());
   scheduler_.BeginFrameDeadlineForTest();
 
+  // SurfaceDamage with |!has_damage| does not trigger early deadline if no
+  // other damage exists.
+  AdvanceTimeAndBeginFrameForTest({sid1});
+  EXPECT_LT(now_src().NowTicks(),
+            scheduler_.DesiredBeginFrameDeadlineTimeForTest());
+  ack = AckForCurrentBeginFrame();
+  ack.has_damage = false;
+  scheduler_.ProcessSurfaceDamage(sid1, ack, false);
+  EXPECT_LT(now_src().NowTicks(),
+            scheduler_.DesiredBeginFrameDeadlineTimeForTest());
+  scheduler_.BeginFrameDeadlineForTest();
+
   // System should be idle now.
   AdvanceTimeAndBeginFrameForTest(std::vector<SurfaceId>());
   EXPECT_FALSE(scheduler_.inside_begin_frame_deadline_interval());
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index aca859b..dcc4e4d 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -5615,6 +5615,9 @@
         Nope
       </message>
       <if expr="not is_android">
+        <message name="IDS_PASSWORD_MANAGER_EDIT_BUTTON" desc="Edit button text for password manager">
+          Edit
+        </message>
         <message name="IDS_PASSWORD_MANAGER_SAVE_BUTTON" desc="Save button text for password manager">
           Save
         </message>
diff --git a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
index 89a651d..4ca43f6 100644
--- a/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
+++ b/chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc
@@ -24,6 +24,7 @@
 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h"
 #include "chrome/grit/generated_resources.h"
+#include "components/password_manager/core/common/password_manager_features.h"
 #include "components/strings/grit/components_strings.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/material_design/material_design_controller.h"
@@ -288,8 +289,8 @@
 // ManagePasswordsBubbleView::PendingView -------------------------------------
 
 // A view offering the user the ability to save credentials. Contains a
-// single ManagePasswordItemsView, along with a "Save Passwords" button
-// and a "Never" button.
+// single ManagePasswordItemsView, along with a "Save Passwords" button,
+// a "Never" button and an "Edit" button to edit username field.
 class ManagePasswordsBubbleView::PendingView
     : public views::View,
       public views::ButtonListener,
@@ -309,6 +310,7 @@
 
   ManagePasswordsBubbleView* parent_;
 
+  views::Button* edit_button_;
   views::Button* save_button_;
   views::Button* never_button_;
 
@@ -317,7 +319,7 @@
 
 ManagePasswordsBubbleView::PendingView::PendingView(
     ManagePasswordsBubbleView* parent)
-    : parent_(parent) {
+    : parent_(parent), edit_button_(nullptr) {
   views::GridLayout* layout = new views::GridLayout(this);
   layout->set_minimum_size(gfx::Size(kDesiredBubbleWidth, 0));
   SetLayoutManager(layout);
@@ -328,6 +330,11 @@
     item = new ManagePasswordItemsView(parent_->model(),
                                        &parent->model()->pending_password());
   }
+  if (base::FeatureList::IsEnabled(
+          password_manager::features::kEnableUsernameCorrection)) {
+    edit_button_ = views::MdTextButton::CreateSecondaryUiButton(
+        this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_EDIT_BUTTON));
+  }
   save_button_ = views::MdTextButton::CreateSecondaryUiBlueButton(
       this, l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SAVE_BUTTON));
   never_button_ = views::MdTextButton::CreateSecondaryUiButton(
@@ -349,8 +356,13 @@
   }
 
   // Button row.
-  BuildColumnSet(layout, DOUBLE_BUTTON_COLUMN_SET);
-  layout->StartRow(0, DOUBLE_BUTTON_COLUMN_SET);
+  ColumnSetType column_set_type =
+      edit_button_ ? TRIPLE_BUTTON_COLUMN_SET : DOUBLE_BUTTON_COLUMN_SET;
+  BuildColumnSet(layout, column_set_type);
+  layout->StartRow(0, column_set_type);
+  if (column_set_type == TRIPLE_BUTTON_COLUMN_SET) {
+    layout->AddView(edit_button_);
+  }
   layout->AddView(save_button_);
   layout->AddView(never_button_);
 
@@ -363,7 +375,10 @@
 void ManagePasswordsBubbleView::PendingView::ButtonPressed(
     views::Button* sender,
     const ui::Event& event) {
-  if (sender == save_button_) {
+  // TODO(https://crbug.com/734965): Implement edit button logic.
+  if (sender == edit_button_) {
+    return;
+  } else if (sender == save_button_) {
     parent_->model()->OnSaveClicked();
     if (parent_->model()->ReplaceToShowPromotionIfNeeded()) {
       parent_->Refresh();
diff --git a/components/password_manager/core/common/password_manager_features.cc b/components/password_manager/core/common/password_manager_features.cc
index 1b880b3..eb0e30f 100644
--- a/components/password_manager/core/common/password_manager_features.cc
+++ b/components/password_manager/core/common/password_manager_features.cc
@@ -27,6 +27,10 @@
 extern const base::Feature kEnableManualPasswordGeneration = {
     "enable-manual-password-generation", base::FEATURE_DISABLED_BY_DEFAULT};
 
+// Enables username correction while saving username and password details.
+extern const base::Feature kEnableUsernameCorrection{
+    "EnableUsernameCorrection", base::FEATURE_DISABLED_BY_DEFAULT};
+
 // Disallow autofilling of the sync credential.
 const base::Feature kProtectSyncCredential = {
     "protect-sync-credential", base::FEATURE_DISABLED_BY_DEFAULT};
diff --git a/components/password_manager/core/common/password_manager_features.h b/components/password_manager/core/common/password_manager_features.h
index 57a216c..ba39cbd 100644
--- a/components/password_manager/core/common/password_manager_features.h
+++ b/components/password_manager/core/common/password_manager_features.h
@@ -21,6 +21,7 @@
 extern const base::Feature kDropSyncCredential;
 extern const base::Feature kEnableManualPasswordGeneration;
 extern const base::Feature kEnablePasswordForceSaving;
+extern const base::Feature kEnableUsernameCorrection;
 extern const base::Feature kProtectSyncCredential;
 extern const base::Feature kProtectSyncCredentialOnReauth;
 extern const base::Feature kPasswordImportExport;
diff --git a/components/plugins/renderer/webview_plugin.cc b/components/plugins/renderer/webview_plugin.cc
index 7ce26936..f9d9434 100644
--- a/components/plugins/renderer/webview_plugin.cc
+++ b/components/plugins/renderer/webview_plugin.cc
@@ -259,9 +259,8 @@
   // ApplyWebPreferences before making a WebLocalFrame so that the frame sees a
   // consistent view of our preferences.
   content::RenderView::ApplyWebPreferences(preferences, web_view_);
-  WebLocalFrame* web_frame = WebLocalFrame::Create(
-      blink::WebTreeScopeType::kDocument, this, nullptr, nullptr);
-  web_view_->SetMainFrame(web_frame);
+  WebLocalFrame* web_frame =
+      WebLocalFrame::CreateMainFrame(web_view_, this, nullptr, nullptr);
   WebFrameWidget::Create(this, web_frame);
 }
 
diff --git a/components/printing/renderer/print_web_view_helper.cc b/components/printing/renderer/print_web_view_helper.cc
index b740f5b..740f83e5 100644
--- a/components/printing/renderer/print_web_view_helper.cc
+++ b/components/printing/renderer/print_web_view_helper.cc
@@ -590,9 +590,8 @@
     }
   };
   HeaderAndFooterClient frame_client;
-  blink::WebLocalFrame* frame = blink::WebLocalFrame::Create(
-      blink::WebTreeScopeType::kDocument, &frame_client, nullptr, nullptr);
-  web_view->SetMainFrame(frame);
+  blink::WebLocalFrame* frame = blink::WebLocalFrame::CreateMainFrame(
+      web_view, &frame_client, nullptr, nullptr);
   blink::WebWidgetClient web_widget_client;
   blink::WebFrameWidget::Create(&web_widget_client, frame);
 
@@ -817,9 +816,8 @@
       blink::WebView::Create(this, blink::kWebPageVisibilityStateVisible);
   owns_web_view_ = true;
   content::RenderView::ApplyWebPreferences(prefs, web_view);
-  blink::WebLocalFrame* main_frame = blink::WebLocalFrame::Create(
-      blink::WebTreeScopeType::kDocument, this, nullptr, nullptr);
-  web_view->SetMainFrame(main_frame);
+  blink::WebLocalFrame* main_frame =
+      blink::WebLocalFrame::CreateMainFrame(web_view, this, nullptr, nullptr);
   blink::WebFrameWidget::Create(this, main_frame);
   frame_.Reset(web_view->MainFrame()->ToWebLocalFrame());
   node_to_print_.Reset();
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
index 7bf5386c..cc4afef5 100644
--- a/content/renderer/BUILD.gn
+++ b/content/renderer/BUILD.gn
@@ -197,8 +197,6 @@
     "manifest/manifest_parser.h",
     "manifest/manifest_uma_util.cc",
     "manifest/manifest_uma_util.h",
-    "media/android/media_info_loader.cc",
-    "media/android/media_info_loader.h",
     "media/android/media_player_renderer_client.cc",
     "media/android/media_player_renderer_client.h",
     "media/android/media_player_renderer_client_factory.cc",
diff --git a/content/renderer/media/android/media_info_loader.cc b/content/renderer/media/android/media_info_loader.cc
deleted file mode 100644
index 2a669bd..0000000
--- a/content/renderer/media/android/media_info_loader.cc
+++ /dev/null
@@ -1,201 +0,0 @@
-// Copyright 2013 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 "content/renderer/media/android/media_info_loader.h"
-
-#include <utility>
-
-#include "base/bits.h"
-#include "base/callback_helpers.h"
-#include "base/metrics/histogram_macros.h"
-#include "third_party/WebKit/public/platform/WebURLError.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "third_party/WebKit/public/platform/WebURLResponse.h"
-#include "third_party/WebKit/public/web/WebAssociatedURLLoader.h"
-#include "third_party/WebKit/public/web/WebLocalFrame.h"
-
-using blink::WebAssociatedURLLoader;
-using blink::WebAssociatedURLLoaderOptions;
-using blink::WebLocalFrame;
-using blink::WebURLError;
-using blink::WebURLRequest;
-using blink::WebURLResponse;
-
-namespace content {
-
-static const int kHttpOK = 200;
-static const int kHttpPartialContentOK = 206;
-
-MediaInfoLoader::MediaInfoLoader(
-    const GURL& url,
-    blink::WebMediaPlayer::CORSMode cors_mode,
-    const ReadyCB& ready_cb)
-    : loader_failed_(false),
-      url_(url),
-      allow_stored_credentials_(false),
-      cors_mode_(cors_mode),
-      single_origin_(true),
-      ready_cb_(ready_cb) {}
-
-MediaInfoLoader::~MediaInfoLoader() {}
-
-void MediaInfoLoader::Start(blink::WebLocalFrame* frame) {
-  // Make sure we have not started.
-  DCHECK(!ready_cb_.is_null());
-  CHECK(frame);
-
-  start_time_ = base::TimeTicks::Now();
-  first_party_url_ = frame->GetDocument().FirstPartyForCookies();
-
-  // Prepare the request.
-  WebURLRequest request(url_);
-  // TODO(mkwst): Split this into video/audio.
-  request.SetRequestContext(WebURLRequest::kRequestContextVideo);
-  frame->SetReferrerForRequest(request, blink::WebURL());
-
-  // Since we don't actually care about the media data at this time, use a two
-  // byte range request to avoid unnecessarily downloading resources.  Not all
-  // servers support HEAD unfortunately, so use a range request; which is no
-  // worse than the previous request+cancel code.  See http://crbug.com/400788
-  request.AddHTTPHeaderField("Range", "bytes=0-1");
-
-  std::unique_ptr<WebAssociatedURLLoader> loader;
-  if (test_loader_) {
-    loader = std::move(test_loader_);
-  } else {
-    WebAssociatedURLLoaderOptions options;
-    if (cors_mode_ == blink::WebMediaPlayer::kCORSModeUnspecified) {
-      request.SetFetchCredentialsMode(
-          WebURLRequest::kFetchCredentialsModeInclude);
-      options.fetch_request_mode = WebURLRequest::kFetchRequestModeNoCORS;
-      allow_stored_credentials_ = true;
-    } else {
-      options.expose_all_response_headers = true;
-      // The author header set is empty, no preflight should go ahead.
-      options.preflight_policy =
-          WebAssociatedURLLoaderOptions::kPreventPreflight;
-      options.fetch_request_mode = WebURLRequest::kFetchRequestModeCORS;
-      if (cors_mode_ == blink::WebMediaPlayer::kCORSModeUseCredentials) {
-        request.SetFetchCredentialsMode(
-            WebURLRequest::kFetchCredentialsModeInclude);
-        allow_stored_credentials_ = true;
-      } else {
-        request.SetFetchCredentialsMode(
-            WebURLRequest::kFetchCredentialsModeSameOrigin);
-      }
-    }
-    loader.reset(frame->CreateAssociatedURLLoader(options));
-  }
-
-  // Start the resource loading.
-  loader->LoadAsynchronously(request, this);
-  active_loader_.reset(new media::ActiveLoader(std::move(loader)));
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// blink::WebAssociatedURLLoaderClient implementation.
-bool MediaInfoLoader::WillFollowRedirect(
-    const WebURLRequest& newRequest,
-    const WebURLResponse& redirectResponse) {
-  // The load may have been stopped and |ready_cb| is destroyed.
-  // In this case we shouldn't do anything.
-  if (ready_cb_.is_null())
-    return false;
-
-  // Only allow |single_origin_| if we haven't seen a different origin yet.
-  if (single_origin_)
-    single_origin_ = url_.GetOrigin() == GURL(newRequest.Url()).GetOrigin();
-
-  url_ = newRequest.Url();
-  first_party_url_ = newRequest.FirstPartyForCookies();
-  allow_stored_credentials_ = newRequest.AllowStoredCredentials();
-
-  return true;
-}
-
-void MediaInfoLoader::DidSendData(unsigned long long bytes_sent,
-                                  unsigned long long total_bytes_to_be_sent) {
-  NOTIMPLEMENTED();
-}
-
-void MediaInfoLoader::DidReceiveResponse(const WebURLResponse& response) {
-  DVLOG(1) << "didReceiveResponse: HTTP/"
-           << (response.HttpVersion() == WebURLResponse::kHTTPVersion_0_9
-                   ? "0.9"
-                   : response.HttpVersion() == WebURLResponse::kHTTPVersion_1_0
-                         ? "1.0"
-                         : response.HttpVersion() ==
-                                   WebURLResponse::kHTTPVersion_1_1
-                               ? "1.1"
-                               : "Unknown")
-           << " " << response.HttpStatusCode();
-  DCHECK(active_loader_.get());
-  if (!url_.SchemeIs(url::kHttpScheme) && !url_.SchemeIs(url::kHttpsScheme)) {
-      DidBecomeReady(kOk);
-      return;
-  }
-  if (response.HttpStatusCode() == kHttpOK ||
-      response.HttpStatusCode() == kHttpPartialContentOK) {
-    DidBecomeReady(kOk);
-    return;
-  }
-  loader_failed_ = true;
-  DidBecomeReady(kFailed);
-}
-
-void MediaInfoLoader::DidReceiveData(const char* data, int data_length) {
-  // Ignored.
-}
-
-void MediaInfoLoader::DidDownloadData(int dataLength) {
-  NOTIMPLEMENTED();
-}
-
-void MediaInfoLoader::DidReceiveCachedMetadata(const char* data,
-                                               int data_length) {
-  NOTIMPLEMENTED();
-}
-
-void MediaInfoLoader::DidFinishLoading(double finishTime) {
-  DCHECK(active_loader_.get());
-  DidBecomeReady(kOk);
-}
-
-void MediaInfoLoader::DidFail(const WebURLError& error) {
-  DVLOG(1) << "didFail: reason=" << error.reason
-           << ", isCancellation=" << error.is_cancellation
-           << ", domain=" << error.domain.Utf8().data()
-           << ", localizedDescription="
-           << error.localized_description.Utf8().data();
-  DCHECK(active_loader_.get());
-  loader_failed_ = true;
-  DidBecomeReady(kFailed);
-}
-
-bool MediaInfoLoader::HasSingleOrigin() const {
-  DCHECK(ready_cb_.is_null())
-      << "Must become ready before calling HasSingleOrigin()";
-  return single_origin_;
-}
-
-bool MediaInfoLoader::DidPassCORSAccessCheck() const {
-  DCHECK(ready_cb_.is_null())
-      << "Must become ready before calling DidPassCORSAccessCheck()";
-  return !loader_failed_ &&
-         cors_mode_ != blink::WebMediaPlayer::kCORSModeUnspecified;
-}
-
-/////////////////////////////////////////////////////////////////////////////
-// Helper methods.
-
-void MediaInfoLoader::DidBecomeReady(Status status) {
-  UMA_HISTOGRAM_TIMES("Media.InfoLoadDelay",
-                      base::TimeTicks::Now() - start_time_);
-  active_loader_.reset();
-  if (!ready_cb_.is_null())
-    base::ResetAndReturn(&ready_cb_).Run(status, url_, first_party_url_,
-                                         allow_stored_credentials_);
-}
-
-}  // namespace content
diff --git a/content/renderer/media/android/media_info_loader.h b/content/renderer/media/android/media_info_loader.h
deleted file mode 100644
index 624d3427..0000000
--- a/content/renderer/media/android/media_info_loader.h
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright 2013 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 CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_
-#define CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_
-
-#include <stdint.h>
-
-#include <memory>
-#include <string>
-
-#include "base/callback.h"
-#include "base/macros.h"
-#include "base/time/time.h"
-#include "content/common/content_export.h"
-#include "media/blink/active_loader.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
-#include "third_party/WebKit/public/web/WebAssociatedURLLoaderClient.h"
-#include "third_party/WebKit/public/web/WebDocument.h"
-#include "url/gurl.h"
-
-namespace blink {
-class WebAssociatedURLLoader;
-class WebLocalFrame;
-class WebURLRequest;
-}
-
-namespace content {
-
-// This class provides additional information about a media URL. Currently it
-// can be used to determine if a media URL has a single security origin and
-// whether the URL passes a CORS access check.
-class CONTENT_EXPORT MediaInfoLoader
-    : private blink::WebAssociatedURLLoaderClient {
- public:
-  // Status codes for start operations on MediaInfoLoader.
-  enum Status {
-    // The operation failed, which may have been due to:
-    //   - Page navigation
-    //   - Server replied 4xx/5xx
-    //   - The response was invalid
-    //   - Connection was terminated
-    //
-    // At this point you should delete the loader.
-    kFailed,
-
-    // Everything went as planned.
-    kOk,
-  };
-
-  // Callback when MediaInfoLoader finishes loading the url. Args: whether URL
-  // is successfully loaded, the final URL destination following all the
-  // redirect, the first party URL for the final destination, and whether
-  // credentials needs to be sent to the final destination.
-  typedef base::Callback<void(Status, const GURL&, const GURL&, bool)> ReadyCB;
-
-  // Start loading information about the given media URL.
-  // |url| - URL for the media resource to be loaded.
-  // |cors_mode| - HTML media element's crossorigin attribute.
-  // |ready_cb| - Called when media info has finished or failed loading.
-  MediaInfoLoader(
-      const GURL& url,
-      blink::WebMediaPlayer::CORSMode cors_mode,
-      const ReadyCB& ready_cb);
-  ~MediaInfoLoader() override;
-
-  // Start loading media info.
-  void Start(blink::WebLocalFrame* frame);
-
-  // Returns true if the media resource has a single origin, false otherwise.
-  // Only valid to call after the loader becomes ready.
-  bool HasSingleOrigin() const;
-
-  // Returns true if the media resource passed a CORS access control check.
-  // Only valid to call after the loader becomes ready.
-  bool DidPassCORSAccessCheck() const;
-
- private:
-  friend class MediaInfoLoaderTest;
-
-  // blink::WebAssociatedURLLoaderClient implementation.
-  bool WillFollowRedirect(
-      const blink::WebURLRequest& newRequest,
-      const blink::WebURLResponse& redirectResponse) override;
-  void DidSendData(unsigned long long bytesSent,
-                   unsigned long long totalBytesToBeSent) override;
-  void DidReceiveResponse(const blink::WebURLResponse& response) override;
-  void DidDownloadData(int data_length) override;
-  void DidReceiveData(const char* data, int data_length) override;
-  void DidReceiveCachedMetadata(const char* data, int dataLength) override;
-  void DidFinishLoading(double finishTime) override;
-  void DidFail(const blink::WebURLError&) override;
-
-  void DidBecomeReady(Status status);
-
-  // Injected WebAssociatedURLLoader instance for testing purposes.
-  std::unique_ptr<blink::WebAssociatedURLLoader> test_loader_;
-
-  // Keeps track of an active WebAssociatedURLLoader and associated state.
-  std::unique_ptr<media::ActiveLoader> active_loader_;
-
-  bool loader_failed_;
-  GURL url_;
-  GURL first_party_url_;
-  bool allow_stored_credentials_;
-  blink::WebMediaPlayer::CORSMode cors_mode_;
-  bool single_origin_;
-
-  ReadyCB ready_cb_;
-  base::TimeTicks start_time_;
-
-  DISALLOW_COPY_AND_ASSIGN(MediaInfoLoader);
-};
-
-}  // namespace content
-
-#endif  // CONTENT_RENDERER_MEDIA_ANDROID_MEDIA_INFO_LOADER_H_
diff --git a/content/renderer/media/android/media_info_loader_unittest.cc b/content/renderer/media/android/media_info_loader_unittest.cc
deleted file mode 100644
index 710db34..0000000
--- a/content/renderer/media/android/media_info_loader_unittest.cc
+++ /dev/null
@@ -1,203 +0,0 @@
-// Copyright 2013 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 "base/bind.h"
-#include "base/macros.h"
-#include "base/message_loop/message_loop.h"
-#include "base/run_loop.h"
-#include "content/renderer/media/android/media_info_loader.h"
-#include "content/test/mock_webassociatedurlloader.h"
-#include "third_party/WebKit/public/platform/WebMediaPlayer.h"
-#include "third_party/WebKit/public/platform/WebURLError.h"
-#include "third_party/WebKit/public/platform/WebURLRequest.h"
-#include "third_party/WebKit/public/platform/WebURLResponse.h"
-#include "third_party/WebKit/public/web/WebFrameClient.h"
-#include "third_party/WebKit/public/web/WebLocalFrame.h"
-#include "third_party/WebKit/public/web/WebView.h"
-
-using ::testing::_;
-using ::testing::InSequence;
-using ::testing::NiceMock;
-
-using blink::WebLocalFrame;
-using blink::WebString;
-using blink::WebURLError;
-using blink::WebURLResponse;
-using blink::WebView;
-
-namespace content {
-
-static const char* kHttpUrl = "http://test";
-static const char kHttpRedirectToSameDomainUrl1[] = "http://test/ing";
-static const char kHttpRedirectToSameDomainUrl2[] = "http://test/ing2";
-static const char kHttpRedirectToDifferentDomainUrl1[] = "http://test2";
-static const char kHttpDataUrl[] = "data:audio/wav;base64,UklGRhwMAABXQVZFZm10";
-
-static const int kHttpOK = 200;
-static const int kHttpNotFound = 404;
-
-class MediaInfoLoaderTest : public testing::Test {
- public:
-  MediaInfoLoaderTest()
-      : view_(WebView::Create(nullptr, blink::kWebPageVisibilityStateVisible)) {
-    view_->SetMainFrame(WebLocalFrame::Create(
-        blink::WebTreeScopeType::kDocument, &client_, nullptr, nullptr));
-  }
-
-  virtual ~MediaInfoLoaderTest() { view_->Close(); }
-
-  void Initialize(
-      const char* url,
-      blink::WebMediaPlayer::CORSMode cors_mode) {
-    gurl_ = GURL(url);
-
-    loader_.reset(new MediaInfoLoader(
-        gurl_, cors_mode,
-        base::Bind(&MediaInfoLoaderTest::ReadyCallback,
-                   base::Unretained(this))));
-
-    // |test_loader_| will be used when Start() is called.
-    url_loader_ = new NiceMock<MockWebAssociatedURLLoader>();
-    loader_->test_loader_ =
-        std::unique_ptr<blink::WebAssociatedURLLoader>(url_loader_);
-  }
-
-  void Start() {
-    InSequence s;
-    EXPECT_CALL(*url_loader_, LoadAsynchronously(_, _));
-    loader_->Start(view_->MainFrame()->ToWebLocalFrame());
-  }
-
-  void Stop() {
-    InSequence s;
-    EXPECT_CALL(*url_loader_, Cancel());
-    loader_.reset();
-  }
-
-  void Redirect(const char* url) {
-    GURL redirect_url(url);
-    blink::WebURLRequest new_request(redirect_url);
-    blink::WebURLResponse redirect_response(gurl_);
-
-    loader_->WillFollowRedirect(new_request, redirect_response);
-
-    base::RunLoop().RunUntilIdle();
-  }
-
-  void SendResponse(
-      int http_status, MediaInfoLoader::Status expected_status) {
-    EXPECT_CALL(*this, ReadyCallback(expected_status, _, _, _));
-    EXPECT_CALL(*url_loader_, Cancel());
-
-    WebURLResponse response(gurl_);
-    response.SetHTTPHeaderField(WebString::FromUTF8("Content-Length"),
-                                WebString::FromUTF8("0"));
-    response.SetExpectedContentLength(0);
-    response.SetHTTPStatusCode(http_status);
-    loader_->DidReceiveResponse(response);
-  }
-
-  void FailLoad() {
-    EXPECT_CALL(*this, ReadyCallback(
-        MediaInfoLoader::kFailed, _, _, _));
-    loader_->DidFail(WebURLError());
-  }
-
-  MOCK_METHOD4(ReadyCallback,
-               void(MediaInfoLoader::Status, const GURL&, const GURL&, bool));
-
- protected:
-  GURL gurl_;
-
-  std::unique_ptr<MediaInfoLoader> loader_;
-  NiceMock<MockWebAssociatedURLLoader>* url_loader_;
-
-  blink::WebFrameClient client_;
-  WebView* view_;
-
-  base::MessageLoop message_loop_;
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(MediaInfoLoaderTest);
-};
-
-TEST_F(MediaInfoLoaderTest, StartStop) {
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  Stop();
-}
-
-TEST_F(MediaInfoLoaderTest, LoadFailure) {
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  FailLoad();
-}
-
-TEST_F(MediaInfoLoaderTest, DataUri) {
-  Initialize(kHttpDataUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  SendResponse(0, MediaInfoLoader::kOk);
-}
-
-TEST_F(MediaInfoLoaderTest, HasSingleOriginNoRedirect) {
-  // Make sure no redirect case works as expected.
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  SendResponse(kHttpOK, MediaInfoLoader::kOk);
-  EXPECT_TRUE(loader_->HasSingleOrigin());
-}
-
-TEST_F(MediaInfoLoaderTest, HasSingleOriginSingleRedirect) {
-  // Test redirect to the same domain.
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  Redirect(kHttpRedirectToSameDomainUrl1);
-  SendResponse(kHttpOK, MediaInfoLoader::kOk);
-  EXPECT_TRUE(loader_->HasSingleOrigin());
-}
-
-TEST_F(MediaInfoLoaderTest, HasSingleOriginDoubleRedirect) {
-  // Test redirect twice to the same domain.
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  Redirect(kHttpRedirectToSameDomainUrl1);
-  Redirect(kHttpRedirectToSameDomainUrl2);
-  SendResponse(kHttpOK, MediaInfoLoader::kOk);
-  EXPECT_TRUE(loader_->HasSingleOrigin());
-}
-
-TEST_F(MediaInfoLoaderTest, HasSingleOriginDifferentDomain) {
-  // Test redirect to a different domain.
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  Redirect(kHttpRedirectToDifferentDomainUrl1);
-  SendResponse(kHttpOK, MediaInfoLoader::kOk);
-  EXPECT_FALSE(loader_->HasSingleOrigin());
-}
-
-TEST_F(MediaInfoLoaderTest, HasSingleOriginMultipleDomains) {
-  // Test redirect to the same domain and then to a different domain.
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUnspecified);
-  Start();
-  Redirect(kHttpRedirectToSameDomainUrl1);
-  Redirect(kHttpRedirectToDifferentDomainUrl1);
-  SendResponse(kHttpOK, MediaInfoLoader::kOk);
-  EXPECT_FALSE(loader_->HasSingleOrigin());
-}
-
-TEST_F(MediaInfoLoaderTest, CORSAccessCheckPassed) {
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUseCredentials);
-  Start();
-  SendResponse(kHttpOK, MediaInfoLoader::kOk);
-  EXPECT_TRUE(loader_->DidPassCORSAccessCheck());
-}
-
-TEST_F(MediaInfoLoaderTest, CORSAccessCheckFailed) {
-  Initialize(kHttpUrl, blink::WebMediaPlayer::kCORSModeUseCredentials);
-  Start();
-  SendResponse(kHttpNotFound, MediaInfoLoader::kFailed);
-  EXPECT_FALSE(loader_->DidPassCORSAccessCheck());
-}
-
-}  // namespace content
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 4f762c2..901eb22 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -984,18 +984,22 @@
     bool hidden,
     const ScreenInfo& screen_info,
     CompositorDependencies* compositor_deps,
-    blink::WebFrame* opener) {
+    blink::WebFrame* opener,
+    const FrameReplicationState& replicated_state) {
   // A main frame RenderFrame must have a RenderWidget.
   DCHECK_NE(MSG_ROUTING_NONE, widget_routing_id);
 
   RenderFrameImpl* render_frame =
       RenderFrameImpl::Create(render_view, routing_id);
   render_frame->InitializeBlameContext(nullptr);
-  WebLocalFrame* web_frame = WebLocalFrame::Create(
-      blink::WebTreeScopeType::kDocument, render_frame,
+  WebLocalFrame* web_frame = WebLocalFrame::CreateMainFrame(
+      render_view->webview(), render_frame,
       render_frame->blink_interface_provider_.get(),
-      render_frame->blink_interface_registry_.get(), opener);
-  render_view->webview()->SetMainFrame(web_frame);
+      render_frame->blink_interface_registry_.get(), opener,
+      // This conversion is a little sad, as this often comes from a
+      // WebString...
+      WebString::FromUTF8(replicated_state.name),
+      replicated_state.sandbox_flags);
   render_frame->render_widget_ = RenderWidget::CreateForFrame(
       widget_routing_id, hidden, screen_info, compositor_deps, web_frame);
   // TODO(avi): This DCHECK is to track cleanup for https://crbug.com/545684
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index db168f8..adee335 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -188,7 +188,8 @@
       bool hidden,
       const ScreenInfo& screen_info,
       CompositorDependencies* compositor_deps,
-      blink::WebFrame* opener);
+      blink::WebFrame* opener,
+      const FrameReplicationState& replicated_state);
 
   // Creates a new RenderFrame with |routing_id|.  If |proxy_routing_id| is
   // MSG_ROUTING_NONE, it creates the Blink WebLocalFrame and inserts it into
diff --git a/content/renderer/render_frame_proxy.cc b/content/renderer/render_frame_proxy.cc
index 5703c7a5..f34ad3f9 100644
--- a/content/renderer/render_frame_proxy.cc
+++ b/content/renderer/render_frame_proxy.cc
@@ -108,9 +108,8 @@
   if (!parent) {
     // Create a top level WebRemoteFrame.
     render_view = RenderViewImpl::FromRoutingID(render_view_routing_id);
-    web_frame = blink::WebRemoteFrame::Create(replicated_state.scope,
-                                              proxy.get(), opener);
-    render_view->webview()->SetMainFrame(web_frame);
+    web_frame = blink::WebRemoteFrame::CreateMainFrame(
+        render_view->GetWebView(), proxy.get(), opener);
     render_widget = render_view->GetWidget();
 
     // If the RenderView is reused by this proxy after having been used for a
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index 4ce9fd27..c1b14ad 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -568,7 +568,8 @@
   blink::WebURLRequest popup_request(GURL("http://foo.com"));
   blink::WebView* new_web_view = view()->CreateView(
       GetMainFrame(), popup_request, blink::WebWindowFeatures(), "foo",
-      blink::kWebNavigationPolicyNewForegroundTab, false);
+      blink::kWebNavigationPolicyNewForegroundTab, false,
+      blink::WebSandboxFlags::kNone);
   RenderViewImpl* new_view = RenderViewImpl::FromWebView(new_web_view);
 
   // Checks that the frame is deleted properly and cleans up the view.
@@ -789,7 +790,8 @@
   blink::WebURLRequest popup_request(GURL("http://foo.com"));
   blink::WebView* new_web_view = view()->CreateView(
       GetMainFrame(), popup_request, blink::WebWindowFeatures(), "foo",
-      blink::kWebNavigationPolicyNewForegroundTab, false);
+      blink::kWebNavigationPolicyNewForegroundTab, false,
+      blink::WebSandboxFlags::kNone);
   RenderViewImpl* new_view = RenderViewImpl::FromWebView(new_web_view);
   blink::WebFrameClient::NavigationPolicyInfo popup_policy_info(popup_request);
   popup_policy_info.navigation_type = blink::kWebNavigationTypeLinkClicked;
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 74369403..0be19c3 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -233,6 +233,7 @@
 using blink::WebPoint;
 using blink::WebRect;
 using blink::WebReferrerPolicy;
+using blink::WebSandboxFlags;
 using blink::WebScriptSource;
 using blink::WebSearchableFormData;
 using blink::WebSecurityOrigin;
@@ -629,9 +630,13 @@
   if (params.main_frame_routing_id != MSG_ROUTING_NONE) {
     main_render_frame_ = RenderFrameImpl::CreateMainFrame(
         this, params.main_frame_routing_id, params.main_frame_widget_routing_id,
-        params.hidden, screen_info(), compositor_deps_, opener_frame);
+        params.hidden, screen_info(), compositor_deps_, opener_frame,
+        params.replicated_frame_state);
   }
 
+  // TODO(dcheng): Shouldn't these be mutually exclusive at this point? See
+  // https://crbug.com/720116 where the browser is apparently sending both
+  // routing IDs...
   if (params.proxy_routing_id != MSG_ROUTING_NONE) {
     CHECK(params.swapped_out);
     RenderFrameProxy::CreateFrameProxy(params.proxy_routing_id, GetRoutingID(),
@@ -649,15 +654,6 @@
   if (!was_created_by_renderer)
     did_show_ = true;
 
-  // Set the main frame's name.  Only needs to be done for WebLocalFrames,
-  // since the remote case was handled as part of SetReplicatedState on the
-  // proxy above.
-  if (!params.replicated_frame_state.name.empty() &&
-      webview()->MainFrame()->IsWebLocalFrame()) {
-    webview()->MainFrame()->SetName(
-        blink::WebString::FromUTF8(params.replicated_frame_state.name));
-  }
-
   // TODO(davidben): Move this state from Blink into content.
   if (params.window_was_created_with_opener)
     webview()->SetOpenedByDOM();
@@ -675,14 +671,6 @@
 
   GetContentClient()->renderer()->RenderViewCreated(this);
 
-  // Ensure that sandbox flags are inherited from an opener in a different
-  // process.  In that case, the browser process will set any inherited sandbox
-  // flags in |replicated_frame_state|, so apply them here.
-  if (!was_created_by_renderer && webview()->MainFrame()->IsWebLocalFrame()) {
-    webview()->MainFrame()->ToWebLocalFrame()->ForceSandboxFlags(
-        params.replicated_frame_state.sandbox_flags);
-  }
-
   page_zoom_level_ = params.page_zoom_level;
 }
 
@@ -1369,7 +1357,8 @@
                                     const WebWindowFeatures& features,
                                     const WebString& frame_name,
                                     WebNavigationPolicy policy,
-                                    bool suppress_opener) {
+                                    bool suppress_opener,
+                                    WebSandboxFlags sandbox_flags) {
   RenderFrameImpl* creator_frame = RenderFrameImpl::FromWebFrame(creator);
   mojom::CreateNewWindowParamsPtr params = mojom::CreateNewWindowParams::New();
   params->user_gesture = WebUserGestureIndicator::IsProcessingUserGesture();
@@ -1377,10 +1366,9 @@
     params->user_gesture = true;
   params->window_container_type = WindowFeaturesToContainerType(features);
   params->session_storage_namespace_id = session_storage_namespace_id_;
-  if (frame_name != "_blank")
-    params->frame_name = frame_name.Utf8(
-        WebString::UTF8ConversionMode::kStrictReplacingErrorsWithFFFD);
-
+  const std::string& frame_name_utf8 = frame_name.Utf8(
+      WebString::UTF8ConversionMode::kStrictReplacingErrorsWithFFFD);
+  params->frame_name = frame_name_utf8;
   params->opener_suppressed = suppress_opener;
   params->disposition = NavigationPolicyToDisposition(policy);
   if (!request.IsNull()) {
@@ -1438,8 +1426,10 @@
   view_params.session_storage_namespace_id =
       reply->cloned_session_storage_namespace_id;
   view_params.swapped_out = false;
-  // WebCore will take care of setting the correct name.
-  view_params.replicated_frame_state = FrameReplicationState();
+  view_params.replicated_frame_state.sandbox_flags = sandbox_flags;
+  view_params.replicated_frame_state.name = frame_name_utf8;
+  // Even if the main frame has a name, the main frame's unique name is always
+  // the empty string.
   view_params.hidden = is_background_tab;
   view_params.never_visible = never_visible;
   view_params.initial_size = initial_size;
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 270b234..91eb6de 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -286,7 +286,8 @@
                              const blink::WebWindowFeatures& features,
                              const blink::WebString& frame_name,
                              blink::WebNavigationPolicy policy,
-                             bool suppress_opener) override;
+                             bool suppress_opener,
+                             blink::WebSandboxFlags sandbox_flags) override;
   blink::WebWidget* CreatePopupMenu(blink::WebPopupType popup_type) override;
   blink::WebStorageNamespace* CreateSessionStorageNamespace() override;
   void PrintPage(blink::WebLocalFrame* frame) override;
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
index 768e9232..8dfe95e 100644
--- a/content/renderer/service_worker/service_worker_context_client.cc
+++ b/content/renderer/service_worker/service_worker_context_client.cc
@@ -1008,6 +1008,8 @@
   web_body_as_stream->SetListener(
       base::MakeUnique<StreamHandleListener>(std::move(callback_ptr)));
 
+  // Temporary CHECK to debug https://crbug.com/734978.
+  CHECK(body_as_stream->stream.is_valid());
   response_callback->OnResponseStream(
       response, std::move(body_as_stream),
       base::Time::FromDoubleT(event_dispatch_time));
diff --git a/content/shell/test_runner/web_view_test_client.cc b/content/shell/test_runner/web_view_test_client.cc
index ba283e8..11f3c93 100644
--- a/content/shell/test_runner/web_view_test_client.cc
+++ b/content/shell/test_runner/web_view_test_client.cc
@@ -52,7 +52,8 @@
     const blink::WebWindowFeatures& features,
     const blink::WebString& frame_name,
     blink::WebNavigationPolicy policy,
-    bool suppress_opener) {
+    bool suppress_opener,
+    blink::WebSandboxFlags sandbox_flags) {
   if (test_runner()->shouldDumpNavigationPolicy()) {
     delegate()->PrintMessage("Default policy for createView for '" +
                              URLDescription(request.Url()) + "' is '" +
diff --git a/content/shell/test_runner/web_view_test_client.h b/content/shell/test_runner/web_view_test_client.h
index ef34e45..2065b82 100644
--- a/content/shell/test_runner/web_view_test_client.h
+++ b/content/shell/test_runner/web_view_test_client.h
@@ -41,7 +41,8 @@
                              const blink::WebWindowFeatures& features,
                              const blink::WebString& frame_name,
                              blink::WebNavigationPolicy policy,
-                             bool suppress_opener) override;
+                             bool suppress_opener,
+                             blink::WebSandboxFlags) override;
   void PrintPage(blink::WebLocalFrame* frame) override;
   blink::WebSpeechRecognizer* SpeechRecognizer() override;
   blink::WebString AcceptLanguages() override;
diff --git a/content/shell/test_runner/web_view_test_proxy.h b/content/shell/test_runner/web_view_test_proxy.h
index e22752e..049616435 100644
--- a/content/shell/test_runner/web_view_test_proxy.h
+++ b/content/shell/test_runner/web_view_test_proxy.h
@@ -190,12 +190,13 @@
                              const blink::WebWindowFeatures& features,
                              const blink::WebString& frame_name,
                              blink::WebNavigationPolicy policy,
-                             bool suppress_opener) override {
+                             bool suppress_opener,
+                             blink::WebSandboxFlags sandbox_flags) override {
     if (!view_test_client()->CreateView(creator, request, features, frame_name,
-                                        policy, suppress_opener))
+                                        policy, suppress_opener, sandbox_flags))
       return nullptr;
     return Base::CreateView(creator, request, features, frame_name, policy,
-                            suppress_opener);
+                            suppress_opener, sandbox_flags);
   }
   void PrintPage(blink::WebLocalFrame* frame) override {
     view_test_client()->PrintPage(frame);
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
index 3ced453..88a50c97 100644
--- a/content/test/BUILD.gn
+++ b/content/test/BUILD.gn
@@ -1438,7 +1438,6 @@
     "../renderer/input/input_event_filter_unittest.cc",
     "../renderer/input/main_thread_event_queue_unittest.cc",
     "../renderer/manifest/manifest_parser_unittest.cc",
-    "../renderer/media/android/media_info_loader_unittest.cc",
     "../renderer/media/audio_ipc_factory_unittest.cc",
     "../renderer/media/audio_message_filter_unittest.cc",
     "../renderer/media/audio_renderer_mixer_manager_unittest.cc",
diff --git a/extensions/renderer/scoped_web_frame.cc b/extensions/renderer/scoped_web_frame.cc
index 01ab7375..8f8c96ee 100644
--- a/extensions/renderer/scoped_web_frame.cc
+++ b/extensions/renderer/scoped_web_frame.cc
@@ -8,13 +8,13 @@
 
 namespace extensions {
 
-ScopedWebFrame::ScopedWebFrame() : view_(nullptr), frame_(nullptr) {
-  view_ =
-      blink::WebView::Create(nullptr, blink::kWebPageVisibilityStateVisible);
-  frame_ = blink::WebLocalFrame::Create(blink::WebTreeScopeType::kDocument,
-                                        &frame_client_, nullptr, nullptr);
-  view_->SetMainFrame(frame_);
-}
+ScopedWebFrame::ScopedWebFrame()
+    : view_(blink::WebView::Create(nullptr,
+                                   blink::kWebPageVisibilityStateVisible)),
+      frame_(blink::WebLocalFrame::CreateMainFrame(view_,
+                                                   &frame_client_,
+                                                   nullptr,
+                                                   nullptr)) {}
 
 ScopedWebFrame::~ScopedWebFrame() {
   view_->Close();
diff --git a/ios/chrome/app/strings/ios_strings.grd b/ios/chrome/app/strings/ios_strings.grd
index ec5f170..998a290 100644
--- a/ios/chrome/app/strings/ios_strings.grd
+++ b/ios/chrome/app/strings/ios_strings.grd
@@ -579,7 +579,7 @@
         Touch to Search
       </message>
       <message name="IDS_IOS_CONTEXT_MENU_SEARCHWEBFORIMAGE" desc="Context menu text for option to perform a search for image [Length: 25em] [iOS only]">
-        Search <ph name="SEARCH_ENGINE">$1<ex>Google</ex></ph> For This Image
+        Search <ph name="SEARCH_ENGINE">$1<ex>Google</ex></ph> for This Image
       </message>
       <message name="IDS_IOS_COPY_VERSION_HINT" desc="The accessibility hint for the label showing the Chrome version. [iOS only]">
         Double tap to copy.
diff --git a/ios/showcase/payments/sc_payments_editor_egtest.mm b/ios/showcase/payments/sc_payments_editor_egtest.mm
index b595fe2..a1b1ecd4 100644
--- a/ios/showcase/payments/sc_payments_editor_egtest.mm
+++ b/ios/showcase/payments/sc_payments_editor_egtest.mm
@@ -39,7 +39,7 @@
   return grey_allOf(
       grey_accessibilityLabel(l10n_util::GetNSString(IDS_ACCNAME_NEXT)),
       grey_accessibilityTrait(UIAccessibilityTraitButton),
-      grey_sufficientlyVisible(), nil);
+      grey_kindOfClass([UIButton class]), grey_sufficientlyVisible(), nil);
 }
 
 // Returns the GREYMatcher for the input accessory view's close button.
diff --git a/media/blink/multibuffer_data_source_unittest.cc b/media/blink/multibuffer_data_source_unittest.cc
index 1ade7293..36596d6 100644
--- a/media/blink/multibuffer_data_source_unittest.cc
+++ b/media/blink/multibuffer_data_source_unittest.cc
@@ -227,9 +227,8 @@
   MultibufferDataSourceTest()
       : view_(WebView::Create(nullptr, blink::kWebPageVisibilityStateVisible)),
         preload_(MultibufferDataSource::AUTO) {
-    WebLocalFrame* frame = WebLocalFrame::Create(
-        blink::WebTreeScopeType::kDocument, &client_, nullptr, nullptr);
-    view_->SetMainFrame(frame);
+    WebLocalFrame* frame =
+        WebLocalFrame::CreateMainFrame(view_, &client_, nullptr, nullptr);
     url_index_ = make_linked_ptr(new TestUrlIndex(frame));
   }
 
diff --git a/media/blink/resource_multibuffer_data_provider_unittest.cc b/media/blink/resource_multibuffer_data_provider_unittest.cc
index 93c453a..f7126ff0 100644
--- a/media/blink/resource_multibuffer_data_provider_unittest.cc
+++ b/media/blink/resource_multibuffer_data_provider_unittest.cc
@@ -76,9 +76,8 @@
  public:
   ResourceMultiBufferDataProviderTest()
       : view_(WebView::Create(nullptr, blink::kWebPageVisibilityStateVisible)) {
-    WebLocalFrame* frame = WebLocalFrame::Create(
-        blink::WebTreeScopeType::kDocument, &client_, nullptr, nullptr);
-    view_->SetMainFrame(frame);
+    WebLocalFrame* frame =
+        WebLocalFrame::CreateMainFrame(view_, &client_, nullptr, nullptr);
     url_index_.reset(new UrlIndex(frame, 0));
 
     for (int i = 0; i < kDataSize; ++i) {
diff --git a/media/blink/webmediaplayer_impl_unittest.cc b/media/blink/webmediaplayer_impl_unittest.cc
index 49ee8b9..3718c0e 100644
--- a/media/blink/webmediaplayer_impl_unittest.cc
+++ b/media/blink/webmediaplayer_impl_unittest.cc
@@ -211,12 +211,11 @@
             blink::WebView::Create(nullptr,
                                    blink::kWebPageVisibilityStateVisible)),
         web_local_frame_(
-            blink::WebLocalFrame::Create(blink::WebTreeScopeType::kDocument,
-                                         &web_frame_client_,
-                                         nullptr,
-                                         nullptr)),
+            blink::WebLocalFrame::CreateMainFrame(web_view_,
+                                                  &web_frame_client_,
+                                                  nullptr,
+                                                  nullptr)),
         audio_parameters_(TestAudioParameters::Normal()) {
-    web_view_->SetMainFrame(web_local_frame_);
     media_thread_.StartAndWaitForTesting();
   }
 
diff --git a/third_party/WebKit/LayoutTests/editing/selection/double_click_and_modify.html b/third_party/WebKit/LayoutTests/editing/selection/double_click_and_modify.html
new file mode 100644
index 0000000..cc737d0
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/editing/selection/double_click_and_modify.html
@@ -0,0 +1,33 @@
+<!doctype html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../assert_selection.js"></script>
+<script>
+// TODO(editing-dev): Once http://crbug.com/736253 fixed, we should use
+// |chrome.pointerActionSequence()| instead of |eventSender|.
+test(() => {
+  function doDoubleClickInMiddle(selection, target) {
+    const document = selection.document;
+    const clickX = target.offsetLeft + target.offsetWidth / 2;
+    const clickY = target.offsetTop + target.offsetHeight / 2;
+    eventSender.mouseMoveTo(document.offsetLeft + clickX,
+                            document.offsetTop + clickY);
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+    eventSender.mouseDown();
+    eventSender.mouseUp();
+  }
+
+  assert_exists(window, 'eventSender', 'This test requires eventSender.');
+
+  assert_selection(
+    '<span id="sample">xyz</span>',
+    selection => {
+      const sample = selection.document.getElementById('sample');
+      doDoubleClickInMiddle(selection, sample);
+      sample.insertBefore(new Text('abc'), sample.firstChild);
+    },
+    '<span id="sample">abc^xyz|</span>',
+    'DOM modification outside selection should not affect selection');
+}, 'Double-click and modify text');
+</script>
diff --git a/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc-expected.txt b/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc-expected.txt
new file mode 100644
index 0000000..caea5e41
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc-expected.txt
@@ -0,0 +1,2 @@
+CONSOLE ERROR: line 11: Uncaught SyntaxError: Unexpected token %
+This test pass if no crash.
diff --git a/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc.html b/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc.html
new file mode 100644
index 0000000..ab027972
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/dom/script-module-inline-error-gc.html
@@ -0,0 +1,21 @@
+<!doctype html>
+<head>
+  <title>Test that module script compile -> V8 GC -> module script exec doesn't crash renderer</title>
+<body>
+<script>
+if (window.testRunner) {
+  testRunner.dumpAsText();
+  testRunner.waitUntilDone();
+}
+</script>
+<script type="module">
+%syntax error
+</script>
+<script>
+gc();
+window.requestAnimationFrame(() => {
+  if (window.testRunner)
+    testRunner.notifyDone();
+});
+</script>
+<p>This test pass if no crash.
diff --git a/third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html b/third_party/WebKit/PerformanceTests/DOM/page-up-with-many-lines.html
similarity index 100%
rename from third_party/WebKit/PerformanceTests/Editing/page-up-with-many-lines.html
rename to third_party/WebKit/PerformanceTests/DOM/page-up-with-many-lines.html
diff --git a/third_party/WebKit/Source/bindings/bindings.gni b/third_party/WebKit/Source/bindings/bindings.gni
index 20afb503..feb91f7 100644
--- a/third_party/WebKit/Source/bindings/bindings.gni
+++ b/third_party/WebKit/Source/bindings/bindings.gni
@@ -197,6 +197,7 @@
                     "core/v8/ScriptPromisePropertyTest.cpp",
                     "core/v8/ScriptPromiseResolverTest.cpp",
                     "core/v8/ScriptPromiseTest.cpp",
+                    "core/v8/WindowProxyTest.cpp",
                     "core/v8/ScriptStreamerTest.cpp",
                     "core/v8/ScriptWrappableVisitorTest.cpp",
                     "core/v8/ToV8Test.cpp",
diff --git a/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.h b/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.h
index 021ece77..6d0006b 100644
--- a/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.h
+++ b/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.h
@@ -64,13 +64,15 @@
              const DOMWrapperWorld& world,
              v8::Local<v8::FunctionTemplate> interface_template);
 
-using InstallRuntimeEnabledFunction =
-    void (*)(v8::Isolate* isolate,
-             const DOMWrapperWorld& world,
+using InstallRuntimeEnabledFeaturesFunction =
+    void (*)(v8::Isolate*,
+             const DOMWrapperWorld&,
              v8::Local<v8::Object> instance,
              v8::Local<v8::Object> prototype,
              v8::Local<v8::Function> interface);
 
+using InstallRuntimeEnabledFeaturesOnTemplateFunction = InstallTemplateFunction;
+
 }  // namespace blink
 
 #endif  // GeneratedCodeHelper_h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
index 80ad2e68..c5c0e9e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptModuleTest.cpp
@@ -35,6 +35,7 @@
   // Implements ScriptModuleResolver:
 
   void RegisterModuleScript(ModuleScript*) override { NOTREACHED(); }
+  void UnregisterModuleScript(ModuleScript*) override { NOTREACHED(); }
 
   ScriptModule Resolve(const String& specifier,
                        const ScriptModule&,
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
index 0591fee..1707ea6 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptStreamerTest.cpp
@@ -102,11 +102,7 @@
   Persistent<ClassicPendingScript> pending_script_;
 };
 
-class TestPendingScriptClient
-    : public GarbageCollectedFinalized<TestPendingScriptClient>,
-      public PendingScriptClient {
-  USING_GARBAGE_COLLECTED_MIXIN(TestPendingScriptClient);
-
+class TestPendingScriptClient final : public PendingScriptClient {
  public:
   TestPendingScriptClient() : finished_(false) {}
   void PendingScriptFinished(PendingScript*) override { finished_ = true; }
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
index eb3d167..333a417 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/V8ScriptRunner.cpp
@@ -730,6 +730,10 @@
 void V8ScriptRunner::ThrowException(v8::Isolate* isolate,
                                     v8::Local<v8::Value> exception,
                                     const v8::ScriptOrigin& origin) {
+  // This is intentionally a CHECK, as CallInternalFunction below will deref
+  // nullptr if this condition is false.
+  CHECK(!exception.IsEmpty());
+
   // In order for the current TryCatch to catch this exception and
   // call MessageCallback when SetVerbose(true), create a v8::Function
   // that calls isolate->throwException().
diff --git a/third_party/WebKit/Source/web/tests/WindowProxyTest.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxyTest.cpp
similarity index 98%
rename from third_party/WebKit/Source/web/tests/WindowProxyTest.cpp
rename to third_party/WebKit/Source/bindings/core/v8/WindowProxyTest.cpp
index df173bc..96145cc 100644
--- a/third_party/WebKit/Source/web/tests/WindowProxyTest.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxyTest.cpp
@@ -48,4 +48,4 @@
   ASSERT_GT(ConsoleMessages().size(), 0U);
   EXPECT_EQ("PASSED", ConsoleMessages()[0]);
 }
-}
+}  // namespace blink
diff --git a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
index 2223379..ba0a97f 100644
--- a/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/constants.cpp.tmpl
@@ -27,21 +27,15 @@
     {{constant_configuration(constant)}},
     {% endfor %}
 };
-V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants));
+V8DOMConfiguration::InstallConstants(
+    isolate, interfaceTemplate, prototypeTemplate,
+    {{v8_class}}Constants, WTF_ARRAY_LENGTH({{v8_class}}Constants));
 {% endif %}
-{# Runtime-enabled constants #}
-{% for group in constants | runtime_enabled_constants | groupby('runtime_enabled_feature_name') %}
-{% filter runtime_enabled(group.list[0].runtime_enabled_feature_name) %}
-{% for constant in group.list %}
-{% set constant_name = constant.name.title().replace('_', '') %}
-const V8DOMConfiguration::ConstantConfiguration constant{{constant_name}}Configuration = {{constant_configuration(constant)}};
-V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constant{{constant_name}}Configuration);
-{% endfor %}
-{% endfilter %}
-{% endfor %}
 {# Constants with [DeprecateAs] or [MeasureAs] #}
 {% for constant in constants | has_special_getter %}
-V8DOMConfiguration::InstallConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "{{constant.name}}", {{v8_class_or_partial}}::{{constant.name}}ConstantGetterCallback);
+V8DOMConfiguration::InstallConstantWithGetter(
+    isolate, interfaceTemplate, prototypeTemplate,
+    "{{constant.name}}", {{v8_class_or_partial}}::{{constant.name}}ConstantGetterCallback);
 {% endfor %}
 {# Check constants #}
 {% if not do_not_check_constants %}
diff --git a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
index 88bf120..11b0ffa 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface.cpp.tmpl
@@ -919,29 +919,42 @@
 {% block partial_interface %}
 {% if has_partial_interface %}
 {% if needs_runtime_enabled_installer %}
-InstallRuntimeEnabledFunction {{v8_class}}::install{{v8_class}}RuntimeEnabledFunction =
-    &{{v8_class}}::installRuntimeEnabledFeatures;
+InstallRuntimeEnabledFeaturesFunction
+{{v8_class}}::install_runtime_enabled_features_function_ =
+    &{{v8_class}}::InstallRuntimeEnabledFeatures;
+{% endif %}
+{% if not is_array_buffer_or_view %}
+InstallRuntimeEnabledFeaturesOnTemplateFunction
+{{v8_class}}::install_runtime_enabled_features_on_template_function_ =
+    &{{v8_class}}::InstallRuntimeEnabledFeaturesOnTemplate;
 {% endif %}
 
 InstallTemplateFunction {{v8_class}}::install{{v8_class}}TemplateFunction =
     &{{v8_class}}::install{{v8_class}}Template;
 
-void {{v8_class}}::updateWrapperTypeInfo(
-    InstallTemplateFunction installTemplateFunction,
-    InstallRuntimeEnabledFunction installRuntimeEnabledFunction,
-    PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
-  ALLOW_UNUSED_LOCAL(installRuntimeEnabledFunction);
-
+void {{v8_class}}::UpdateWrapperTypeInfo(
+    InstallTemplateFunction install_template_function,
+    InstallRuntimeEnabledFeaturesFunction install_runtime_enabled_features_function,
+    InstallRuntimeEnabledFeaturesOnTemplateFunction install_runtime_enabled_features_on_template_function,
+    PreparePrototypeAndInterfaceObjectFunction prepare_prototype_and_interface_object_function) {
   {{v8_class}}::install{{v8_class}}TemplateFunction =
-      installTemplateFunction;
+      install_template_function;
+
   {% if needs_runtime_enabled_installer %}
-  CHECK(installRuntimeEnabledFunction);
-  {{v8_class}}::install{{v8_class}}RuntimeEnabledFunction =
-      installRuntimeEnabledFunction;
+  CHECK(install_runtime_enabled_features_function);
+  {{v8_class}}::install_runtime_enabled_features_function_ =
+      install_runtime_enabled_features_function;
+
   {% endif %}
-  if (preparePrototypeAndInterfaceObjectFunction) {
+  {% if not is_array_buffer_or_view  %}
+  CHECK(install_runtime_enabled_features_on_template_function);
+  {{v8_class}}::install_runtime_enabled_features_on_template_function_ =
+      install_runtime_enabled_features_on_template_function;
+  {% endif %}
+
+  if (prepare_prototype_and_interface_object_function) {
     {{v8_class}}::wrapperTypeInfo.prepare_prototype_and_interface_object_function =
-        preparePrototypeAndInterfaceObjectFunction;
+        prepare_prototype_and_interface_object_function;
   }
 }
 
@@ -951,5 +964,5 @@
 }
 
 {% endfor %}
-{% endif %}
+{% endif %}{# has_partial_interface #}
 {% endblock %}
diff --git a/third_party/WebKit/Source/bindings/templates/interface.h.tmpl b/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
index abcfeef..b294016 100644
--- a/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface.h.tmpl
@@ -131,7 +131,11 @@
   {% endif %}
 
   {% if has_partial_interface %}
-  {{exported}}static void updateWrapperTypeInfo(InstallTemplateFunction, InstallRuntimeEnabledFunction, PreparePrototypeAndInterfaceObjectFunction);
+  {{exported}}static void UpdateWrapperTypeInfo(
+      InstallTemplateFunction,
+      InstallRuntimeEnabledFeaturesFunction,
+      InstallRuntimeEnabledFeaturesOnTemplateFunction,
+      PreparePrototypeAndInterfaceObjectFunction);
   {{exported}}static void install{{v8_class}}Template(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
   {% for method in methods if method.overloads and method.overloads.has_partial_overloads %}
   {{exported}}static void register{{method.name | blink_capitalize}}MethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&));
@@ -249,17 +253,29 @@
   {% endif %}
 
   {% if needs_runtime_enabled_installer %}
-  {{exported}}static void installRuntimeEnabledFeatures(
-      v8::Isolate* isolate,
+  {{exported if has_partial_interface else ''}}static void InstallRuntimeEnabledFeatures(
+      v8::Isolate*,
       const DOMWrapperWorld& world,
       v8::Local<v8::Object> instance,
       v8::Local<v8::Object> prototype,
       v8::Local<v8::Function> interface);
 
   {% if has_partial_interface %}
-  static InstallRuntimeEnabledFunction install{{v8_class}}RuntimeEnabledFunction;
+  static InstallRuntimeEnabledFeaturesFunction
+  install_runtime_enabled_features_function_;
   {% endif %}
+  {% endif %}{# needs_runtime_enabled_installer #}
+
+  {% if not is_array_buffer_or_view %}
+  {{exported if has_partial_interface else ''}}static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
+  {% if has_partial_interface %}
+  static InstallRuntimeEnabledFeaturesOnTemplateFunction
+  install_runtime_enabled_features_on_template_function_;
   {% endif %}
+  {% endif %}{# not is_array_buffer_or_view #}
 
   {% if has_partial_interface %}
  private:
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 d15a65c..cbc92ef 100644
--- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp.tmpl
@@ -418,12 +418,18 @@
 {% from 'attributes.cpp.tmpl' import accessor_configuration,
         attribute_configuration,
         with context %}
-{% from 'constants.cpp.tmpl' import install_constants with context %}
+ {% from 'constants.cpp.tmpl' import install_constants, constant_configuration with context %}
 {% from 'methods.cpp.tmpl' import method_configuration with context %}
 {% if has_partial_interface or is_partial %}
-void {{v8_class_or_partial}}::install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+void {{v8_class_or_partial}}::install{{v8_class}}Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
 {% else %}
-static void install{{v8_class}}Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void install{{v8_class}}Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
 {% endif %}
   // Initialize the interface object's template.
   {% if is_partial %}
@@ -469,21 +475,29 @@
   instanceTemplate->SetImmutableProto();
   {% endif %}
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   {% if constants %}
   {{install_constants() | indent(2)}}
   {% endif %}
   {% if data_attributes %}
-  V8DOMConfiguration::InstallAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}});
+  V8DOMConfiguration::InstallAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      {{'%sAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAttributes)' % v8_class}});
   {% endif %}
   {% if lazy_data_attributes %}
-  V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, {{'%sLazyDataAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sLazyDataAttributes)' % v8_class}});
+  V8DOMConfiguration::InstallLazyDataAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      {{'%sLazyDataAttributes' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sLazyDataAttributes)' % v8_class}});
   {% endif %}
   {% if accessors %}
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sAccessors' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class}});
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, {{'%sAccessors' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sAccessors)' % v8_class}});
   {% endif %}
   {% if methods | has_method_configuration(is_partial) %}
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, {{'%sMethods' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sMethods)' % v8_class}});
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, {{'%sMethods' % v8_class}}, {{'WTF_ARRAY_LENGTH(%sMethods)' % v8_class}});
   {% endif %}
 
   {% if has_access_check_callbacks and not is_partial %}
@@ -492,31 +506,18 @@
   {% set cross_origin_named_setter = '%s::crossOriginNamedSetter' % v8_class_or_partial if has_cross_origin_named_setter else 'nullptr' %}
   {% set cross_origin_named_enumerator = '%s::crossOriginNamedEnumerator' % v8_class_or_partial if has_cross_origin_named_enumerator else 'nullptr' %}
   {% set cross_origin_indexed_getter = '%s::crossOriginIndexedGetter' % v8_class_or_partial if has_cross_origin_indexed_getter else 'nullptr' %}
-  instanceTemplate->SetAccessCheckCallbackAndHandler({{v8_class_or_partial}}::securityCheck, v8::NamedPropertyHandlerConfiguration({{cross_origin_named_getter}}, {{cross_origin_named_setter}}, nullptr, nullptr, {{cross_origin_named_enumerator}}), v8::IndexedPropertyHandlerConfiguration({{cross_origin_indexed_getter}}), v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrapperTypeInfo)));
+  instanceTemplate->SetAccessCheckCallbackAndHandler(
+      {{v8_class_or_partial}}::securityCheck,
+      v8::NamedPropertyHandlerConfiguration(
+          {{cross_origin_named_getter}},
+          {{cross_origin_named_setter}},
+          nullptr,
+          nullptr,
+          {{cross_origin_named_enumerator}}),
+      v8::IndexedPropertyHandlerConfiguration({{cross_origin_indexed_getter}}),
+      v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&{{v8_class}}::wrapperTypeInfo)));
   {% endif %}
 
-  {% for feature_name, attribute_list in runtime_enabled_attributes | selectattr('is_data_type_property') | groupby('runtime_enabled_feature_name') %}
-  {% filter runtime_enabled(feature_name) %}
-  static const V8DOMConfiguration::AttributeConfiguration attribute_configurations[] = {
-      {% for attribute in attribute_list | sort %}
-      {{attribute_configuration(attribute) | indent(6)}},
-      {% endfor %}
-  };
-  V8DOMConfiguration::InstallAttributes(isolate, world, instanceTemplate, prototypeTemplate, attribute_configurations, WTF_ARRAY_LENGTH(attribute_configurations));
-  {% endfilter %}
-  {% endfor %}
-
-  {% for feature_name, attribute_list in runtime_enabled_attributes | selectattr('is_data_type_property', 'equalto', False) | groupby('runtime_enabled_feature_name') %}
-  {% filter runtime_enabled(feature_name) %}
-  static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-      {% for attribute in attribute_list | sort %}
-      {{accessor_configuration(attribute) | indent(6)}},
-      {% endfor %}
-  };
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
-  {% endfilter %}
-  {% endfor %}
-
   {% if (indexed_property_getter or named_property_getter) and not is_partial %}
   // Indexed properties
   {{install_indexed_property_handler('instanceTemplate') | indent(2)}}
@@ -542,16 +543,24 @@
   {% endif %}
   {% endif %}
 
-  {% if iterator_method %}
+  {% if iterator_method and not iterator_method.runtime_enabled_feature_name %}
   {% filter exposed(iterator_method.exposed_test) %}
-  {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %}
   {% set symbol_alias = '"%s"' % iterator_method_alias
                         if iterator_method_alias else 'nullptr' %}
   // Iterator (@@iterator)
-  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, {{symbol_alias}}, {{v8_class_or_partial}}::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess };
+  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration
+  symbolKeyedIteratorConfiguration = {
+      v8::Symbol::GetIterator,
+      {{symbol_alias}},
+      {{v8_class_or_partial}}::iteratorMethodCallback,
+      0,
+      v8::DontEnum,
+      V8DOMConfiguration::kOnPrototype,
+      V8DOMConfiguration::kCheckHolder,
+      V8DOMConfiguration::kDoNotCheckAccess
+  };
   V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
   {% endfilter %}
-  {% endfilter %}
   {% endif %}
 
   {% if interface_name == 'Iterator' %}
@@ -612,47 +621,159 @@
   instanceTemplate->MarkAsUndetectable();
   {% endif %}
 
-  {% if methods | custom_registration(is_partial) %}
+  // Custom signature
   {% for method in methods | custom_registration(is_partial) %}
-  {# install_custom_signature #}
   {% filter exposed(method.overloads.exposed_test_all
                     if method.overloads else method.exposed_test) %}
-  {% filter runtime_enabled(method.overloads.runtime_enabled_all
-                            if method.overloads else method.runtime_enabled_feature_name) %}
+  {% set feature_name = method.overloads.runtime_enabled_all
+                        if method.overloads else method.runtime_enabled_feature_name %}
+  {% if not feature_name %}
   {% if method.is_cross_origin %}
-  {# TODO(dcheng): Currently, bindings must create a function object for each
-     realm as a hack to support the incumbent realm. Remove this when Blink
-     properly supports the incumbent realm. #}
   {{install_origin_safe_method(method, 'instanceTemplate', 'prototypeTemplate') | indent(2)}}
   {% else %}
   {{install_custom_signature(method, 'instanceTemplate', 'prototypeTemplate', 'interfaceTemplate', 'signature') | indent(2)}}
   {% endif %}
-  {% endfilter %}
+  {% endif %}
   {% endfilter %}
   {% endfor %}
+  {% if not has_partial_interface %}
+
+  {{v8_class_or_partial}}::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
   {% endif %}
 }
 
+void {{v8_class_or_partial}}::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  {% if runtime_enabled_feature_name and not context_enabled_feature_name %}
+  if (!{{runtime_enabled_feature_name | runtime_enabled_function}}) {
+    return;
+  }
+  {% endif %}
+
+  {% if is_partial %}
+  {{v8_class}}::InstallRuntimeEnabledFeaturesOnTemplate(isolate, world, interface_template);
+  {% endif %}
+
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+  {% for feature_name, constants_list in constants | selectattr('runtime_enabled_feature_name') | groupby('runtime_enabled_feature_name') %}
+  {% filter runtime_enabled(feature_name) %}
+  static const V8DOMConfiguration::ConstantConfiguration constant_configurations[] = {
+      {% for constant in constants_list %}
+      {{constant_configuration(constant) | indent(6)}},
+      {% endfor %}
+  };
+  V8DOMConfiguration::InstallConstants(
+      isolate, interface_template, prototype_template,
+      constant_configurations, WTF_ARRAY_LENGTH(constant_configurations));
+  {% endfilter %}
+  {% endfor %}
+
+  {% for feature_name, attribute_list in runtime_enabled_attributes | selectattr('is_data_type_property') | groupby('runtime_enabled_feature_name') %}
+  {% filter runtime_enabled(feature_name) %}
+  static const V8DOMConfiguration::AttributeConfiguration attribute_configurations[] = {
+      {% for attribute in attribute_list | sort %}
+      {{attribute_configuration(attribute) | indent(6)}},
+      {% endfor %}
+  };
+  V8DOMConfiguration::InstallAttributes(
+      isolate, world, instance_template, prototype_template,
+      attribute_configurations, WTF_ARRAY_LENGTH(attribute_configurations));
+  {% endfilter %}
+  {% endfor %}
+
+  {% for feature_name, attribute_list in runtime_enabled_attributes | selectattr('is_data_type_property', 'equalto', False) | groupby('runtime_enabled_feature_name') %}
+  {% filter runtime_enabled(feature_name) %}
+  static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
+      {% for attribute in attribute_list | sort %}
+      {{accessor_configuration(attribute) | indent(6)}},
+      {% endfor %}
+  };
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instance_template, prototype_template, interface_template,
+      signature, accessor_configurations,
+      WTF_ARRAY_LENGTH(accessor_configurations));
+  {% endfilter %}
+  {% endfor %}
+
+  {% if iterator_method and iterator_method.runtime_enabled_feature_name %}
+  {% filter exposed(iterator_method.exposed_test) %}
+  {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %}
+  {% set symbol_alias = '"%s"' % iterator_method_alias
+                        if iterator_method_alias else 'nullptr' %}
+  // Iterator (@@iterator)
+  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration
+      symbol_keyed_iterator_configuration = {
+      v8::Symbol::GetIterator,
+      {{symbol_alias}},
+      {{v8_class_or_partial}}::iteratorMethodCallback,
+      0,
+      v8::DontEnum,
+      V8DOMConfiguration::kOnPrototype,
+      V8DOMConfiguration::kCheckHolder,
+      V8DOMConfiguration::kDoNotCheckAccess
+  };
+  V8DOMConfiguration::InstallMethod(
+      isolate, world, prototype_template, signature,
+      symbol_keyed_iterator_configuration);
+  {% endfilter %}
+  {% endfilter %}
+  {% endif %}
+
+  // Custom signature
+  {% for method in methods | custom_registration(is_partial) %}
+  {% filter exposed(method.overloads.exposed_test_all
+                    if method.overloads else method.exposed_test) %}
+  {% set feature_name = method.overloads.runtime_enabled_all
+        if method.overloads else method.runtime_enabled_feature_name %}
+  {% if feature_name %}
+  {% filter runtime_enabled(feature_name) %}
+  {% if method.is_cross_origin %}
+  {{install_origin_safe_method(method, 'instance_template', 'prototype_template') | indent(2)}}
+  {% else %}
+  {{install_custom_signature(method, 'instance_template', 'prototype_template', 'interface_template', 'signature') | indent(2)}}
+  {% endif %}
+  {% endfilter %}
+  {% endif %}
+  {% endfilter %}
+  {% endfor %}
+}
+
 {% endif %}{# not is_array_buffer_or_view #}
 {% endblock %}
 {##############################################################################}
 {% block install_runtime_enabled %}
+#line 759 "interface_base.cpp.tmpl"
 {% if needs_runtime_enabled_installer %}
 {% from 'attributes.cpp.tmpl' import accessor_configuration,
         attribute_configuration,
         with context %}
 {% from 'methods.cpp.tmpl' import install_custom_signature with context %}
-void {{v8_class_or_partial}}::installRuntimeEnabledFeatures(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
+void {{v8_class_or_partial}}::InstallRuntimeEnabledFeatures(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::Object> instance,
+    v8::Local<v8::Object> prototype,
+    v8::Local<v8::Function> interface) {
   {% if runtime_enabled_feature_name %}
 #error "We don't expect a runtime enabled interface {{v8_class_or_partial}} to have installRuntimeEnabledFeatures()."
   {% endif %}
 
   {% if is_partial %}
-  {{v8_class}}::installRuntimeEnabledFeatures(isolate, world, instance, prototype, interface);
+  {{v8_class}}::InstallRuntimeEnabledFeatures(isolate, world, instance, prototype, interface);
   {% endif %}
 
-  v8::Local<v8::FunctionTemplate> interfaceTemplate = {{v8_class}}::wrapperTypeInfo.domTemplate(isolate, world);
-  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
+  v8::Local<v8::FunctionTemplate> interface_template = {{v8_class}}::wrapperTypeInfo.domTemplate(isolate, world);
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
   ALLOW_UNUSED_LOCAL(signature);
 
   {# TODO(peria): Generate code to install constants. It depends on runtime_enabled_feaure of this interface. #}
@@ -683,12 +804,7 @@
   {% endfor %}
 
   {% if iterator_method and iterator_method.runtime_enabled_feature_name %}
-  {% filter exposed(iterator_method.exposed_test) %}
-  {% filter runtime_enabled(iterator_method.runtime_enabled_feature_name) %}
-  // Runtime enabled iterator (@@iterator)
-#error "{{v8_class_or_partial}} should not have runtime enabled iterators."
-  {% endfilter %}
-  {% endfilter %}
+#error "{{v8_class_or_partial}} should not have runtime enabled iterator (@@iterator)."
   {% endif %}
 
   {% if methods | custom_registration(is_partial) %}
diff --git a/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl b/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
index 04f17cd..ea8fe93 100644
--- a/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/partial_interface.cpp.tmpl
@@ -4,13 +4,14 @@
 {% block partial_interface %}
 void {{v8_class_or_partial}}::initialize() {
   // Should be invoked from ModulesInitializer.
-  {{v8_class}}::updateWrapperTypeInfo(
+  {{v8_class}}::UpdateWrapperTypeInfo(
       &{{v8_class_or_partial}}::install{{v8_class}}Template,
       {% if needs_runtime_enabled_installer %}
-      &{{v8_class_or_partial}}::installRuntimeEnabledFeatures,
+      &{{v8_class_or_partial}}::InstallRuntimeEnabledFeatures,
       {% else %}
       nullptr,
       {% endif %}
+      &{{v8_class_or_partial}}::InstallRuntimeEnabledFeaturesOnTemplate,
       {{prepare_prototype_and_interface_object_func or 'nullptr'}});
   {% for method in methods %}
   {% if method.overloads and method.overloads.has_partial_overloads %}
diff --git a/third_party/WebKit/Source/bindings/templates/partial_interface.h.tmpl b/third_party/WebKit/Source/bindings/templates/partial_interface.h.tmpl
index d2b9a57..979e0c6 100644
--- a/third_party/WebKit/Source/bindings/templates/partial_interface.h.tmpl
+++ b/third_party/WebKit/Source/bindings/templates/partial_interface.h.tmpl
@@ -42,13 +42,17 @@
   {% endfor %}
 
   {% if needs_runtime_enabled_installer %}
-  static void installRuntimeEnabledFeatures(
-      v8::Isolate* isolate,
-      const DOMWrapperWorld& world,
+  static void InstallRuntimeEnabledFeatures(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
       v8::Local<v8::Object> instance,
       v8::Local<v8::Object> prototype,
       v8::Local<v8::Function> interface);
   {% endif %}
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 
   // Callback functions
   {% for attribute in attributes %}
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
index cdd4ea9e..cee026a8 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBuffer.cpp
@@ -65,6 +65,7 @@
     "[ActiveScriptWrappable] extended attribute in the IDL file.  "
     "Be consistent.");
 
+#line 759 "interface_base.cpp.tmpl"
 TestArrayBuffer* V8ArrayBuffer::toImpl(v8::Local<v8::Object> object) {
   DCHECK(object->IsArrayBuffer());
   v8::Local<v8::ArrayBuffer> v8buffer = object.As<v8::ArrayBuffer>();
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.cpp
index f9c8a724..a8f182f 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8ArrayBufferView.cpp
@@ -76,6 +76,7 @@
     "[ActiveScriptWrappable] extended attribute in the IDL file.  "
     "Be consistent.");
 
+#line 759 "interface_base.cpp.tmpl"
 TestArrayBufferView* V8ArrayBufferView::toImpl(v8::Local<v8::Object> object) {
   DCHECK(object->IsArrayBufferView());
   ScriptWrappable* scriptWrappable = ToScriptWrappable(object);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
index 498b519..8fc88b8 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8DataView.cpp
@@ -65,6 +65,7 @@
     "[ActiveScriptWrappable] extended attribute in the IDL file.  "
     "Be consistent.");
 
+#line 759 "interface_base.cpp.tmpl"
 TestDataView* V8DataView::toImpl(v8::Local<v8::Object> object) {
   DCHECK(object->IsDataView());
   ScriptWrappable* scriptWrappable = ToScriptWrappable(object);
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 60a2cea..fd8e042 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.cpp
@@ -113,7 +113,10 @@
     { "type", V8SVGTestInterface::typeAttributeGetterCallback, V8SVGTestInterface::typeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
 };
 
-static void installV8SVGTestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8SVGTestInterfaceTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8SVGTestInterface::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8SVGTestInterface::internalFieldCount);
 
@@ -124,10 +127,34 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8SVGTestInterfaceAccessors, WTF_ARRAY_LENGTH(V8SVGTestInterfaceAccessors));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8SVGTestInterfaceAccessors, WTF_ARRAY_LENGTH(V8SVGTestInterfaceAccessors));
+
+  // Custom signature
+
+  V8SVGTestInterface::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8SVGTestInterface::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8SVGTestInterface::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8SVGTestInterfaceTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.h b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.h
index b65b6c8..58744ca 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8SVGTestInterface.h
@@ -48,6 +48,11 @@
 
   CORE_EXPORT static void typeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void typeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 3a06db2..05d22d7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.cpp
@@ -250,7 +250,10 @@
     {"customElementCallbacksMethod", V8TestCallbackFunctions::customElementCallbacksMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestCallbackFunctionsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestCallbackFunctionsTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestCallbackFunctions::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestCallbackFunctions::internalFieldCount);
 
@@ -261,11 +264,37 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestCallbackFunctionsAccessors, WTF_ARRAY_LENGTH(V8TestCallbackFunctionsAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestCallbackFunctionsMethods, WTF_ARRAY_LENGTH(V8TestCallbackFunctionsMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestCallbackFunctionsAccessors, WTF_ARRAY_LENGTH(V8TestCallbackFunctionsAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestCallbackFunctionsMethods, WTF_ARRAY_LENGTH(V8TestCallbackFunctionsMethods));
+
+  // Custom signature
+
+  V8TestCallbackFunctions::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestCallbackFunctions::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestCallbackFunctions::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestCallbackFunctionsTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.h
index dcbaead..75299d4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestCallbackFunctions.h
@@ -56,6 +56,11 @@
   CORE_EXPORT static void voidMethodOptionalCallbackFunctionInArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void voidMethodNullableCallbackFunctionInArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void customElementCallbacksMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 c9b423f0..5ccf5daa 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.cpp
@@ -81,7 +81,10 @@
   V8SetReturnValueInt(info, 1);
 }
 
-static void installV8TestConstantsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestConstantsTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestConstants::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestConstants::internalFieldCount);
 
@@ -92,7 +95,7 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   const V8DOMConfiguration::ConstantConfiguration V8TestConstantsConstants[] = {
       {"CONST_VALUE_ZERO", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
       {"CONST_VALUE_ONE", 1, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
@@ -116,21 +119,15 @@
       {"CONST_VALUE_FLOAT", 0, 1, V8DOMConfiguration::kConstantTypeFloat},
       {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::kConstantTypeShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestConstantsConstants, WTF_ARRAY_LENGTH(V8TestConstantsConstants));
-  if (RuntimeEnabledFeatures::FeatureName1Enabled()) {
-    const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst1Configuration = {"FEATURE1_ENABLED_CONST1", 1, 0, V8DOMConfiguration::kConstantTypeShort};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst1Configuration);
-    const V8DOMConfiguration::ConstantConfiguration constantFeature1EnabledConst2Configuration = {"FEATURE1_ENABLED_CONST2", 2, 0, V8DOMConfiguration::kConstantTypeShort};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature1EnabledConst2Configuration);
-  }
-  if (RuntimeEnabledFeatures::FeatureName2Enabled()) {
-    const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst1Configuration = {"FEATURE2_ENABLED_CONST1", 3, 0, V8DOMConfiguration::kConstantTypeShort};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst1Configuration);
-    const V8DOMConfiguration::ConstantConfiguration constantFeature2EnabledConst2Configuration = {"FEATURE2_ENABLED_CONST2", 4, 0, V8DOMConfiguration::kConstantTypeShort};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantFeature2EnabledConst2Configuration);
-  }
-  V8DOMConfiguration::InstallConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "DEPRECATED_CONSTANT", V8TestConstants::DEPRECATED_CONSTANTConstantGetterCallback);
-  V8DOMConfiguration::InstallConstantWithGetter(isolate, interfaceTemplate, prototypeTemplate, "MEASURED_CONSTANT", V8TestConstants::MEASURED_CONSTANTConstantGetterCallback);
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestConstantsConstants, WTF_ARRAY_LENGTH(V8TestConstantsConstants));
+  V8DOMConfiguration::InstallConstantWithGetter(
+      isolate, interfaceTemplate, prototypeTemplate,
+      "DEPRECATED_CONSTANT", V8TestConstants::DEPRECATED_CONSTANTConstantGetterCallback);
+  V8DOMConfiguration::InstallConstantWithGetter(
+      isolate, interfaceTemplate, prototypeTemplate,
+      "MEASURED_CONSTANT", V8TestConstants::MEASURED_CONSTANTConstantGetterCallback);
   static_assert(0 == TestConstants::kConstValueZero, "the value of TestConstants_kConstValueZero does not match with implementation");
   static_assert(1 == TestConstants::kConstValueOne, "the value of TestConstants_kConstValueOne does not match with implementation");
   static_assert(2 == TestConstants::kConstValueTwo, "the value of TestConstants_kConstValueTwo does not match with implementation");
@@ -154,8 +151,48 @@
   static_assert(8 == TestConstants::kFeature2OriginTrialEnabledConst1, "the value of TestConstants_kFeature2OriginTrialEnabledConst1 does not match with implementation");
   static_assert(9 == TestConstants::kFeature2OriginTrialEnabledConst2, "the value of TestConstants_kFeature2OriginTrialEnabledConst2 does not match with implementation");
   static_assert(1 == TestConstants::CONST_IMPL, "the value of TestConstants_CONST_IMPL does not match with implementation");
+
+  // Custom signature
+
+  V8TestConstants::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestConstants::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+  if (RuntimeEnabledFeatures::FeatureName1Enabled()) {
+    static const V8DOMConfiguration::ConstantConfiguration constant_configurations[] = {
+        {"FEATURE1_ENABLED_CONST1", 1, 0, V8DOMConfiguration::kConstantTypeShort},
+        {"FEATURE1_ENABLED_CONST2", 2, 0, V8DOMConfiguration::kConstantTypeShort},
+    };
+    V8DOMConfiguration::InstallConstants(
+        isolate, interface_template, prototype_template,
+        constant_configurations, WTF_ARRAY_LENGTH(constant_configurations));
+  }
+  if (RuntimeEnabledFeatures::FeatureName2Enabled()) {
+    static const V8DOMConfiguration::ConstantConfiguration constant_configurations[] = {
+        {"FEATURE2_ENABLED_CONST1", 3, 0, V8DOMConfiguration::kConstantTypeShort},
+        {"FEATURE2_ENABLED_CONST2", 4, 0, V8DOMConfiguration::kConstantTypeShort},
+    };
+    V8DOMConfiguration::InstallConstants(
+        isolate, interface_template, prototype_template,
+        constant_configurations, WTF_ARRAY_LENGTH(constant_configurations));
+  }
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 void V8TestConstants::installFeatureName1(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
   const V8DOMConfiguration::ConstantConfiguration constantFeature1OriginTrialEnabledConst1Configuration = {"FEATURE1_ORIGIN_TRIAL_ENABLED_CONST1", 6, 0, V8DOMConfiguration::kConstantTypeShort};
   V8DOMConfiguration::InstallConstant(isolate, interface, prototype, constantFeature1OriginTrialEnabledConst1Configuration);
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.h
index 8b8e3c17..31ea476a 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestConstants.h
@@ -56,6 +56,11 @@
   // Callback functions
   CORE_EXPORT static void DEPRECATED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void MEASURED_CONSTANTConstantGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 06f4e25..eb0bb6f 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.cpp
@@ -145,7 +145,10 @@
   TestExceptionV8Internal::constructor(info);
 }
 
-static void installV8TestExceptionTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestExceptionTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestException::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestException::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestException::constructorCallback);
@@ -158,15 +161,43 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   const V8DOMConfiguration::ConstantConfiguration V8TestExceptionConstants[] = {
       {"UNSIGNED_SHORT_CONSTANT", 1, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestExceptionConstants, WTF_ARRAY_LENGTH(V8TestExceptionConstants));
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestExceptionAccessors, WTF_ARRAY_LENGTH(V8TestExceptionAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestExceptionMethods, WTF_ARRAY_LENGTH(V8TestExceptionMethods));
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestExceptionConstants, WTF_ARRAY_LENGTH(V8TestExceptionConstants));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestExceptionAccessors, WTF_ARRAY_LENGTH(V8TestExceptionAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestExceptionMethods, WTF_ARRAY_LENGTH(V8TestExceptionMethods));
+
+  // Custom signature
+
+  V8TestException::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestException::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestException::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestExceptionTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.h
index 4ede42c..025bd6c 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestException.h
@@ -51,6 +51,11 @@
   CORE_EXPORT static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
 
   CORE_EXPORT static void toStringMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 3e8cf431..af91630 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.cpp
@@ -185,7 +185,10 @@
     {"voidMethodDocument", V8TestIntegerIndexed::voidMethodDocumentMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestIntegerIndexedTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestIntegerIndexedTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestIntegerIndexed::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestIntegerIndexed::internalFieldCount);
 
@@ -196,9 +199,13 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestIntegerIndexedAccessors, WTF_ARRAY_LENGTH(V8TestIntegerIndexedAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestIntegerIndexedMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestIntegerIndexedAccessors, WTF_ARRAY_LENGTH(V8TestIntegerIndexedAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestIntegerIndexedMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedMethods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestIntegerIndexed::indexedPropertyGetterCallback, V8TestIntegerIndexed::indexedPropertySetterCallback, nullptr, V8TestIntegerIndexed::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestIntegerIndexed>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -209,8 +216,30 @@
 
   // Array iterator (@@iterator)
   prototypeTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum);
+
+  // Custom signature
+
+  V8TestIntegerIndexed::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestIntegerIndexed::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexed::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestIntegerIndexedTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.h
index f56d005..01f15d6 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexed.h
@@ -67,6 +67,11 @@
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 e419694..24a90e5a 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.cpp
@@ -185,7 +185,10 @@
     {"voidMethodDocument", V8TestIntegerIndexedGlobal::voidMethodDocumentMethodCallback, 1, v8::None, V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestIntegerIndexedGlobalTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestIntegerIndexedGlobalTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestIntegerIndexedGlobal::wrapperTypeInfo.interface_name, V8TestIntegerIndexedGlobal::domTemplateForNamedPropertiesObject(isolate, world), V8TestIntegerIndexedGlobal::internalFieldCount);
 
@@ -202,9 +205,13 @@
   // Global objects are Immutable Prototype Exotic Objects
   instanceTemplate->SetImmutableProto();
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestIntegerIndexedGlobalAccessors, WTF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestIntegerIndexedGlobalMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestIntegerIndexedGlobalAccessors, WTF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestIntegerIndexedGlobalMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedGlobalMethods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestIntegerIndexedGlobal::indexedPropertyGetterCallback, V8TestIntegerIndexedGlobal::indexedPropertySetterCallback, nullptr, V8TestIntegerIndexedGlobal::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestIntegerIndexedGlobal>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -212,8 +219,30 @@
 
   // Array iterator (@@iterator)
   instanceTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum);
+
+  // Custom signature
+
+  V8TestIntegerIndexedGlobal::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestIntegerIndexedGlobal::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedGlobal::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestIntegerIndexedGlobalTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.h
index 4de8baf..a2313828 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedGlobal.h
@@ -68,6 +68,11 @@
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 c244208..e891fe6 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.cpp
@@ -185,7 +185,10 @@
     {"voidMethodDocument", V8TestIntegerIndexedPrimaryGlobal::voidMethodDocumentMethodCallback, 1, v8::None, V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestIntegerIndexedPrimaryGlobalTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestIntegerIndexedPrimaryGlobalTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestIntegerIndexedPrimaryGlobal::wrapperTypeInfo.interface_name, V8TestIntegerIndexedPrimaryGlobal::domTemplateForNamedPropertiesObject(isolate, world), V8TestIntegerIndexedPrimaryGlobal::internalFieldCount);
 
@@ -202,9 +205,13 @@
   // Global objects are Immutable Prototype Exotic Objects
   instanceTemplate->SetImmutableProto();
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestIntegerIndexedPrimaryGlobalAccessors, WTF_ARRAY_LENGTH(V8TestIntegerIndexedPrimaryGlobalAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestIntegerIndexedPrimaryGlobalMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedPrimaryGlobalMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestIntegerIndexedPrimaryGlobalAccessors, WTF_ARRAY_LENGTH(V8TestIntegerIndexedPrimaryGlobalAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestIntegerIndexedPrimaryGlobalMethods, WTF_ARRAY_LENGTH(V8TestIntegerIndexedPrimaryGlobalMethods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestIntegerIndexedPrimaryGlobal::indexedPropertyGetterCallback, V8TestIntegerIndexedPrimaryGlobal::indexedPropertySetterCallback, nullptr, V8TestIntegerIndexedPrimaryGlobal::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestIntegerIndexedPrimaryGlobal>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -212,8 +219,30 @@
 
   // Array iterator (@@iterator)
   instanceTemplate->SetIntrinsicDataProperty(v8::Symbol::GetIterator(isolate), v8::kArrayProto_values, v8::DontEnum);
+
+  // Custom signature
+
+  V8TestIntegerIndexedPrimaryGlobal::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestIntegerIndexedPrimaryGlobal::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestIntegerIndexedPrimaryGlobal::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestIntegerIndexedPrimaryGlobalTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.h
index 66fd938e..502e16f 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestIntegerIndexedPrimaryGlobal.h
@@ -68,6 +68,11 @@
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 6fc8062..7ba749d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.cpp
@@ -2996,7 +2996,10 @@
     {"toString", V8TestInterface::toStringMethodCallback, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-void V8TestInterface::installV8TestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+void V8TestInterface::installV8TestInterfaceTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface::wrapperTypeInfo.interface_name, V8TestInterfaceEmpty::domTemplate(isolate, world), V8TestInterface::internalFieldCount);
 
@@ -3007,7 +3010,7 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] = {
       {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedLong},
       {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::kConstantTypeShort},
@@ -3015,16 +3018,66 @@
       {"IMPLEMENTS_CONSTANT_2", 2, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
       {"PARTIAL2_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
+  V8DOMConfiguration::InstallLazyDataAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestInterfaceLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceLazyDataAttributes));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
+
+  // Indexed properties
+  v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInterface::indexedPropertyGetterCallback, V8TestInterface::indexedPropertySetterCallback, nullptr, V8TestInterface::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestInterfaceImplementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
+  instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
+  // Named properties
+  v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestInterface::namedPropertyGetterCallback, V8TestInterface::namedPropertySetterCallback, V8TestInterface::namedPropertyQueryCallback, V8TestInterface::namedPropertyDeleterCallback, V8TestInterface::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
+  instanceTemplate->SetHandler(namedPropertyHandlerConfig);
+
+  // Iterator (@@iterator)
+  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration
+  symbolKeyedIteratorConfiguration = {
+      v8::Symbol::GetIterator,
+      "entries",
+      V8TestInterface::iteratorMethodCallback,
+      0,
+      v8::DontEnum,
+      V8DOMConfiguration::kOnPrototype,
+      V8DOMConfiguration::kCheckHolder,
+      V8DOMConfiguration::kDoNotCheckAccess
+  };
+  V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
+
+  instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom);
+
+  // Custom signature
+}
+
+void V8TestInterface::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
-    const V8DOMConfiguration::ConstantConfiguration constantPartialUnsignedShortConfiguration = {"PARTIAL_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedShort};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantPartialUnsignedShortConfiguration);
-    const V8DOMConfiguration::ConstantConfiguration constantPartialDoubleConfiguration = {"PARTIAL_DOUBLE", 0, 3.14, V8DOMConfiguration::kConstantTypeDouble};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantPartialDoubleConfiguration);
+    static const V8DOMConfiguration::ConstantConfiguration constant_configurations[] = {
+        {"PARTIAL_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
+        {"PARTIAL_DOUBLE", 0, 3.14, V8DOMConfiguration::kConstantTypeDouble},
+    };
+    V8DOMConfiguration::InstallConstants(
+        isolate, interface_template, prototype_template,
+        constant_configurations, WTF_ARRAY_LENGTH(constant_configurations));
   }
-  V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterfaceLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceLazyDataAttributes));
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
 
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
@@ -3034,7 +3087,10 @@
 
         { "conditionalLongAttribute", V8TestInterface::conditionalLongAttributeAttributeGetterCallback, V8TestInterface::conditionalLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
     };
-    V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
+    V8DOMConfiguration::InstallAccessors(
+        isolate, world, instance_template, prototype_template, interface_template,
+        signature, accessor_configurations,
+        WTF_ARRAY_LENGTH(accessor_configurations));
   }
   if (RuntimeEnabledFeatures::Implements2FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
@@ -3042,13 +3098,19 @@
 
         { "implements2StringAttribute", V8TestInterface::implements2StringAttributeAttributeGetterCallback, V8TestInterface::implements2StringAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
     };
-    V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
+    V8DOMConfiguration::InstallAccessors(
+        isolate, world, instance_template, prototype_template, interface_template,
+        signature, accessor_configurations,
+        WTF_ARRAY_LENGTH(accessor_configurations));
   }
   if (RuntimeEnabledFeatures::ImplementsFeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
         { "implementsRuntimeEnabledNodeAttribute", V8TestInterface::implementsRuntimeEnabledNodeAttributeAttributeGetterCallback, V8TestInterface::implementsRuntimeEnabledNodeAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
     };
-    V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
+    V8DOMConfiguration::InstallAccessors(
+        isolate, world, instance_template, prototype_template, interface_template,
+        signature, accessor_configurations,
+        WTF_ARRAY_LENGTH(accessor_configurations));
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
@@ -3060,66 +3122,58 @@
 
         { "partialStaticLongAttribute", V8TestInterface::partialStaticLongAttributeAttributeGetterCallback, V8TestInterface::partialStaticLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
     };
-    V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
+    V8DOMConfiguration::InstallAccessors(
+        isolate, world, instance_template, prototype_template, interface_template,
+        signature, accessor_configurations,
+        WTF_ARRAY_LENGTH(accessor_configurations));
   }
 
-  // Indexed properties
-  v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInterface::indexedPropertyGetterCallback, V8TestInterface::indexedPropertySetterCallback, nullptr, V8TestInterface::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestInterfaceImplementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
-  instanceTemplate->SetHandler(indexedPropertyHandlerConfig);
-  // Named properties
-  v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestInterface::namedPropertyGetterCallback, V8TestInterface::namedPropertySetterCallback, V8TestInterface::namedPropertyQueryCallback, V8TestInterface::namedPropertyDeleterCallback, V8TestInterface::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
-  instanceTemplate->SetHandler(namedPropertyHandlerConfig);
-
-  // Iterator (@@iterator)
-  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, "entries", V8TestInterface::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess };
-  V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
-
-  instanceTemplate->SetCallAsFunctionHandler(V8TestInterface::legacyCallCustom);
-
+  // Custom signature
   if (RuntimeEnabledFeatures::Implements2FeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration implements2VoidMethodMethodConfiguration[] = {
       {"implements2VoidMethod", V8TestInterface::implements2VoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : implements2VoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration partialVoidMethodMethodConfiguration[] = {
       {"partialVoidMethod", V8TestInterface::partialVoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : partialVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration partialStaticVoidMethodMethodConfiguration[] = {
       {"partialStaticVoidMethod", V8TestInterface::partialStaticVoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInterface, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : partialStaticVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration partialVoidMethodLongArgMethodConfiguration[] = {
       {"partialVoidMethodLongArg", V8TestInterface::partialVoidMethodLongArgMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : partialVoidMethodLongArgMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration[] = {
       {"partialCallWithExecutionContextRaisesExceptionVoidMethod", V8TestInterface::partialCallWithExecutionContextRaisesExceptionVoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : partialCallWithExecutionContextRaisesExceptionVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::PartialFeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration partialVoidMethodPartialCallbackTypeArgMethodConfiguration[] = {
       {"partialVoidMethodPartialCallbackTypeArg", V8TestInterface::partialVoidMethodPartialCallbackTypeArgMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : partialVoidMethodPartialCallbackTypeArgMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
 }
 
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterface::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), V8TestInterface::installV8TestInterfaceTemplateFunction);
 }
@@ -3472,20 +3526,28 @@
   }
 }
 
+InstallRuntimeEnabledFeaturesOnTemplateFunction
+V8TestInterface::install_runtime_enabled_features_on_template_function_ =
+    &V8TestInterface::InstallRuntimeEnabledFeaturesOnTemplate;
+
 InstallTemplateFunction V8TestInterface::installV8TestInterfaceTemplateFunction =
     &V8TestInterface::installV8TestInterfaceTemplate;
 
-void V8TestInterface::updateWrapperTypeInfo(
-    InstallTemplateFunction installTemplateFunction,
-    InstallRuntimeEnabledFunction installRuntimeEnabledFunction,
-    PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
-  ALLOW_UNUSED_LOCAL(installRuntimeEnabledFunction);
-
+void V8TestInterface::UpdateWrapperTypeInfo(
+    InstallTemplateFunction install_template_function,
+    InstallRuntimeEnabledFeaturesFunction install_runtime_enabled_features_function,
+    InstallRuntimeEnabledFeaturesOnTemplateFunction install_runtime_enabled_features_on_template_function,
+    PreparePrototypeAndInterfaceObjectFunction prepare_prototype_and_interface_object_function) {
   V8TestInterface::installV8TestInterfaceTemplateFunction =
-      installTemplateFunction;
-  if (preparePrototypeAndInterfaceObjectFunction) {
+      install_template_function;
+
+  CHECK(install_runtime_enabled_features_on_template_function);
+  V8TestInterface::install_runtime_enabled_features_on_template_function_ =
+      install_runtime_enabled_features_on_template_function;
+
+  if (prepare_prototype_and_interface_object_function) {
     V8TestInterface::wrapperTypeInfo.prepare_prototype_and_interface_object_function =
-        preparePrototypeAndInterfaceObjectFunction;
+        prepare_prototype_and_interface_object_function;
   }
 }
 
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 8561e67..31e5de10 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface.h
@@ -49,7 +49,11 @@
   static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + 0;
   CORE_EXPORT static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate);
 
-  CORE_EXPORT static void updateWrapperTypeInfo(InstallTemplateFunction, InstallRuntimeEnabledFunction, PreparePrototypeAndInterfaceObjectFunction);
+  CORE_EXPORT static void UpdateWrapperTypeInfo(
+      InstallTemplateFunction,
+      InstallRuntimeEnabledFeaturesFunction,
+      InstallRuntimeEnabledFeaturesOnTemplateFunction,
+      PreparePrototypeAndInterfaceObjectFunction);
   CORE_EXPORT static void installV8TestInterfaceTemplate(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
   CORE_EXPORT static void registerVoidMethodPartialOverloadMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&));
   CORE_EXPORT static void registerStaticVoidMethodPartialOverloadMethodForPartialInterface(void (*)(const v8::FunctionCallbackInfo<v8::Value>&));
@@ -220,6 +224,13 @@
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
 
+  CORE_EXPORT static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
+  static InstallRuntimeEnabledFeaturesOnTemplateFunction
+  install_runtime_enabled_features_on_template_function_;
+
  private:
   static InstallTemplateFunction installV8TestInterfaceTemplateFunction;
 };
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 8bc002a..02e5c24 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -621,7 +621,10 @@
   TestInterface2V8Internal::constructor(info);
 }
 
-void V8TestInterface2::installV8TestInterface2Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+void V8TestInterface2::installV8TestInterface2Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface2::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterface2::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterface2::constructorCallback);
@@ -634,14 +637,14 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
-    const V8DOMConfiguration::ConstantConfiguration constantConstValue1Configuration = {"CONST_VALUE_1", 1, 0, V8DOMConfiguration::kConstantTypeUnsignedShort};
-    V8DOMConfiguration::InstallConstant(isolate, interfaceTemplate, prototypeTemplate, constantConstValue1Configuration);
-  }
+  // Register IDL constants, attributes and operations.
   static_assert(1 == TestInterface2::kConstValue1, "the value of TestInterface2_kConstValue1 does not match with implementation");
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface2Accessors, WTF_ARRAY_LENGTH(V8TestInterface2Accessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface2Accessors, WTF_ARRAY_LENGTH(V8TestInterface2Accessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInterface2::indexedPropertyGetterCallback, V8TestInterface2::indexedPropertySetterCallback, nullptr, V8TestInterface2::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestInterface2>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -651,12 +654,49 @@
   instanceTemplate->SetHandler(namedPropertyHandlerConfig);
 
   // Iterator (@@iterator)
-  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, "values", V8TestInterface2::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess };
+  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration
+  symbolKeyedIteratorConfiguration = {
+      v8::Symbol::GetIterator,
+      "values",
+      V8TestInterface2::iteratorMethodCallback,
+      0,
+      v8::DontEnum,
+      V8DOMConfiguration::kOnPrototype,
+      V8DOMConfiguration::kCheckHolder,
+      V8DOMConfiguration::kDoNotCheckAccess
+  };
   V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
 
   instanceTemplate->SetCallAsFunctionHandler(TestInterface2V8Internal::legacyCallerMethodCallback);
+
+  // Custom signature
 }
 
+void V8TestInterface2::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+  if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
+    static const V8DOMConfiguration::ConstantConfiguration constant_configurations[] = {
+        {"CONST_VALUE_1", 1, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
+    };
+    V8DOMConfiguration::InstallConstants(
+        isolate, interface_template, prototype_template,
+        constant_configurations, WTF_ARRAY_LENGTH(constant_configurations));
+  }
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterface2::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), V8TestInterface2::installV8TestInterface2TemplateFunction);
 }
@@ -682,20 +722,28 @@
   return nativeValue;
 }
 
+InstallRuntimeEnabledFeaturesOnTemplateFunction
+V8TestInterface2::install_runtime_enabled_features_on_template_function_ =
+    &V8TestInterface2::InstallRuntimeEnabledFeaturesOnTemplate;
+
 InstallTemplateFunction V8TestInterface2::installV8TestInterface2TemplateFunction =
     &V8TestInterface2::installV8TestInterface2Template;
 
-void V8TestInterface2::updateWrapperTypeInfo(
-    InstallTemplateFunction installTemplateFunction,
-    InstallRuntimeEnabledFunction installRuntimeEnabledFunction,
-    PreparePrototypeAndInterfaceObjectFunction preparePrototypeAndInterfaceObjectFunction) {
-  ALLOW_UNUSED_LOCAL(installRuntimeEnabledFunction);
-
+void V8TestInterface2::UpdateWrapperTypeInfo(
+    InstallTemplateFunction install_template_function,
+    InstallRuntimeEnabledFeaturesFunction install_runtime_enabled_features_function,
+    InstallRuntimeEnabledFeaturesOnTemplateFunction install_runtime_enabled_features_on_template_function,
+    PreparePrototypeAndInterfaceObjectFunction prepare_prototype_and_interface_object_function) {
   V8TestInterface2::installV8TestInterface2TemplateFunction =
-      installTemplateFunction;
-  if (preparePrototypeAndInterfaceObjectFunction) {
+      install_template_function;
+
+  CHECK(install_runtime_enabled_features_on_template_function);
+  V8TestInterface2::install_runtime_enabled_features_on_template_function_ =
+      install_runtime_enabled_features_on_template_function;
+
+  if (prepare_prototype_and_interface_object_function) {
     V8TestInterface2::wrapperTypeInfo.prepare_prototype_and_interface_object_function =
-        preparePrototypeAndInterfaceObjectFunction;
+        prepare_prototype_and_interface_object_function;
   }
 }
 
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h
index aa33c6a..40384c7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.h
@@ -45,7 +45,11 @@
   static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + 0;
   CORE_EXPORT static void preparePrototypeAndInterfaceObject(v8::Local<v8::Context>, const DOMWrapperWorld&, v8::Local<v8::Object> prototypeObject, v8::Local<v8::Function> interfaceObject, v8::Local<v8::FunctionTemplate> interfaceTemplate) {}
 
-  CORE_EXPORT static void updateWrapperTypeInfo(InstallTemplateFunction, InstallRuntimeEnabledFunction, PreparePrototypeAndInterfaceObjectFunction);
+  CORE_EXPORT static void UpdateWrapperTypeInfo(
+      InstallTemplateFunction,
+      InstallRuntimeEnabledFeaturesFunction,
+      InstallRuntimeEnabledFeaturesOnTemplateFunction,
+      PreparePrototypeAndInterfaceObjectFunction);
   CORE_EXPORT static void installV8TestInterface2Template(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::FunctionTemplate> interfaceTemplate);
 
   // Callback functions
@@ -77,6 +81,13 @@
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
 
+  CORE_EXPORT static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
+  static InstallRuntimeEnabledFeaturesOnTemplateFunction
+  install_runtime_enabled_features_on_template_function_;
+
  private:
   static InstallTemplateFunction installV8TestInterface2TemplateFunction;
 };
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 df6c0ee..b8f1cfbc 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.cpp
@@ -185,7 +185,10 @@
     {"toString", V8TestInterface3::toStringMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestInterface3Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterface3Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface3::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterface3::internalFieldCount);
 
@@ -196,9 +199,13 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface3Accessors, WTF_ARRAY_LENGTH(V8TestInterface3Accessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface3Accessors, WTF_ARRAY_LENGTH(V8TestInterface3Accessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface3Methods, WTF_ARRAY_LENGTH(V8TestInterface3Methods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInterface3::indexedPropertyGetterCallback, V8TestInterface3::indexedPropertySetterCallback, nullptr, V8TestInterface3::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestInterface3>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -215,8 +222,30 @@
   prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "forEach"), v8::kArrayProto_forEach);
   prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "keys"), v8::kArrayProto_keys);
   prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "values"), v8::kArrayProto_values);
+
+  // Custom signature
+
+  V8TestInterface3::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterface3::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterface3::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterface3Template);
 }
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 377cd21..e84d2da 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface3.h
@@ -68,6 +68,11 @@
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 ed7fdc46..66835a3e 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.cpp
@@ -519,7 +519,10 @@
     {"voidMethod", V8TestInterfaceCheckSecurity::voidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestInterfaceCheckSecurityTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceCheckSecurityTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceCheckSecurity::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceCheckSecurity::internalFieldCount);
 
@@ -536,14 +539,30 @@
   // Global objects are Immutable Prototype Exotic Objects
   instanceTemplate->SetImmutableProto();
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityAttributes));
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestInterfaceCheckSecurityAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityAttributes));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceCheckSecurityAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceCheckSecurityMethods, WTF_ARRAY_LENGTH(V8TestInterfaceCheckSecurityMethods));
 
   // Cross-origin access check
-  instanceTemplate->SetAccessCheckCallbackAndHandler(V8TestInterfaceCheckSecurity::securityCheck, v8::NamedPropertyHandlerConfiguration(V8TestInterfaceCheckSecurity::crossOriginNamedGetter, V8TestInterfaceCheckSecurity::crossOriginNamedSetter, nullptr, nullptr, V8TestInterfaceCheckSecurity::crossOriginNamedEnumerator), v8::IndexedPropertyHandlerConfiguration(nullptr), v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceCheckSecurity::wrapperTypeInfo)));
+  instanceTemplate->SetAccessCheckCallbackAndHandler(
+      V8TestInterfaceCheckSecurity::securityCheck,
+      v8::NamedPropertyHandlerConfiguration(
+          V8TestInterfaceCheckSecurity::crossOriginNamedGetter,
+          V8TestInterfaceCheckSecurity::crossOriginNamedSetter,
+          nullptr,
+          nullptr,
+          V8TestInterfaceCheckSecurity::crossOriginNamedEnumerator),
+      v8::IndexedPropertyHandlerConfiguration(nullptr),
+      v8::External::New(isolate, const_cast<WrapperTypeInfo*>(&V8TestInterfaceCheckSecurity::wrapperTypeInfo)));
 
+  // Custom signature
   static const V8DOMConfiguration::AttributeConfiguration doNotCheckSecurityVoidMethodOriginSafeAttributeConfiguration[] = {
       {"doNotCheckSecurityVoidMethod", V8TestInterfaceCheckSecurity::doNotCheckSecurityVoidMethodOriginSafeMethodGetterCallback, V8TestInterfaceCheckSecurity::TestInterfaceCheckSecurityOriginSafeMethodSetterCallback, &V8TestInterfaceCheckSecurity::wrapperTypeInfo, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds}
   };
@@ -560,8 +579,28 @@
   };
   for (const auto& attributeConfig : doNotCheckSecurityUnforgeableVoidMethodOriginSafeAttributeConfiguration)
     V8DOMConfiguration::InstallAttribute(isolate, world, instanceTemplate, prototypeTemplate, attributeConfig);
+
+  V8TestInterfaceCheckSecurity::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceCheckSecurity::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceCheckSecurity::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceCheckSecurityTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h
index 1f54a58..c96072548 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCheckSecurity.h
@@ -71,6 +71,11 @@
   CORE_EXPORT static void crossOriginNamedGetter(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void crossOriginNamedSetter(v8::Local<v8::Name>, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void crossOriginNamedEnumerator(const v8::PropertyCallbackInfo<v8::Array>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 5ec4b527..c94023d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.cpp
@@ -436,7 +436,10 @@
   TestInterfaceConstructorV8Internal::constructor(info);
 }
 
-static void installV8TestInterfaceConstructorTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceConstructorTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceConstructor::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceConstructor::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceConstructor::constructorCallback);
@@ -449,9 +452,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructor::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceConstructorTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.h
index e2ef4f3..ef8b1ac7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor.h
@@ -55,6 +55,11 @@
 
   // Callback functions
   CORE_EXPORT static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
index ce1df7b..731802f 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.cpp
@@ -246,7 +246,10 @@
   TestInterfaceConstructor2V8Internal::constructor(info);
 }
 
-static void installV8TestInterfaceConstructor2Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceConstructor2Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceConstructor2::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceConstructor2::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceConstructor2::constructorCallback);
@@ -259,9 +262,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceConstructor2::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceConstructor2::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructor2::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceConstructor2Template);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h
index f7b143f..5aa57c1 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor2.h
@@ -46,6 +46,11 @@
 
   // Callback functions
   CORE_EXPORT static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp
index 066af32..7844d2d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.cpp
@@ -99,7 +99,10 @@
   TestInterfaceConstructor3V8Internal::constructor(info);
 }
 
-static void installV8TestInterfaceConstructor3Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceConstructor3Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceConstructor3::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceConstructor3::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceConstructor3::constructorCallback);
@@ -112,9 +115,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceConstructor3::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceConstructor3::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructor3::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceConstructor3Template);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h
index 5a328d80..f452bfc5 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor3.h
@@ -46,6 +46,11 @@
 
   // Callback functions
   CORE_EXPORT static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
index 3cc69b2..b89fd17e 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.cpp
@@ -132,7 +132,10 @@
   TestInterfaceConstructor4V8Internal::constructor(info);
 }
 
-static void installV8TestInterfaceConstructor4Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceConstructor4Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceConstructor4::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceConstructor4::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceConstructor4::constructorCallback);
@@ -145,9 +148,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceConstructor4::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceConstructor4::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceConstructor4::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceConstructor4Template);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h
index 8baefb47..478f7f3 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceConstructor4.h
@@ -46,6 +46,11 @@
 
   // Callback functions
   CORE_EXPORT static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp
index 46f13ed..8f9903b39 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.cpp
@@ -80,7 +80,10 @@
   V8TestInterfaceCustomConstructor::constructorCustom(info);
 }
 
-static void installV8TestInterfaceCustomConstructorTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceCustomConstructorTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceCustomConstructor::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceCustomConstructor::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceCustomConstructor::constructorCallback);
@@ -93,9 +96,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceCustomConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceCustomConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceCustomConstructor::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceCustomConstructorTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h
index 00246c4a..e86a663 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceCustomConstructor.h
@@ -47,6 +47,11 @@
 
   // Callback functions
   CORE_EXPORT static void constructorCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 9a4ad21..209c74c 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.cpp
@@ -115,7 +115,10 @@
     { "location", V8TestInterfaceDocument::locationAttributeGetterCallback, V8TestInterfaceDocument::locationAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
 };
 
-static void installV8TestInterfaceDocumentTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceDocumentTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceDocument::wrapperTypeInfo.interface_name, V8Document::domTemplate(isolate, world), V8TestInterfaceDocument::internalFieldCount);
 
@@ -126,10 +129,34 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceDocumentAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceDocumentAccessors));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceDocumentAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceDocumentAccessors));
+
+  // Custom signature
+
+  V8TestInterfaceDocument::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceDocument::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceDocument::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceDocumentTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.h
index c18a3d3..cf3ad3a0 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceDocument.h
@@ -49,6 +49,11 @@
 
   CORE_EXPORT static void locationAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void locationAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp
index 9e82de84..4f3e078b 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.cpp
@@ -65,7 +65,10 @@
 
 } // namespace TestInterfaceEmptyV8Internal
 
-static void installV8TestInterfaceEmptyTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceEmptyTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceEmpty::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceEmpty::internalFieldCount);
 
@@ -76,9 +79,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceEmpty::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceEmpty::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceEmpty::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceEmptyTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.h
index 1046b8a..436e7666 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEmpty.h
@@ -45,6 +45,11 @@
   static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + 0;
 
   // Callback functions
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 4e53ea2..35524c8e 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.cpp
@@ -142,7 +142,10 @@
   TestInterfaceEventInitConstructorV8Internal::constructor(info);
 }
 
-static void installV8TestInterfaceEventInitConstructorTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceEventInitConstructorTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceEventInitConstructor::wrapperTypeInfo.interface_name, V8Event::domTemplate(isolate, world), V8TestInterfaceEventInitConstructor::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceEventInitConstructor::constructorCallback);
@@ -155,10 +158,34 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceEventInitConstructorAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceEventInitConstructorAccessors));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceEventInitConstructorAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceEventInitConstructorAccessors));
+
+  // Custom signature
+
+  V8TestInterfaceEventInitConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceEventInitConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventInitConstructor::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceEventInitConstructorTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.h
index e50e350..b288c03c 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventInitConstructor.h
@@ -50,6 +50,11 @@
 
   CORE_EXPORT static void readonlyStringAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void isTrustedAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp
index 2bbd9ac7..1e368a4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.cpp
@@ -154,7 +154,10 @@
   V8SetReturnValue(info, namedConstructor);
 }
 
-static void installV8TestInterfaceEventTargetTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceEventTargetTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceEventTarget::wrapperTypeInfo.interface_name, V8EventTarget::domTemplate(isolate, world), V8TestInterfaceEventTarget::internalFieldCount);
 
@@ -165,9 +168,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceEventTarget::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceEventTarget::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceEventTarget::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceEventTargetTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h
index 8c1a4d1..57b0a52 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceEventTarget.h
@@ -55,6 +55,11 @@
   static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + 1;
 
   // Callback functions
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 5fe2ce0..98b4d52 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.cpp
@@ -384,7 +384,10 @@
   TestInterfaceGarbageCollectedV8Internal::constructor(info);
 }
 
-static void installV8TestInterfaceGarbageCollectedTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceGarbageCollectedTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceGarbageCollected::wrapperTypeInfo.interface_name, V8EventTarget::domTemplate(isolate, world), V8TestInterfaceGarbageCollected::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestInterfaceGarbageCollected::constructorCallback);
@@ -397,15 +400,51 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceGarbageCollectedAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceGarbageCollectedMethods, WTF_ARRAY_LENGTH(V8TestInterfaceGarbageCollectedMethods));
 
   // Iterator (@@iterator)
-  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, "values", V8TestInterfaceGarbageCollected::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess };
+  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration
+  symbolKeyedIteratorConfiguration = {
+      v8::Symbol::GetIterator,
+      "values",
+      V8TestInterfaceGarbageCollected::iteratorMethodCallback,
+      0,
+      v8::DontEnum,
+      V8DOMConfiguration::kOnPrototype,
+      V8DOMConfiguration::kCheckHolder,
+      V8DOMConfiguration::kDoNotCheckAccess
+  };
   V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
+
+  // Custom signature
+
+  V8TestInterfaceGarbageCollected::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceGarbageCollected::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceGarbageCollected::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceGarbageCollectedTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h
index 895594b..55106ca 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceGarbageCollected.h
@@ -62,6 +62,11 @@
   CORE_EXPORT static void clearMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void deleteMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void iteratorMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 9f419da..abb4d35 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.cpp
@@ -229,7 +229,10 @@
   V8SetReturnValue(info, namedConstructor);
 }
 
-static void installV8TestInterfaceNamedConstructorTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceNamedConstructorTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceNamedConstructor::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceNamedConstructor::internalFieldCount);
 
@@ -240,10 +243,34 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterfaceNamedConstructorLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceNamedConstructorLazyDataAttributes));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallLazyDataAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestInterfaceNamedConstructorLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterfaceNamedConstructorLazyDataAttributes));
+
+  // Custom signature
+
+  V8TestInterfaceNamedConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceNamedConstructor::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructorTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h
index f916804e..c58d8a3 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor.h
@@ -53,6 +53,11 @@
   static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + 0;
 
   // Callback functions
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
index f7e6cca3..d0c597a 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.cpp
@@ -164,7 +164,10 @@
   V8SetReturnValue(info, namedConstructor);
 }
 
-static void installV8TestInterfaceNamedConstructor2Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceNamedConstructor2Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceNamedConstructor2::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceNamedConstructor2::internalFieldCount);
 
@@ -175,9 +178,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceNamedConstructor2::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceNamedConstructor2::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceNamedConstructor2::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceNamedConstructor2Template);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h
index 9b991ec..b7343fc4 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNamedConstructor2.h
@@ -53,6 +53,11 @@
   static const int internalFieldCount = kV8DefaultWrapperInternalFieldCount + 0;
 
   // Callback functions
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 b9aa5f05..083f0f5 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.cpp
@@ -395,7 +395,10 @@
     {"perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArg", V8TestInterfaceNode::perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kNonMainWorlds},
 };
 
-static void installV8TestInterfaceNodeTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceNodeTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceNode::wrapperTypeInfo.interface_name, V8Node::domTemplate(isolate, world), V8TestInterfaceNode::internalFieldCount);
 
@@ -406,11 +409,37 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceNodeAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceNodeMethods, WTF_ARRAY_LENGTH(V8TestInterfaceNodeMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceNodeAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceNodeAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceNodeMethods, WTF_ARRAY_LENGTH(V8TestInterfaceNodeMethods));
+
+  // Custom signature
+
+  V8TestInterfaceNode::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceNode::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceNode::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceNodeTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.h
index 406d8986e..bf3f8c3 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceNode.h
@@ -66,6 +66,11 @@
   CORE_EXPORT static void perWorldBindingsTestInterfaceEmptyMethodMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void perWorldBindingsTestInterfaceEmptyMethodOptionalBooleanArgMethodCallbackForMainWorld(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 316b1ca..0004bd0 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.cpp
@@ -278,7 +278,10 @@
     {"voidMethodPartialOverload", V8TestInterfaceOriginTrialEnabled::voidMethodPartialOverloadMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestInterfaceOriginTrialEnabledTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceOriginTrialEnabledTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceOriginTrialEnabled::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceOriginTrialEnabled::internalFieldCount);
 
@@ -289,16 +292,41 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceOriginTrialEnabledConstants[] = {
       {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedLong},
       {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::kConstantTypeShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterfaceOriginTrialEnabledConstants, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledConstants));
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestInterfaceOriginTrialEnabledConstants, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledConstants));
   static_assert(0 == TestInterfaceOriginTrialEnabled::kUnsignedLong, "the value of TestInterfaceOriginTrialEnabled_kUnsignedLong does not match with implementation");
   static_assert(1 == TestInterfaceOriginTrialEnabled::kConstJavascript, "the value of TestInterfaceOriginTrialEnabled_kConstJavascript does not match with implementation");
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceOriginTrialEnabledMethods, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledMethods));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceOriginTrialEnabledAccessors, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceOriginTrialEnabledMethods, WTF_ARRAY_LENGTH(V8TestInterfaceOriginTrialEnabledMethods));
+
+  // Custom signature
+
+  V8TestInterfaceOriginTrialEnabled::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
+}
+
+void V8TestInterfaceOriginTrialEnabled::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
 
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
@@ -308,10 +336,16 @@
 
         { "conditionalLongAttribute", V8TestInterfaceOriginTrialEnabled::conditionalLongAttributeAttributeGetterCallback, V8TestInterfaceOriginTrialEnabled::conditionalLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
     };
-    V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
+    V8DOMConfiguration::InstallAccessors(
+        isolate, world, instance_template, prototype_template, interface_template,
+        signature, accessor_configurations,
+        WTF_ARRAY_LENGTH(accessor_configurations));
   }
+
+  // Custom signature
 }
 
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceOriginTrialEnabled::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceOriginTrialEnabledTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.h
index d18417f8..a6742cc 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceOriginTrialEnabled.h
@@ -57,6 +57,11 @@
 
   CORE_EXPORT static void voidMethodDoubleArgFloatArgMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void voidMethodPartialOverloadMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 8335df0..27586bdf 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.cpp
@@ -374,7 +374,10 @@
   TestInterfaceSecureContextV8Internal::secureContextWorkerExposedRuntimeEnabledMethodMethod(info);
 }
 
-static void installV8TestInterfaceSecureContextTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterfaceSecureContextTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterfaceSecureContext::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestInterfaceSecureContext::internalFieldCount);
 
@@ -385,9 +388,31 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+
+  V8TestInterfaceSecureContext::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfaceSecureContext::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterfaceSecureContext::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterfaceSecureContextTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.h
index 2aa007d..0c0f202a1 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterfaceSecureContext.h
@@ -66,6 +66,11 @@
   CORE_EXPORT static void secureContextWorkerExposedMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void secureContextWindowExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void secureContextWorkerExposedRuntimeEnabledMethodMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestLegacyCallbackInterface.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestLegacyCallbackInterface.cpp
index bbec962e3a..d107bbad 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestLegacyCallbackInterface.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestLegacyCallbackInterface.cpp
@@ -73,7 +73,9 @@
   const V8DOMConfiguration::ConstantConfiguration V8TestLegacyCallbackInterfaceConstants[] = {
       {"CONST_VALUE_USHORT_42", 42, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestLegacyCallbackInterfaceConstants, WTF_ARRAY_LENGTH(V8TestLegacyCallbackInterfaceConstants));
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestLegacyCallbackInterfaceConstants, WTF_ARRAY_LENGTH(V8TestLegacyCallbackInterfaceConstants));
   static_assert(42 == TestLegacyCallbackInterface::kConstValueUshort42, "the value of TestLegacyCallbackInterface_kConstValueUshort42 does not match with implementation");
 }
 
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 e1da81d..74cb9835 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
@@ -245,7 +245,10 @@
   TestNodeV8Internal::constructor(info);
 }
 
-static void installV8TestNodeTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestNodeTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestNode::wrapperTypeInfo.interface_name, V8Node::domTemplate(isolate, world), V8TestNode::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestNode::constructorCallback);
@@ -258,10 +261,34 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestNodeAccessors, WTF_ARRAY_LENGTH(V8TestNodeAccessors));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestNodeAccessors, WTF_ARRAY_LENGTH(V8TestNodeAccessors));
+
+  // Custom signature
+
+  V8TestNode::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestNode::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestNode::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestNodeTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.h
index 65d06a8..4eae542 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.h
@@ -56,6 +56,11 @@
   CORE_EXPORT static void hrefCallWithAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void hrefByteStringAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void hrefByteStringAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 c8eacd3..658e6365 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.cpp
@@ -12850,7 +12850,10 @@
     {"toString", V8TestObject::toStringMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestObjectTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestObjectTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestObject::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestObject::internalFieldCount);
 
@@ -12861,20 +12864,19 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes));
-  V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestObjectLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestObjectLazyDataAttributes));
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods));
-
-  if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
-    static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
-        { "runtimeEnabledLongAttribute", V8TestObject::runtimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::runtimeEnabledLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
-
-        { "unscopableRuntimeEnabledLongAttribute", V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
-    };
-    V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, accessor_configurations, WTF_ARRAY_LENGTH(accessor_configurations));
-  }
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestObjectAttributes, WTF_ARRAY_LENGTH(V8TestObjectAttributes));
+  V8DOMConfiguration::InstallLazyDataAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestObjectLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestObjectLazyDataAttributes));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestObjectAccessors, WTF_ARRAY_LENGTH(V8TestObjectAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestObjectMethods, WTF_ARRAY_LENGTH(V8TestObjectMethods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestObject::indexedPropertyGetterCallback, V8TestObject::indexedPropertySetterCallback, nullptr, V8TestObject::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestObject>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -12884,22 +12886,69 @@
   instanceTemplate->SetHandler(namedPropertyHandlerConfig);
 
   // Iterator (@@iterator)
-  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration symbolKeyedIteratorConfiguration = { v8::Symbol::GetIterator, "entries", V8TestObject::iteratorMethodCallback, 0, v8::DontEnum, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess };
+  static const V8DOMConfiguration::SymbolKeyedMethodConfiguration
+  symbolKeyedIteratorConfiguration = {
+      v8::Symbol::GetIterator,
+      "entries",
+      V8TestObject::iteratorMethodCallback,
+      0,
+      v8::DontEnum,
+      V8DOMConfiguration::kOnPrototype,
+      V8DOMConfiguration::kCheckHolder,
+      V8DOMConfiguration::kDoNotCheckAccess
+  };
   V8DOMConfiguration::InstallMethod(isolate, world, prototypeTemplate, signature, symbolKeyedIteratorConfiguration);
 
+  // Custom signature
+  const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration[] = {
+    {"partiallyRuntimeEnabledOverloadedVoidMethod", V8TestObject::partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
+  };
+  for (const auto& methodConfig : partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration)
+    V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+
+  V8TestObject::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
+}
+
+void V8TestObject::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
+    static const V8DOMConfiguration::AccessorConfiguration accessor_configurations[] = {
+        { "runtimeEnabledLongAttribute", V8TestObject::runtimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::runtimeEnabledLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+
+        { "unscopableRuntimeEnabledLongAttribute", V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeGetterCallback, V8TestObject::unscopableRuntimeEnabledLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::None), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
+    };
+    V8DOMConfiguration::InstallAccessors(
+        isolate, world, instance_template, prototype_template, interface_template,
+        signature, accessor_configurations,
+        WTF_ARRAY_LENGTH(accessor_configurations));
+  }
+
+  // Custom signature
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration unscopableRuntimeEnabledVoidMethodMethodConfiguration[] = {
       {"unscopableRuntimeEnabledVoidMethod", V8TestObject::unscopableRuntimeEnabledVoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : unscopableRuntimeEnabledVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration runtimeEnabledVoidMethodMethodConfiguration[] = {
       {"runtimeEnabledVoidMethod", V8TestObject::runtimeEnabledVoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : runtimeEnabledVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration[] = {
@@ -12907,29 +12956,25 @@
       {"perWorldBindingsRuntimeEnabledVoidMethod", V8TestObject::perWorldBindingsRuntimeEnabledVoidMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kNonMainWorlds}
     };
     for (const auto& methodConfig : perWorldBindingsRuntimeEnabledVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration runtimeEnabledOverloadedVoidMethodMethodConfiguration[] = {
       {"runtimeEnabledOverloadedVoidMethod", V8TestObject::runtimeEnabledOverloadedVoidMethodMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : runtimeEnabledOverloadedVoidMethodMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
-  const V8DOMConfiguration::MethodConfiguration partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration[] = {
-    {"partiallyRuntimeEnabledOverloadedVoidMethod", V8TestObject::partiallyRuntimeEnabledOverloadedVoidMethodMethodCallback, TestObjectV8Internal::partiallyRuntimeEnabledOverloadedVoidMethodMethodLength(), v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
-  };
-  for (const auto& methodConfig : partiallyRuntimeEnabledOverloadedVoidMethodMethodConfiguration)
-    V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
   if (RuntimeEnabledFeatures::FeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration clearMethodConfiguration[] = {
       {"clear", V8TestObject::clearMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : clearMethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
 }
 
+#line 759 "interface_base.cpp.tmpl"
 void V8TestObject::installFeatureName(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
   v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestObject::wrapperTypeInfo.domTemplate(isolate, world);
   v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
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 9d75a49..0b6ea49 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestObject.h
@@ -641,6 +641,11 @@
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 cc699cb..4f61cde 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.cpp
@@ -186,7 +186,10 @@
     {"namedItem", V8TestSpecialOperations::namedItemMethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestSpecialOperationsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestSpecialOperationsTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestSpecialOperations::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestSpecialOperations::internalFieldCount);
 
@@ -197,8 +200,10 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestSpecialOperationsMethods, WTF_ARRAY_LENGTH(V8TestSpecialOperationsMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestSpecialOperationsMethods, WTF_ARRAY_LENGTH(V8TestSpecialOperationsMethods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestSpecialOperations::indexedPropertyGetterCallback, V8TestSpecialOperations::indexedPropertySetterCallback, nullptr, nullptr, nullptr, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -206,8 +211,30 @@
   // Named properties
   v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestSpecialOperations::namedPropertyGetterCallback, V8TestSpecialOperations::namedPropertySetterCallback, V8TestSpecialOperations::namedPropertyQueryCallback, nullptr, V8TestSpecialOperations::namedPropertyEnumeratorCallback, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings)));
   instanceTemplate->SetHandler(namedPropertyHandlerConfig);
+
+  // Custom signature
+
+  V8TestSpecialOperations::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestSpecialOperations::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestSpecialOperations::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestSpecialOperationsTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.h
index c4e4596..3987cd12 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperations.h
@@ -55,6 +55,11 @@
   CORE_EXPORT static void namedPropertyEnumeratorCallback(const v8::PropertyCallbackInfo<v8::Array>&);
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
index 58e6d01b..9ef879e7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.cpp
@@ -101,7 +101,10 @@
   TestSpecialOperationsNotEnumerableV8Internal::indexedPropertyGetter(index, info);
 }
 
-static void installV8TestSpecialOperationsNotEnumerableTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestSpecialOperationsNotEnumerableTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestSpecialOperationsNotEnumerable::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestSpecialOperationsNotEnumerable::internalFieldCount);
 
@@ -112,7 +115,7 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestSpecialOperationsNotEnumerable::indexedPropertyGetterCallback, nullptr, nullptr, nullptr, nullptr, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -120,8 +123,30 @@
   // Named properties
   v8::NamedPropertyHandlerConfiguration namedPropertyHandlerConfig(V8TestSpecialOperationsNotEnumerable::namedPropertyGetterCallback, nullptr, nullptr, nullptr, nullptr, v8::Local<v8::Value>(), static_cast<v8::PropertyHandlerFlags>(int(v8::PropertyHandlerFlags::kOnlyInterceptStrings) | int(v8::PropertyHandlerFlags::kNonMasking)));
   instanceTemplate->SetHandler(namedPropertyHandlerConfig);
+
+  // Custom signature
+
+  V8TestSpecialOperationsNotEnumerable::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestSpecialOperationsNotEnumerable::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestSpecialOperationsNotEnumerable::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestSpecialOperationsNotEnumerableTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h
index 7eef849..2e58dfe 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestSpecialOperationsNotEnumerable.h
@@ -48,6 +48,11 @@
 
   CORE_EXPORT static void namedPropertyGetterCallback(v8::Local<v8::Name>, const v8::PropertyCallbackInfo<v8::Value>&);
   CORE_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 8d2a210..b39256c 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.cpp
@@ -512,7 +512,10 @@
   TestTypedefsV8Internal::constructor(info);
 }
 
-static void installV8TestTypedefsTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestTypedefsTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestTypedefs::wrapperTypeInfo.interface_name, v8::Local<v8::FunctionTemplate>(), V8TestTypedefs::internalFieldCount);
   interfaceTemplate->SetCallHandler(V8TestTypedefs::constructorCallback);
@@ -525,12 +528,40 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestTypedefsLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsLazyDataAttributes));
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestTypedefsAccessors, WTF_ARRAY_LENGTH(V8TestTypedefsAccessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallLazyDataAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestTypedefsLazyDataAttributes, WTF_ARRAY_LENGTH(V8TestTypedefsLazyDataAttributes));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestTypedefsAccessors, WTF_ARRAY_LENGTH(V8TestTypedefsAccessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestTypedefsMethods, WTF_ARRAY_LENGTH(V8TestTypedefsMethods));
+
+  // Custom signature
+
+  V8TestTypedefs::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestTypedefs::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestTypedefs::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestTypedefsTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.h b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.h
index 0f55d20..9c0c9e03 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.h
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestTypedefs.h
@@ -71,6 +71,11 @@
   CORE_EXPORT static void methodThatReturnsRecordMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void voidMethodNestedUnionTypeMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   CORE_EXPORT static void voidMethodUnionWithTypedefMethodCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
index 1a679d0..9b6e6b7 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8Uint8ClampedArray.cpp
@@ -58,6 +58,7 @@
     "[ActiveScriptWrappable] extended attribute in the IDL file.  "
     "Be consistent.");
 
+#line 759 "interface_base.cpp.tmpl"
 TestUint8ClampedArray* V8Uint8ClampedArray::toImpl(v8::Local<v8::Object> object) {
   DCHECK(object->IsUint8ClampedArray());
   ScriptWrappable* scriptWrappable = ToScriptWrappable(object);
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 58d2e44..921cb23 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.cpp
@@ -74,7 +74,10 @@
     {"voidMethodPartial2", V8TestInterface2Partial::voidMethodPartial2MethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-void V8TestInterface2Partial::installV8TestInterface2Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+void V8TestInterface2Partial::installV8TestInterface2Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8TestInterface2::installV8TestInterface2Template(isolate, world, interfaceTemplate);
 
@@ -85,23 +88,50 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface2Methods, WTF_ARRAY_LENGTH(V8TestInterface2Methods));
 
+  // Custom signature
+
+  V8TestInterface2Partial::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
+}
+
+void V8TestInterface2Partial::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  V8TestInterface2::InstallRuntimeEnabledFeaturesOnTemplate(isolate, world, interface_template);
+
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
   if (RuntimeEnabledFeatures::Interface2PartialFeatureNameEnabled()) {
     const V8DOMConfiguration::MethodConfiguration voidMethodPartial1MethodConfiguration[] = {
       {"voidMethodPartial1", V8TestInterface2Partial::voidMethodPartial1MethodCallback, 1, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds}
     };
     for (const auto& methodConfig : voidMethodPartial1MethodConfiguration)
-      V8DOMConfiguration::InstallMethod(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, methodConfig);
+      V8DOMConfiguration::InstallMethod(isolate, world, instance_template, prototype_template, interface_template, signature, methodConfig);
   }
 }
 
+#line 759 "interface_base.cpp.tmpl"
+
 void V8TestInterface2Partial::initialize() {
   // Should be invoked from ModulesInitializer.
-  V8TestInterface2::updateWrapperTypeInfo(
+  V8TestInterface2::UpdateWrapperTypeInfo(
       &V8TestInterface2Partial::installV8TestInterface2Template,
       nullptr,
+      &V8TestInterface2Partial::InstallRuntimeEnabledFeaturesOnTemplate,
       nullptr);
 }
 
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.h b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.h
index dba519c..6321a27 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.h
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface2Partial.h
@@ -29,6 +29,11 @@
  public:
   static void initialize();
 
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
+
   // Callback functions
 
   static void voidMethodPartial1MethodCallback(const v8::FunctionCallbackInfo<v8::Value>& info);
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 50e05e6..fc77079 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.cpp
@@ -855,7 +855,10 @@
     {"toString", V8TestInterface5::toStringMethodCallback, 0, static_cast<v8::PropertyAttribute>(v8::DontEnum), V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-static void installV8TestInterface5Template(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestInterface5Template(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestInterface5::wrapperTypeInfo.interface_name, V8TestInterfaceEmpty::domTemplate(isolate, world), V8TestInterface5::internalFieldCount);
 
@@ -870,15 +873,23 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   const V8DOMConfiguration::ConstantConfiguration V8TestInterface5Constants[] = {
       {"UNSIGNED_LONG", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedLong},
       {"CONST_JAVASCRIPT", 1, 0, V8DOMConfiguration::kConstantTypeShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
-  V8DOMConfiguration::InstallLazyDataAttributes(isolate, world, instanceTemplate, prototypeTemplate, V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterface5LazyDataAttributes));
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessors));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestInterface5Constants, WTF_ARRAY_LENGTH(V8TestInterface5Constants));
+  V8DOMConfiguration::InstallLazyDataAttributes(
+      isolate, world, instanceTemplate, prototypeTemplate,
+      V8TestInterface5LazyDataAttributes, WTF_ARRAY_LENGTH(V8TestInterface5LazyDataAttributes));
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface5Accessors, WTF_ARRAY_LENGTH(V8TestInterface5Accessors));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterface5Methods, WTF_ARRAY_LENGTH(V8TestInterface5Methods));
 
   // Indexed properties
   v8::IndexedPropertyHandlerConfiguration indexedPropertyHandlerConfig(V8TestInterface5::indexedPropertyGetterCallback, V8TestInterface5::indexedPropertySetterCallback, nullptr, V8TestInterface5::indexedPropertyDeleterCallback, IndexedPropertyEnumerator<TestInterface5Implementation>, v8::Local<v8::Value>(), v8::PropertyHandlerFlags::kNone);
@@ -897,8 +908,34 @@
   prototypeTemplate->SetIntrinsicDataProperty(V8AtomicString(isolate, "values"), v8::kArrayProto_values);
 
   instanceTemplate->SetCallAsFunctionHandler(V8TestInterface5::legacyCallCustom);
+
+  // Custom signature
+
+  V8TestInterface5::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterface5::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  if (!RuntimeEnabledFeatures::FeatureNameEnabled()) {
+    return;
+  }
+
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestInterface5::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestInterface5Template);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h
index 631b336..80019b5 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterface5.h
@@ -97,6 +97,11 @@
   MODULES_EXPORT static void indexedPropertyGetterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Value>&);
   MODULES_EXPORT static void indexedPropertySetterCallback(uint32_t index, v8::Local<v8::Value>, const v8::PropertyCallbackInfo<v8::Value>&);
   MODULES_EXPORT static void indexedPropertyDeleterCallback(uint32_t index, const v8::PropertyCallbackInfo<v8::Boolean>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
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 1724905f..a63c6d0 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.cpp
@@ -429,7 +429,10 @@
     {"unionWithTypedefMethod", V8TestInterfacePartial::unionWithTypedefMethodMethodCallback, 0, v8::None, V8DOMConfiguration::kOnPrototype, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kDoNotCheckAccess, V8DOMConfiguration::kAllWorlds},
 };
 
-void V8TestInterfacePartial::installV8TestInterfaceTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+void V8TestInterfacePartial::installV8TestInterfaceTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8TestInterface::installV8TestInterfaceTemplate(isolate, world, interfaceTemplate);
 
@@ -440,14 +443,42 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
+  // Register IDL constants, attributes and operations.
   const V8DOMConfiguration::ConstantConfiguration V8TestInterfaceConstants[] = {
       {"PARTIAL3_UNSIGNED_SHORT", 0, 0, V8DOMConfiguration::kConstantTypeUnsignedShort},
   };
-  V8DOMConfiguration::InstallConstants(isolate, interfaceTemplate, prototypeTemplate, V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
-  V8DOMConfiguration::InstallMethods(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
+  V8DOMConfiguration::InstallConstants(
+      isolate, interfaceTemplate, prototypeTemplate,
+      V8TestInterfaceConstants, WTF_ARRAY_LENGTH(V8TestInterfaceConstants));
+  V8DOMConfiguration::InstallMethods(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestInterfaceMethods, WTF_ARRAY_LENGTH(V8TestInterfaceMethods));
+
+  // Custom signature
+
+  V8TestInterfacePartial::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestInterfacePartial::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  V8TestInterface::InstallRuntimeEnabledFeaturesOnTemplate(isolate, world, interface_template);
+
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 void V8TestInterfacePartial::installOriginTrialPartialFeature(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface) {
   v8::Local<v8::FunctionTemplate> interfaceTemplate = V8TestInterface::wrapperTypeInfo.domTemplate(isolate, world);
   v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interfaceTemplate);
@@ -505,9 +536,10 @@
 
 void V8TestInterfacePartial::initialize() {
   // Should be invoked from ModulesInitializer.
-  V8TestInterface::updateWrapperTypeInfo(
+  V8TestInterface::UpdateWrapperTypeInfo(
       &V8TestInterfacePartial::installV8TestInterfaceTemplate,
       nullptr,
+      &V8TestInterfacePartial::InstallRuntimeEnabledFeaturesOnTemplate,
       V8TestInterfacePartial::preparePrototypeAndInterfaceObject);
   V8TestInterface::registerVoidMethodPartialOverloadMethodForPartialInterface(&TestInterfaceImplementationPartialV8Internal::voidMethodPartialOverloadMethod);
   V8TestInterface::registerStaticVoidMethodPartialOverloadMethodForPartialInterface(&TestInterfaceImplementationPartialV8Internal::staticVoidMethodPartialOverloadMethod);
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h
index f2e4717a..110f27e1 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestInterfacePartial.h
@@ -38,6 +38,11 @@
   static void installOriginTrialPartialFeature(v8::Isolate*, const DOMWrapperWorld&, v8::Local<v8::Object> instance, v8::Local<v8::Object> prototype, v8::Local<v8::Function> interface);
   static void installOriginTrialPartialFeature(ScriptState*);
 
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
+
   // Callback functions
   static void partial4LongAttributeAttributeGetterCallback(    const v8::FunctionCallbackInfo<v8::Value>& info);
   static void partial4LongAttributeAttributeSetterCallback(    const v8::FunctionCallbackInfo<v8::Value>& info);
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp
index 55df9f4..13a25ff 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.cpp
@@ -145,7 +145,10 @@
     { "unforgeableLongAttribute", V8TestSubObject::unforgeableLongAttributeAttributeGetterCallback, V8TestSubObject::unforgeableLongAttributeAttributeSetterCallback, nullptr, nullptr, static_cast<v8::PropertyAttribute>(v8::DontDelete), V8DOMConfiguration::kOnInstance, V8DOMConfiguration::kCheckHolder, V8DOMConfiguration::kAllWorlds },
 };
 
-static void installV8TestSubObjectTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world, v8::Local<v8::FunctionTemplate> interfaceTemplate) {
+static void installV8TestSubObjectTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interfaceTemplate) {
   // Initialize the interface object's template.
   V8DOMConfiguration::InitializeDOMInterfaceTemplate(isolate, interfaceTemplate, V8TestSubObject::wrapperTypeInfo.interface_name, V8TestObject::domTemplate(isolate, world), V8TestSubObject::internalFieldCount);
 
@@ -156,10 +159,34 @@
   v8::Local<v8::ObjectTemplate> prototypeTemplate = interfaceTemplate->PrototypeTemplate();
   ALLOW_UNUSED_LOCAL(prototypeTemplate);
 
-  // Register DOM constants, attributes and operations.
-  V8DOMConfiguration::InstallAccessors(isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate, signature, V8TestSubObjectAccessors, WTF_ARRAY_LENGTH(V8TestSubObjectAccessors));
+  // Register IDL constants, attributes and operations.
+  V8DOMConfiguration::InstallAccessors(
+      isolate, world, instanceTemplate, prototypeTemplate, interfaceTemplate,
+      signature, V8TestSubObjectAccessors, WTF_ARRAY_LENGTH(V8TestSubObjectAccessors));
+
+  // Custom signature
+
+  V8TestSubObject::InstallRuntimeEnabledFeaturesOnTemplate(
+      isolate, world, interfaceTemplate);
 }
 
+void V8TestSubObject::InstallRuntimeEnabledFeaturesOnTemplate(
+    v8::Isolate* isolate,
+    const DOMWrapperWorld& world,
+    v8::Local<v8::FunctionTemplate> interface_template) {
+  v8::Local<v8::Signature> signature = v8::Signature::New(isolate, interface_template);
+  ALLOW_UNUSED_LOCAL(signature);
+  v8::Local<v8::ObjectTemplate> instance_template = interface_template->InstanceTemplate();
+  ALLOW_UNUSED_LOCAL(instance_template);
+  v8::Local<v8::ObjectTemplate> prototype_template = interface_template->PrototypeTemplate();
+  ALLOW_UNUSED_LOCAL(prototype_template);
+
+  // Register IDL constants, attributes and operations.
+
+  // Custom signature
+}
+
+#line 759 "interface_base.cpp.tmpl"
 v8::Local<v8::FunctionTemplate> V8TestSubObject::domTemplate(v8::Isolate* isolate, const DOMWrapperWorld& world) {
   return V8DOMConfiguration::DomClassTemplate(isolate, world, const_cast<WrapperTypeInfo*>(&wrapperTypeInfo), installV8TestSubObjectTemplate);
 }
diff --git a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.h b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.h
index ee71d1e..4f88078 100644
--- a/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.h
+++ b/third_party/WebKit/Source/bindings/tests/results/modules/V8TestSubObject.h
@@ -51,6 +51,11 @@
   MODULES_EXPORT static void unforgeableStringAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   MODULES_EXPORT static void unforgeableLongAttributeAttributeGetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
   MODULES_EXPORT static void unforgeableLongAttributeAttributeSetterCallback(const v8::FunctionCallbackInfo<v8::Value>&);
+
+  static void InstallRuntimeEnabledFeaturesOnTemplate(
+      v8::Isolate*,
+      const DOMWrapperWorld&,
+      v8::Local<v8::FunctionTemplate> interface_template);
 };
 
 template <>
diff --git a/third_party/WebKit/Source/core/BUILD.gn b/third_party/WebKit/Source/core/BUILD.gn
index 3d311f2..55a12436 100644
--- a/third_party/WebKit/Source/core/BUILD.gn
+++ b/third_party/WebKit/Source/core/BUILD.gn
@@ -1389,14 +1389,17 @@
     "layout/PaginationTest.cpp",
     "layout/PaintContainmentTest.cpp",
     "layout/ScrollAnchorTest.cpp",
+    "layout/ScrollbarsTest.cpp",
     "layout/TextAutosizerTest.cpp",
     "layout/VisualRectMappingTest.cpp",
     "layout/api/SelectionStateTest.cpp",
     "layout/compositing/CompositedLayerMappingTest.cpp",
     "layout/compositing/CompositingReasonFinderTest.cpp",
+    "layout/compositing/CompositorWorkerTest.cpp",
     "layout/compositing/PaintLayerCompositorTest.cpp",
     "layout/line/InlineBoxTest.cpp",
     "layout/line/InlineTextBoxTest.cpp",
+    "layout/ng/NGInlineLayoutTest.cpp",
     "layout/ng/geometry/ng_box_strut_test.cc",
     "layout/ng/geometry/ng_logical_offset_test.cc",
     "layout/ng/geometry/ng_physical_rect_test.cc",
diff --git a/third_party/WebKit/Source/core/animation/CSSAngleInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSAngleInterpolationType.h
index e64bd6f..4bff958 100644
--- a/third_party/WebKit/Source/core/animation/CSSAngleInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSAngleInterpolationType.h
@@ -11,8 +11,9 @@
 
 class CSSAngleInterpolationType : public CSSInterpolationType {
  public:
-  CSSAngleInterpolationType(PropertyHandle property)
-      : CSSInterpolationType(property) {
+  CSSAngleInterpolationType(PropertyHandle property,
+                            const PropertyRegistration* registration = nullptr)
+      : CSSInterpolationType(property, registration) {
     DCHECK(property.IsCSSCustomProperty());
   }
 
diff --git a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.h
index 85b7156..57ba743 100644
--- a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.h
@@ -17,8 +17,9 @@
 
 class CSSColorInterpolationType : public CSSInterpolationType {
  public:
-  CSSColorInterpolationType(PropertyHandle property)
-      : CSSInterpolationType(property) {}
+  CSSColorInterpolationType(PropertyHandle property,
+                            const PropertyRegistration* registration = nullptr)
+      : CSSInterpolationType(property, registration) {}
 
   InterpolationValue MaybeConvertStandardPropertyUnderlyingValue(
       const ComputedStyle&) const final;
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
index 39e3dffa..2df52759 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationType.cpp
@@ -97,18 +97,13 @@
   Persistent<const CSSValue> initial_value_;
 };
 
-CSSInterpolationType::CSSInterpolationType(PropertyHandle property)
-    : InterpolationType(property) {
+CSSInterpolationType::CSSInterpolationType(
+    PropertyHandle property,
+    const PropertyRegistration* registration)
+    : InterpolationType(property), registration_(registration) {
   DCHECK(!isShorthandProperty(CssProperty()));
 }
 
-void CSSInterpolationType::SetCustomPropertyRegistration(
-    const PropertyRegistration& registration) {
-  DCHECK(GetProperty().IsCSSCustomProperty());
-  DCHECK(!registration_);
-  registration_ = &registration;
-}
-
 InterpolationValue CSSInterpolationType::MaybeConvertSingle(
     const PropertySpecificKeyframe& keyframe,
     const InterpolationEnvironment& environment,
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSInterpolationType.h
index c2eb7df..17e9287 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationType.h
@@ -17,8 +17,6 @@
 
 class CSSInterpolationType : public InterpolationType {
  public:
-  void SetCustomPropertyRegistration(const PropertyRegistration&);
-
   class CSSConversionChecker : public ConversionChecker {
    public:
     bool IsValid(const InterpolationEnvironment& environment,
@@ -33,7 +31,7 @@
   };
 
  protected:
-  CSSInterpolationType(PropertyHandle);
+  CSSInterpolationType(PropertyHandle, const PropertyRegistration* = nullptr);
 
   CSSPropertyID CssProperty() const { return GetProperty().CssProperty(); }
 
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.cpp b/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.cpp
index 9800ae64..1e55ba3 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.cpp
@@ -335,12 +335,13 @@
   return registry_ ? registry_->RegistrationCount() : 0;
 }
 
-CSSInterpolationTypes
-CSSInterpolationTypesMap::CreateCSSInterpolationTypesForSyntax(
+InterpolationTypes
+CSSInterpolationTypesMap::CreateInterpolationTypesForCSSSyntax(
     const AtomicString& property_name,
-    const CSSSyntaxDescriptor& descriptor) {
+    const CSSSyntaxDescriptor& descriptor,
+    const PropertyRegistration& registration) {
   PropertyHandle property(property_name);
-  CSSInterpolationTypes result;
+  InterpolationTypes result;
   for (const CSSSyntaxComponent& component : descriptor.Components()) {
     if (component.repeatable_) {
       // TODO(alancutter): Support animation of repeatable types.
@@ -349,25 +350,30 @@
 
     switch (component.type_) {
       case CSSSyntaxType::kAngle:
-        result.push_back(WTF::MakeUnique<CSSAngleInterpolationType>(property));
+        result.push_back(WTF::MakeUnique<CSSAngleInterpolationType>(
+            property, &registration));
         break;
       case CSSSyntaxType::kColor:
-        result.push_back(WTF::MakeUnique<CSSColorInterpolationType>(property));
+        result.push_back(WTF::MakeUnique<CSSColorInterpolationType>(
+            property, &registration));
         break;
       case CSSSyntaxType::kLength:
       case CSSSyntaxType::kLengthPercentage:
       case CSSSyntaxType::kPercentage:
-        result.push_back(WTF::MakeUnique<CSSLengthInterpolationType>(property));
+        result.push_back(WTF::MakeUnique<CSSLengthInterpolationType>(
+            property, &registration));
         break;
       case CSSSyntaxType::kNumber:
-        result.push_back(WTF::MakeUnique<CSSNumberInterpolationType>(property));
+        result.push_back(WTF::MakeUnique<CSSNumberInterpolationType>(
+            property, &registration));
         break;
       case CSSSyntaxType::kResolution:
-        result.push_back(
-            WTF::MakeUnique<CSSResolutionInterpolationType>(property));
+        result.push_back(WTF::MakeUnique<CSSResolutionInterpolationType>(
+            property, &registration));
         break;
       case CSSSyntaxType::kTime:
-        result.push_back(WTF::MakeUnique<CSSTimeInterpolationType>(property));
+        result.push_back(
+            WTF::MakeUnique<CSSTimeInterpolationType>(property, &registration));
         break;
       case CSSSyntaxType::kImage:
       case CSSSyntaxType::kUrl:
diff --git a/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.h b/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.h
index 22d3f0f..a1ea2c4 100644
--- a/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.h
+++ b/third_party/WebKit/Source/core/animation/CSSInterpolationTypesMap.h
@@ -14,8 +14,6 @@
 class CSSSyntaxDescriptor;
 class PropertyRegistry;
 
-using CSSInterpolationTypes = Vector<std::unique_ptr<CSSInterpolationType>>;
-
 class CSSInterpolationTypesMap : public InterpolationTypesMap {
  public:
   CSSInterpolationTypesMap(const PropertyRegistry* registry)
@@ -24,9 +22,10 @@
   const InterpolationTypes& Get(const PropertyHandle&) const final;
   size_t Version() const final;
 
-  static CSSInterpolationTypes CreateCSSInterpolationTypesForSyntax(
+  static InterpolationTypes CreateInterpolationTypesForCSSSyntax(
       const AtomicString& property_name,
-      const CSSSyntaxDescriptor&);
+      const CSSSyntaxDescriptor&,
+      const PropertyRegistration&);
 
  private:
   Member<const PropertyRegistry> registry_;
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
index eb48d47..5d95404 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
@@ -17,8 +17,10 @@
 
 namespace blink {
 
-CSSLengthInterpolationType::CSSLengthInterpolationType(PropertyHandle property)
-    : CSSInterpolationType(property),
+CSSLengthInterpolationType::CSSLengthInterpolationType(
+    PropertyHandle property,
+    const PropertyRegistration* registration)
+    : CSSInterpolationType(property, registration),
       value_range_(LengthPropertyFunctions::GetValueRange(CssProperty())) {}
 
 float CSSLengthInterpolationType::EffectiveZoom(
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h
index 61f00e6..f4cfd2a 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.h
@@ -15,7 +15,8 @@
 
 class CSSLengthInterpolationType : public CSSInterpolationType {
  public:
-  CSSLengthInterpolationType(PropertyHandle);
+  CSSLengthInterpolationType(PropertyHandle,
+                             const PropertyRegistration* = nullptr);
 
   InterpolationValue MaybeConvertStandardPropertyUnderlyingValue(
       const ComputedStyle&) const final;
diff --git a/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.h
index b3d754d..99c40755a 100644
--- a/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSNumberInterpolationType.h
@@ -11,8 +11,9 @@
 
 class CSSNumberInterpolationType : public CSSInterpolationType {
  public:
-  CSSNumberInterpolationType(PropertyHandle property)
-      : CSSInterpolationType(property) {}
+  CSSNumberInterpolationType(PropertyHandle property,
+                             const PropertyRegistration* registration = nullptr)
+      : CSSInterpolationType(property, registration) {}
 
   InterpolationValue MaybeConvertStandardPropertyUnderlyingValue(
       const ComputedStyle&) const final;
diff --git a/third_party/WebKit/Source/core/animation/CSSResolutionInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSResolutionInterpolationType.h
index 4a784112..0ef5118 100644
--- a/third_party/WebKit/Source/core/animation/CSSResolutionInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSResolutionInterpolationType.h
@@ -11,8 +11,10 @@
 
 class CSSResolutionInterpolationType : public CSSInterpolationType {
  public:
-  CSSResolutionInterpolationType(PropertyHandle property)
-      : CSSInterpolationType(property) {
+  CSSResolutionInterpolationType(
+      PropertyHandle property,
+      const PropertyRegistration* registration = nullptr)
+      : CSSInterpolationType(property, registration) {
     DCHECK(property.IsCSSCustomProperty());
   }
 
diff --git a/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h
index b4807a49..33a8ea5 100644
--- a/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSTimeInterpolationType.h
@@ -11,8 +11,9 @@
 
 class CSSTimeInterpolationType : public CSSInterpolationType {
  public:
-  CSSTimeInterpolationType(PropertyHandle property)
-      : CSSInterpolationType(property) {
+  CSSTimeInterpolationType(PropertyHandle property,
+                           const PropertyRegistration* registration = nullptr)
+      : CSSInterpolationType(property, registration) {
     DCHECK(property.IsCSSCustomProperty());
   }
 
diff --git a/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.h b/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.h
index 05fbb02c..acc45cb 100644
--- a/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.h
+++ b/third_party/WebKit/Source/core/animation/CSSValueInterpolationType.h
@@ -13,8 +13,9 @@
 // A catch all for default for CSSValues.
 class CSSValueInterpolationType : public CSSInterpolationType {
  public:
-  CSSValueInterpolationType(PropertyHandle property)
-      : CSSInterpolationType(property) {}
+  CSSValueInterpolationType(PropertyHandle property,
+                            const PropertyRegistration* registration = nullptr)
+      : CSSInterpolationType(property, registration) {}
 
   PairwiseInterpolationValue MaybeConvertPairwise(
       const PropertySpecificKeyframe& start_keyframe,
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
index b7a75bb7..3e4ad4c 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
+++ b/third_party/WebKit/Source/core/css/PropertyRegistration.cpp
@@ -22,30 +22,21 @@
 
 namespace blink {
 
-static InterpolationTypes SetRegistrationOnCSSInterpolationTypes(
-    CSSInterpolationTypes css_interpolation_types,
-    const PropertyRegistration& registration) {
-  InterpolationTypes result;
-  for (auto& css_interpolation_type : css_interpolation_types) {
-    css_interpolation_type->SetCustomPropertyRegistration(registration);
-    result.push_back(std::move(css_interpolation_type));
-  }
-  return result;
-}
-
 PropertyRegistration::PropertyRegistration(
+    const AtomicString& name,
     const CSSSyntaxDescriptor& syntax,
     bool inherits,
     const CSSValue* initial,
-    PassRefPtr<CSSVariableData> initial_variable_data,
-    CSSInterpolationTypes css_interpolation_types)
+    PassRefPtr<CSSVariableData> initial_variable_data)
     : syntax_(syntax),
       inherits_(inherits),
       initial_(initial),
       initial_variable_data_(std::move(initial_variable_data)),
-      interpolation_types_(SetRegistrationOnCSSInterpolationTypes(
-          std::move(css_interpolation_types),
-          *this)) {}
+      interpolation_types_(
+          CSSInterpolationTypesMap::CreateInterpolationTypesForCSSSyntax(
+              name,
+              syntax,
+              *this)) {}
 
 static bool ComputationallyIndependent(const CSSValue& value) {
   DCHECK(!value.IsCSSWideKeyword());
@@ -119,14 +110,12 @@
     return;
   }
 
-  CSSInterpolationTypes css_interpolation_types =
-      CSSInterpolationTypesMap::CreateCSSInterpolationTypesForSyntax(
-          atomic_name, syntax_descriptor);
-
+  const CSSValue* initial = nullptr;
+  RefPtr<CSSVariableData> initial_variable_data;
   if (descriptor.hasInitialValue()) {
     CSSTokenizer tokenizer(descriptor.initialValue());
     bool is_animation_tainted = false;
-    const CSSValue* initial = syntax_descriptor.Parse(
+    initial = syntax_descriptor.Parse(
         tokenizer.TokenRange(),
         document->ElementSheet().Contents()->ParserContext(),
         is_animation_tainted);
@@ -144,11 +133,8 @@
     }
     initial =
         &StyleBuilderConverter::ConvertRegisteredPropertyInitialValue(*initial);
-    RefPtr<CSSVariableData> initial_variable_data = CSSVariableData::Create(
+    initial_variable_data = CSSVariableData::Create(
         tokenizer.TokenRange(), is_animation_tainted, false);
-    registry.RegisterProperty(
-        atomic_name, syntax_descriptor, descriptor.inherits(), initial,
-        std::move(initial_variable_data), std::move(css_interpolation_types));
   } else {
     if (!syntax_descriptor.IsTokenStream()) {
       exception_state.ThrowDOMException(
@@ -156,10 +142,11 @@
           "An initial value must be provided if the syntax is not '*'");
       return;
     }
-    registry.RegisterProperty(atomic_name, syntax_descriptor,
-                              descriptor.inherits(), nullptr, nullptr,
-                              std::move(css_interpolation_types));
   }
+  registry.RegisterProperty(
+      atomic_name, *new PropertyRegistration(atomic_name, syntax_descriptor,
+                                             descriptor.inherits(), initial,
+                                             std::move(initial_variable_data)));
 
   // TODO(timloh): Invalidate only elements with this custom property set
   document->SetNeedsStyleRecalc(kSubtreeStyleChange,
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistration.h b/third_party/WebKit/Source/core/css/PropertyRegistration.h
index b2bdac9..04e1d7c 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistration.h
+++ b/third_party/WebKit/Source/core/css/PropertyRegistration.h
@@ -29,12 +29,6 @@
                                const PropertyDescriptor&,
                                ExceptionState&);
 
-  PropertyRegistration(const CSSSyntaxDescriptor&,
-                       bool inherits,
-                       const CSSValue* initial,
-                       PassRefPtr<CSSVariableData> initial_variable_data,
-                       CSSInterpolationTypes);
-
   const CSSSyntaxDescriptor& Syntax() const { return syntax_; }
   bool Inherits() const { return inherits_; }
   const CSSValue* Initial() const { return initial_; }
@@ -48,6 +42,12 @@
   DEFINE_INLINE_TRACE() { visitor->Trace(initial_); }
 
  private:
+  PropertyRegistration(const AtomicString& name,
+                       const CSSSyntaxDescriptor&,
+                       bool inherits,
+                       const CSSValue* initial,
+                       PassRefPtr<CSSVariableData> initial_variable_data);
+
   const CSSSyntaxDescriptor syntax_;
   const bool inherits_;
   const Member<const CSSValue> initial_;
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistry.cpp b/third_party/WebKit/Source/core/css/PropertyRegistry.cpp
index 4574d39..6132e71 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistry.cpp
+++ b/third_party/WebKit/Source/core/css/PropertyRegistry.cpp
@@ -6,18 +6,10 @@
 
 namespace blink {
 
-void PropertyRegistry::RegisterProperty(
-    const AtomicString& name,
-    const CSSSyntaxDescriptor& syntax,
-    bool inherits,
-    const CSSValue* initial,
-    PassRefPtr<CSSVariableData> initial_variable_data,
-    CSSInterpolationTypes css_interpolation_types) {
+void PropertyRegistry::RegisterProperty(const AtomicString& name,
+                                        PropertyRegistration& registration) {
   DCHECK(!Registration(name));
-  registrations_.Set(
-      name, new PropertyRegistration(syntax, inherits, initial,
-                                     std::move(initial_variable_data),
-                                     std::move(css_interpolation_types)));
+  registrations_.Set(name, &registration);
 }
 
 const PropertyRegistration* PropertyRegistry::Registration(
diff --git a/third_party/WebKit/Source/core/css/PropertyRegistry.h b/third_party/WebKit/Source/core/css/PropertyRegistry.h
index c4e26d8b..d2bc4c9 100644
--- a/third_party/WebKit/Source/core/css/PropertyRegistry.h
+++ b/third_party/WebKit/Source/core/css/PropertyRegistry.h
@@ -15,12 +15,7 @@
  public:
   static PropertyRegistry* Create() { return new PropertyRegistry(); }
 
-  void RegisterProperty(const AtomicString&,
-                        const CSSSyntaxDescriptor&,
-                        bool inherits,
-                        const CSSValue* initial,
-                        PassRefPtr<CSSVariableData> initial_variable_data,
-                        CSSInterpolationTypes);
+  void RegisterProperty(const AtomicString&, PropertyRegistration&);
   const PropertyRegistration* Registration(const AtomicString&) const;
   size_t RegistrationCount() const { return registrations_.size(); }
 
diff --git a/third_party/WebKit/Source/core/dom/MockScriptElementBase.h b/third_party/WebKit/Source/core/dom/MockScriptElementBase.h
index 7d133b68..f913a63c 100644
--- a/third_party/WebKit/Source/core/dom/MockScriptElementBase.h
+++ b/third_party/WebKit/Source/core/dom/MockScriptElementBase.h
@@ -18,6 +18,7 @@
   static MockScriptElementBase* Create() {
     return new testing::StrictMock<MockScriptElementBase>();
   }
+  virtual ~MockScriptElementBase() {}
 
   MOCK_METHOD0(DispatchLoadEvent, void());
   MOCK_METHOD0(DispatchErrorEvent, void());
@@ -47,6 +48,7 @@
   MOCK_CONST_METHOD0(GetDocument, Document&());
   MOCK_METHOD1(SetScriptElementForBinding,
                void(HTMLScriptElementOrSVGScriptElement&));
+  MOCK_CONST_METHOD0(Loader, ScriptLoader*());
 
   DEFINE_INLINE_VIRTUAL_TRACE() { ScriptElementBase::Trace(visitor); }
 };
diff --git a/third_party/WebKit/Source/core/dom/Modulator.h b/third_party/WebKit/Source/core/dom/Modulator.h
index 8c62b81..a76fb29 100644
--- a/third_party/WebKit/Source/core/dom/Modulator.h
+++ b/third_party/WebKit/Source/core/dom/Modulator.h
@@ -32,15 +32,25 @@
 // A SingleModuleClient is notified when single module script node (node as in a
 // module tree graph) load is complete and its corresponding entry is created in
 // module map.
-class CORE_EXPORT SingleModuleClient : public GarbageCollectedMixin {
+class CORE_EXPORT SingleModuleClient
+    : public GarbageCollectedFinalized<SingleModuleClient>,
+      public TraceWrapperBase {
  public:
+  virtual ~SingleModuleClient() = default;
+  DEFINE_INLINE_VIRTUAL_TRACE() {}
+
   virtual void NotifyModuleLoadFinished(ModuleScript*) = 0;
 };
 
 // A ModuleTreeClient is notified when a module script and its whole descendent
 // tree load is complete.
-class CORE_EXPORT ModuleTreeClient : public GarbageCollectedMixin {
+class CORE_EXPORT ModuleTreeClient
+    : public GarbageCollectedFinalized<ModuleTreeClient>,
+      public TraceWrapperBase {
  public:
+  virtual ~ModuleTreeClient() = default;
+  DEFINE_INLINE_VIRTUAL_TRACE() {}
+
   virtual void NotifyModuleTreeLoadFinished(ModuleScript*) = 0;
 };
 
diff --git a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
index 1867afb..a250caa 100644
--- a/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
+++ b/third_party/WebKit/Source/core/dom/ModulatorImpl.cpp
@@ -30,7 +30,7 @@
       fetcher_(fetcher),
       map_(this, ModuleMap::Create(this)),
       loader_registry_(ModuleScriptLoaderRegistry::Create()),
-      tree_linker_registry_(ModuleTreeLinkerRegistry::Create()),
+      tree_linker_registry_(this, ModuleTreeLinkerRegistry::Create()),
       script_module_resolver_(ScriptModuleResolverImpl::Create(
           this,
           ExecutionContext::From(script_state_.Get()))) {
@@ -185,9 +185,7 @@
 
   // Step 3. "If s is errored, then report the exception given by s's error for
   // s and abort these steps." [spec text]
-  // TODO(kouhei): Update "is errored".
-  ModuleInstantiationState instantiationState = module_script->State();
-  if (instantiationState == ModuleInstantiationState::kErrored) {
+  if (module_script->IsErrored()) {
     v8::Isolate* isolate = script_state_->GetIsolate();
     ScriptModule::ReportException(
         script_state_.Get(), module_script->CreateErrorInternal(isolate),
@@ -221,6 +219,7 @@
 
 DEFINE_TRACE_WRAPPERS(ModulatorImpl) {
   visitor->TraceWrappers(map_);
+  visitor->TraceWrappers(tree_linker_registry_);
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ModulatorImpl.h b/third_party/WebKit/Source/core/dom/ModulatorImpl.h
index ae97b35f..f431f43 100644
--- a/third_party/WebKit/Source/core/dom/ModulatorImpl.h
+++ b/third_party/WebKit/Source/core/dom/ModulatorImpl.h
@@ -79,7 +79,7 @@
   Member<ResourceFetcher> fetcher_;
   TraceWrapperMember<ModuleMap> map_;
   Member<ModuleScriptLoaderRegistry> loader_registry_;
-  Member<ModuleTreeLinkerRegistry> tree_linker_registry_;
+  TraceWrapperMember<ModuleTreeLinkerRegistry> tree_linker_registry_;
   Member<ScriptModuleResolver> script_module_resolver_;
 };
 
diff --git a/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp b/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
index 1492bfc..8848834 100644
--- a/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleMapTest.cpp
@@ -21,16 +21,15 @@
 
 namespace {
 
-class TestSingleModuleClient final
-    : public GarbageCollectedFinalized<TestSingleModuleClient>,
-      public SingleModuleClient {
-  USING_GARBAGE_COLLECTED_MIXIN(TestSingleModuleClient);
-
+class TestSingleModuleClient final : public SingleModuleClient {
  public:
   TestSingleModuleClient() = default;
   virtual ~TestSingleModuleClient() {}
 
-  DEFINE_INLINE_TRACE() { visitor->Trace(module_script_); }
+  DEFINE_INLINE_TRACE() {
+    visitor->Trace(module_script_);
+    SingleModuleClient::Trace(visitor);
+  }
 
   void NotifyModuleLoadFinished(ModuleScript* module_script) override {
     was_notify_finished_ = true;
@@ -57,6 +56,10 @@
     register_module_script_call_count_++;
   }
 
+  void UnregisterModuleScript(ModuleScript*) override {
+    FAIL() << "UnregisterModuleScript shouldn't be called in ModuleMapTest";
+  }
+
   ScriptModule Resolve(const String& specifier,
                        const ScriptModule& referrer,
                        ExceptionState&) override {
diff --git a/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp b/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
index 5675e938..db9f6b8 100644
--- a/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ModulePendingScript.cpp
@@ -10,7 +10,7 @@
 namespace blink {
 
 ModulePendingScriptTreeClient::ModulePendingScriptTreeClient()
-    : module_script_(nullptr), pending_script_(nullptr) {}
+    : module_script_(this, nullptr), pending_script_(this, nullptr) {}
 
 void ModulePendingScriptTreeClient::SetPendingScript(
     ModulePendingScript* pending_script) {
@@ -24,8 +24,8 @@
 
 void ModulePendingScriptTreeClient::NotifyModuleTreeLoadFinished(
     ModuleScript* module_script) {
-  DCHECK(!(module_script && module_script->State() ==
-                                ModuleInstantiationState::kUninstantiated));
+  DCHECK(!module_script || module_script->IsErrored() ||
+         module_script->State() == ModuleInstantiationState::kInstantiated);
   DCHECK(!finished_);
   finished_ = true;
   module_script_ = module_script;
@@ -40,9 +40,16 @@
   ModuleTreeClient::Trace(visitor);
 }
 
+DEFINE_TRACE_WRAPPERS(ModulePendingScriptTreeClient) {
+  visitor->TraceWrappers(module_script_);
+  visitor->TraceWrappers(pending_script_);
+  ModuleTreeClient::TraceWrappers(visitor);
+}
+
 ModulePendingScript::ModulePendingScript(ScriptElementBase* element,
                                          ModulePendingScriptTreeClient* client)
-    : PendingScript(element, TextPosition()), module_tree_client_(client) {
+    : PendingScript(element, TextPosition()),
+      module_tree_client_(this, client) {
   CHECK(this->GetElement());
   DCHECK(module_tree_client_);
   client->SetPendingScript(this);
@@ -59,6 +66,11 @@
   PendingScript::Trace(visitor);
 }
 
+DEFINE_TRACE_WRAPPERS(ModulePendingScript) {
+  visitor->TraceWrappers(module_tree_client_);
+  PendingScript::TraceWrappers(visitor);
+}
+
 void ModulePendingScript::NotifyModuleTreeLoadFinished() {
   CHECK(!IsReady());
   ready_ = true;
diff --git a/third_party/WebKit/Source/core/dom/ModulePendingScript.h b/third_party/WebKit/Source/core/dom/ModulePendingScript.h
index 62ecccb..f91de6fc 100644
--- a/third_party/WebKit/Source/core/dom/ModulePendingScript.h
+++ b/third_party/WebKit/Source/core/dom/ModulePendingScript.h
@@ -8,6 +8,8 @@
 #include "core/dom/Modulator.h"
 #include "core/dom/ModuleScript.h"
 #include "core/dom/PendingScript.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/TraceWrapperMember.h"
 
 namespace blink {
 
@@ -19,11 +21,7 @@
 // registered as ModuleTreeClient to FetchTree() first, and later
 // ModulePendingScript is supplied to ModulePendingScriptTreeClient via
 // SetPendingScript() and is notified of module tree load finish.
-class ModulePendingScriptTreeClient final
-    : public GarbageCollectedFinalized<ModulePendingScriptTreeClient>,
-      public ModuleTreeClient {
-  USING_GARBAGE_COLLECTED_MIXIN(ModulePendingScriptTreeClient);
-
+class ModulePendingScriptTreeClient final : public ModuleTreeClient {
  public:
   static ModulePendingScriptTreeClient* Create() {
     return new ModulePendingScriptTreeClient();
@@ -35,6 +33,7 @@
   ModuleScript* GetModuleScript() const { return module_script_; }
 
   DECLARE_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
  private:
   ModulePendingScriptTreeClient();
@@ -43,8 +42,8 @@
   void NotifyModuleTreeLoadFinished(ModuleScript*) override;
 
   bool finished_ = false;
-  Member<ModuleScript> module_script_;
-  Member<ModulePendingScript> pending_script_;
+  TraceWrapperMember<ModuleScript> module_script_;
+  TraceWrapperMember<ModulePendingScript> pending_script_;
 };
 
 // PendingScript for a module script
@@ -65,6 +64,7 @@
   }
 
   DECLARE_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
  private:
   ModulePendingScript(ScriptElementBase*, ModulePendingScriptTreeClient*);
@@ -89,7 +89,7 @@
 
   void CheckState() const override {}
 
-  Member<ModulePendingScriptTreeClient> module_tree_client_;
+  TraceWrapperMember<ModulePendingScriptTreeClient> module_tree_client_;
   bool ready_ = false;
 };
 
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.cpp b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
index 828f181d..a0a62684 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.cpp
@@ -151,7 +151,7 @@
     : settings_object_(settings_object),
       record_(this),
       base_url_(base_url),
-      error_(this),
+      preinstantiation_error_(this),
       nonce_(nonce),
       parser_state_(parser_state),
       credentials_mode_(credentials_mode),
@@ -185,31 +185,23 @@
 void ModuleScript::SetErrorAndClearRecord(ScriptValue error) {
   DVLOG(1) << "ModuleScript[" << this << "]::SetErrorAndClearRecord()";
 
-  // https://html.spec.whatwg.org/multipage/webappapis.html#error-a-module-script
-  // Step 1. Assert: script's state is not "errored".
-  DCHECK_NE(state_, ModuleInstantiationState::kErrored);
-
-  // Step 2. If script's module record is set, then:
+  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-set-pre-instantiation-error
+  // Step 1. "If script's module record is not null, ..." [spec text]
   if (!record_.IsEmpty()) {
-    // Step 2.1. Set script module record's [[HostDefined]] field to undefined.
-    // TODO(kouhei): Implement this step.
-    // if (ScriptModuleResolver* resolver =
-    // modulator_->GetScriptModuleResolver())
-    //   resolver->UnregisterModuleScript(this);
-    NOTIMPLEMENTED();
-
-    // Step 2.2. Set script's module record to null.
-    record_.Clear();
+    // "set its [[HostDefined]] field to undefined." [spec text]
+    if (ScriptModuleResolver* resolver =
+            settings_object_->GetScriptModuleResolver())
+      resolver->UnregisterModuleScript(this);
   }
 
-  // Step 3. Set script's state to "errored".
-  state_ = ModuleInstantiationState::kErrored;
+  // Step 2. "Set script's module record to null." [spec text]
+  record_.Clear();
 
-  // Step 4. Set script's error to error.
+  // Step 3. "Set script's pre-instantiation error to error." [spec text]
   DCHECK(!error.IsEmpty());
   {
     ScriptState::Scope scope(error.GetScriptState());
-    error_.Set(error.GetIsolate(), error.V8Value());
+    preinstantiation_error_.Set(error.GetIsolate(), error.V8Value());
   }
 }
 
@@ -230,7 +222,7 @@
   // TODO(mlippautz): Support TraceWrappers(const
   // TraceWrapperV8Reference<v8::Module>&) to remove the cast.
   visitor->TraceWrappers(record_.Cast<v8::Value>());
-  visitor->TraceWrappers(error_);
+  visitor->TraceWrappers(preinstantiation_error_);
 }
 
 bool ModuleScript::IsEmpty() const {
@@ -245,6 +237,7 @@
 }
 
 void ModuleScript::RunScript(LocalFrame* frame, const SecurityOrigin*) const {
+  DVLOG(1) << "ModuleScript[" << this << "]::RunScript()";
   settings_object_->ExecuteModule(this);
 }
 
diff --git a/third_party/WebKit/Source/core/dom/ModuleScript.h b/third_party/WebKit/Source/core/dom/ModuleScript.h
index 3070e50..b45010d5 100644
--- a/third_party/WebKit/Source/core/dom/ModuleScript.h
+++ b/third_party/WebKit/Source/core/dom/ModuleScript.h
@@ -61,7 +61,10 @@
 
   ModuleInstantiationState State() const { return state_; }
 
-  // https://html.spec.whatwg.org/multipage/webappapis.html#error-a-module-script
+  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-is-errored
+  bool IsErrored() const { return record_.IsEmpty(); }
+
+  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-set-pre-instantiation-error
   void SetErrorAndClearRecord(ScriptValue error);
 
   // Implements Step 7.2 of:
@@ -69,7 +72,7 @@
   void SetInstantiationSuccess();
 
   v8::Local<v8::Value> CreateError(v8::Isolate* isolate) const {
-    return error_.NewLocal(isolate);
+    return preinstantiation_error_.NewLocal(isolate);
   }
 
   ParserDisposition ParserState() const { return parser_state_; }
@@ -113,8 +116,10 @@
   friend class ModuleTreeLinkerTestModulator;
   // Access this func only via ModulatorImpl::GetError(),
   // or via Modulator mocks for unit tests.
+  // TODO(kouhei): Needs update after V8 change. The error may also be stored
+  // inside record_.
   v8::Local<v8::Value> CreateErrorInternal(v8::Isolate* isolate) const {
-    return error_.NewLocal(isolate);
+    return preinstantiation_error_.NewLocal(isolate);
   }
 
   // https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
@@ -129,15 +134,19 @@
   // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-instantiation-state
   ModuleInstantiationState state_ = ModuleInstantiationState::kUninstantiated;
 
-  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-error
+  // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-pre-instantiation-error
   //
-  // |error_| is TraceWrappers()ed and kept alive via the path of
-  // v8::Context -> PerContextData -> Modulator/ModulatorImpl
-  // -> ModuleMap -> ModuleMap::Entry -> ModuleScript -> error_.
+  // |record_| and |preinstantiation_error_| are TraceWrappers()ed and kept
+  // alive via the path of
+  // DOMWindow -> Modulator/ModulatorImpl -> ModuleMap -> ModuleMap::Entry
+  // -> ModuleScript, or
+  // Modulator/ModulatorImpl -> ModuleTreeLinkerRegistry -> ModuleTreeLinker
+  // -> ModuleScript, or
+  // ScriptLoader -> PendingScript -> ModulePendingScript ->
+  // ModulePendingScriptTreeClient -> ModuleScript.
   // All the classes/references on the path above should be
   // TraceWrapperBase/TraceWrapperMember<>/etc.,
-  // but other references to those classes can be normal Member<>.
-  TraceWrapperV8Reference<v8::Value> error_;
+  TraceWrapperV8Reference<v8::Value> preinstantiation_error_;
 
   // https://html.spec.whatwg.org/multipage/webappapis.html#concept-module-script-nonce
   const String nonce_;
diff --git a/third_party/WebKit/Source/core/dom/PendingScript.h b/third_party/WebKit/Source/core/dom/PendingScript.h
index b666717..f2c6452 100644
--- a/third_party/WebKit/Source/core/dom/PendingScript.h
+++ b/third_party/WebKit/Source/core/dom/PendingScript.h
@@ -30,6 +30,7 @@
 #include "core/CoreExport.h"
 #include "core/dom/Script.h"
 #include "core/dom/ScriptElementBase.h"
+#include "platform/bindings/ScriptWrappable.h"
 #include "platform/heap/Handle.h"
 #include "platform/weborigin/KURL.h"
 #include "platform/wtf/Noncopyable.h"
@@ -40,7 +41,8 @@
 class Document;
 class PendingScript;
 
-class CORE_EXPORT PendingScriptClient : public GarbageCollectedMixin {
+class CORE_EXPORT PendingScriptClient
+    : public GarbageCollectedFinalized<PendingScriptClient> {
  public:
   virtual ~PendingScriptClient() {}
 
@@ -57,7 +59,8 @@
 // This is used to receive a notification of "script is ready"
 // https://html.spec.whatwg.org/#the-script-is-ready via PendingScriptClient.
 class CORE_EXPORT PendingScript
-    : public GarbageCollectedFinalized<PendingScript> {
+    : public GarbageCollectedFinalized<PendingScript>,
+      public TraceWrapperBase {
   WTF_MAKE_NONCOPYABLE(PendingScript);
 
  public:
diff --git a/third_party/WebKit/Source/core/dom/ScriptElementBase.cpp b/third_party/WebKit/Source/core/dom/ScriptElementBase.cpp
index c74a419..136db70d 100644
--- a/third_party/WebKit/Source/core/dom/ScriptElementBase.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptElementBase.cpp
@@ -17,16 +17,12 @@
   return nullptr;
 }
 
-void ScriptElementBase::InitializeScriptLoader(
+ScriptLoader* ScriptElementBase::InitializeScriptLoader(
     bool parser_inserted,
     bool already_started,
     bool created_during_document_write) {
-  loader_ = ScriptLoader::Create(this, parser_inserted, already_started,
-                                 created_during_document_write);
-}
-
-DEFINE_TRACE(ScriptElementBase) {
-  visitor->Trace(loader_);
+  return ScriptLoader::Create(this, parser_inserted, already_started,
+                              created_during_document_write);
 }
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ScriptElementBase.h b/third_party/WebKit/Source/core/dom/ScriptElementBase.h
index bd1bcd2b..6733970 100644
--- a/third_party/WebKit/Source/core/dom/ScriptElementBase.h
+++ b/third_party/WebKit/Source/core/dom/ScriptElementBase.h
@@ -36,8 +36,6 @@
 
 class CORE_EXPORT ScriptElementBase : public GarbageCollectedMixin {
  public:
-  virtual ~ScriptElementBase() {}
-
   static ScriptElementBase* FromElementIfPossible(Element*);
 
   virtual void DispatchLoadEvent() = 0;
@@ -70,16 +68,12 @@
   virtual void SetScriptElementForBinding(
       HTMLScriptElementOrSVGScriptElement&) = 0;
 
-  ScriptLoader* Loader() const { return loader_.Get(); }
-
-  DECLARE_VIRTUAL_TRACE();
+  virtual ScriptLoader* Loader() const = 0;
 
  protected:
-  void InitializeScriptLoader(bool parser_inserted,
-                              bool already_started,
-                              bool created_during_document_write);
-
-  Member<ScriptLoader> loader_;
+  ScriptLoader* InitializeScriptLoader(bool parser_inserted,
+                                       bool already_started,
+                                       bool created_during_document_write);
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
index 5d7f061..a72185d 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.cpp
@@ -76,7 +76,9 @@
       created_during_document_write_(created_during_document_write),
       async_exec_type_(ScriptRunner::kNone),
       document_write_intervention_(
-          DocumentWriteIntervention::kDocumentWriteInterventionNone) {
+          DocumentWriteIntervention::kDocumentWriteInterventionNone),
+      pending_script_(this, nullptr),
+      module_tree_client_(this, nullptr) {
   // https://html.spec.whatwg.org/#already-started
   // "The cloning steps for script elements must set the "already started"
   //  flag on the copy if it is set on the element being cloned."
@@ -116,6 +118,11 @@
   PendingScriptClient::Trace(visitor);
 }
 
+DEFINE_TRACE_WRAPPERS(ScriptLoader) {
+  visitor->TraceWrappers(pending_script_);
+  visitor->TraceWrappers(module_tree_client_);
+}
+
 void ScriptLoader::SetFetchDocWrittenScriptDeferIdle() {
   DCHECK(!created_during_document_write_);
   document_write_intervention_ =
diff --git a/third_party/WebKit/Source/core/dom/ScriptLoader.h b/third_party/WebKit/Source/core/dom/ScriptLoader.h
index cb441f2..9b9c245 100644
--- a/third_party/WebKit/Source/core/dom/ScriptLoader.h
+++ b/third_party/WebKit/Source/core/dom/ScriptLoader.h
@@ -26,6 +26,8 @@
 #include "core/dom/Script.h"
 #include "core/dom/ScriptRunner.h"
 #include "core/html/CrossOriginAttribute.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/TraceWrapperMember.h"
 #include "platform/loader/fetch/IntegrityMetadata.h"
 #include "platform/loader/fetch/ResourceLoaderOptions.h"
 #include "platform/wtf/text/TextEncoding.h"
@@ -44,10 +46,8 @@
 class Modulator;
 class ModulePendingScriptTreeClient;
 
-class CORE_EXPORT ScriptLoader : public GarbageCollectedFinalized<ScriptLoader>,
-                                 public PendingScriptClient {
-  USING_GARBAGE_COLLECTED_MIXIN(ScriptLoader);
-
+class CORE_EXPORT ScriptLoader : public PendingScriptClient,
+                                 public TraceWrapperBase {
  public:
   static ScriptLoader* Create(ScriptElementBase* element,
                               bool created_by_parser,
@@ -59,6 +59,7 @@
 
   ~ScriptLoader() override;
   DECLARE_VIRTUAL_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
   enum LegacyTypeSupport {
     kDisallowLegacyTypeInTypeAttribute,
@@ -226,8 +227,8 @@
 
   DocumentWriteIntervention document_write_intervention_;
 
-  Member<PendingScript> pending_script_;
-  Member<ModulePendingScriptTreeClient> module_tree_client_;
+  TraceWrapperMember<PendingScript> pending_script_;
+  TraceWrapperMember<ModulePendingScriptTreeClient> module_tree_client_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h b/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h
index 5ac520a..bc8af693 100644
--- a/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h
+++ b/third_party/WebKit/Source/core/dom/ScriptModuleResolver.h
@@ -28,11 +28,14 @@
   virtual ~ScriptModuleResolver() {}
   DEFINE_INLINE_VIRTUAL_TRACE() {}
 
-  // Notify the ScriptModuleResolver that a ModuleScript exists.
+  // Notifies the ScriptModuleResolver that a ModuleScript exists.
   // This hook gives a chance for the resolver impl to populate module record
   // identifier -> ModuleScript mapping entry.
   virtual void RegisterModuleScript(ModuleScript*) = 0;
 
+  // Notifies the ScriptModuleResolver to clear its ModuleScript mapping.
+  virtual void UnregisterModuleScript(ModuleScript*) = 0;
+
   // Implements "Runtime Semantics: HostResolveImportedModule"
   // https://tc39.github.io/ecma262/#sec-hostresolveimportedmodule
   // This returns a null ScriptModule when an exception is thrown.
diff --git a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
index 00e2ecd..412cdea 100644
--- a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
+++ b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.cpp
@@ -16,9 +16,9 @@
   if (module_script->Record().IsNull())
     return;
 
-  DVLOG(1) << "ScriptModuleResolverImpl::registerModuleScript(url=\""
+  DVLOG(1) << "ScriptModuleResolverImpl::RegisterModuleScript(url="
            << module_script->BaseURL().GetString()
-           << "\", hash=" << ScriptModuleHash::GetHash(module_script->Record())
+           << ", hash=" << ScriptModuleHash::GetHash(module_script->Record())
            << ")";
 
   auto result =
@@ -26,6 +26,20 @@
   DCHECK(result.is_new_entry);
 }
 
+void ScriptModuleResolverImpl::UnregisterModuleScript(
+    ModuleScript* module_script) {
+  DCHECK(module_script);
+  if (module_script->Record().IsNull())
+    return;
+
+  DVLOG(1) << "ScriptModuleResolverImpl::UnregisterModuleScript(url="
+           << module_script->BaseURL().GetString()
+           << ", hash=" << ScriptModuleHash::GetHash(module_script->Record())
+           << ")";
+
+  record_to_module_script_map_.erase(module_script->Record());
+}
+
 ScriptModule ScriptModuleResolverImpl::Resolve(
     const String& specifier,
     const ScriptModule& referrer,
@@ -68,7 +82,8 @@
 
   // Step 5. If resolved module script's instantiation state is "errored", then
   // throw resolved module script's instantiation error.
-  if (module_script->State() == ModuleInstantiationState::kErrored) {
+  // TODO(kouhei): Update spec references.
+  if (module_script->IsErrored()) {
     ScriptValue error = modulator_->GetError(module_script);
     exception_state.RethrowV8Exception(error.V8Value());
     return ScriptModule();
diff --git a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h
index 008929f..4b56388 100644
--- a/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h
+++ b/third_party/WebKit/Source/core/dom/ScriptModuleResolverImpl.h
@@ -42,6 +42,8 @@
   // Implements ScriptModuleResolver:
 
   void RegisterModuleScript(ModuleScript*) final;
+  void UnregisterModuleScript(ModuleScript*) final;
+
   // Implements "Runtime Semantics: HostResolveImportedModule" per HTML spec.
   // https://html.spec.whatwg.org/#hostresolveimportedmodule(referencingmodule,-specifier)
   ScriptModule Resolve(const String& specifier,
diff --git a/third_party/WebKit/Source/core/editing/SelectionController.cpp b/third_party/WebKit/Source/core/editing/SelectionController.cpp
index 26338841..60618f6a 100644
--- a/third_party/WebKit/Source/core/editing/SelectionController.cpp
+++ b/third_party/WebKit/Source/core/editing/SelectionController.cpp
@@ -81,10 +81,19 @@
 VisibleSelectionInFlatTree ExpandSelectionToRespectUserSelectAll(
     Node* target_node,
     const VisibleSelectionInFlatTree& selection) {
+  if (selection.IsNone())
+    return selection;
   Node* const root_user_select_all =
       EditingInFlatTreeStrategy::RootUserSelectAllForNode(target_node);
-  if (!root_user_select_all)
-    return selection;
+  if (!root_user_select_all) {
+    SelectionInFlatTree::Builder builder;
+    if (selection.IsBaseFirst())
+      builder.SetBaseAndExtent(selection.Start(), selection.End());
+    else
+      builder.SetBaseAndExtent(selection.End(), selection.Start());
+    builder.SetAffinity(selection.Affinity());
+    return CreateVisibleSelection(builder.Build());
+  }
 
   return CreateVisibleSelection(
       SelectionInFlatTree::Builder(selection.AsSelection())
diff --git a/third_party/WebKit/Source/core/exported/WebFactory.h b/third_party/WebKit/Source/core/exported/WebFactory.h
index 9ec794f..448bfa2 100644
--- a/third_party/WebKit/Source/core/exported/WebFactory.h
+++ b/third_party/WebKit/Source/core/exported/WebFactory.h
@@ -7,10 +7,12 @@
 
 #include "core/CoreExport.h"
 #include "public/platform/WebPageVisibilityState.h"
+#include "public/web/WebSandboxFlags.h"
 
 namespace blink {
 
 class ChromeClient;
+class WebView;
 class WebViewBase;
 class WebLocalFrameBase;
 class WebViewClient;
@@ -30,12 +32,17 @@
   virtual ChromeClient* CreateChromeClient(WebViewBase*) const = 0;
   virtual WebViewBase* CreateWebViewBase(WebViewClient*,
                                          WebPageVisibilityState) const = 0;
+  virtual WebLocalFrameBase* CreateMainWebLocalFrameBase(
+      WebView*,
+      WebFrameClient*,
+      InterfaceProvider*,
+      InterfaceRegistry*) const = 0;
   virtual WebLocalFrameBase* CreateWebLocalFrameBase(
       WebTreeScopeType,
       WebFrameClient*,
-      blink::InterfaceProvider*,
-      blink::InterfaceRegistry*,
-      WebFrame* opener = nullptr) const = 0;
+      InterfaceProvider*,
+      InterfaceRegistry*,
+      WebFrame* opener) const = 0;
 
  protected:
   // Takes ownership of |factory|.
diff --git a/third_party/WebKit/Source/core/exported/WebFrame.cpp b/third_party/WebKit/Source/core/exported/WebFrame.cpp
index 9a4c200..21ac08c 100644
--- a/third_party/WebKit/Source/core/exported/WebFrame.cpp
+++ b/third_party/WebKit/Source/core/exported/WebFrame.cpp
@@ -353,15 +353,6 @@
     Parent()->RemoveChild(this);
 }
 
-void WebFrame::InitializeCoreFrame(WebFrame& frame, Page& page) {
-  if (frame.IsWebLocalFrame())
-    ToWebLocalFrameBase(frame).InitializeCoreFrame(page, 0, g_null_atom);
-  else if (frame.IsWebRemoteFrame())
-    ToWebRemoteFrameBase(frame).InitializeCoreFrame(page, 0, g_null_atom);
-  else
-    NOTREACHED();
-}
-
 Frame* WebFrame::ToCoreFrame(const WebFrame& frame) {
   if (frame.IsWebLocalFrame())
     return ToWebLocalFrameBase(frame).GetFrame();
diff --git a/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp
index 3255631..7fc9192 100644
--- a/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp
@@ -36,16 +36,39 @@
 namespace blink {
 
 WebRemoteFrame* WebRemoteFrame::Create(WebTreeScopeType scope,
-                                       WebRemoteFrameClient* client,
-                                       WebFrame* opener) {
-  return WebRemoteFrameImpl::Create(scope, client, opener);
+                                       WebRemoteFrameClient* client) {
+  return WebRemoteFrameImpl::Create(scope, client);
+}
+
+WebRemoteFrame* WebRemoteFrame::CreateMainFrame(WebView* web_view,
+                                                WebRemoteFrameClient* client,
+                                                WebFrame* opener) {
+  return WebRemoteFrameImpl::CreateMainFrame(web_view, client, opener);
 }
 
 WebRemoteFrameImpl* WebRemoteFrameImpl::Create(WebTreeScopeType scope,
-                                               WebRemoteFrameClient* client,
-                                               WebFrame* opener) {
+                                               WebRemoteFrameClient* client) {
   WebRemoteFrameImpl* frame = new WebRemoteFrameImpl(scope, client);
+  return frame;
+}
+
+WebRemoteFrameImpl* WebRemoteFrameImpl::CreateMainFrame(
+    WebView* web_view,
+    WebRemoteFrameClient* client,
+    WebFrame* opener) {
+  WebRemoteFrameImpl* frame =
+      new WebRemoteFrameImpl(WebTreeScopeType::kDocument, client);
   frame->SetOpener(opener);
+  Page& page = *static_cast<WebViewBase*>(web_view)->GetPage();
+  // It would be nice to DCHECK that the main frame is not set yet here.
+  // Unfortunately, there is an edge case with a pending RenderFrameHost that
+  // violates this: the embedder may create a pending RenderFrameHost for
+  // navigating to a new page in a popup. If the navigation ends up redirecting
+  // to a site that requires a process swap, it doesn't go through the standard
+  // swapping path and instead directly overwrites the main frame.
+  // TODO(dcheng): Remove the need for this and strongly enforce this condition
+  // with a DCHECK.
+  frame->InitializeCoreFrame(page, nullptr, g_null_atom);
   return frame;
 }
 
@@ -185,7 +208,8 @@
     const WebParsedFeaturePolicy& container_policy,
     WebRemoteFrameClient* client,
     WebFrame* opener) {
-  WebRemoteFrameImpl* child = WebRemoteFrameImpl::Create(scope, client, opener);
+  WebRemoteFrameImpl* child = WebRemoteFrameImpl::Create(scope, client);
+  child->SetOpener(opener);
   AppendChild(child);
   RemoteFrameOwner* owner =
       RemoteFrameOwner::Create(static_cast<SandboxFlags>(sandbox_flags),
diff --git a/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h b/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h
index 9551d92..5d84313 100644
--- a/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h
+++ b/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h
@@ -21,13 +21,16 @@
 enum class WebFrameLoadType;
 class WebAssociatedURLLoader;
 struct WebAssociatedURLLoaderOptions;
+class WebView;
 
 class CORE_EXPORT WebRemoteFrameImpl final
     : NON_EXPORTED_BASE(public WebRemoteFrameBase) {
  public:
-  static WebRemoteFrameImpl* Create(WebTreeScopeType,
-                                    WebRemoteFrameClient*,
-                                    WebFrame* opener = nullptr);
+  static WebRemoteFrameImpl* Create(WebTreeScopeType, WebRemoteFrameClient*);
+  static WebRemoteFrameImpl* CreateMainFrame(WebView*,
+                                             WebRemoteFrameClient*,
+                                             WebFrame* opener = nullptr);
+
   ~WebRemoteFrameImpl() override;
 
   // WebFrame methods:
diff --git a/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp b/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp
index bcd9557..ebc1cb5 100644
--- a/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/core/exported/WebSharedWorkerImpl.cpp
@@ -138,10 +138,8 @@
   // FIXME: Settings information should be passed to the Worker process from
   // Browser process when the worker is created (similar to
   // RenderThread::OnCreateNewView).
-  main_frame_ = WebFactory::GetInstance().CreateWebLocalFrameBase(
-      WebTreeScopeType::kDocument, this,
-      Platform::Current()->GetInterfaceProvider(), nullptr);
-  web_view_->SetMainFrame(main_frame_.Get());
+  main_frame_ = WebFactory::GetInstance().CreateMainWebLocalFrameBase(
+      web_view_, this, Platform::Current()->GetInterfaceProvider(), nullptr);
   main_frame_->SetDevToolsAgentClient(this);
 
   // If we were asked to pause worker context on start and wait for debugger
diff --git a/third_party/WebKit/Source/core/exported/WebViewTest.cpp b/third_party/WebKit/Source/core/exported/WebViewTest.cpp
index 57cee998..d5b7d26 100644
--- a/third_party/WebKit/Source/core/exported/WebViewTest.cpp
+++ b/third_party/WebKit/Source/core/exported/WebViewTest.cpp
@@ -463,10 +463,9 @@
   web_view->SetBaseBackgroundColor(kBlue);
   EXPECT_EQ(kBlue, web_view->BackgroundColor());
   FrameTestHelpers::TestWebFrameClient web_frame_client;
-  WebLocalFrame* frame = WebLocalFrame::Create(
-      WebTreeScopeType::kDocument, &web_frame_client, nullptr, nullptr);
+  WebLocalFrame* frame = WebLocalFrame::CreateMainFrame(
+      web_view, &web_frame_client, nullptr, nullptr);
   web_frame_client.Bind(frame);
-  web_view->SetMainFrame(frame);
   web_view->Close();
 }
 
@@ -2541,10 +2540,9 @@
       WebView::Create(nullptr, kWebPageVisibilityStateVisible));
   FrameTestHelpers::TestWebFrameClient web_frame_client;
   FrameTestHelpers::TestWebWidgetClient web_widget_client;
-  WebLocalFrame* local_frame = WebLocalFrame::Create(
-      WebTreeScopeType::kDocument, &web_frame_client, nullptr, nullptr);
+  WebLocalFrame* local_frame = WebLocalFrame::CreateMainFrame(
+      web_view, &web_frame_client, nullptr, nullptr);
   web_frame_client.Bind(local_frame);
-  web_view->SetMainFrame(local_frame);
   blink::WebFrameWidget::Create(&web_widget_client, local_frame);
 
   WebGestureEvent event(WebInputEvent::kGestureTap, WebInputEvent::kNoModifiers,
@@ -3294,7 +3292,8 @@
                       const WebWindowFeatures&,
                       const WebString& name,
                       WebNavigationPolicy,
-                      bool) override {
+                      bool,
+                      WebSandboxFlags) override {
     return web_view_helper_.InitializeWithOpener(opener);
   }
 
diff --git a/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp b/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
index cff1c7fa..4fb9750 100644
--- a/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameTestHelpers.cpp
@@ -255,11 +255,10 @@
     update_settings_func(web_view_->GetSettings());
 
   auto owned_web_frame_client = CreateDefaultClientIfNeeded(web_frame_client);
-  WebLocalFrame* frame = WebLocalFrameBase::Create(
-      WebTreeScopeType::kDocument, web_frame_client,
+  WebLocalFrame* frame = WebLocalFrame::CreateMainFrame(
+      web_view_, web_frame_client,
       web_frame_client->GetInterfaceProviderForTesting(), nullptr, opener);
   web_frame_client->Bind(frame, std::move(owned_web_frame_client));
-  web_view_->SetMainFrame(frame);
 
   // TODO(dcheng): The main frame widget currently has a special case.
   // Eliminate this once WebView is no longer a WebWidget.
@@ -308,11 +307,10 @@
 
   auto owned_web_remote_frame_client =
       CreateDefaultClientIfNeeded(web_remote_frame_client);
-  WebRemoteFrameImpl* frame = WebRemoteFrameImpl::Create(
-      WebTreeScopeType::kDocument, web_remote_frame_client);
+  WebRemoteFrameImpl* frame = WebRemoteFrameImpl::CreateMainFrame(
+      web_view_, web_remote_frame_client, nullptr);
   web_remote_frame_client->Bind(frame,
                                 std::move(owned_web_remote_frame_client));
-  web_view_->SetMainFrame(frame);
   if (!security_origin)
     security_origin = SecurityOrigin::CreateUnique();
   frame->GetFrame()->GetSecurityContext()->SetReplicatedOrigin(
diff --git a/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp b/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
index 48a21ca..083d115 100644
--- a/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLScriptElement.cpp
@@ -44,10 +44,11 @@
                                             bool was_inserted_by_parser,
                                             bool already_started,
                                             bool created_during_document_write)
-    : HTMLElement(scriptTag, document) {
-  InitializeScriptLoader(was_inserted_by_parser, already_started,
-                         created_during_document_write);
-}
+    : HTMLElement(scriptTag, document),
+      loader_(this,
+              InitializeScriptLoader(was_inserted_by_parser,
+                                     already_started,
+                                     created_during_document_write)) {}
 
 HTMLScriptElement* HTMLScriptElement::Create(
     Document& document,
@@ -236,8 +237,14 @@
 }
 
 DEFINE_TRACE(HTMLScriptElement) {
+  visitor->Trace(loader_);
   HTMLElement::Trace(visitor);
   ScriptElementBase::Trace(visitor);
 }
 
+DEFINE_TRACE_WRAPPERS(HTMLScriptElement) {
+  visitor->TraceWrappers(loader_);
+  HTMLElement::TraceWrappers(visitor);
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/html/HTMLScriptElement.h b/third_party/WebKit/Source/core/html/HTMLScriptElement.h
index 29fcb4c4..2a06418 100644
--- a/third_party/WebKit/Source/core/html/HTMLScriptElement.h
+++ b/third_party/WebKit/Source/core/html/HTMLScriptElement.h
@@ -51,12 +51,13 @@
   void setAsync(bool);
   bool async() const;
 
-  ScriptLoader* Loader() const { return loader_.Get(); }
+  ScriptLoader* Loader() const final { return loader_.Get(); }
 
   bool IsScriptElement() const override { return true; }
   Document& GetDocument() const override;
 
   DECLARE_VIRTUAL_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
  private:
   HTMLScriptElement(Document&,
@@ -102,6 +103,8 @@
       HTMLScriptElementOrSVGScriptElement&) override;
 
   Element* CloneElementWithoutAttributesAndChildren() override;
+
+  TraceWrapperMember<ScriptLoader> loader_;
 };
 
 }  // 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 09a30e5..6da466c 100644
--- a/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
+++ b/third_party/WebKit/Source/core/html/parser/HTMLParserScriptRunner.h
@@ -50,11 +50,8 @@
 // executing it when required.
 //
 // An HTMLParserScriptRunner is owned by its host, an HTMLDocumentParser.
-class HTMLParserScriptRunner final
-    : public GarbageCollectedFinalized<HTMLParserScriptRunner>,
-      private PendingScriptClient {
+class HTMLParserScriptRunner final : public PendingScriptClient {
   WTF_MAKE_NONCOPYABLE(HTMLParserScriptRunner);
-  USING_GARBAGE_COLLECTED_MIXIN(HTMLParserScriptRunner);
 
  public:
   static HTMLParserScriptRunner* Create(HTMLParserReentryPermit* reentry_permit,
diff --git a/third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp b/third_party/WebKit/Source/core/layout/ScrollbarsTest.cpp
similarity index 100%
rename from third_party/WebKit/Source/web/tests/ScrollbarsTest.cpp
rename to third_party/WebKit/Source/core/layout/ScrollbarsTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositorWorkerTest.cpp
similarity index 99%
rename from third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp
rename to third_party/WebKit/Source/core/layout/compositing/CompositorWorkerTest.cpp
index 2dd7773..a0dce8a9 100644
--- a/third_party/WebKit/Source/web/tests/CompositorWorkerTest.cpp
+++ b/third_party/WebKit/Source/core/layout/compositing/CompositorWorkerTest.cpp
@@ -108,7 +108,6 @@
 
 INSTANTIATE_TEST_CASE_P(All, CompositorWorkerTest, ::testing::Bool());
 
-
 TEST_P(CompositorWorkerTest, applyingMutationsMultipleElements) {
   RegisterMockedHttpURLLoad("compositor-worker-basic.html");
   NavigateTo(base_url_ + "compositor-worker-basic.html");
diff --git a/third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp b/third_party/WebKit/Source/core/layout/ng/NGInlineLayoutTest.cpp
similarity index 100%
rename from third_party/WebKit/Source/web/tests/NGInlineLayoutTest.cpp
rename to third_party/WebKit/Source/core/layout/ng/NGInlineLayoutTest.cpp
diff --git a/third_party/WebKit/Source/core/loader/EmptyClients.h b/third_party/WebKit/Source/core/loader/EmptyClients.h
index 55b69635..c8d4c14 100644
--- a/third_party/WebKit/Source/core/loader/EmptyClients.h
+++ b/third_party/WebKit/Source/core/loader/EmptyClients.h
@@ -98,7 +98,8 @@
   Page* CreateWindow(LocalFrame*,
                      const FrameLoadRequest&,
                      const WebWindowFeatures&,
-                     NavigationPolicy) override {
+                     NavigationPolicy,
+                     SandboxFlags) override {
     return nullptr;
   }
   void Show(NavigationPolicy) override {}
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp b/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
index ad0859d0..9778609 100644
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleScriptLoaderTest.cpp
@@ -160,8 +160,7 @@
   EXPECT_TRUE(client->WasNotifyFinished())
       << "ModuleScriptLoader should finish synchronously.";
   ASSERT_TRUE(client->GetModuleScript());
-  EXPECT_EQ(client->GetModuleScript()->State(),
-            ModuleInstantiationState::kErrored);
+  EXPECT_TRUE(client->GetModuleScript()->IsErrored());
 }
 
 TEST_F(ModuleScriptLoaderTest, fetchInvalidURL) {
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
index 9ccda6d..f1d65e0 100644
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp
@@ -71,7 +71,9 @@
     : modulator_(modulator),
       registry_(registry),
       client_(client),
-      ancestor_list_with_url_(ancestor_list_with_url) {
+      ancestor_list_with_url_(ancestor_list_with_url),
+      module_script_(this, nullptr),
+      descendants_module_script_(this, nullptr) {
   CHECK(modulator);
   CHECK(registry);
   CHECK(client);
@@ -87,6 +89,11 @@
   SingleModuleClient::Trace(visitor);
 }
 
+DEFINE_TRACE_WRAPPERS(ModuleTreeLinker) {
+  visitor->TraceWrappers(module_script_);
+  visitor->TraceWrappers(descendants_module_script_);
+}
+
 #if DCHECK_IS_ON()
 const char* ModuleTreeLinker::StateToString(ModuleTreeLinker::State state) {
   switch (state) {
@@ -175,8 +182,9 @@
 
   // Step 3. "If result is null, ..."
   // Step 4. "If result's state is "instantiated" or "errored", ..."
+  // TODO(kouhei): Update the spec references.
   if (!result || result->State() == ModuleInstantiationState::kInstantiated ||
-      result->State() == ModuleInstantiationState::kErrored) {
+      result->IsErrored()) {
     // "asynchronously complete this algorithm with result, and abort these
     // steps."
     descendants_module_script_ = result;
@@ -193,12 +201,7 @@
   FetchDescendants();
 }
 
-class ModuleTreeLinker::DependencyModuleClient
-    : public GarbageCollectedFinalized<
-          ModuleTreeLinker::DependencyModuleClient>,
-      public ModuleTreeClient {
-  USING_GARBAGE_COLLECTED_MIXIN(ModuleTreeLinker::DependencyModuleClient);
-
+class ModuleTreeLinker::DependencyModuleClient : public ModuleTreeClient {
  public:
   static DependencyModuleClient* Create(ModuleTreeLinker* module_tree_linker) {
     return new DependencyModuleClient(module_tree_linker);
@@ -240,8 +243,9 @@
   // Step 2. If module script's state is "instantiated" or "errored",
   // asynchronously complete this algorithm with module script, and abort these
   // steps.
+  // TODO(kouhei): Update spec references
   if (module_script_->State() == ModuleInstantiationState::kInstantiated ||
-      module_script_->State() == ModuleInstantiationState::kErrored) {
+      module_script_->IsErrored()) {
     descendants_module_script_ = module_script_;
     AdvanceState(State::kFinished);
     return;
@@ -398,7 +402,8 @@
   // "If any invocation of the internal module script graph fetching procedure
   // asynchronously completes with a module script whose state is "errored",
   // then ..." [spec text]
-  if (module_script->State() == ModuleInstantiationState::kErrored) {
+  // TODO(kouhei): Update spec references.
+  if (module_script->IsErrored()) {
     // "optionally abort all other invocations, ..." [spec text]
     // TODO(kouhei) Implement this.
 
@@ -438,8 +443,7 @@
   // Contrary to the spec, we don't store the "record" in Step 4 for its use in
   // Step 10. If Instantiate() was called on descendant ModuleTreeLinker and
   // failed, module_script_->Record() may be already cleared.
-  if (module_script_->State() == ModuleInstantiationState::kErrored) {
-    DCHECK(module_script_->HasEmptyRecord());
+  if (module_script_->IsErrored()) {
     AdvanceState(State::kFinished);
     return;
   }
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
index be8046c..292628babe 100644
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.h
@@ -8,6 +8,8 @@
 #include "core/CoreExport.h"
 #include "core/dom/AncestorList.h"
 #include "core/dom/Modulator.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/TraceWrapperMember.h"
 
 namespace blink {
 
@@ -19,11 +21,7 @@
 // for "internal module script graph fetching procedure" for a module graph tree
 // node.
 // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure
-class CORE_EXPORT ModuleTreeLinker final
-    : public GarbageCollectedFinalized<ModuleTreeLinker>,
-      public SingleModuleClient {
-  USING_GARBAGE_COLLECTED_MIXIN(ModuleTreeLinker);
-
+class CORE_EXPORT ModuleTreeLinker final : public SingleModuleClient {
  public:
   static ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&,
                                  const AncestorList&,
@@ -39,6 +37,7 @@
 
   virtual ~ModuleTreeLinker() = default;
   DECLARE_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
   bool IsFetching() const {
     return State::kFetchingSelf <= state_ && state_ < State::kFinished;
@@ -86,10 +85,10 @@
   State state_ = State::kInitial;
   // Correspond to _result_ in
   // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure
-  Member<ModuleScript> module_script_;
+  TraceWrapperMember<ModuleScript> module_script_;
   // Correspond to _descendants result_ in
   // https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure
-  Member<ModuleScript> descendants_module_script_;
+  TraceWrapperMember<ModuleScript> descendants_module_script_;
   size_t num_incomplete_descendants_ = 0;
   HeapHashSet<Member<DependencyModuleClient>> dependency_clients_;
 };
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp
index 0a2b6f34..cde4f58 100644
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.cpp
@@ -14,6 +14,11 @@
   visitor->Trace(active_tree_linkers_);
 }
 
+DEFINE_TRACE_WRAPPERS(ModuleTreeLinkerRegistry) {
+  for (const auto& member : active_tree_linkers_)
+    visitor->TraceWrappers(member);
+}
+
 ModuleTreeLinker* ModuleTreeLinkerRegistry::Fetch(
     const ModuleScriptFetchRequest& request,
     const AncestorList& ancestor_list,
@@ -23,7 +28,8 @@
   ModuleTreeLinker* fetcher = ModuleTreeLinker::Fetch(
       request, ancestor_list, level, modulator, this, client);
   DCHECK(fetcher->IsFetching());
-  active_tree_linkers_.insert(fetcher);
+  active_tree_linkers_.insert(
+      TraceWrapperMember<ModuleTreeLinker>(this, fetcher));
   return fetcher;
 }
 
@@ -34,7 +40,8 @@
   ModuleTreeLinker* fetcher = ModuleTreeLinker::FetchDescendantsForInlineScript(
       module_script, modulator, this, client);
   DCHECK(fetcher->IsFetching());
-  active_tree_linkers_.insert(fetcher);
+  active_tree_linkers_.insert(
+      TraceWrapperMember<ModuleTreeLinker>(this, fetcher));
   return fetcher;
 }
 
@@ -42,7 +49,8 @@
     ModuleTreeLinker* fetcher) {
   DCHECK(fetcher->HasFinished());
 
-  auto it = active_tree_linkers_.find(fetcher);
+  auto it = active_tree_linkers_.find(
+      TraceWrapperMember<ModuleTreeLinker>(this, fetcher));
   DCHECK_NE(it, active_tree_linkers_.end());
   active_tree_linkers_.erase(it);
 }
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h
index 0f845fd7..aa4a5cca 100644
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerRegistry.h
@@ -7,6 +7,8 @@
 
 #include "core/CoreExport.h"
 #include "core/dom/AncestorList.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/TraceWrapperMember.h"
 #include "platform/heap/Handle.h"
 
 namespace blink {
@@ -20,12 +22,14 @@
 
 // ModuleTreeLinkerRegistry keeps active ModuleTreeLinkers alive.
 class CORE_EXPORT ModuleTreeLinkerRegistry
-    : public GarbageCollected<ModuleTreeLinkerRegistry> {
+    : public GarbageCollected<ModuleTreeLinkerRegistry>,
+      public TraceWrapperBase {
  public:
   static ModuleTreeLinkerRegistry* Create() {
     return new ModuleTreeLinkerRegistry;
   }
   DECLARE_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
   ModuleTreeLinker* Fetch(const ModuleScriptFetchRequest&,
                           const AncestorList&,
@@ -42,7 +46,7 @@
   friend class ModuleTreeLinker;
   void ReleaseFinishedFetcher(ModuleTreeLinker*);
 
-  HeapHashSet<Member<ModuleTreeLinker>> active_tree_linkers_;
+  HeapHashSet<TraceWrapperMember<ModuleTreeLinker>> active_tree_linkers_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
index 942c9fa..e7755b9 100644
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinkerTest.cpp
@@ -26,15 +26,14 @@
 
 namespace {
 
-class TestModuleTreeClient final
-    : public GarbageCollectedFinalized<TestModuleTreeClient>,
-      public ModuleTreeClient {
-  USING_GARBAGE_COLLECTED_MIXIN(TestModuleTreeClient);
-
+class TestModuleTreeClient final : public ModuleTreeClient {
  public:
   TestModuleTreeClient() = default;
 
-  DEFINE_INLINE_TRACE() { visitor->Trace(module_script_); }
+  DEFINE_INLINE_TRACE() {
+    visitor->Trace(module_script_);
+    ModuleTreeClient::Trace(visitor);
+  }
 
   void NotifyModuleTreeLoadFinished(ModuleScript* module_script) override {
     was_notify_finished_ = true;
@@ -97,7 +96,11 @@
     }
 
     EXPECT_EQ(url, pending_request_url_);
-    EXPECT_EQ(state, module_script->State());
+    if (state == ModuleInstantiationState::kErrored) {
+      EXPECT_TRUE(module_script->IsErrored());
+    } else {
+      EXPECT_EQ(state, module_script->State());
+    }
     EXPECT_TRUE(pending_client_);
     pending_client_->NotifyModuleLoadFinished(module_script);
     pending_client_.Clear();
@@ -295,8 +298,7 @@
 
   EXPECT_TRUE(client->WasNotifyFinished());
   ASSERT_TRUE(client->GetModuleScript());
-  EXPECT_EQ(client->GetModuleScript()->State(),
-            ModuleInstantiationState::kErrored);
+  EXPECT_TRUE(client->GetModuleScript()->IsErrored());
 }
 
 TEST_F(ModuleTreeLinkerTest, FetchTreePreviousInstantiationFailure) {
@@ -320,8 +322,7 @@
       url, {}, ModuleInstantiationState::kErrored);
   EXPECT_TRUE(client->WasNotifyFinished());
   ASSERT_TRUE(client->GetModuleScript());
-  EXPECT_EQ(ModuleInstantiationState::kErrored,
-            client->GetModuleScript()->State());
+  EXPECT_TRUE(client->GetModuleScript()->IsErrored());
 }
 
 TEST_F(ModuleTreeLinkerTest, FetchTreeWithSingleDependency) {
diff --git a/third_party/WebKit/Source/core/page/ChromeClient.h b/third_party/WebKit/Source/core/page/ChromeClient.h
index a9f4583..10a72ce4 100644
--- a/third_party/WebKit/Source/core/page/ChromeClient.h
+++ b/third_party/WebKit/Source/core/page/ChromeClient.h
@@ -28,6 +28,7 @@
 #include "core/CoreExport.h"
 #include "core/dom/AXObjectCache.h"
 #include "core/dom/AnimationWorkletProxyClient.h"
+#include "core/dom/SandboxFlags.h"
 #include "core/html/forms/PopupMenu.h"
 #include "core/inspector/ConsoleTypes.h"
 #include "core/loader/FrameLoader.h"
@@ -132,7 +133,8 @@
   virtual Page* CreateWindow(LocalFrame*,
                              const FrameLoadRequest&,
                              const WebWindowFeatures&,
-                             NavigationPolicy) = 0;
+                             NavigationPolicy,
+                             SandboxFlags) = 0;
   virtual void Show(NavigationPolicy) = 0;
 
   // All the parameters should be in viewport space. That is, if an event
diff --git a/third_party/WebKit/Source/core/page/CreateWindow.cpp b/third_party/WebKit/Source/core/page/CreateWindow.cpp
index 6d027e7..d6f9e19 100644
--- a/third_party/WebKit/Source/core/page/CreateWindow.cpp
+++ b/third_party/WebKit/Source/core/page/CreateWindow.cpp
@@ -292,8 +292,14 @@
       policy, old_page->GetChromeClient().GetCurrentInputEvent(),
       features.tool_bar_visible);
 
-  Page* page = old_page->GetChromeClient().CreateWindow(&opener_frame, request,
-                                                        features, policy);
+  const SandboxFlags sandbox_flags =
+      opener_frame.GetDocument()->IsSandboxed(
+          kSandboxPropagatesToAuxiliaryBrowsingContexts)
+          ? opener_frame.GetSecurityContext()->GetSandboxFlags()
+          : kSandboxNone;
+
+  Page* page = old_page->GetChromeClient().CreateWindow(
+      &opener_frame, request, features, policy, sandbox_flags);
   if (!page)
     return nullptr;
 
@@ -303,9 +309,6 @@
   DCHECK(page->MainFrame());
   LocalFrame& frame = *ToLocalFrame(page->MainFrame());
 
-  if (!EqualIgnoringASCIICase(request.FrameName(), "_blank"))
-    frame.Tree().SetName(request.FrameName());
-
   page->SetWindowFeatures(features);
 
   frame.View()->SetCanHaveScrollbars(features.scrollbars_visible);
@@ -331,11 +334,6 @@
   page->GetChromeClient().SetWindowRectWithAdjustment(window_rect, frame);
   page->GetChromeClient().Show(policy);
 
-  if (opener_frame.GetDocument()->IsSandboxed(
-          kSandboxPropagatesToAuxiliaryBrowsingContexts))
-    frame.Loader().ForceSandboxFlags(
-        opener_frame.GetSecurityContext()->GetSandboxFlags());
-
   // This call may suspend the execution by running nested run loop.
   probe::windowCreated(&opener_frame, &frame);
   created = true;
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.md b/third_party/WebKit/Source/core/style/ComputedStyle.md
new file mode 100644
index 0000000..4f03151
--- /dev/null
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.md
@@ -0,0 +1,35 @@
+# Files:
+Currently the C++ code for ComputedStyle lies in the following sets of files:
+* ComputedStyleBase.{h,cpp} - This is the generated base class for ComputedStyle. All groups and fields are initialized here.
+* ComputedStyle.{h,cpp} - These files add the following things on top of ComputedStyleBase:
+	* Handwritten public accessors that are not straightforward and hence not generated in ComputedStyleBase.
+	* Helper functions - e.g. functions that compare two ComputedStyle to check for equality across a set of fields.
+
+The files that generate the code in ComputedStyleBase.{h,cpp} include:
+* JSON files
+* Python generator files
+* Template files
+
+## JSON files:
+These files are inputs to the generator and tell the generator what shape our fields and functions take. This is a list of all the relevant JSON files (more detailed documentation can be found in the files themselves):
+* [CSSProperties.json5](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/CSSProperties.json5): Contains information for all the CSS properties we support.
+* [ComputedStyleExtraFields.json5](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/ComputedStyleExtraFields.json5): Specifies fields in ComputedStyle that we would like to generate, but are not CSS properties.
+* [ComputedStyleDiffFunctions.json5](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/css/ComputedStyleDiffFunctions.json5): Specifies the fields we want to diff in the various diff functions in ComputedStyle. It is used to generate the various diffing functions on ComputedStyle.
+
+## Generator files:
+These scripts generate the ComputedStyleBase.{h,cpp} files. This is a list of the relevant generator files (more detailed documentation can be found in the files themselves):
+* [make_computed_style_base.py](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/build/scripts/make_computed_style_base.py): Main file that handles the code generation logic. It consumes the JSON inputs provided and outputs fields and groups that encapsulate the structure of ComputedStyle.
+
+## Template files:
+For each generate file, the Python script uses a Jinja template file to format the output:
+* [ComputedStyleBase.h.tmpl](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.h.tmpl): Header file with the field and group declarations.
+* [ComputedStyleBase.cpp.tmpl](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBase.cpp.tmpl): Implementation of various generated helper functions. Notably, contains implementation of functions that use ComputedStyle such as the diffing functions.
+* [ComputedStyleBaseConstants.h.tmpl](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/build/scripts/templates/ComputedStyleBaseConstants.h.tmpl): Definitions of generated enums.
+* [fields/*.tmpl](https://cs.chromium.org/chromium/src/third_party/WebKit/Source/build/scripts/templates/fields/): These files contain various macros that help us generate accessors for the fields depending on their field_template.
+
+# Understanding where to make changes:
+When we want to generate something in ComputedStyle, it’s usually as simple as adding a new entry to the JSON file or modifying a particular value. However, there can be cases where the thing to generate does not fit the current framework and more drastic changes are required. These changes can be done in several different places, but some are more preferable than others (most preferable to least preferable):
+* C++: Can the code to be generated by refactored so that they can be generated easily? Example: renaming some classes to follow a naming pattern.
+* Jinja templates: Allows changes to how the data from the generators are presented. Example: Adding an extra enum value at the end of generated enums to indicate their size.
+* Python: Changes to the generator should try to be generic. Example: supporting mutable fields.
+* JSON: The JSON file is changed when we need to provide more input information to the generator. This is least desirable because it exposes more complexity to contributors who want to perform simple tasks on the JSON.
diff --git a/third_party/WebKit/Source/core/svg/SVGScriptElement.cpp b/third_party/WebKit/Source/core/svg/SVGScriptElement.cpp
index 946c881..da7ed19 100644
--- a/third_party/WebKit/Source/core/svg/SVGScriptElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGScriptElement.cpp
@@ -35,9 +35,12 @@
 inline SVGScriptElement::SVGScriptElement(Document& document,
                                           bool was_inserted_by_parser,
                                           bool already_started)
-    : SVGElement(SVGNames::scriptTag, document), SVGURIReference(this) {
-  InitializeScriptLoader(was_inserted_by_parser, already_started, false);
-}
+    : SVGElement(SVGNames::scriptTag, document),
+      SVGURIReference(this),
+      loader_(this,
+              InitializeScriptLoader(was_inserted_by_parser,
+                                     already_started,
+                                     false)) {}
 
 SVGScriptElement* SVGScriptElement::Create(Document& document,
                                            bool inserted_by_parser) {
@@ -179,9 +182,15 @@
 #endif
 
 DEFINE_TRACE(SVGScriptElement) {
+  visitor->Trace(loader_);
   SVGElement::Trace(visitor);
   SVGURIReference::Trace(visitor);
   ScriptElementBase::Trace(visitor);
 }
 
+DEFINE_TRACE_WRAPPERS(SVGScriptElement) {
+  visitor->TraceWrappers(loader_);
+  SVGElement::TraceWrappers(visitor);
+}
+
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/svg/SVGScriptElement.h b/third_party/WebKit/Source/core/svg/SVGScriptElement.h
index c9e9f1e..5b687390 100644
--- a/third_party/WebKit/Source/core/svg/SVGScriptElement.h
+++ b/third_party/WebKit/Source/core/svg/SVGScriptElement.h
@@ -40,7 +40,7 @@
  public:
   static SVGScriptElement* Create(Document&, bool was_inserted_by_parser);
 
-  ScriptLoader* Loader() const { return loader_.Get(); }
+  ScriptLoader* Loader() const final { return loader_.Get(); }
 
 #if DCHECK_IS_ON()
   bool IsAnimatableAttribute(const QualifiedName&) const override;
@@ -49,6 +49,7 @@
   bool IsScriptElement() const override { return true; }
 
   DECLARE_VIRTUAL_TRACE();
+  DECLARE_TRACE_WRAPPERS();
 
  private:
   SVGScriptElement(Document&,
@@ -98,6 +99,8 @@
 
   Element* CloneElementWithoutAttributesAndChildren() override;
   bool LayoutObjectIsNeeded(const ComputedStyle&) override { return false; }
+
+  TraceWrapperMember<ScriptLoader> loader_;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/core/testing/DummyModulator.cpp b/third_party/WebKit/Source/core/testing/DummyModulator.cpp
index 448d5a8e..79149fa 100644
--- a/third_party/WebKit/Source/core/testing/DummyModulator.cpp
+++ b/third_party/WebKit/Source/core/testing/DummyModulator.cpp
@@ -15,9 +15,10 @@
  public:
   EmptyScriptModuleResolver() {}
 
-  // We ignore RegisterModuleScript() calls caused by
+  // We ignore {Unr,R}egisterModuleScript() calls caused by
   // ModuleScript::CreateForTest().
   void RegisterModuleScript(ModuleScript*) override {}
+  void UnregisterModuleScript(ModuleScript*) override {}
 
   ScriptModule Resolve(const String& specifier,
                        const ScriptModule& referrer,
diff --git a/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.cpp b/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.cpp
index ccf3788..dae48d7 100644
--- a/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.cpp
+++ b/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.cpp
@@ -35,7 +35,8 @@
                                       const WebWindowFeatures&,
                                       const WebString& name,
                                       WebNavigationPolicy,
-                                      bool) {
+                                      bool,
+                                      WebSandboxFlags) {
   return web_view_helper_.InitializeWithOpener(opener);
 }
 
diff --git a/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.h b/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.h
index 39c196e..ea00a07c 100644
--- a/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.h
+++ b/third_party/WebKit/Source/core/testing/sim/SimWebViewClient.h
@@ -34,7 +34,8 @@
                       const WebWindowFeatures&,
                       const WebString& name,
                       WebNavigationPolicy,
-                      bool) override;
+                      bool,
+                      WebSandboxFlags) override;
 
  private:
   // WebWidgetClient overrides.
diff --git a/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.h b/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.h
index eb8c4b8f..2e92963 100644
--- a/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.h
+++ b/third_party/WebKit/Source/core/workers/WorkletModuleTreeClient.h
@@ -15,11 +15,7 @@
 class ModuleScript;
 
 // A ModuleTreeClient that lives on the worklet context's thread.
-class WorkletModuleTreeClient final
-    : public GarbageCollectedFinalized<WorkletModuleTreeClient>,
-      public ModuleTreeClient {
-  USING_GARBAGE_COLLECTED_MIXIN(WorkletModuleTreeClient);
-
+class WorkletModuleTreeClient final : public ModuleTreeClient {
  public:
   WorkletModuleTreeClient(Modulator*,
                           RefPtr<WebTaskRunner> outside_settings_task_runner,
diff --git a/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp b/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp
index 3d3b5cf1..9ef1d70 100644
--- a/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp
+++ b/third_party/WebKit/Source/modules/exported/WebEmbeddedWorkerImpl.cpp
@@ -286,9 +286,8 @@
   settings->SetStrictMixedContentChecking(true);
   settings->SetAllowRunningOfInsecureContent(false);
   settings->SetDataSaverEnabled(worker_start_data_.data_saver_enabled);
-  main_frame_ = WebFactory::GetInstance().CreateWebLocalFrameBase(
-      WebTreeScopeType::kDocument, this, nullptr, nullptr);
-  web_view_->SetMainFrame(main_frame_.Get());
+  main_frame_ = WebFactory::GetInstance().CreateMainWebLocalFrameBase(
+      web_view_, this, nullptr, nullptr);
   main_frame_->SetDevToolsAgentClient(this);
 
   // If we were asked to wait for debugger then it is the good time to do that.
diff --git a/third_party/WebKit/Source/modules/serviceworkers/FetchRespondWithObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/FetchRespondWithObserver.cpp
index 0c708a9..a3be0ea 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/FetchRespondWithObserver.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/FetchRespondWithObserver.cpp
@@ -239,8 +239,9 @@
     }
     // Handle the stream response.
     mojo::DataPipe data_pipe;
-    DCHECK(data_pipe.producer_handle.is_valid());
-    DCHECK(data_pipe.consumer_handle.is_valid());
+    // Temporary CHECKs to debug https://crbug.com/734978.
+    CHECK(data_pipe.producer_handle.is_valid());
+    CHECK(data_pipe.consumer_handle.is_valid());
 
     std::unique_ptr<WebServiceWorkerStreamHandle> body_stream_handle =
         WTF::MakeUnique<WebServiceWorkerStreamHandle>(
diff --git a/third_party/WebKit/Source/platform/exported/WebServiceWorkerStreamHandle.cpp b/third_party/WebKit/Source/platform/exported/WebServiceWorkerStreamHandle.cpp
index d08046c..cef1a3ce 100644
--- a/third_party/WebKit/Source/platform/exported/WebServiceWorkerStreamHandle.cpp
+++ b/third_party/WebKit/Source/platform/exported/WebServiceWorkerStreamHandle.cpp
@@ -24,6 +24,8 @@
 
 mojo::ScopedDataPipeConsumerHandle
 WebServiceWorkerStreamHandle::DrainStreamDataPipe() {
+  // Temporary CHECK to debug https://crbug.com/734978.
+  CHECK(stream_.is_valid());
   return std::move(stream_);
 }
 
diff --git a/third_party/WebKit/Source/web/BUILD.gn b/third_party/WebKit/Source/web/BUILD.gn
index 0c397d6..583b21e 100644
--- a/third_party/WebKit/Source/web/BUILD.gn
+++ b/third_party/WebKit/Source/web/BUILD.gn
@@ -85,7 +85,6 @@
 
     "tests/AccessibilityObjectModelTest.cpp",
     "tests/ChromeClientImplTest.cpp",
-    "tests/CompositorWorkerTest.cpp",
     "tests/DeferredLoadingTest.cpp",
     "tests/DocumentLoadingRenderingTest.cpp",
     "tests/FakeWebPlugin.cpp",
@@ -95,13 +94,11 @@
     "tests/ListenerLeakTest.cpp",
     "tests/LocalFrameClientImplTest.cpp",
     "tests/MHTMLTest.cpp",
-    "tests/NGInlineLayoutTest.cpp",
     "tests/PrerenderingTest.cpp",
     "tests/ProgrammaticScrollTest.cpp",
     "tests/RunAllTests.cpp",
     "tests/ScreenWakeLockTest.cpp",
     "tests/ScrollMetricsTest.cpp",
-    "tests/ScrollbarsTest.cpp",
     "tests/SmoothScrollTest.cpp",
     "tests/SpinLockTest.cpp",
     "tests/TextSelectionRepaintTest.cpp",
@@ -116,7 +113,6 @@
     "tests/WebPluginContainerTest.cpp",
     "tests/WebURLRequestTest.cpp",
     "tests/WebURLResponseTest.cpp",
-    "tests/WindowProxyTest.cpp",
     "tests/scheduler/ActiveConnectionThrottlingTest.cpp",
     "tests/scheduler/FrameThrottlingTest.cpp",
     "tests/scheduler/ThrottlingTest.cpp",
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.cpp b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
index 0e10a61..b9ffc49 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.cpp
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.cpp
@@ -256,7 +256,8 @@
 Page* ChromeClientImpl::CreateWindow(LocalFrame* frame,
                                      const FrameLoadRequest& r,
                                      const WebWindowFeatures& features,
-                                     NavigationPolicy navigation_policy) {
+                                     NavigationPolicy navigation_policy,
+                                     SandboxFlags sandbox_flags) {
   if (!web_view_->Client())
     return nullptr;
 
@@ -265,12 +266,16 @@
   DCHECK(frame->GetDocument());
   Fullscreen::FullyExitFullscreen(*frame->GetDocument());
 
+  const AtomicString& frame_name =
+      !EqualIgnoringASCIICase(r.FrameName(), "_blank") ? r.FrameName()
+                                                       : g_empty_atom;
   WebViewBase* new_view =
       static_cast<WebViewBase*>(web_view_->Client()->CreateView(
           WebLocalFrameImpl::FromFrame(frame),
-          WrappedResourceRequest(r.GetResourceRequest()), features,
-          r.FrameName(), static_cast<WebNavigationPolicy>(navigation_policy),
-          r.GetShouldSetOpener() == kNeverSetOpener));
+          WrappedResourceRequest(r.GetResourceRequest()), features, frame_name,
+          static_cast<WebNavigationPolicy>(navigation_policy),
+          r.GetShouldSetOpener() == kNeverSetOpener,
+          static_cast<WebSandboxFlags>(sandbox_flags)));
   if (!new_view)
     return nullptr;
   return new_view->GetPage();
diff --git a/third_party/WebKit/Source/web/ChromeClientImpl.h b/third_party/WebKit/Source/web/ChromeClientImpl.h
index adad1665..450f1108 100644
--- a/third_party/WebKit/Source/web/ChromeClientImpl.h
+++ b/third_party/WebKit/Source/web/ChromeClientImpl.h
@@ -74,7 +74,8 @@
   Page* CreateWindow(LocalFrame*,
                      const FrameLoadRequest&,
                      const WebWindowFeatures&,
-                     NavigationPolicy) override;
+                     NavigationPolicy,
+                     SandboxFlags) override;
   void Show(NavigationPolicy) override;
   void DidOverscroll(const FloatSize& overscroll_delta,
                      const FloatSize& accumulated_overscroll,
diff --git a/third_party/WebKit/Source/web/WebFactoryImpl.cpp b/third_party/WebKit/Source/web/WebFactoryImpl.cpp
index 66230e3..0a76029 100644
--- a/third_party/WebKit/Source/web/WebFactoryImpl.cpp
+++ b/third_party/WebKit/Source/web/WebFactoryImpl.cpp
@@ -23,11 +23,21 @@
   return WebViewImpl::Create(client, state);
 }
 
+WebLocalFrameBase* WebFactoryImpl::CreateMainWebLocalFrameBase(
+    WebView* web_view,
+    WebFrameClient* client,
+    InterfaceProvider* provider,
+    InterfaceRegistry* registry) const {
+  return WebLocalFrameImpl::CreateMainFrame(web_view, client, provider,
+                                            registry, nullptr, g_empty_atom,
+                                            WebSandboxFlags::kNone);
+}
+
 WebLocalFrameBase* WebFactoryImpl::CreateWebLocalFrameBase(
     WebTreeScopeType type,
     WebFrameClient* client,
-    blink::InterfaceProvider* provider,
-    blink::InterfaceRegistry* registry,
+    InterfaceProvider* provider,
+    InterfaceRegistry* registry,
     WebFrame* opener) const {
   return WebLocalFrameImpl::Create(type, client, provider, registry, opener);
 }
diff --git a/third_party/WebKit/Source/web/WebFactoryImpl.h b/third_party/WebKit/Source/web/WebFactoryImpl.h
index 732a9500..4b1c4b0b 100644
--- a/third_party/WebKit/Source/web/WebFactoryImpl.h
+++ b/third_party/WebKit/Source/web/WebFactoryImpl.h
@@ -20,12 +20,16 @@
   ChromeClient* CreateChromeClient(WebViewBase*) const override;
   WebViewBase* CreateWebViewBase(WebViewClient*,
                                  WebPageVisibilityState) const override;
-  WebLocalFrameBase* CreateWebLocalFrameBase(
-      WebTreeScopeType,
+  WebLocalFrameBase* CreateMainWebLocalFrameBase(
+      WebView*,
       WebFrameClient*,
-      blink::InterfaceProvider*,
-      blink::InterfaceRegistry*,
-      WebFrame* opener = nullptr) const override;
+      InterfaceProvider*,
+      InterfaceRegistry*) const override;
+  WebLocalFrameBase* CreateWebLocalFrameBase(WebTreeScopeType,
+                                             WebFrameClient*,
+                                             InterfaceProvider*,
+                                             InterfaceRegistry*,
+                                             WebFrame* opener) const override;
 };
 
 }  // namespace blink
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index 7f1a221..647b8651 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -1495,20 +1495,23 @@
 
 // WebLocalFrameImpl public --------------------------------------------------
 
-WebLocalFrame* WebLocalFrame::Create(
-    WebTreeScopeType scope,
+WebLocalFrame* WebLocalFrame::CreateMainFrame(
+    WebView* web_view,
     WebFrameClient* client,
-    blink::InterfaceProvider* interface_provider,
-    blink::InterfaceRegistry* interface_registry,
-    WebFrame* opener) {
-  return WebLocalFrameImpl::Create(scope, client, interface_provider,
-                                   interface_registry, opener);
+    InterfaceProvider* interface_provider,
+    InterfaceRegistry* interface_registry,
+    WebFrame* opener,
+    const WebString& name,
+    WebSandboxFlags sandbox_flags) {
+  return WebLocalFrameImpl::CreateMainFrame(
+      web_view, client, interface_provider, interface_registry, opener, name,
+      sandbox_flags);
 }
 
 WebLocalFrame* WebLocalFrame::CreateProvisional(
     WebFrameClient* client,
-    blink::InterfaceProvider* interface_provider,
-    blink::InterfaceRegistry* interface_registry,
+    InterfaceProvider* interface_provider,
+    InterfaceRegistry* interface_registry,
     WebRemoteFrame* old_web_frame,
     WebSandboxFlags flags) {
   return WebLocalFrameImpl::CreateProvisional(
@@ -1527,6 +1530,27 @@
   return frame;
 }
 
+WebLocalFrameImpl* WebLocalFrameImpl::CreateMainFrame(
+    WebView* web_view,
+    WebFrameClient* client,
+    InterfaceProvider* interface_provider,
+    InterfaceRegistry* interface_registry,
+    WebFrame* opener,
+    const WebString& name,
+    WebSandboxFlags sandbox_flags) {
+  WebLocalFrameImpl* frame =
+      new WebLocalFrameImpl(WebTreeScopeType::kDocument, client,
+                            interface_provider, interface_registry);
+  frame->SetOpener(opener);
+  Page& page = *static_cast<WebViewBase*>(web_view)->GetPage();
+  DCHECK(!page.MainFrame());
+  frame->InitializeCoreFrame(page, nullptr, name);
+  // Can't force sandbox flags until there's a core frame.
+  frame->GetFrame()->Loader().ForceSandboxFlags(
+      static_cast<SandboxFlags>(sandbox_flags));
+  return frame;
+}
+
 WebLocalFrameImpl* WebLocalFrameImpl::CreateProvisional(
     WebFrameClient* client,
     blink::InterfaceProvider* interface_provider,
@@ -2370,10 +2394,6 @@
       GetFrame()->Loader().EffectiveSandboxFlags());
 }
 
-void WebLocalFrameImpl::ForceSandboxFlags(WebSandboxFlags flags) {
-  GetFrame()->Loader().ForceSandboxFlags(static_cast<SandboxFlags>(flags));
-}
-
 void WebLocalFrameImpl::ClearActiveFindMatch() {
   EnsureTextFinder().ClearActiveFindMatch();
 }
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.h b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
index 300a78c..3c882e84 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
@@ -288,7 +288,6 @@
                          const WebSourceLocation&) override;
   void SendOrientationChangeEvent() override;
   WebSandboxFlags EffectiveSandboxFlags() const override;
-  void ForceSandboxFlags(WebSandboxFlags) override;
   void DidCallAddSearchProvider() override;
   void DidCallIsSearchProviderInstalled() override;
   void ReplaceSelection(const WebString&) override;
@@ -337,12 +336,19 @@
 
   static WebLocalFrameImpl* Create(WebTreeScopeType,
                                    WebFrameClient*,
-                                   blink::InterfaceProvider*,
-                                   blink::InterfaceRegistry*,
+                                   InterfaceProvider*,
+                                   InterfaceRegistry*,
                                    WebFrame* opener);
+  static WebLocalFrameImpl* CreateMainFrame(WebView*,
+                                            WebFrameClient*,
+                                            InterfaceProvider*,
+                                            InterfaceRegistry*,
+                                            WebFrame* opener,
+                                            const WebString& name,
+                                            WebSandboxFlags);
   static WebLocalFrameImpl* CreateProvisional(WebFrameClient*,
-                                              blink::InterfaceProvider*,
-                                              blink::InterfaceRegistry*,
+                                              InterfaceProvider*,
+                                              InterfaceRegistry*,
                                               WebRemoteFrame*,
                                               WebSandboxFlags);
 
diff --git a/third_party/WebKit/Source/web/WebViewImpl.cpp b/third_party/WebKit/Source/web/WebViewImpl.cpp
index 6cde5a4..f24ac88 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.cpp
+++ b/third_party/WebKit/Source/web/WebViewImpl.cpp
@@ -304,10 +304,6 @@
   PageSuspenderStack().pop_back();
 }
 
-void WebViewImpl::SetMainFrame(WebFrame* frame) {
-  WebFrame::InitializeCoreFrame(*frame, *GetPage());
-}
-
 void WebViewImpl::SetCredentialManagerClient(
     WebCredentialManagerClient* web_credential_manager_client) {
   DCHECK(page_);
diff --git a/third_party/WebKit/Source/web/WebViewImpl.h b/third_party/WebKit/Source/web/WebViewImpl.h
index 10123972..fc0fc718 100644
--- a/third_party/WebKit/Source/web/WebViewImpl.h
+++ b/third_party/WebKit/Source/web/WebViewImpl.h
@@ -154,7 +154,6 @@
 
   // WebView methods:
   virtual bool IsWebView() const { return true; }
-  void SetMainFrame(WebFrame*) override;
   void SetCredentialManagerClient(WebCredentialManagerClient*) override;
   void SetPrerendererClient(WebPrerendererClient*) override;
   WebSettings* GetSettings() override;
diff --git a/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp b/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
index 29062ff3..801ea595 100644
--- a/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp
@@ -71,7 +71,8 @@
                       const WebWindowFeatures&,
                       const WebString& name,
                       WebNavigationPolicy,
-                      bool) override {
+                      bool,
+                      WebSandboxFlags) override {
     return web_view_helper_.InitializeWithOpener(opener);
   }
 
@@ -100,9 +101,9 @@
   LocalFrame* frame = ToWebLocalFrameBase(main_frame_)->GetFrame();
   FrameLoadRequest request(frame->GetDocument());
   WebWindowFeatures features;
-  EXPECT_EQ(nullptr,
-            chrome_client_impl_->CreateWindow(
-                frame, request, features, kNavigationPolicyNewForegroundTab));
+  EXPECT_EQ(nullptr, chrome_client_impl_->CreateWindow(
+                         frame, request, features,
+                         kNavigationPolicyNewForegroundTab, kSandboxNone));
 }
 
 class FakeColorChooserClient
diff --git a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
index c1757a9..764b2b8a 100644
--- a/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebFrameTest.cpp
@@ -7209,7 +7209,8 @@
                       const WebWindowFeatures&,
                       const WebString&,
                       WebNavigationPolicy,
-                      bool) override {
+                      bool,
+                      WebSandboxFlags) override {
     EXPECT_TRUE(false);
     return 0;
   }
diff --git a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h
index e079e44..7b508db 100644
--- a/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h
+++ b/third_party/WebKit/public/platform/modules/serviceworker/WebServiceWorkerStreamHandle.h
@@ -29,7 +29,10 @@
 
 #if INSIDE_BLINK
   WebServiceWorkerStreamHandle(mojo::ScopedDataPipeConsumerHandle stream)
-      : stream_(std::move(stream)) {}
+      : stream_(std::move(stream)) {
+    // Temporary CHECK to debug https://crbug.com/734978.
+    CHECK(stream_.is_valid());
+  }
   void Aborted();
   void Completed();
 #endif
diff --git a/third_party/WebKit/public/web/WebFrame.h b/third_party/WebKit/public/web/WebFrame.h
index 4481109..cd095cb 100644
--- a/third_party/WebKit/public/web/WebFrame.h
+++ b/third_party/WebKit/public/web/WebFrame.h
@@ -46,7 +46,6 @@
 
 class Frame;
 class OpenedFrameTracker;
-class Page;
 class Visitor;
 class WebAssociatedURLLoader;
 struct WebAssociatedURLLoaderOptions;
@@ -246,7 +245,6 @@
 
   bool InShadowTree() const { return scope_ == WebTreeScopeType::kShadow; }
 
-  static void InitializeCoreFrame(WebFrame&, Page&);
   static void TraceFrames(Visitor*, WebFrame*);
 
   // Detaches a frame from its parent frame if it has one.
diff --git a/third_party/WebKit/public/web/WebLocalFrame.h b/third_party/WebKit/public/web/WebLocalFrame.h
index 04cb04f5..75354f0 100644
--- a/third_party/WebKit/public/web/WebLocalFrame.h
+++ b/third_party/WebKit/public/web/WebLocalFrame.h
@@ -17,6 +17,7 @@
 #include "public/platform/WebURLError.h"
 #include "public/platform/WebURLRequest.h"
 #include "public/platform/site_engagement.mojom-shared.h"
+#include "public/web/WebSandboxFlags.h"
 #include "v8/include/v8.h"
 
 namespace base {
@@ -47,7 +48,7 @@
 class WebSpellCheckPanelHostClient;
 class WebTextCheckClient;
 class WebURLLoader;
-enum class WebSandboxFlags;
+class WebView;
 enum class WebTreeScopeType;
 struct WebConsoleMessage;
 struct WebContentSecurityPolicyViolation;
@@ -63,13 +64,20 @@
 // FIXME: Move lots of methods from WebFrame in here.
 class WebLocalFrame : public WebFrame {
  public:
-  // Creates a WebFrame. Delete this WebFrame by calling WebFrame::Close().
+  // Creates a main local frame for the WebView. Can only be invoked when no
+  // main frame exists yet. Call Close() to release the returned frame.
   // WebFrameClient may not be null.
-  BLINK_EXPORT static WebLocalFrame* Create(WebTreeScopeType,
-                                            WebFrameClient*,
-                                            blink::InterfaceProvider*,
-                                            blink::InterfaceRegistry*,
-                                            WebFrame* opener = nullptr);
+  // TODO(dcheng): The argument order should be more consistent with
+  // CreateLocalChild() and CreateRemoteChild() in WebRemoteFrame... but it's so
+  // painful...
+  BLINK_EXPORT static WebLocalFrame* CreateMainFrame(
+      WebView*,
+      WebFrameClient*,
+      blink::InterfaceProvider*,
+      blink::InterfaceRegistry*,
+      WebFrame* opener = nullptr,
+      const WebString& name = WebString(),
+      WebSandboxFlags = WebSandboxFlags::kNone);
 
   // Used to create a provisional local frame. Currently, it's possible for a
   // provisional navigation not to commit (i.e. it might turn into a download),
@@ -84,9 +92,9 @@
   // frame pointer, the parent frame's children list will not contain the
   // provisional frame. Thus, a provisional frame is invisible to the rest of
   // Blink unless the navigation commits and the provisional frame is fully
-  // attached to the frame tree by calling swap().
+  // attached to the frame tree by calling Swap().
   //
-  // Otherwise, if the load should not commit, call detach() to discard the
+  // Otherwise, if the load should not commit, call Detach() to discard the
   // frame.
   BLINK_EXPORT static WebLocalFrame* CreateProvisional(
       WebFrameClient*,
@@ -548,12 +556,6 @@
   // frame.
   virtual WebSandboxFlags EffectiveSandboxFlags() const = 0;
 
-  // Set sandbox flags that will always be forced on this frame.  This is
-  // used to inherit sandbox flags from cross-process opener frames in popups.
-  //
-  // TODO(dcheng): Remove this once we have WebLocalFrame::createMainFrame.
-  virtual void ForceSandboxFlags(WebSandboxFlags) = 0;
-
   // Find-in-page -----------------------------------------------------------
 
   // Specifies the action to be taken at the end of a find-in-page session.
diff --git a/third_party/WebKit/public/web/WebRemoteFrame.h b/third_party/WebKit/public/web/WebRemoteFrame.h
index 9b40f3c..13482bc 100644
--- a/third_party/WebKit/public/web/WebRemoteFrame.h
+++ b/third_party/WebKit/public/web/WebRemoteFrame.h
@@ -21,14 +21,17 @@
 class WebLayer;
 class WebRemoteFrameClient;
 class WebString;
+class WebView;
 
 class WebRemoteFrame : public WebFrame {
  public:
   // Factory methods for creating a WebRemoteFrame. The WebRemoteFrameClient
   // argument must be non-null for all creation methods.
   BLINK_EXPORT static WebRemoteFrame* Create(WebTreeScopeType,
-                                             WebRemoteFrameClient*,
-                                             WebFrame* opener = nullptr);
+                                             WebRemoteFrameClient*);
+
+  BLINK_EXPORT static WebRemoteFrame*
+  CreateMainFrame(WebView*, WebRemoteFrameClient*, WebFrame* opener = nullptr);
 
   // Specialized factory methods to allow the embedder to replicate the frame
   // tree between processes.
diff --git a/third_party/WebKit/public/web/WebView.h b/third_party/WebKit/public/web/WebView.h
index e475073..611321a8 100644
--- a/third_party/WebKit/public/web/WebView.h
+++ b/third_party/WebKit/public/web/WebView.h
@@ -115,19 +115,15 @@
 
   // Initialization ------------------------------------------------------
 
-  // Creates a WebView that is NOT yet initialized. You will need to
-  // call setMainFrame to finish the initialization. It is valid
-  // to pass a null client pointer. The WebPageVisibilityState defines the
-  // initial visibility of the page.
+  // Creates a WebView that is NOT yet initialized. To complete initialization,
+  // call WebLocalFrame::CreateMainFrame() or WebRemoteFrame::CreateMainFrame()
+  // as appropriate. It is legal to modify settings before completing
+  // initialization.
+  //
+  // client may be null, while WebPageVisibilityState defines the initial
+  // visibility of the page.
   BLINK_EXPORT static WebView* Create(WebViewClient*, WebPageVisibilityState);
 
-  // After creating a WebView, you should immediately call this method.
-  // You can optionally modify the settings before calling this method.
-  // This WebFrame will receive events for the main frame and must not
-  // be null.
-  // TODO(mustaq): The non-null param should be a reference.
-  virtual void SetMainFrame(WebFrame*) = 0;
-
   // Initializes the various client interfaces.
   virtual void SetCredentialManagerClient(WebCredentialManagerClient*) = 0;
   virtual void SetPrerendererClient(WebPrerendererClient*) = 0;
diff --git a/third_party/WebKit/public/web/WebViewClient.h b/third_party/WebKit/public/web/WebViewClient.h
index 0ff83fe..c57aa6b 100644
--- a/third_party/WebKit/public/web/WebViewClient.h
+++ b/third_party/WebKit/public/web/WebViewClient.h
@@ -50,6 +50,7 @@
 class WebURLRequest;
 class WebView;
 class WebWidget;
+enum class WebSandboxFlags;
 struct WebDateTimeChooserParams;
 struct WebPoint;
 struct WebRect;
@@ -76,7 +77,8 @@
                               const WebWindowFeatures& features,
                               const WebString& name,
                               WebNavigationPolicy policy,
-                              bool suppress_opener) {
+                              bool suppress_opener,
+                              WebSandboxFlags) {
     return 0;
   }
 
diff --git a/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py b/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py
index 93d7d0d..8f04aa3 100755
--- a/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py
+++ b/tools/android/customtabs_benchmark/scripts/customtabs_benchmark.py
@@ -41,13 +41,15 @@
 _INVALID_VALUE = -1
 
 
-def RunOnce(device, url, warmup, speculation_mode, delay_to_may_launch_url,
-            delay_to_launch_url, cold, chrome_args, reset_chrome_state):
+def RunOnce(device, url, speculated_url, warmup, speculation_mode,
+            delay_to_may_launch_url, delay_to_launch_url, cold, chrome_args,
+            reset_chrome_state):
   """Runs a test on a device once.
 
   Args:
     device: (DeviceUtils) device to run the tests on.
     url: (str) URL to load.
+    speculated_url: (str) Speculated URL.
     warmup: (bool) Whether to call warmup.
     speculation_mode: (str) Speculation Mode.
     delay_to_may_launch_url: (int) Delay to mayLaunchUrl() in ms.
@@ -77,7 +79,9 @@
         action='android.intent.action.MAIN',
         package=_TEST_APP_PACKAGE_NAME,
         activity='org.chromium.customtabs.test.MainActivity',
-        extras={'url': str(url), 'warmup': warmup,
+        extras={'url': str(url),
+                'speculated_url': str(speculated_url),
+                'warmup': warmup,
                 'speculation_mode': str(speculation_mode),
                 'delay_to_may_launch_url': delay_to_may_launch_url,
                 'delay_to_launch_url': delay_to_launch_url,
@@ -167,8 +171,8 @@
               '--force-fieldtrial-params=trial.group:mode/external-prefetching',
               '--enable-features=SpeculativeResourcePrefetching<trial'])
 
-        result = RunOnce(device, config['url'], config['warmup'],
-                         config['speculation_mode'],
+        result = RunOnce(device, config['url'], config['speculated_url'],
+                         config['warmup'], config['speculation_mode'],
                          config['delay_to_may_launch_url'],
                          config['delay_to_launch_url'], config['cold'],
                          chrome_args, reset_chrome_state=True)
@@ -218,6 +222,8 @@
                                  'device, and outputs the navigation timings '
                                  'in a CSV file.')
   parser.add_option('--device', help='Device ID')
+  parser.add_option('--speculated_url',
+                    help='URL to call mayLaunchUrl() with.',)
   parser.add_option('--url', help='URL to navigate to.',
                     default='https://www.android.com')
   parser.add_option('--warmup', help='Call warmup.', default=False,
@@ -289,6 +295,7 @@
 
   config = {
       'url': options.url,
+      'speculated_url': options.speculated_url or options.url,
       'warmup': options.warmup,
       'speculation_mode': options.speculation_mode,
       'delay_to_may_launch_url': options.delay_to_may_launch_url,
diff --git a/tools/android/loading/device_setup.py b/tools/android/loading/device_setup.py
index 06c776d3..cfa19bf0 100644
--- a/tools/android/loading/device_setup.py
+++ b/tools/android/loading/device_setup.py
@@ -28,9 +28,9 @@
 from video_recorder import video_recorder
 
 sys.path.append(os.path.join(_SRC_DIR, 'tools', 'perf'))
-from chrome_telemetry_build import chromium_config
+from core import path_util
+sys.path.append(path_util.GetTelemetryDir())
 
-sys.path.append(chromium_config.GetTelemetryDir())
 from telemetry.internal.image_processing import video
 from telemetry.internal.util import wpr_server
 
diff --git a/tools/android/loading/devtools_monitor.py b/tools/android/loading/devtools_monitor.py
index aa6ba53a..6a5ed10 100644
--- a/tools/android/loading/devtools_monitor.py
+++ b/tools/android/loading/devtools_monitor.py
@@ -15,8 +15,8 @@
 
 file_dir = os.path.dirname(__file__)
 sys.path.append(os.path.join(file_dir, '..', '..', 'perf'))
-from chrome_telemetry_build import chromium_config
-sys.path.append(chromium_config.GetTelemetryDir())
+from core import path_util
+sys.path.append(path_util.GetTelemetryDir())
 
 from telemetry.internal.backends.chrome_inspector import inspector_websocket
 from telemetry.internal.backends.chrome_inspector import websocket
diff --git a/tools/android/loading/sandwich_metrics.py b/tools/android/loading/sandwich_metrics.py
index 7124a990..bceb690 100644
--- a/tools/android/loading/sandwich_metrics.py
+++ b/tools/android/loading/sandwich_metrics.py
@@ -20,9 +20,9 @@
     os.path.dirname(__file__), '..', '..', '..'))
 
 sys.path.append(os.path.join(_SRC_DIR, 'tools', 'perf'))
-from chrome_telemetry_build import chromium_config
+from core import path_util
+sys.path.append(path_util.GetTelemetryDir())
 
-sys.path.append(chromium_config.GetTelemetryDir())
 from telemetry.internal.image_processing import video
 from telemetry.util import image_util
 from telemetry.util import rgba_color
diff --git a/ui/file_manager/file_manager/background/js/file_operation_util.js b/ui/file_manager/file_manager/background/js/file_operation_util.js
index 73bb726..467cf30 100644
--- a/ui/file_manager/file_manager/background/js/file_operation_util.js
+++ b/ui/file_manager/file_manager/background/js/file_operation_util.js
@@ -550,6 +550,12 @@
   this.processedBytes = 0;
 
   /**
+   * Total number of remaining items. Updated periodically.
+   * @type {number}
+   */
+  this.numRemainingItems = this.sourceEntries.length;
+
+  /**
    * Index of the progressing entry in sourceEntries.
    * @private {number}
    */
@@ -612,14 +618,14 @@
 
 /**
  * Get states of the task.
- * TOOD(hirono): Removes this method and sets a task to progress events.
+ * TODO(hirono): Removes this method and sets a task to progress events.
  * @return {Object} Status object.
  */
 fileOperationUtil.Task.prototype.getStatus = function() {
   var processingEntry = this.sourceEntries[this.processingSourceIndex_];
   return {
     operationType: this.operationType,
-    numRemainingItems: this.sourceEntries.length - this.processingSourceIndex_,
+    numRemainingItems: this.numRemainingItems,
     totalBytes: this.totalBytes,
     processedBytes: this.processedBytes,
     processingEntryName: processingEntry ? processingEntry.name : ''
@@ -646,6 +652,36 @@
 };
 
 /**
+ * Obtains the number of remaining items.
+ * @return {number} Number of remaining items.
+ * @private
+ */
+fileOperationUtil.Task.prototype.calcNumRemainingItems_ = function() {
+  var numRemainingItems = 0;
+
+  var resolvedEntryMap;
+  if (this.processingEntries && this.processingEntries.length > 0)
+    resolvedEntryMap = this.processingEntries[this.processingSourceIndex_];
+
+  if (resolvedEntryMap) {
+    for (var key in resolvedEntryMap) {
+      if (resolvedEntryMap.hasOwnProperty(key) &&
+          resolvedEntryMap[key].processedBytes === 0) {
+        numRemainingItems++;
+      }
+    }
+    for (var i = this.processingSourceIndex_ + 1;
+         i < this.processingEntries.length; i++) {
+      numRemainingItems += Object.keys(this.processingEntries[i] || {}).length;
+    }
+  } else {
+    numRemainingItems = this.sourceEntries.length - this.processingSourceIndex_;
+  }
+
+  return numRemainingItems;
+};
+
+/**
  * Task to copy entries.
  *
  * @param {string} taskId A unique ID for identifying this task.
@@ -794,11 +830,24 @@
     if (!processedEntry)
       return;
 
+    var alreadyCompleted =
+        processedEntry.processedBytes === processedEntry.size;
+
     // Accumulates newly processed bytes.
     var size = opt_size !== undefined ? opt_size : processedEntry.size;
     this.processedBytes += size - processedEntry.processedBytes;
     processedEntry.processedBytes = size;
 
+    // updateProgress can be called multiple times for a single file copy, and
+    // it might not be called for a small file.
+    // The following prevents multiple call for a single file to decrement
+    // numRemainingItems multiple times.
+    // For small files, it will be decremented by next calcNumRemainingItems_().
+    if (!alreadyCompleted &&
+        processedEntry.processedBytes === processedEntry.size) {
+      this.numRemainingItems--;
+    }
+
     // Updates progress bar in limited frequency so that intervals between
     // updates have at least 200ms.
     this.updateProgressRateLimiter_.run();
@@ -807,6 +856,8 @@
 
   this.updateProgressRateLimiter_ = new AsyncUtil.RateLimiter(progressCallback);
 
+  this.numRemainingItems = this.calcNumRemainingItems_();
+
   // Number of consecutive errors. Increases while failing and resets to zero
   // when one of them succeeds.
   var errorCount = 0;
@@ -842,6 +893,7 @@
               // Update current source index and processing bytes.
               this.processingSourceIndex_ = index + 1;
               this.processedBytes = this.calcProcessedBytes_();
+              this.numRemainingItems = this.calcNumRemainingItems_();
               errorCount = 0;
               callback();
             }.bind(this),
@@ -851,6 +903,7 @@
               // Update current source index and processing bytes.
               this.processingSourceIndex_ = index + 1;
               this.processedBytes = this.calcProcessedBytes_();
+              this.numRemainingItems = this.calcNumRemainingItems_();
               errorCount++;
               lastError = error;
               if (errorCount <
@@ -1002,6 +1055,7 @@
               // Update current source index.
               this.processingSourceIndex_ = index + 1;
               this.processedBytes = this.calcProcessedBytes_();
+              this.numRemainingItems = this.calcNumRemainingItems_();
               callback();
             }.bind(this),
             errorCallback);