      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
+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

   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.

 }
 
+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();
+}
+
