Summary: | [GTK] Add WebKit2 API for isolated worlds | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | cgarcia, commit-queue, gustavo, mrobinson, svillar, whateley | ||||
Priority: | P2 | Keywords: | Gtk | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Bug Depends on: | 119743, 120252, 120268 | ||||||
Bug Blocks: | |||||||
Attachments: |
|
Description
Zan Dobersek
2012-11-27 01:21:09 PST
Created attachment 209352 [details]
Patch
Patch doesn't apply because it depends on patch applied to bug #119743 Comment on attachment 209352 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209352&action=review > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:41 > + DEFINE_STATIC_LOCAL(ScriptWorldMap, map, ()); This can be NeverDestroyed<ScriptWorldMap> map if you include wtf/NeverDestroyed.h (In reply to comment #3) > (From update of attachment 209352 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=209352&action=review Thanks for the review. > > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:41 > > + DEFINE_STATIC_LOCAL(ScriptWorldMap, map, ()); > > This can be NeverDestroyed<ScriptWorldMap> map if you include wtf/NeverDestroyed.h Sure, I didn't know NeverDestroyed. Comment on attachment 209352 [details]
Patch
The API looks sensible to me, +1.
Comment on attachment 209352 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=209352&action=review Looks good to me as well. > Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp:154 > + const char *script; Nit: asterisk location > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:88 > + return scriptWorlds().get(scriptWorld); This returns null if the world isn't in the map? (In reply to comment #6) > (From update of attachment 209352 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=209352&action=review > > Looks good to me as well. Thanks! > > Source/WebKit2/UIProcess/API/gtk/tests/WebExtensionTest.cpp:154 > > + const char *script; > > Nit: asterisk location Ooops > > Source/WebKit2/WebProcess/InjectedBundle/API/gtk/WebKitScriptWorld.cpp:88 > > + return scriptWorlds().get(scriptWorld); > > This returns null if the world isn't in the map? Yes. Committed r154545: <http://trac.webkit.org/changeset/154545> Re-opened since this is blocked by bug 120252 Committed r154603: <http://trac.webkit.org/changeset/154603> |