<commit_before>diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index a95f10f..cee0dbc 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -832,6 +832,13 @@ v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const {
   return scriptState->context();
 }
 
+v8::Local<v8::Context> WebLocalFrameImpl::worldScriptContext(
+    v8::Isolate* isolate, int worldID, int extensionGroup) const {
+  PassRefPtr<DOMWrapperWorld> world = DOMWrapperWorld::ensureIsolatedWorld(
+      isolate, worldID, extensionGroup);
+  return ScriptState::forWorld(frame(), *world)->context();
+}
+
 bool WebFrame::scriptCanAccess(WebFrame* target) {
   return BindingSecurity::shouldAllowAccessToFrame(
       currentDOMWindow(mainThreadIsolate()), target->toImplBase()->frame(),
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.h b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
index 6898061..7f6e315 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
@@ -145,6 +145,8 @@ class WEB_EXPORT WebLocalFrameImpl final
       int argc,
       v8::Local<v8::Value> argv[]) override;
   v8::Local<v8::Context> mainWorldScriptContext() const override;
+  v8::Local<v8::Context> worldScriptContext(
+      v8::Isolate* isolate, int worldID, int extensionGroup) const override;
   void reload(WebFrameLoadType) override;
   void reloadWithOverrideURL(const WebURL& overrideUrl,
                              WebFrameLoadType) override;
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index e43dcc0..779ed45 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -212,6 +212,12 @@ v8::Local<v8::Context> WebRemoteFrameImpl::mainWorldScriptContext() const {
   return v8::Local<v8::Context>();
 }
 
+v8::Local<v8::Context> WebRemoteFrameImpl::worldScriptContext(
+    v8::Isolate* isolate, int worldID, int extensionGroup) const {
+  NOTREACHED();
+  return v8::Local<v8::Context>();
+}
+
 v8::Local<v8::Context> WebRemoteFrameImpl::deprecatedMainWorldScriptContext()
     const {
   return toV8Context(frame(), DOMWrapperWorld::mainWorld());
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
index d049228..540d607 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
@@ -75,6 +75,8 @@ class WEB_EXPORT WebRemoteFrameImpl final
       int argc,
       v8::Local<v8::Value> argv[]) override;
   v8::Local<v8::Context> mainWorldScriptContext() const override;
+  v8::Local<v8::Context> worldScriptContext(
+      v8::Isolate* isolate, int worldID, int extensionGroup) const override;
   v8::Local<v8::Context> deprecatedMainWorldScriptContext() const override;
   void reload(WebFrameLoadType) override;
   void reloadWithOverrideURL(const WebURL& overrideUrl,
diff --git a/third_party/WebKit/public/web/WebFrame.h b/third_party/WebKit/public/web/WebFrame.h
index 855ed08..a3f1fc9 100644
--- a/third_party/WebKit/public/web/WebFrame.h
+++ b/third_party/WebKit/public/web/WebFrame.h
@@ -42,6 +42,7 @@
 namespace v8 {
 class Context;
 class Function;
+class Isolate;
 class Value;
 template <class T>
 class Local;
@@ -300,6 +301,9 @@ class WebFrame {
   // be calling this API.
   virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0;
 
+  virtual v8::Local<v8::Context> worldScriptContext(
+      v8::Isolate* isolate, int worldID, int extensionGroup) const = 0;
+
   // Returns true if the WebFrame currently executing JavaScript has access
   // to the given WebFrame, or false otherwise.
   BLINK_EXPORT static bool scriptCanAccess(WebFrame*);<commit_msg>extensionGroup is no longer used<commit_after>diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
index a95f10f..b97bef9 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.cpp
@@ -832,6 +832,13 @@ v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const {
   return scriptState->context();
 }
 
+v8::Local<v8::Context> WebLocalFrameImpl::worldScriptContext(
+    v8::Isolate* isolate, int worldID) const {
+  PassRefPtr<DOMWrapperWorld> world = DOMWrapperWorld::ensureIsolatedWorld(
+      isolate, worldID);
+  return ScriptState::forWorld(frame(), *world)->context();
+}
+
 bool WebFrame::scriptCanAccess(WebFrame* target) {
   return BindingSecurity::shouldAllowAccessToFrame(
       currentDOMWindow(mainThreadIsolate()), target->toImplBase()->frame(),
diff --git a/third_party/WebKit/Source/web/WebLocalFrameImpl.h b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
index 6898061..b79db8d 100644
--- a/third_party/WebKit/Source/web/WebLocalFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebLocalFrameImpl.h
@@ -145,6 +145,8 @@ class WEB_EXPORT WebLocalFrameImpl final
       int argc,
       v8::Local<v8::Value> argv[]) override;
   v8::Local<v8::Context> mainWorldScriptContext() const override;
+  v8::Local<v8::Context> worldScriptContext(
+      v8::Isolate* isolate, int worldID) const override;
   void reload(WebFrameLoadType) override;
   void reloadWithOverrideURL(const WebURL& overrideUrl,
                              WebFrameLoadType) override;
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
index e43dcc0..bff3738 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.cpp
@@ -212,6 +212,12 @@ v8::Local<v8::Context> WebRemoteFrameImpl::mainWorldScriptContext() const {
   return v8::Local<v8::Context>();
 }
 
+v8::Local<v8::Context> WebRemoteFrameImpl::worldScriptContext(
+    v8::Isolate* isolate, int worldID) const {
+  NOTREACHED();
+  return v8::Local<v8::Context>();
+}
+
 v8::Local<v8::Context> WebRemoteFrameImpl::deprecatedMainWorldScriptContext()
     const {
   return toV8Context(frame(), DOMWrapperWorld::mainWorld());
diff --git a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
index d049228..de5d606 100644
--- a/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
+++ b/third_party/WebKit/Source/web/WebRemoteFrameImpl.h
@@ -75,6 +75,8 @@ class WEB_EXPORT WebRemoteFrameImpl final
       int argc,
       v8::Local<v8::Value> argv[]) override;
   v8::Local<v8::Context> mainWorldScriptContext() const override;
+  v8::Local<v8::Context> worldScriptContext(
+      v8::Isolate* isolate, int worldID) const override;
   v8::Local<v8::Context> deprecatedMainWorldScriptContext() const override;
   void reload(WebFrameLoadType) override;
   void reloadWithOverrideURL(const WebURL& overrideUrl,
diff --git a/third_party/WebKit/public/web/WebFrame.h b/third_party/WebKit/public/web/WebFrame.h
index 855ed08..5c10312c 100644
--- a/third_party/WebKit/public/web/WebFrame.h
+++ b/third_party/WebKit/public/web/WebFrame.h
@@ -42,6 +42,7 @@
 namespace v8 {
 class Context;
 class Function;
+class Isolate;
 class Value;
 template <class T>
 class Local;
@@ -300,6 +301,9 @@ class WebFrame {
   // be calling this API.
   virtual v8::Local<v8::Context> mainWorldScriptContext() const = 0;
 
+  virtual v8::Local<v8::Context> worldScriptContext(
+      v8::Isolate* isolate, int worldID) const = 0;
+
   // Returns true if the WebFrame currently executing JavaScript has access
   // to the given WebFrame, or false otherwise.
   BLINK_EXPORT static bool scriptCanAccess(WebFrame*);
{'fraction_non_alphanumeric': 0.13510747185261002, 'fraction_numerical': 0.041453428863868984, 'mean_word_length': 5.243610223642173, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '106682', 'n_tokens_mistral': 2785, 'n_tokens_neox': 2588, 'n_words': 460}