[webkit-changes] [WebKit/WebKit] 5e8c33: Check both browser and chrome objects in enumerate...

Brian Weinstein noreply at github.com
Thu Mar 7 14:59:42 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 5e8c33f6e1ce4b6f4f7d3fadbdd34ea40b2ce8f5
      https://github.com/WebKit/WebKit/commit/5e8c33f6e1ce4b6f4f7d3fadbdd34ea40b2ce8f5
  Author: Brian Weinstein <bweinstein at apple.com>
  Date:   2024-03-07 (Thu, 07 Mar 2024)

  Changed paths:
    M Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.cpp

  Log Message:
  -----------
  Check both browser and chrome objects in enumerateFramesAndNamespaceObjects
https://bugs.webkit.org/show_bug.cgi?id=270657
rdar://123409359

Reviewed by Timothy Hatcher.

Some extensions use a polyfill to overwrite the browser object with their own proxy. The Blue Canoe extension was doing this,
and it led to WebExtensionContextProxy::enumerateFramesAndNamespaceObjects not being able to find the namespace object for the extension,
since we were only checking the `browser` object.

To fix this, check both `browser` and `chrome`, and use whichever one is valid.

* Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.cpp:
(WebKit::WebExtensionContextProxy::enumerateFramesAndNamespaceObjects):

Canonical link: https://commits.webkit.org/275809@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list