-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EmberJS Web Extension fails to detect Ember application. #24899
Conversation
EWS run on previous version of this PR (hash 99c3a00) |
EWS run on previous version of this PR (hash ccfee0e) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice tests!
EWS run on current version of this PR (hash 593374d) |
https://webkit.org/b/269816 rdar://problem/123338506 Reviewed by Brian Weinstein. DevTools extensions need to use a custom content world type, that is similar to Main but distinct since it has less APIs. Previously we were just using the ContentScript world type to limit the APIs. This prevented message passing from being delivered properly to the Inspector pages. We also need the pass the Inspector page, tab, and window identifiers to the web process so browser.devtools.inspectedWindow.tabId returns the correct value. * Source/WebKit/Shared/Extensions/WebExtensionContentWorldType.h: (WebKit::toDebugString): * Source/WebKit/Shared/Extensions/WebExtensionContentWorldType.serialization.in: * Source/WebKit/Shared/Extensions/WebExtensionContextParameters.h: * Source/WebKit/Shared/Extensions/WebExtensionContextParameters.serialization.in: * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIPortCocoa.mm: (WebKit::WebExtensionContext::portPostMessage): (WebKit::WebExtensionContext::firePortDisconnectEventIfNeeded): * Source/WebKit/UIProcess/Extensions/Cocoa/API/WebExtensionContextAPIRuntimeCocoa.mm: (WebKit::WebExtensionContext::runtimeSendMessage): * Source/WebKit/UIProcess/Extensions/Cocoa/WebExtensionContextCocoa.mm: (WebKit::WebExtensionContext::inspectorPageIdentifiers const): (WebKit::WebExtensionContext::wakeUpBackgroundContentIfNecessaryToFireEvents): (WebKit::WebExtensionContext::loadInspectorBackgroundPage): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.cpp: (WebKit::WebExtensionContext::parameters const): (WebKit::WebExtensionContext::pageListensForEvent const): (WebKit::WebExtensionContext::processes const): * Source/WebKit/UIProcess/Extensions/WebExtensionContext.h: (WebKit::WebExtensionContext::processes const): (WebKit::WebExtensionContext::sendToProcessesForEvents const): * Source/WebKit/WebProcess/Extensions/API/Cocoa/WebExtensionAPIRuntimeCocoa.mm: (WebKit::WebExtensionContextProxy::dispatchRuntimeMessageEvent): (WebKit::WebExtensionContextProxy::dispatchRuntimeConnectEvent): * Source/WebKit/WebProcess/Extensions/Cocoa/WebExtensionContextProxyCocoa.mm: (WebKit::WebExtensionContextProxy::toDOMWrapperWorld): * Source/WebKit/WebProcess/Extensions/Cocoa/WebExtensionControllerProxyCocoa.mm: (WebKit::WebExtensionControllerProxy::globalObjectIsAvailableForFrame): * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.cpp: (WebKit::WebExtensionContextProxy::tabIdentifier const): (WebKit::WebExtensionContextProxy::addInspectorPage): (WebKit::WebExtensionContextProxy::addInspectorPageIdentifier): * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.h: * Source/WebKit/WebProcess/Extensions/WebExtensionContextProxy.messages.in: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebExtensionAPIDevTools.mm: (TEST(WKWebExtensionAPIDevTools, MessagePassingToBackground)): Added. (TEST(WKWebExtensionAPIDevTools, MessagePassingFromPanelToBackground)): Added. (TEST(WKWebExtensionAPIDevTools, MessagePassingFromPanelToDevToolsBackground)): Added. (TEST(WKWebExtensionAPIDevTools, PortMessagePassingToBackground)): Added. (TEST(WKWebExtensionAPIDevTools, PortMessagePassingFromPanelToBackground)): Added. (TEST(WKWebExtensionAPIDevTools, PortMessagePassingFromPanelToDevToolsBackground)): Added. Canonical link: https://commits.webkit.org/275135@main
593374d
to
7c0a7f0
Compare
Committed 275135@main (7c0a7f0): https://commits.webkit.org/275135@main Reviewed commits have been landed. Closing PR #24899 and removing active labels. |
7c0a7f0
593374d
π macπ wincairoπ§ͺ wpe-wk2π§ͺ ios-wk2π§ͺ api-macπ§ͺ api-wpeπ§ͺ ios-wk2-wptπ§ͺ mac-wk1π§ͺ api-iosπ§ͺ mac-wk2π§ͺ gtk-wk2π tvπ§ͺ mac-AS-debug-wk2π§ͺ api-gtkπ tv-simπ§ͺ mac-wk2-stressπ watchπ watch-sim