[Webkit-unassigned] [Bug 88473] Web Inspector: Implement ExtensionPanel.show() method
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 8 08:17:25 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=88473
--- Comment #10 from Andrey Kosyakov <caseq at chromium.org> 2012-06-08 08:17:24 PST ---
(From update of attachment 146421)
View in context: https://bugs.webkit.org/attachment.cgi?id=146421&action=review
> Source/WebCore/inspector/front-end/ExtensionAPI.js:312
> + Panels._canShow = true;
> callback.call(null, new Resource(message.resource), message.lineNumber);
> + delete Panels._canShow;
There are two problems with this approach:
- _canShow is accessible to user code, so I would be able to do webInspector.panels.constructor._canShow = true; myPanel.show()
- if user callback throws, _canShow sticks.
Note that most of stuff defined within ExtensionAPI.js is actually within a closure, so just make var userGesture = false; within and use it.
> Source/WebCore/inspector/front-end/ExtensionAPI.js:405
> + if (Panels._canShow) {
That would be more readable as a bail-out, e.g.
if (!Panels._canShow)
return;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list